diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2020-04-02 01:38:25 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 01:38:25 -0300 |
commit | 825a6e2615f86742b2e5182af1329da4a2bae413 (patch) | |
tree | 0b5d26f82b65067f0562b14a65b0d34aba688e01 /src/yuzu_cmd/yuzu.cpp | |
parent | baf91c920c7df131c9099721bad960556e74d86d (diff) | |
parent | f1da3ec584e5956c8090ac9a958447e4f5e78da2 (diff) |
Merge pull request #3552 from jroweboy/single-context
Refactor Context management (Fixes renderdoc on opengl issues)
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index babf4c3a4..4d2ea7e9e 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -230,17 +230,10 @@ int main(int argc, char** argv) { system.TelemetrySession().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); - system.Renderer().Rasterizer().LoadDiskResources(); + // Core is loaded, start the GPU (makes the GPU contexts current to this thread) + system.GPU().Start(); - // Acquire render context for duration of the thread if this is the rendering thread - if (!Settings::values.use_asynchronous_gpu_emulation) { - emu_window->MakeCurrent(); - } - SCOPE_EXIT({ - if (!Settings::values.use_asynchronous_gpu_emulation) { - emu_window->DoneCurrent(); - } - }); + system.Renderer().Rasterizer().LoadDiskResources(); std::thread render_thread([&emu_window] { emu_window->Present(); }); while (emu_window->IsOpen()) { |