diff --git a/Source/debug.cpp b/Source/debug.cpp index 9a8ad0a59..a8a676c22 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -238,6 +238,11 @@ std::string DebugCmdLoadQuestMap(const string_view parameter) if (!MyPlayer->isOnLevel(quest._qlevel)) { StartNewLvl(*MyPlayer, (quest._qlevel != 21) ? interface_mode::WM_DIABNEXTLVL : interface_mode::WM_DIABTOWNWARP, quest._qlevel); ProcessMessages(); + // Workaround for SDL_PollEvent: + // StartNewLvl pushes a new event with SDL_PushEvent. + // ProcessMessages calls SDL_PollEvent but SDL ignores the new pushed event. + // Calling SDL_PollEvent again fixes this. + ProcessMessages(); } setlvltype = quest._qlvltype;