mirror of
https://github.com/libretro/virtualjaguar-libretro.git
synced 2026-11-10 17:28:58 -10:00
One menu model (app/src/platform/commands.cpp) feeds every native surface: the macOS menu bar and Dock menu (Objective-C++, replacing SDL's default menu after init and leaving SDL's app delegate alone), and an optional tray / menu-bar icon through SDL_tray. A click posts a command event, so nothing runs inside Cocoa's menu-tracking loop. macOS: native menu bar with Cmd shortcuts (the in-window bar is hidden), Dock menu with recent games, NSDocumentController recents, App Nap held while a game runs, document types plus an exported UTI. Windows: dark title bar, AppUserModelID shared with the installer shortcuts, Explorer / Jump List recents, per-monitor-v2 + long-path manifest, optional per-user file associations in the installer. Linux: shared-mime-info types, MimeType= and desktop Actions, app id as WM_CLASS / Wayland app_id (was com.provenance-emu.virtualjaguar), mime XML in the .deb and Flatpak. All: screensaver allowed in the library / while paused and blocked while a game runs (SDL disables it for the whole run by default), fullscreen state follows the OS, Show in Finder / Explorer, launcher-argument filter (-psn_). Tests: platform_unit (model, dispatch, recents, associations, event round trip), platform_assoc_sync (extension lists and the app id agree across C++, Info.plist, installer, .desktop, mime XML), native_menu_dump (macOS: builds and checks the real NSMenu). Refs #833 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>