mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-14 05:55:13 +01:00
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>();
|
timing = std::make_unique<Timing>();
|
||||||
|
|
||||||
kernel = std::make_unique<Kernel::KernelSystem>(*memory, *timing,
|
kernel = std::make_unique<Kernel::KernelSystem>(
|
||||||
[this] { PrepareReschedule(); }, system_mode);
|
*memory, *timing, [this] { PrepareReschedule(); }, system_mode);
|
||||||
|
|
||||||
if (Settings::values.use_cpu_jit) {
|
if (Settings::values.use_cpu_jit) {
|
||||||
#ifdef ARCHITECTURE_x86_64
|
#ifdef ARCHITECTURE_x86_64
|
||||||
@ -237,9 +237,16 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
|
|||||||
Service::Init(*this);
|
Service::Init(*this);
|
||||||
GDBStub::Init();
|
GDBStub::Init();
|
||||||
|
|
||||||
ResultStatus result = VideoCore::Init(emu_window, *memory);
|
VideoCore::ResultStatus result = VideoCore::Init(emu_window, *memory);
|
||||||
if (result != ResultStatus::Success) {
|
if (result != VideoCore::ResultStatus::Success) {
|
||||||
return result;
|
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
|
#ifdef ENABLE_FFMPEG_VIDEO_DUMPER
|
||||||
@ -253,6 +260,10 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo
|
|||||||
return ResultStatus::Success;
|
return ResultStatus::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RendererBase& System::Renderer() {
|
||||||
|
return *VideoCore::g_renderer;
|
||||||
|
}
|
||||||
|
|
||||||
Service::SM::ServiceManager& System::ServiceManager() {
|
Service::SM::ServiceManager& System::ServiceManager() {
|
||||||
return *service_manager;
|
return *service_manager;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,8 @@ namespace VideoDumper {
|
|||||||
class Backend;
|
class Backend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class RendererBase;
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
class Timing;
|
class Timing;
|
||||||
@ -170,6 +172,8 @@ public:
|
|||||||
return *dsp_core;
|
return *dsp_core;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RendererBase& Renderer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a reference to the service manager.
|
* Gets a reference to the service manager.
|
||||||
* @returns A reference to the service manager.
|
* @returns A reference to the service manager.
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/microprofile.h"
|
#include "common/microprofile.h"
|
||||||
#include "common/vector_math.h"
|
#include "common/vector_math.h"
|
||||||
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/hle/service/gsp/gsp.h"
|
#include "core/hle/service/gsp/gsp.h"
|
||||||
#include "core/hw/gpu.h"
|
#include "core/hw/gpu.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user