mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 06:07:58 -05:00
core: hle: kernel: Allocate dummy threads on host thread storage.
- Fixes a crash where on subsequent boots, long-lived host threads would have their dummy threads freed.
This commit is contained in:
@ -49,12 +49,9 @@ ServiceThread::Impl::Impl(KernelCore& kernel, std::size_t num_threads, const std
|
||||
return;
|
||||
}
|
||||
|
||||
// Allocate a dummy guest thread for this host thread.
|
||||
kernel.RegisterHostThread();
|
||||
|
||||
// Ensure the dummy thread allocated for this host thread is closed on exit.
|
||||
auto* dummy_thread = kernel.GetCurrentEmuThread();
|
||||
SCOPE_EXIT({ dummy_thread->Close(); });
|
||||
|
||||
while (true) {
|
||||
std::function<void()> task;
|
||||
|
||||
|
Reference in New Issue
Block a user