mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Name threads for easier debugging
This commit is contained in:
@@ -344,6 +344,9 @@ int main(int argc, char *argv[])
|
|||||||
// Disable minimize on focus loss by default. Users seem to want this off by default.
|
// Disable minimize on focus loss by default. Users seem to want this off by default.
|
||||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
||||||
|
|
||||||
|
// Allow thread naming
|
||||||
|
SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "0");
|
||||||
|
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
|
|
||||||
// After the QGuiApplication is created, the platform stuff will be initialized
|
// After the QGuiApplication is created, the platform stuff will be initialized
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ bool DxVsyncSource::initialize(SDL_Window* window, int displayFps)
|
|||||||
|
|
||||||
m_Window = info.info.win.window;
|
m_Window = info.info.win.window;
|
||||||
|
|
||||||
m_Thread = SDL_CreateThread(vsyncThread, "DX Vsync Thread", this);
|
m_Thread = SDL_CreateThread(vsyncThread, "DXVsync", this);
|
||||||
if (m_Thread == nullptr) {
|
if (m_Thread == nullptr) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Unable to create DX V-sync thread: %s",
|
"Unable to create DX V-sync thread: %s",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ NullThreadedVsyncSource::~NullThreadedVsyncSource()
|
|||||||
bool NullThreadedVsyncSource::initialize(SDL_Window*, int displayFps)
|
bool NullThreadedVsyncSource::initialize(SDL_Window*, int displayFps)
|
||||||
{
|
{
|
||||||
m_DisplayFps = displayFps;
|
m_DisplayFps = displayFps;
|
||||||
m_Thread = SDL_CreateThread(vsyncThread, "Null Vsync Thread", this);
|
m_Thread = SDL_CreateThread(vsyncThread, "NullVsync", this);
|
||||||
if (m_Thread == nullptr) {
|
if (m_Thread == nullptr) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Unable to create DX V-sync thread: %s",
|
"Unable to create DX V-sync thread: %s",
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ bool Pacer::initialize(SDL_Window* window, int maxVideoFps, bool enablePacing)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_VsyncRenderer->isRenderThreadSupported()) {
|
if (m_VsyncRenderer->isRenderThreadSupported()) {
|
||||||
m_RenderThread = SDL_CreateThread(Pacer::renderThread, "Pacer Render Thread", this);
|
m_RenderThread = SDL_CreateThread(Pacer::renderThread, "PacerRender", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Submodule moonlight-common-c/moonlight-common-c updated: a7d4537274...1154cb1d3d
Reference in New Issue
Block a user