File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,13 @@ static FNAPlatform()
9292 "1"
9393 ) ;
9494 }
95+ if ( args . TryGetValue ( "disableglobalmouse" , out arg ) && arg == "1" )
96+ {
97+ Environment . SetEnvironmentVariable (
98+ "FNA_MOUSE_DISABLE_GLOBAL_ACCESS" ,
99+ "1"
100+ ) ;
101+ }
95102 if ( args . TryGetValue ( "nukesteaminput" , out arg ) && arg == "1" )
96103 {
97104 Environment . SetEnvironmentVariable (
Original file line number Diff line number Diff line change @@ -237,6 +237,11 @@ public static string ProgramInit(LaunchParameters args)
237237 SupportsGlobalMouse = ( OSVersion . Equals ( "Windows" ) ||
238238 OSVersion . Equals ( "Mac OS X" ) ||
239239 videoDriver . Equals ( "x11" ) ) ;
240+ if ( Environment . GetEnvironmentVariable ( "FNA_MOUSE_DISABLE_GLOBAL_ACCESS" ) == "1" )
241+ {
242+ // Ignore previous instructions
243+ SupportsGlobalMouse = false ;
244+ }
240245
241246 // Only iOS and Android care about device orientation.
242247 SupportsOrientations = ( OSVersion . Equals ( "iOS" ) ||
Original file line number Diff line number Diff line change @@ -207,6 +207,11 @@ public static string ProgramInit(LaunchParameters args)
207207 SupportsGlobalMouse = ( OSVersion . Equals ( "Windows" ) ||
208208 OSVersion . Equals ( "macOS" ) ||
209209 videoDriver . Equals ( "x11" ) ) ;
210+ if ( Environment . GetEnvironmentVariable ( "FNA_MOUSE_DISABLE_GLOBAL_ACCESS" ) == "1" )
211+ {
212+ // Ignore previous instructions
213+ SupportsGlobalMouse = false ;
214+ }
210215
211216 /* SDL3 added a helper to try and override constant warping
212217 * with emulation via relative mouse mode; this is nice
You can’t perform that action at this time.
0 commit comments