From 758faac445742738c9ae5bbe33dc744fbb18bf9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 3 Nov 2024 18:11:55 +0100 Subject: [PATCH] Be more consistent about thread naming --- Qt/QtMain.cpp | 2 +- SDL/SDLMain.cpp | 2 +- Windows/EmuThread.cpp | 6 +++--- libretro/libretro.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Qt/QtMain.cpp b/Qt/QtMain.cpp index 5122131e10..2f789effe9 100644 --- a/Qt/QtMain.cpp +++ b/Qt/QtMain.cpp @@ -473,7 +473,7 @@ static int mainInternal(QApplication &a) { } void MainUI::EmuThreadFunc() { - SetCurrentThreadName("Emu"); + SetCurrentThreadName("EmuThread"); // There's no real requirement that NativeInit happen on this thread, though it can't hurt... // We just call the update/render loop here. NativeInitGraphics should be here though. diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 9ae8bd5ae3..33dc21f59c 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -686,7 +686,7 @@ static std::thread emuThread; static std::atomic emuThreadState((int)EmuThreadState::DISABLED); static void EmuThreadFunc(GraphicsContext *graphicsContext) { - SetCurrentThreadName("Emu"); + SetCurrentThreadName("EmuThread"); // There's no real requirement that NativeInit happen on this thread. // We just call the update/render loop here. diff --git a/Windows/EmuThread.cpp b/Windows/EmuThread.cpp index 8f51150e5c..28908510cc 100644 --- a/Windows/EmuThread.cpp +++ b/Windows/EmuThread.cpp @@ -76,7 +76,7 @@ bool MainThread_Ready() { } static void EmuThreadFunc(GraphicsContext *graphicsContext) { - SetCurrentThreadName("Emu"); + SetCurrentThreadName("EmuThread"); // There's no real requirement that NativeInit happen on this thread. // We just call the update/render loop here. @@ -152,7 +152,7 @@ bool CreateGraphicsBackend(std::string *error_message, GraphicsContext **ctx) { void MainThreadFunc() { // We'll start up a separate thread we'll call Emu - SetCurrentThreadName(useEmuThread ? "Render" : "Emu"); + SetCurrentThreadName(useEmuThread ? "RenderThread" : "EmuThread"); SetConsolePosition(); @@ -180,7 +180,7 @@ void MainThreadFunc() { } else if (useEmuThread) { // We must've failed over from OpenGL, flip the emu thread off. useEmuThread = false; - SetCurrentThreadName("Emu"); + SetCurrentThreadName("EmuThread"); } if (g_Config.sFailedGPUBackends.find("ALL") != std::string::npos) { diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index eddb6d63a0..d17785ec8b 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -1367,7 +1367,7 @@ namespace Libretro static void EmuThreadFunc() { - SetCurrentThreadName("Emu"); + SetCurrentThreadName("EmuThread"); for (;;) {