Skip to content

Map phone sleep/wake to DS lid close/open - #1589

Open
DLCSharp wants to merge 1 commit into
rafaelvcaetano:masterfrom
DLCSharp:master
Open

Map phone sleep/wake to DS lid close/open#1589
DLCSharp wants to merge 1 commit into
rafaelvcaetano:masterfrom
DLCSharp:master

Conversation

@DLCSharp

@DLCSharp DLCSharp commented Apr 12, 2026

Copy link
Copy Markdown

Summary

When the phone screen turns off, the DS lid close input is now triggered so the running game can play their sleep sound (if supported) before emulation is paused.
On screen wake, the lid reopens allowing the game to play their wake sound.

On sleep, games have a 3s window to react on sleep before emulation is paused. There can be slight audio crunchiness during this window because of Android's handling : a service is used to keep the app in foreground which helps a lot.

It is not a necessary feature, but it's fun and makes the experience more immersive, especially on dual-screen handhelds like the Ayn Thor.

Tested games

Test devices : Ayn Thor, Samsung Galaxy S23+

Confirmed working with no issues :

  • New Super Mario Bros
  • Scribblenauts
  • Super Scribblenauts
  • Super Mario 64 DS
  • Castlevania: Portrait of Ruin
  • Transformers: War for Cybertron
  • The Legendary Starfy
  • Yoshi's Island DS
  • Mario vs Donkey Kong Mini-Land Mayhem
  • Mario vs Donkey Kong 2 March of the Minis

Full list of known games which play sounds on wake/sleep : https://niwanetwork.org/wiki/Sleep_Mode

Sign up for free to 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