mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-01 11:49:37 +00:00
MakeCurrent race condition fix
This commit is contained in:
parent
05dc633a8c
commit
16fbba3c2a
2 changed files with 3 additions and 2 deletions
|
@ -28,11 +28,11 @@
|
||||||
|
|
||||||
EmuThread::EmuThread(GRenderWindow* render_window) :
|
EmuThread::EmuThread(GRenderWindow* render_window) :
|
||||||
exec_step(false), running(false), stop_run(false), render_window(render_window) {
|
exec_step(false), running(false), stop_run(false), render_window(render_window) {
|
||||||
|
|
||||||
connect(this, SIGNAL(started()), render_window, SLOT(moveContext()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmuThread::run() {
|
void EmuThread::run() {
|
||||||
|
render_window->MakeCurrent();
|
||||||
|
|
||||||
stop_run = false;
|
stop_run = false;
|
||||||
|
|
||||||
// holds whether the cpu was running during the last iteration,
|
// holds whether the cpu was running during the last iteration,
|
||||||
|
|
|
@ -216,6 +216,7 @@ void GMainWindow::BootGame(std::string filename) {
|
||||||
// Create and start the emulation thread
|
// Create and start the emulation thread
|
||||||
emu_thread = Common::make_unique<EmuThread>(render_window);
|
emu_thread = Common::make_unique<EmuThread>(render_window);
|
||||||
emit EmulationStarting(emu_thread.get());
|
emit EmulationStarting(emu_thread.get());
|
||||||
|
render_window->moveContext();
|
||||||
emu_thread->start();
|
emu_thread->start();
|
||||||
|
|
||||||
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues
|
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues
|
||||||
|
|
Loading…
Reference in a new issue