summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonYoung Choi <wy80.choi@samsung.com>2018-10-01 11:11:42 +0900
committerGitHub <noreply@github.com>2018-10-01 11:11:42 +0900
commit273c2d4f8d5e2f8bf6facd51c8afdf58329fa69b (patch)
tree235c38ceb66ae918be3165505ce057a98ed9526c
parent75bc5bb7ea7cd04601c3d662d445f7575b14a546 (diff)
downloadopentk-273c2d4f8d5e2f8bf6facd51c8afdf58329fa69b.tar.gz
opentk-273c2d4f8d5e2f8bf6facd51c8afdf58329fa69b.tar.bz2
opentk-273c2d4f8d5e2f8bf6facd51c8afdf58329fa69b.zip
[Tizen] Skip pumping events when creating window (#4)submit/tizen/20181001.021745accepted/tizen/unified/20181001.092541
-rw-r--r--src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs2
-rw-r--r--src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs b/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs
index 45f15e92..a89e484a 100644
--- a/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs
+++ b/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs
@@ -100,7 +100,9 @@ namespace OpenTK.Platform.SDL2
handle = SDL.CreateWindow(title, bounds.Left + x, bounds.Top + y, width, height, flags);
exists = true;
}
+#if !TIZEN
ProcessEvents();
+#endif
window = new Sdl2WindowInfo(handle, null);
window_id = SDL.GetWindowID(handle);
windows.Add(window_id, this);
diff --git a/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs b/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs
index 5b2bca08..6aacc655 100644
--- a/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs
+++ b/src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs
@@ -49,6 +49,8 @@ namespace OpenTK.Platform.Tizen
public override void Run(string[] args)
{
+ base.Run(args);
+
lock (SDL2.SDL.Sync)
{
SDL2.SDL.AddEventWatch(EventFilterDelegate, IntPtr.Zero);
@@ -77,7 +79,7 @@ namespace OpenTK.Platform.Tizen
}
}
- private bool OnCreateNative()
+ private void OnCreateNative()
{
if (Handlers.ContainsKey(EventType.PreCreated))
{
@@ -96,7 +98,6 @@ namespace OpenTK.Platform.Tizen
var handler = Handlers[EventType.Created] as Action;
handler?.Invoke();
}
- return true;
}
private unsafe int OnHandleSDLAppEvent(IntPtr data, IntPtr e)