fix: ImHex being displayed as "Main" in some task managers on Linux

This commit is contained in:
WerWolv
2025-08-05 17:57:26 +02:00
parent c3cd4edbf9
commit 388f5354a1
3 changed files with 33 additions and 5 deletions

View File

@@ -29,8 +29,12 @@ int main(int argc, char **argv) {
std::setlocale(LC_ALL, "en_US.utf8");
// Set the main thread's name to "Main"
TaskManager::setCurrentThreadName("Main");
// Tell the Task Manager that we are the main thread
TaskManager::setMainThreadId(std::this_thread::get_id());
// Set the main thread's name. This is the name that will be displayed
// in tools like btop
TaskManager::setCurrentThreadName("ImHex 🔍");
// Setup crash handlers right away to catch crashes as early as possible
crash::setupCrashHandlers();