From b7fff840c84ec40348b144721b7914a6be129533 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 29 Nov 2024 21:06:33 +1000 Subject: [PATCH] System: Move thread name init to host Prevents funky thread names for regtest on Linux. --- src/core/system.cpp | 3 --- src/duckstation-qt/qthost.cpp | 3 +++ src/duckstation-regtest/regtest_host.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/system.cpp b/src/core/system.cpp index df399ce76..e508c2c24 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -61,7 +61,6 @@ #include "common/memmap.h" #include "common/path.h" #include "common/string_util.h" -#include "common/threading.h" #include "IconsEmoji.h" #include "IconsFontAwesome5.h" @@ -499,8 +498,6 @@ void System::ProcessShutdown() bool System::CPUThreadInitialize(Error* error) { - Threading::SetNameOfCurrentThread("CPU Thread"); - #ifdef _WIN32 // On Win32, we have a bunch of things which use COM (e.g. SDL, Cubeb, etc). // We need to initialize COM first, before anything else does, because otherwise they might diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 9946875a2..b590eb1f1 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -37,6 +37,7 @@ #include "common/path.h" #include "common/scoped_guard.h" #include "common/string_util.h" +#include "common/threading.h" #include "util/audio_stream.h" #include "util/http_downloader.h" @@ -1791,6 +1792,8 @@ void EmuThread::stopInThread() void EmuThread::run() { + Threading::SetNameOfCurrentThread("CPU Thread"); + m_event_loop = new QEventLoop(); m_started_semaphore.release(); diff --git a/src/duckstation-regtest/regtest_host.cpp b/src/duckstation-regtest/regtest_host.cpp index 0a6731acd..c7923c9ac 100644 --- a/src/duckstation-regtest/regtest_host.cpp +++ b/src/duckstation-regtest/regtest_host.cpp @@ -121,7 +121,7 @@ bool RegTestHost::InitializeConfig() EmuFolders::EnsureFoldersExist(); // imgui setup, make sure it doesn't bug out - ImGuiManager::SetFontPathAndRange(std::string(), {0x0020, 0x00FF, 0, 0}); + ImGuiManager::SetFontPathAndRange(std::string(), {0x0020, 0x00FF, 0x2022, 0x2022, 0, 0}); return true; }