You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: container_config launch-intent override is acknowledged but ignored (screenSize, showFPS, …): XServerScreen reloads the container from disk
#2242
Launching a game through the app.gamenative.LAUNCH_GAME intent with a container_config extra logs Applied temporary config override … (in-memory only), but the override never reaches the running game:
the X server is created with the container's saved settings. Tested with screenSize and showFPS.
The override is applied with saveToDisk = false to a Container instance obtained from a fresh ContainerManager
(IntentLaunchManager.applyTemporaryConfigOverride, IntentLaunchManager.kt:109-131; and in preLaunchApp, PluviaMain.kt:2349-2353 → ContainerUtils.getOrCreateContainerWithOverride, ContainerUtils.kt:1181-1201).
XServerScreen then loads the container again with ContainerUtils.getContainer(context, appId)
(XServerScreen.kt:539-541), which builds a new ContainerManager and reads the container from disk
(ContainerUtils.kt:707-714). The in-memory override is therefore lost, and XServerState.screenSize comes from
the saved config (XServerScreen.kt:587-596).
Possible fix
In XServerScreen, use the effective config when a temporary override exists, for example by loading the container with getOrCreateContainerWithOverride(context, appId) when IntentLaunchManager.hasTemporaryOverride(appId), or by applying IntentLaunchManager.getEffectiveContainerConfig(context, appId) to the loaded container (still without saving to disk).
Related
In parseContainerConfig, a JSON without screenSize defaults to PluviaApp.getDefaultScreenSize(). Since mergeConfigurations keeps override.screenSize whenever it differs from the base, an override that does not mention screenSize would replace the container's screen size with the device default once the main issue is fixed. Comparing
with the parsing default (as done for the other fields) would avoid that.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
Launching a game through the
app.gamenative.LAUNCH_GAMEintent with acontainer_configextra logsApplied temporary config override … (in-memory only), but the override never reaches the running game:the X server is created with the container's saved settings. Tested with
screenSizeandshowFPS.Environment
Steps to reproduce
adb shell am start -a app.gamenative.LAUNCH_GAME -n app.gamenative/app.gamenative.MainActivity \ --ei app_id 1244090 --es game_source STEAM \ --es container_config '{"showFPS":true,"screenSize":"1920x1080"}' -f 0x14000000Expected
The game starts with a 1920x1080 X server and the FPS counter shown, the saved container config is left untouched
(temporary override).
Actual
The game starts with the saved settings: 1280x720 (the in-game video menu also reports 1280 x 720) and no FPS counter.
Cause (as far as I can tell, at 5a1d22b)
saveToDisk = falseto aContainerinstance obtained from a freshContainerManager(
IntentLaunchManager.applyTemporaryConfigOverride,IntentLaunchManager.kt:109-131; and inpreLaunchApp,PluviaMain.kt:2349-2353→ContainerUtils.getOrCreateContainerWithOverride,ContainerUtils.kt:1181-1201).XServerScreenthen loads the container again withContainerUtils.getContainer(context, appId)(
XServerScreen.kt:539-541), which builds a newContainerManagerand reads the container from disk(
ContainerUtils.kt:707-714). The in-memory override is therefore lost, andXServerState.screenSizecomes fromthe saved config (
XServerScreen.kt:587-596).Possible fix
In
XServerScreen, use the effective config when a temporary override exists, for example by loading the container withgetOrCreateContainerWithOverride(context, appId)whenIntentLaunchManager.hasTemporaryOverride(appId), or by applyingIntentLaunchManager.getEffectiveContainerConfig(context, appId)to the loaded container (still without saving to disk).Related
In
parseContainerConfig, a JSON withoutscreenSizedefaults toPluviaApp.getDefaultScreenSize(). SincemergeConfigurationskeepsoverride.screenSizewhenever it differs from the base, an override that does not mentionscreenSizewould replace the container's screen size with the device default once the main issue is fixed. Comparingwith the parsing default (as done for the other fields) would avoid that.
All reactions