Opening a foldable like a handheld
We split the unfolded display into a game area above and controls below. The Nintendo DS touch screen sits between the buttons, and unfolded control positions are saved separately.
An unfolded display has very different proportions from a regular phone. N-EMU previously chose its layout only by whether the window was wider or taller. Neither layout suited a nearly square inner display, so we added a separate unfolded layout.
The Nintendo DS inspired the layout: game picture above, controls below. We split the display vertically regardless of the hinge direction, and move the boundary to the fold when the device is half open.
The buttons on the lower half follow the real handheld. L and R sit just below the fold, the D-pad and buttons at mid height, Select and Start at the bottom. For the Nintendo DS the top screen fills the upper half and a 4:3 touch screen sits in the middle of the lower one. Unfolded sideways, the lower half is shorter, so the touch screen shrinks to fit the band — but never below the size it would have had stacked with the other screen above.
Unfolded control positions are saved separately from regular portrait and landscape positions. We added an unfolded section to the existing storage format so older versions can still read portrait and landscape layouts. Older versions cannot read the unfolded layout, and saving again in one of those versions may discard the stored control layout.
The operating system supplies the fold position and state: Jetpack WindowManager on Android, and iOS fold information in builds using the iOS 27.1 SDK. When that information is unavailable on iOS, window size classes identify the unfolded state. Automated tests checked the layout calculations, and screens were checked in the iOS simulator and Android emulator. Android used simulated fold information; physical-device verification is still pending.
Folding or unfolding does not stop the game. Any button being held is released, because at the moment the screen changes there is no telling what is under the finger.
Related development stories
- Development storiesv1.1.1Closed beta testing
Why the Nintendo DS screens grew on a book-shaped foldable
Holding a foldable like a book made the Nintendo DS touch screen small in the old layout. We moved both screens to the center and the controls to the sides to make more room for touch.
- Development storiesv1.0.8Closed beta testing
Why connecting a controller now gives the game more room
The game kept its old size even after touch buttons disappeared. We made it use that space and adjusted Nintendo DS screen arrangements to match the controls in use.
- Development storiesv0.2.0Early development
Bringing several systems into one app
Several emulator cores are connected so you can choose games and manage saves from the same library across systems.