Beispiel #1
0
 public OpenTKGamePlatform(Game game)
     : base(game)
 {
     this._view      = new OpenTKGameWindow();
     this._view.Game = game;
     this.Window     = (GameWindow)this._view;
     this.soundControllerInstance = OpenALSoundController.Instance;
     WindowsHelperAccessibilityKeys.AllowAccessibilityShortcutKeys(false);
 }
Beispiel #2
0
 protected override void Dispose(bool disposing)
 {
     if (!this.IsDisposed && this._view != null)
     {
         this._view.Dispose();
         this._view = (OpenTKGameWindow)null;
     }
     if (this.soundControllerInstance != null)
     {
         this.soundControllerInstance.Dispose();
     }
     SdlGamePad.Cleanup();
     WindowsHelperAccessibilityKeys.AllowAccessibilityShortcutKeys(true);
     base.Dispose(disposing);
 }
 public static void AllowAccessibilityShortcutKeys(bool bAllowKeys)
 {
     if (!WindowsHelperAccessibilityKeys.StartupAccessibilitySet)
     {
         WindowsHelperAccessibilityKeys.StartupStickyKeys.cbSize = WindowsHelperAccessibilityKeys.SKEYSize;
         WindowsHelperAccessibilityKeys.StartupToggleKeys.cbSize = WindowsHelperAccessibilityKeys.SKEYSize;
         WindowsHelperAccessibilityKeys.StartupFilterKeys.cbSize = WindowsHelperAccessibilityKeys.FKEYSize;
         WindowsHelperAccessibilityKeys.SystemParametersInfo(58U, WindowsHelperAccessibilityKeys.SKEYSize, ref WindowsHelperAccessibilityKeys.StartupStickyKeys, 0U);
         WindowsHelperAccessibilityKeys.SystemParametersInfo(52U, WindowsHelperAccessibilityKeys.SKEYSize, ref WindowsHelperAccessibilityKeys.StartupToggleKeys, 0U);
         WindowsHelperAccessibilityKeys.SystemParametersInfo(50U, WindowsHelperAccessibilityKeys.FKEYSize, ref WindowsHelperAccessibilityKeys.StartupFilterKeys, 0U);
         WindowsHelperAccessibilityKeys.StartupAccessibilitySet = true;
     }
     if (bAllowKeys)
     {
         WindowsHelperAccessibilityKeys.SystemParametersInfo(59U, WindowsHelperAccessibilityKeys.SKEYSize, ref WindowsHelperAccessibilityKeys.StartupStickyKeys, 0U);
         WindowsHelperAccessibilityKeys.SystemParametersInfo(53U, WindowsHelperAccessibilityKeys.SKEYSize, ref WindowsHelperAccessibilityKeys.StartupToggleKeys, 0U);
         WindowsHelperAccessibilityKeys.SystemParametersInfo(51U, WindowsHelperAccessibilityKeys.FKEYSize, ref WindowsHelperAccessibilityKeys.StartupFilterKeys, 0U);
     }
     else
     {
         WindowsHelperAccessibilityKeys.SKEY vparam1 = WindowsHelperAccessibilityKeys.StartupStickyKeys;
         if (((int)vparam1.dwFlags & 1) == 0)
         {
             vparam1.dwFlags &= 4294967291U;
             vparam1.dwFlags &= 4294967287U;
             WindowsHelperAccessibilityKeys.SystemParametersInfo(59U, WindowsHelperAccessibilityKeys.SKEYSize, ref vparam1, 0U);
         }
         WindowsHelperAccessibilityKeys.SKEY vparam2 = WindowsHelperAccessibilityKeys.StartupToggleKeys;
         if (((int)vparam2.dwFlags & 1) == 0)
         {
             vparam2.dwFlags &= 4294967291U;
             vparam2.dwFlags &= 4294967287U;
             WindowsHelperAccessibilityKeys.SystemParametersInfo(53U, WindowsHelperAccessibilityKeys.SKEYSize, ref vparam2, 0U);
         }
         WindowsHelperAccessibilityKeys.FILTERKEY vparam3 = WindowsHelperAccessibilityKeys.StartupFilterKeys;
         if (((int)vparam3.dwFlags & 1) != 0)
         {
             return;
         }
         vparam3.dwFlags &= 4294967291U;
         vparam3.dwFlags &= 4294967287U;
         WindowsHelperAccessibilityKeys.SystemParametersInfo(51U, WindowsHelperAccessibilityKeys.FKEYSize, ref vparam3, 0U);
     }
 }
 private static bool SystemParametersInfo(uint action, uint param, ref WindowsHelperAccessibilityKeys.FILTERKEY vparam, uint init);