Prevent Mac's Cmd+Q from exiting the game
This operation can be devastating if you were trying to assign a control group using Cmd + 1 but accidentally catch the Q key during gameplay.
This commit is contained in:
committed by
Paul Chote
parent
05c3861426
commit
8c10dc406a
@@ -73,7 +73,10 @@ namespace OpenRA.Platforms.Default
|
||||
switch (e.type)
|
||||
{
|
||||
case SDL.SDL_EventType.SDL_QUIT:
|
||||
Game.Exit();
|
||||
// On macOS, we'd like to restrict Cmd + Q from suddenly exiting the game.
|
||||
if (Platform.CurrentPlatform != PlatformType.OSX || !mods.HasModifier(Modifiers.Meta))
|
||||
Game.Exit();
|
||||
|
||||
break;
|
||||
|
||||
case SDL.SDL_EventType.SDL_WINDOWEVENT:
|
||||
|
||||
Reference in New Issue
Block a user