@@ -38,16 +38,23 @@ public ShipGameGame()
3838 soundManager = new SoundManager ( ) ;
3939 game = new GameManager ( soundManager ) ;
4040
41+ // Runtime platform detection - works because Core project is shared
4142 // On desktop, use the preferred resolution from GameOptions
42- // On mobile/consoles, these values will be overridden by the device's native resolution
43- #if WINDOWS || WINDOWS_UAP || DESKTOPGL
44- graphics . PreferredBackBufferWidth = GameOptions . ScreenWidth ;
45- graphics . PreferredBackBufferHeight = GameOptions . ScreenHeight ;
46- #else
47- // On mobile platforms, use native resolution
48- graphics . IsFullScreen = true ;
49- graphics . SupportedOrientations = DisplayOrientation . LandscapeLeft | DisplayOrientation . LandscapeRight ;
50- #endif
43+ // On mobile platforms, use native resolution in fullscreen
44+ bool isMobile = OperatingSystem . IsAndroid ( ) || OperatingSystem . IsIOS ( ) ;
45+
46+ if ( isMobile )
47+ {
48+ // Mobile: Use native resolution in fullscreen landscape mode
49+ graphics . IsFullScreen = true ;
50+ graphics . SupportedOrientations = DisplayOrientation . LandscapeLeft | DisplayOrientation . LandscapeRight ;
51+ }
52+ else
53+ {
54+ // Desktop: Use preferred resolution from GameOptions
55+ graphics . PreferredBackBufferWidth = GameOptions . ScreenWidth ;
56+ graphics . PreferredBackBufferHeight = GameOptions . ScreenHeight ;
57+ }
5158
5259 IsFixedTimeStep = renderVsync ;
5360 graphics . SynchronizeWithVerticalRetrace = renderVsync ;
0 commit comments