Uh oh!
There was an error while loading. Please reload this page.
Fix/ps2 portrait 2 - #704
Merged
Merged
Conversation
The PS2 activity had no screenOrientation in the armsx2 manifest, and applyEmulationOrientation read a "ui.orientation" preference that nothing in the repo ever writes, so it always resolved to SCREEN_ORIENTATION_ UNSPECIFIED and overrode whatever the manifest asked for. PS2 sessions followed the device sensor and could come up or rotate into portrait. Declare sensorLandscape on com.armsx2.Main so the window is landscape from creation, before the first frame, and make applyEmulationOrientation set sensor landscape unconditionally so the runtime no longer undoes it. This matches the Dolphin activity, which already ships sensorLandscape.
Launching a PS2 game while the device was in portrait could take the whole app down instead of rotating into landscape and staying there. com.armsx2.Main declares no taskAffinity, so FLAG_ACTIVITY_NEW_TASK puts it in WinNative's own task rather than a new one. dumpsys confirms it: rootOfTask=false, taskAffinity=10229:com.winnative.cmod, sharing the task with UnifiedActivity. finishAndRemoveTask() therefore removed the library along with the emulator. Finish the activity instead whenever it is not the task root, so the standalone ARMSX2 behaviour is kept but the embedded one can no longer close its host. The activity was also the only one in the app declaring resizeableActivity="false". A non-resizeable activity that requests a fixed orientation is letterboxed into size compat mode, and rotating the task from portrait to landscape at launch is exactly the display change that relaunches it. onDestroy killed the :ps2 process on any destroy that was not a configuration change, so a relaunch killed the process out from under the instance that replaced it. Drop resizeableActivity, match the configChanges set the Dolphin activity already ships, and only kill the process when this instance really is the last one finishing. The overlay latch was process-wide, so a recreated activity came back with no controls at all. Key it on the activity it attached to instead.
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.