mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Show thread name in assert messagebox caption on Windows. Minor cleanup
This commit is contained in:
1 parent
c45376ddc7
commit
1cf4e83824
2 files changed
+3
-4
No files matched your search
+2
-1
@@ -24,6 +24,7 @@
|
||||
#include "Common/Log.h"
|
||||
#include "StringUtils.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
#include <android/log.h>
|
||||
@@ -71,7 +72,7 @@ bool HandleAssert(const char *function, const char *file, int line, const char *
|
||||
if (!getenv("CI")) {
|
||||
int msgBoxStyle = MB_ICONINFORMATION | MB_YESNO;
|
||||
std::wstring wtext = ConvertUTF8ToWString(formatted) + L"\n\nTry to continue?";
|
||||
std::wstring wcaption = ConvertUTF8ToWString(caption);
|
||||
std::wstring wcaption = ConvertUTF8ToWString(std::string(caption) + " " + GetCurrentThreadName());
|
||||
OutputDebugString(wtext.c_str());
|
||||
if (IDYES != MessageBox(0, wtext.c_str(), wcaption.c_str(), msgBoxStyle)) {
|
||||
return false;
|
||||
|
||||
@@ -24,9 +24,7 @@ struct Mailbox {
|
||||
|
||||
T Wait() {
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
while (!dataReceived_) {
|
||||
condvar_.wait(lock);
|
||||
}
|
||||
condvar_.wait(lock, [&] {return dataReceived_;});
|
||||
return data_;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user