OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering.

This commit is contained in:
bunnei 2018-06-29 14:10:16 -04:00
parent 9fc0d1d701
commit 05cb10530f
6 changed files with 39 additions and 2 deletions

View file

@ -148,6 +148,11 @@ int main(int argc, char** argv) {
std::unique_ptr<EmuWindow_SDL2> emu_window{std::make_unique<EmuWindow_SDL2>(fullscreen)};
if (!Settings::values.use_multi_core) {
// Single core mode must acquire OpenGL context for entire emulation session
emu_window->MakeCurrent();
}
Core::System& system{Core::System::GetInstance()};
SCOPE_EXIT({ system.Shutdown(); });