From 4203c14b22f9fa82a0202372069e8d5f1f681df0 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Tue, 14 Jan 2014 18:36:19 +0100 Subject: [PATCH] [X11] Removed IJoystickDriver from X11Joystick Legacy IJoystickDriver support is now implemented through a LegacyJoystickDriver instance. --- Source/OpenTK/Platform/X11/X11Input.cs | 60 +--------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/Source/OpenTK/Platform/X11/X11Input.cs b/Source/OpenTK/Platform/X11/X11Input.cs index a8393be..3847745 100644 --- a/Source/OpenTK/Platform/X11/X11Input.cs +++ b/Source/OpenTK/Platform/X11/X11Input.cs @@ -24,8 +24,6 @@ namespace OpenTK.Platform.X11 /// internal sealed class X11Input : IInputDriver { - X11Joystick joystick_driver = new X11Joystick(); - //X11WindowInfo window; KeyboardDevice keyboard = new KeyboardDevice(); MouseDevice mouse = new MouseDevice(); List dummy_keyboard_list = new List(1); @@ -96,57 +94,6 @@ namespace OpenTK.Platform.X11 #endregion - #region private void InternalPoll() -#if false - private void InternalPoll() - { - X11.XEvent e = new XEvent(); - try - { - while (!disposed) - { - Functions.XMaskEvent(window.Display, - EventMask.PointerMotionMask | EventMask.PointerMotionHintMask | - EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | - EventMask.KeyPressMask | EventMask.KeyReleaseMask | - EventMask.StructureNotifyMask, ref e); - - if (disposed) - return; - - switch (e.type) - { - case XEventName.KeyPress: - case XEventName.KeyRelease: - keyboardDriver.ProcessKeyboardEvent(ref e.KeyEvent); - break; - - case XEventName.ButtonPress: - case XEventName.ButtonRelease: - mouseDriver.ProcessButton(ref e.ButtonEvent); - break; - - case XEventName.MotionNotify: - mouseDriver.ProcessMotion(ref e.MotionEvent); - break; - - case XEventName.DestroyNotify: - Functions.XPutBackEvent(window.Display, ref e); - Functions.XAutoRepeatOn(window.Display); - return; - } - } - } - catch (ThreadAbortException expt) - { - Functions.XUnmapWindow(window.Display, window.Handle); - Functions.XDestroyWindow(window.Display, window.Handle); - return; - } - } -#endif - #endregion - #region TranslateKey internal bool TranslateKey(ref XKeyEvent e, out Key key) @@ -242,11 +189,9 @@ namespace OpenTK.Platform.X11 #endregion - #region public IList Joysticks - public IList Joysticks { - get { return joystick_driver.Joysticks; } + get { throw new NotImplementedException(); } } #endregion @@ -258,13 +203,10 @@ namespace OpenTK.Platform.X11 /// public void Poll() { - joystick_driver.Poll(); } #endregion - #endregion - #region --- IDisposable Members --- public void Dispose() -- 2.7.4