From 987589dcbc3a33937330eeadcbb409731d0be4b5 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 26 Jul 2015 23:49:32 -0700 Subject: [PATCH] Stop overwriting already-specified thread names. --- src/xenia/kernel/objects/xthread.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/xenia/kernel/objects/xthread.cc b/src/xenia/kernel/objects/xthread.cc index 4af7524ff..e634b19a5 100644 --- a/src/xenia/kernel/objects/xthread.cc +++ b/src/xenia/kernel/objects/xthread.cc @@ -324,11 +324,13 @@ X_STATUS XThread::Create() { } thread_->set_affinity_mask(proc_mask); - // Set the thread name based on host ID (for easier debugging) - char thread_name[32]; - snprintf(thread_name, xe::countof(thread_name), "XThread%04X (%04X)", - handle(), thread_->id()); - set_name(thread_name); + // Set the thread name based on host ID (for easier debugging). + if (name_.empty()) { + char thread_name[32]; + snprintf(thread_name, xe::countof(thread_name), "XThread%04X (%04X)", + handle(), thread_->id()); + set_name(thread_name); + } if (creation_params_.creation_flags & 0x60) { thread_->set_priority(creation_params_.creation_flags & 0x20 ? 1 : 0);