Add GetRenderer to core
This commit is contained in:
parent
be52d3a7d0
commit
d03d201482
|
@ -198,8 +198,8 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
|
|||
|
||||
timing = std::make_unique<Timing>();
|
||||
|
||||
kernel = std::make_unique<Kernel::KernelSystem>(*memory, *timing,
|
||||
[this] { PrepareReschedule(); }, system_mode);
|
||||
kernel = std::make_unique<Kernel::KernelSystem>(
|
||||
*memory, *timing, [this] { PrepareReschedule(); }, system_mode);
|
||||
|
||||
if (Settings::values.use_cpu_jit) {
|
||||
#ifdef ARCHITECTURE_x86_64
|
||||
|
@ -237,9 +237,16 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
|
|||
Service::Init(*this);
|
||||
GDBStub::Init();
|
||||
|
||||
ResultStatus result = VideoCore::Init(emu_window, *memory);
|
||||
if (result != ResultStatus::Success) {
|
||||
return result;
|
||||
VideoCore::ResultStatus result = VideoCore::Init(emu_window, *memory);
|
||||
if (result != VideoCore::ResultStatus::Success) {
|
||||
switch (result) {
|
||||
case VideoCore::ResultStatus::ErrorGenericDrivers:
|
||||
return ResultStatus::ErrorVideoCore_ErrorGenericDrivers;
|
||||
case VideoCore::ResultStatus::ErrorBelowGL33:
|
||||
return ResultStatus::ErrorVideoCore_ErrorBelowGL33;
|
||||
default:
|
||||
return ResultStatus::ErrorVideoCore;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FFMPEG_VIDEO_DUMPER
|
||||
|
@ -253,6 +260,10 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
|
|||
return ResultStatus::Success;
|
||||
}
|
||||
|
||||
RendererBase& System::Renderer() {
|
||||
return *VideoCore::g_renderer;
|
||||
}
|
||||
|
||||
Service::SM::ServiceManager& System::ServiceManager() {
|
||||
return *service_manager;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,8 @@ namespace VideoDumper {
|
|||
class Backend;
|
||||
}
|
||||
|
||||
class RendererBase;
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Timing;
|
||||
|
@ -170,6 +172,8 @@ public:
|
|||
return *dsp_core;
|
||||
}
|
||||
|
||||
RendererBase& Renderer();
|
||||
|
||||
/**
|
||||
* Gets a reference to the service manager.
|
||||
* @returns A reference to the service manager.
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/vector_math.h"
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/service/gsp/gsp.h"
|
||||
#include "core/hw/gpu.h"
|
||||
|
|
Reference in New Issue