Skip to content

Fix/ps2 portrait 2 - #704

Merged
maxjivi05 merged 2 commits into
WinNative-Emu:mainfrom
maxjivi05:fix/ps2-portrait-2
Aug 27, 2026
Merged

Fix/ps2 portrait 2#704
maxjivi05 merged 2 commits into
WinNative-Emu:mainfrom
maxjivi05:fix/ps2-portrait-2

Conversation

@maxjivi05

Copy link
Copy Markdown
Contributor

No description provided.

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@maxjivi05
maxjivi05 merged commit bb2813c into WinNative-Emu:mainAug 27, 2026
@maxjivi05
maxjivi05 deleted the fix/ps2-portrait-2 branch August 27, 2026 17:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@maxjivi05