mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 06:05:29 +00:00
Reverted to 0.3.12 way of handling input events.
This commit is contained in:
parent
c13f33d6bd
commit
57a1277aa9
|
@ -49,7 +49,7 @@ namespace OpenTK
|
||||||
/// parameters that
|
/// parameters that
|
||||||
/// specify the logic update rate, and the render update rate.
|
/// specify the logic update rate, and the render update rate.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class GameWindow : INativeGLWindow
|
public class GameWindow : IDisposable/* : IGameWindow*/
|
||||||
{
|
{
|
||||||
#region --- Fields ---
|
#region --- Fields ---
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ namespace OpenTK
|
||||||
int width, height;
|
int width, height;
|
||||||
VSyncMode vsync;
|
VSyncMode vsync;
|
||||||
|
|
||||||
InputDriver input_driver;
|
//InputDriver input_driver;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -119,7 +119,8 @@ namespace OpenTK
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new PlatformNotSupportedException("Your platform is not supported currently. Please, refer to http://opentk.sourceforge.net for more information.");
|
throw new PlatformNotSupportedException(
|
||||||
|
"Your platform is not supported currently. Please, refer to http://opentk.sourceforge.net for more information.");
|
||||||
}
|
}
|
||||||
|
|
||||||
glWindow.Destroy += new DestroyEvent(glWindow_Destroy);
|
glWindow.Destroy += new DestroyEvent(glWindow_Destroy);
|
||||||
|
@ -408,7 +409,7 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
glWindow.CreateWindow(mode);
|
glWindow.CreateWindow(mode);
|
||||||
this.Title = title;
|
this.Title = title;
|
||||||
input_driver = new InputDriver(this);
|
//input_driver = new InputDriver(this);
|
||||||
}
|
}
|
||||||
catch (ApplicationException expt)
|
catch (ApplicationException expt)
|
||||||
{
|
{
|
||||||
|
@ -812,8 +813,13 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (input_driver.Keyboard.Count > 0)
|
//if (input_driver.Keyboard.Count > 0)
|
||||||
return input_driver.Keyboard[0];
|
// return input_driver.Keyboard[0];
|
||||||
|
//else
|
||||||
|
// return null;
|
||||||
|
|
||||||
|
if (glWindow.InputDriver.Keyboard.Count > 0)
|
||||||
|
return glWindow.InputDriver.Keyboard[0];
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -830,8 +836,13 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (input_driver.Mouse.Count > 0)
|
//if (input_driver.Mouse.Count > 0)
|
||||||
return input_driver.Mouse[0];
|
// return input_driver.Mouse[0];
|
||||||
|
//else
|
||||||
|
// return null;
|
||||||
|
|
||||||
|
if (glWindow.InputDriver.Mouse.Count > 0)
|
||||||
|
return glWindow.InputDriver.Mouse[0];
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1362,7 +1373,7 @@ namespace OpenTK
|
||||||
|
|
||||||
#region --- GameWindow Exceptions ---
|
#region --- GameWindow Exceptions ---
|
||||||
|
|
||||||
public class GameWindowExitException : ApplicationException
|
class GameWindowExitException : ApplicationException
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue