mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Force game windows fullscreen: off by default (#276)
A game whose resolution differs from the screen's (DiRT 3 at 1280x720) fights --force-windows-fullscreen: every forced resize makes it rebuild its swapchain, and the picture flickers between its own size and the screen's - often from the first menu, before the player can reach the game's resolution setting. It also drove the Xwayland dma-buf leak fixed separately. The switch stays in Settings > Games and the session drawer, now off unless turned on; its hint says when to turn it on (a game coming back small or in a corner after switching apps, e.g. FlatOut) and when to leave it off (flicker). Users who already set it keep their choice. The session script's fallback when the app passes nothing is off as well. Co-authored-by: The412Banner <the412banner@users.noreply.github.com>
This commit is contained in:
1 parent
2ccc8204ad
commit
5ddcde7023
4 files changed
+13
-9
No files matched your search
@@ -152,7 +152,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var showPhantomGate by mutableStateOf(false)
|
||||
private var directAudio by mutableStateOf(false)
|
||||
private var clientDirectAudio by mutableStateOf(false)
|
||||
private var forceFullscreen by mutableStateOf(true)
|
||||
private var forceFullscreen by mutableStateOf(false)
|
||||
private var stretch16x9 by mutableStateOf(false)
|
||||
private var launcherFullscreen by mutableStateOf(true)
|
||||
private var animationsEnabled by mutableStateOf(true)
|
||||
|
||||
@@ -168,9 +168,12 @@ object SessionPrefs {
|
||||
* Steam only: gamescope makes every game window the size of the screen. A game that resizes
|
||||
* its own window when it loses focus (FlatOut) otherwise comes back smaller, drawn in a
|
||||
* corner; a game that sets its own resolution and never looks at its window again (Quake 3)
|
||||
* instead draws small in the bottom-left of the stretched one. On unless turned off.
|
||||
* instead draws small in the bottom-left of the stretched one. A game whose resolution differs
|
||||
* from the screen's (DiRT 3 at 1280x720) fights it: it rebuilds its swapchain on every forced
|
||||
* resize and the picture flickers between its own size and the screen's, often from the first
|
||||
* menu, before the player can reach its resolution setting. Off unless turned on.
|
||||
*/
|
||||
fun forceFullscreen(context: Context): Boolean = prefs(context).getBoolean("forceFullscreen", true)
|
||||
fun forceFullscreen(context: Context): Boolean = prefs(context).getBoolean("forceFullscreen", false)
|
||||
|
||||
fun setForceFullscreen(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("forceFullscreen", on).apply()
|
||||
|
||||
Reference in new issue
Block a user