Revert "Fix crash at exit due to a unreleased mutex."
This reverts commit 80e5470006.
std::unique_lock is incapable of recursively locking a mutex, which is needed for multi-monitor setups.
As a result it will crash/show undefined behaviour when switching renderers. Switch to instead calling
endblit() after pc_close to avoid crashes; at this point the CPU thread is now terminated so the mutex
no longer remains held by it.
This commit is contained in:
@@ -289,6 +289,7 @@ int main(int argc, char* argv[]) {
|
||||
cpu_thread_run = 0;
|
||||
main_thread->join();
|
||||
pc_close(nullptr);
|
||||
endblit();
|
||||
|
||||
socket.close();
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user