mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
The iOS app renders its own SwiftUI UI, so the shared core's ImGui FullscreenUI overlay never appears on screen. Before this change every RetroAchievements event still initialized FullscreenUI and posted the notification through it, adding per-frame render work for an overlay that is invisible on iOS, and the native toast layer never saw the events at all. Add two Host callbacks so a platform can take over notification rendering: bool Host::HasNativeAchievementNotifications() void Host::OnAchievementNotification(key, duration, title, message, badge_path) When HasNativeAchievementNotifications() is true the shared core hands each RA event (unlocks, mastery, leaderboard start/submit/scoreboard, login, connect/disconnect, summary) to OnAchievementNotification and skips ImGuiManager::InitializeFullscreenUI() entirely — in BeginLoadingScreen, ClientLoadGameCallback, DisplayHardcoreDeferredMessage, and SetHardcoreMode — so the invisible overlay and its render loop stay down. The existing ImGui path is unchanged for desktop/Android, which return false from the new callback. Every frontend (eerunner, gsrunner, libretro, sdl, qt, android, test stub, macOS stubs) gets a no-op implementation; iOS provides the real one, posting the notification to its SwiftUI toast layer through ARMSX2_PostRetroAchievementsNotification. The notification now also carries the configured display duration. Also flesh out Achievements::GetCurrentUserStats / GetCurrentGameStats / GetCurrentAchievementList, which were previously unimplemented stubs returning false. The iOS bridge already wired these up to the RetroAchievements panel; they now return the logged-in user's score, the active game's unlock progress, and a bucket-ordered achievement list so the native panel has real data instead of an empty state. Stray RetroAchievements debug fprintf spam in the iOS bridge and overlay defaults is dropped.