Skip to content

Commit

Permalink
Fix Emu.Stop() with vulkan device enumeration hack
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Jul 11, 2019
1 parent 2898309 commit 75039de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rpcs3/rpcs3qt/emu_settings.cpp
Expand Up @@ -163,11 +163,11 @@ emu_settings::Render_Creator::Render_Creator()
static std::mutex mtx;
static std::condition_variable cond;
static bool thread_running = true;
static volatile bool device_found = false;
static bool device_found = false;

static QStringList compatible_gpus;

thread_ctrl::spawn("Vulkan device enumeration", [&]
std::thread* const enum_thread = new std::thread([&]
{
thread_ctrl::set_native_priority(-1);

Expand All @@ -189,7 +189,8 @@ emu_settings::Render_Creator::Render_Creator()
}
}
}
std::scoped_lock{mtx}, thread_running = false;

std::lock_guard{mtx}, thread_running = false;
cond.notify_all();
});

Expand All @@ -214,6 +215,7 @@ emu_settings::Render_Creator::Render_Creator()
}
else
{
enum_thread->join(); delete (enum_thread);
supportsVulkan = device_found;
vulkanAdapters = std::move(compatible_gpus);
}
Expand Down

0 comments on commit 75039de

Please sign in to comment.