Fix lag on events

Found on sanctum2, returning 0 in XPending & XEventsQueued make the SDL do something else than polling events and makes lag the event loop.
Now the event loop returns 0 when there are no more events.
This commit is contained in:
Nemirtingas
2019-09-03 17:24:34 +02:00
parent 9fa4053551
commit 1016e7f47f
4 changed files with 78 additions and 69 deletions

View File

@ -9,9 +9,9 @@
#pragma once
IMGUI_IMPL_API bool ImGui_ImplX11_Init(void* display);
IMGUI_IMPL_API bool ImGui_ImplX11_Init(void* display, void* window);
IMGUI_IMPL_API void ImGui_ImplX11_Shutdown();
IMGUI_IMPL_API void ImGui_ImplX11_NewFrame(void* window);
IMGUI_IMPL_API void ImGui_ImplX11_NewFrame();
// Handler for Win32 messages, update mouse/keyboard data.
// You may or not need this for your implementation, but it can serve as reference for handling inputs.