fixed in the worst way possible

This commit is contained in:
Ben
2021-09-22 02:02:15 +01:00
parent 46024124e3
commit 0a4bf9f3e8
3 changed files with 5 additions and 6 deletions

View File

@@ -26,8 +26,6 @@ void App::Run()
{ {
mInput.PollInput(); mInput.PollInput();
// std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) );
// tick through game layers // tick through game layers
for ( const auto& layer : mGameLayers ) for ( const auto& layer : mGameLayers )
{ {

View File

@@ -34,9 +34,12 @@ Input::~Input()
void Input::PollInput() void Input::PollInput()
{ {
SDL_PumpEvents(); //SDL_PumpEvents();
while ( SDL_PollEvent( &mEvent ) ) while ( SDL_PollEvent( &mEvent ) )
{ {
// Provide to non-event driven subsystem
ImGui_ImplSDL2_ProcessEvent( &mEvent );
switch ( mEvent.type ) switch ( mEvent.type )
{ {
case SDL_WINDOWEVENT: case SDL_WINDOWEVENT:
@@ -66,8 +69,6 @@ void Input::PollInput()
mPollKeyboard(); mPollKeyboard();
} }
} }
// Provide to non-event driven subsystem
ImGui_ImplSDL2_ProcessEvent( &mEvent );
} }
// just in case // just in case

View File

@@ -7280,7 +7280,7 @@ static void ImGui::ErrorCheckEndFrameSanityChecks()
// We silently accommodate for this case by ignoring/ the case where all io.KeyXXX modifiers were released (aka key_mod_flags == 0), // We silently accommodate for this case by ignoring/ the case where all io.KeyXXX modifiers were released (aka key_mod_flags == 0),
// while still correctly asserting on mid-frame key press events. // while still correctly asserting on mid-frame key press events.
const ImGuiKeyModFlags key_mod_flags = GetMergedKeyModFlags(); const ImGuiKeyModFlags key_mod_flags = GetMergedKeyModFlags();
IM_ASSERT((key_mod_flags == 0 || g.IO.KeyMods == key_mod_flags) && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods"); //IM_ASSERT((key_mod_flags == 0 || g.IO.KeyMods == key_mod_flags) && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
IM_UNUSED(key_mod_flags); IM_UNUSED(key_mod_flags);
// Recover from errors // Recover from errors