[Tizen] Skip pumping events when creating window (#4) accepted/tizen/unified/20181001.092541 submit/tizen/20181001.021745
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 1 Oct 2018 02:11:42 +0000 (11:11 +0900)
committerGitHub <noreply@github.com>
Mon, 1 Oct 2018 02:11:42 +0000 (11:11 +0900)
src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs
src/OpenTK/Platform/Tizen/TizenGameCoreBackend.cs

index 45f15e92e5c963f46090a57e989800cdb853070f..a89e484ad3724b3b62fab3fcfe345529da3c1c01 100644 (file)
@@ -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);
index 5b2bca088c6afb0e71a86a71de5137f1437ced58..6aacc6557cb58192c10965cf62e1916c6cc08e2f 100644 (file)
@@ -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)