From 6ba6940aad0ac7567f54e3a758f75c8cf0d94a5a Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 18 Mar 2011 16:18:51 +1300 Subject: [PATCH] Support the meta key modifier --- OpenRA.FileFormats/Graphics/IInputHandler.cs | 1 + OpenRA.Renderer.Cg/GraphicsDevice.cs | 1 + OpenRA.Renderer.Gl/GraphicsDevice.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/OpenRA.FileFormats/Graphics/IInputHandler.cs b/OpenRA.FileFormats/Graphics/IInputHandler.cs index b1f74459ec..e816fd5937 100755 --- a/OpenRA.FileFormats/Graphics/IInputHandler.cs +++ b/OpenRA.FileFormats/Graphics/IInputHandler.cs @@ -57,6 +57,7 @@ namespace OpenRA Shift = 1, Alt = 2, Ctrl = 4, + Meta = 8, } public enum KeyInputEvent { Down, Up }; diff --git a/OpenRA.Renderer.Cg/GraphicsDevice.cs b/OpenRA.Renderer.Cg/GraphicsDevice.cs index 5dbf1e08cd..d13b3f089d 100755 --- a/OpenRA.Renderer.Cg/GraphicsDevice.cs +++ b/OpenRA.Renderer.Cg/GraphicsDevice.cs @@ -154,6 +154,7 @@ namespace OpenRA.Renderer.Cg { return ( ( raw & Sdl.KMOD_ALT ) != 0 ? Modifiers.Alt : 0 ) | ( ( raw & Sdl.KMOD_CTRL ) != 0 ? Modifiers.Ctrl : 0 ) + | ( ( raw & Sdl.KMOD_META ) != 0 ? Modifiers.Meta : 0 ) | ( ( raw & Sdl.KMOD_SHIFT ) != 0 ? Modifiers.Shift : 0 ); } diff --git a/OpenRA.Renderer.Gl/GraphicsDevice.cs b/OpenRA.Renderer.Gl/GraphicsDevice.cs index 73f8cd94c6..c97f173d73 100755 --- a/OpenRA.Renderer.Gl/GraphicsDevice.cs +++ b/OpenRA.Renderer.Gl/GraphicsDevice.cs @@ -149,6 +149,7 @@ namespace OpenRA.Renderer.Glsl { return ( ( raw & Sdl.KMOD_ALT ) != 0 ? Modifiers.Alt : 0 ) | ( ( raw & Sdl.KMOD_CTRL ) != 0 ? Modifiers.Ctrl : 0 ) + | ( ( raw & Sdl.KMOD_META ) != 0 ? Modifiers.Meta : 0 ) | ( ( raw & Sdl.KMOD_SHIFT ) != 0 ? Modifiers.Shift : 0 ); }