Win32 thread priority isolation layer

other changes merged in this commit:
Update RageSoundReader_ThreadedBuffer.h
Update GameLoop.cpp
Update CMakeData-os.cmake
This commit is contained in:
sukibaby
2024-06-11 06:32:27 -07:00
committed by teejusb
parent 481532ab77
commit 5b0070f403
5 changed files with 132 additions and 1 deletions
+10
View File
@@ -24,6 +24,9 @@
#include <cmath>
#include <vector>
#ifdef _WIN32
#include "archutils/Win32/ThreadPriorityHelper.h"
#endif
static RageTimer g_GameplayTimer;
@@ -410,6 +413,13 @@ void ConcurrentRenderer::RenderThread()
if( m_State == RENDERING_START )
{
#ifdef _WIN32
bool setThreadSuccess = BoostThreadPriorityToHighest();
if (!setThreadSuccess)
{
ASSERT_M(0, "Failed to set thread priority to highest.");
}
#endif
/* We're starting to render. Set up, and then kick the event to wake
* up the calling thread. */
DISPLAY->BeginConcurrentRendering();