From 6fc2e11ad48deadbae3eebba0e55e09b1cf11d91 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 4 Aug 2013 21:50:42 +1200 Subject: [PATCH] Restore Alt-f4 quit shortcut for Windows users. --- OpenRA.Renderer.SdlCommon/SdlInput.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenRA.Renderer.SdlCommon/SdlInput.cs b/OpenRA.Renderer.SdlCommon/SdlInput.cs index bd2440028a..05a417bba6 100644 --- a/OpenRA.Renderer.SdlCommon/SdlInput.cs +++ b/OpenRA.Renderer.SdlCommon/SdlInput.cs @@ -115,7 +115,14 @@ namespace OpenRA.Renderer.SdlCommon MultiTapCount = MultiTapDetection.DetectFromKeyboard(keyName) }; - inputHandler.OnKeyInput(keyEvent); + // Special case workaround for windows users + if (e.key.keysym.sym == Sdl.SDLK_F4 && mods.HasModifier(Modifiers.Alt) && + Platform.CurrentPlatform == PlatformType.Windows) + { + OpenRA.Game.Exit(); + } + else + inputHandler.OnKeyInput(keyEvent); break; }