瀏覽代碼

Use SDL_PollEvent() instead of SDL_PumpEvents() / SDL_PeepEvent() for subjectively smoother mouse input under vsync (Windows.)

Lasse Öörni 11 年之前
父節點
當前提交
52aa4bc780
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Source/Urho3D/Input/Input.cpp

+ 1 - 2
Source/Urho3D/Input/Input.cpp

@@ -159,9 +159,8 @@ void Input::Update()
     }
 
     // Check and handle SDL events
-    SDL_PumpEvents();
     SDL_Event evt;
-    while (SDL_PeepEvents(&evt, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0)
+    while (SDL_PollEvent(&evt))
         HandleSDLEvent(&evt);
 
     if (mouseVisible_ && mouseMode_ == MM_WRAP)