diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2020-04-02 06:38:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 06:38:25 +0200 |
commit | 825a6e2615f86742b2e5182af1329da4a2bae413 (patch) | |
tree | 0b5d26f82b65067f0562b14a65b0d34aba688e01 /src/core/core.cpp | |
parent | Merge pull request #3591 from ReinUsesLisp/vk-wrapper-part2 (diff) | |
parent | Frontend: Don't call DoneCurrent if the context isnt already current (diff) | |
download | yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar.gz yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar.bz2 yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar.lz yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar.xz yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar.zst yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.zip |
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r-- | src/core/core.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index d1bc9340d..3bd90d79f 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -24,7 +24,6 @@ #include "core/file_sys/sdmc_factory.h" #include "core/file_sys/vfs_concat.h" #include "core/file_sys/vfs_real.h" -#include "core/frontend/scope_acquire_context.h" #include "core/gdbstub/gdbstub.h" #include "core/hardware_interrupt_manager.h" #include "core/hle/kernel/client_port.h" @@ -168,13 +167,12 @@ struct System::Impl { Service::Init(service_manager, system); GDBStub::DeferStart(); - renderer = VideoCore::CreateRenderer(emu_window, system); - if (!renderer->Init()) { + interrupt_manager = std::make_unique<Core::Hardware::InterruptManager>(system); + gpu_core = VideoCore::CreateGPU(emu_window, system); + if (!gpu_core) { return ResultStatus::ErrorVideoCore; } - interrupt_manager = std::make_unique<Core::Hardware::InterruptManager>(system); - gpu_core = VideoCore::CreateGPU(system); - renderer->Rasterizer().SetupDirtyFlags(); + gpu_core->Renderer().Rasterizer().SetupDirtyFlags(); is_powered_on = true; exit_lock = false; @@ -186,8 +184,6 @@ struct System::Impl { ResultStatus Load(System& system, Frontend::EmuWindow& emu_window, const std::string& filepath) { - Core::Frontend::ScopeAcquireContext acquire_context{emu_window}; - app_loader = Loader::GetLoader(GetGameFileFromPath(virtual_filesystem, filepath)); if (!app_loader) { LOG_CRITICAL(Core, "Failed to obtain loader for {}!", filepath); @@ -216,10 +212,6 @@ struct System::Impl { AddGlueRegistrationForProcess(*app_loader, *main_process); kernel.MakeCurrentProcess(main_process.get()); - // Main process has been loaded and been made current. - // Begin GPU and CPU execution. - gpu_core->Start(); - // Initialize cheat engine if (cheat_engine) { cheat_engine->Initialize(); @@ -277,7 +269,6 @@ struct System::Impl { } // Shutdown emulation session - renderer.reset(); GDBStub::Shutdown(); Service::Shutdown(); service_manager.reset(); @@ -353,7 +344,6 @@ struct System::Impl { Service::FileSystem::FileSystemController fs_controller; /// AppLoader used to load the current executing application std::unique_ptr<Loader::AppLoader> app_loader; - std::unique_ptr<VideoCore::RendererBase> renderer; std::unique_ptr<Tegra::GPU> gpu_core; std::unique_ptr<Hardware::InterruptManager> interrupt_manager; Memory::Memory memory; @@ -536,11 +526,11 @@ const Core::Hardware::InterruptManager& System::InterruptManager() const { } VideoCore::RendererBase& System::Renderer() { - return *impl->renderer; + return impl->gpu_core->Renderer(); } const VideoCore::RendererBase& System::Renderer() const { - return *impl->renderer; + return impl->gpu_core->Renderer(); } Kernel::KernelCore& System::Kernel() { |