Implement Menu Notifications in Game Player
Implement the ability for emulators to notify the Game Player that a menu is visible, and that Orbiter should adjust its screen accordingly.
The approach taken is to use inotify to watch files inside /run/Game_Player_state/ and to act upon them, e.g.
/run/Game_Player_state/MENU_VISIBLE would contain a single value, the menu to display.
This approach is taken, because it can be adapted to a variety of emulator engines, without burdening with a socket or fifo implementation that would require a consistent connection. This approach makes notification stateless, and modeless; all the emulator has to do is create the appropriate file when a UI action needs to take place.
e.g. MENU_VISIBLE will contain a single integer specifying which menu to show. This would be specific to each emulator.
Once the file is created, the inotify watch will fire an EVENT_Menu_Onscreen(), with true or false, depending on if the file is created or deleted (created when menu visible, deleted when menu is no longer visible).
This does imply that when the UI needs to change, a deletion needs to occur to keep transaction atomicity.