diff --git a/dotnet/src/Window/Event.cs b/dotnet/src/Window/Event.cs
index 37a1043f2..543ada661 100644
--- a/dotnet/src/Window/Event.cs
+++ b/dotnet/src/Window/Event.cs
@@ -234,13 +234,13 @@ namespace SFML
public KeyCode Code;
/// Is the Alt modifier pressed?
- public bool Alt;
+ public int Alt;
/// Is the Control modifier pressed?
- public bool Control;
+ public int Control;
/// Is the Shift modifier pressed?
- public bool Shift;
+ public int Shift;
}
////////////////////////////////////////////////////////////
diff --git a/dotnet/src/Window/EventArgs.cs b/dotnet/src/Window/EventArgs.cs
index 89c47744f..d66e569c1 100644
--- a/dotnet/src/Window/EventArgs.cs
+++ b/dotnet/src/Window/EventArgs.cs
@@ -20,9 +20,9 @@ namespace SFML
public KeyEventArgs(KeyEvent e)
{
Code = e.Code;
- Alt = e.Alt;
- Control = e.Control;
- Shift = e.Shift;
+ Alt = e.Alt != 0;
+ Control = e.Control != 0;
+ Shift = e.Shift != 0;
}
/// Code of the key (see KeyCode enum)
diff --git a/dotnet/src/Window/Window.cs b/dotnet/src/Window/Window.cs
index 51041e9b6..c2f741960 100644
--- a/dotnet/src/Window/Window.cs
+++ b/dotnet/src/Window/Window.cs
@@ -103,25 +103,6 @@ namespace SFML
myInput = new Input(sfWindow_GetInput(This));
}
- ////////////////////////////////////////////////////////////
- ///
- /// Return the list of window's events which happened since last call
- ///
- /// Array of events
- ////////////////////////////////////////////////////////////
- public Event[] Events
- {
- get
- {
- Event Evt;
- List Evts = new List();
- while (GetEvent(out Evt))
- Evts.Add(Evt);
-
- return Evts.ToArray();
- }
- }
-
////////////////////////////////////////////////////////////
///
/// Input manager of the window
@@ -365,7 +346,8 @@ namespace SFML
////////////////////////////////////////////////////////////
public void DispatchEvents()
{
- foreach (Event e in Events)
+ Event e;
+ while (GetEvent(out e))
{
switch (e.Type)
{