Create a MainWindow class that manages the main win32 window of the application

This commit is contained in:
Magnus Norddahl 2022-05-14 02:25:56 +02:00 committed by Christoph Oelckers
commit 6670bc09b9
24 changed files with 1187 additions and 1108 deletions

View file

@ -32,10 +32,6 @@
#include "polyrenderer/drawers/poly_triangle.h"
#include <chrono>
#ifdef WIN32
void PeekThreadedErrorPane();
#endif
CVAR(Int, r_multithreaded, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
CVAR(Int, r_debug_draw, 0, 0);
@ -101,12 +97,7 @@ void DrawerThreads::WaitForWorkers()
std::unique_lock<std::mutex> end_lock(queue->end_mutex);
if (!queue->end_condition.wait_for(end_lock, 5s, [&]() { return queue->tasks_left == 0; }))
{
#ifdef WIN32
PeekThreadedErrorPane();
#endif
// Invoke the crash reporter so that we can capture the call stack of whatever the hung worker thread is doing
int *threadCrashed = nullptr;
*threadCrashed = 0xdeadbeef;
I_FatalError("Drawer threads did not finish within 5 seconds!");
}
end_lock.unlock();