mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-16 20:07:16 +01:00
VideoCore: pass in memory system
currently set as global. Will change when videocore itself is wrapped as a class
This commit is contained in:
parent
8c618c3fc3
commit
8bb404c82a
@ -206,7 +206,7 @@ System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) {
|
|||||||
Service::Init(*this);
|
Service::Init(*this);
|
||||||
GDBStub::Init();
|
GDBStub::Init();
|
||||||
|
|
||||||
ResultStatus result = VideoCore::Init(emu_window);
|
ResultStatus result = VideoCore::Init(emu_window, *memory);
|
||||||
if (result != ResultStatus::Success) {
|
if (result != ResultStatus::Success) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,11 @@ void* g_screenshot_bits;
|
|||||||
std::function<void()> g_screenshot_complete_callback;
|
std::function<void()> g_screenshot_complete_callback;
|
||||||
Layout::FramebufferLayout g_screenshot_framebuffer_layout;
|
Layout::FramebufferLayout g_screenshot_framebuffer_layout;
|
||||||
|
|
||||||
|
Memory::MemorySystem* g_memory;
|
||||||
|
|
||||||
/// Initialize the video core
|
/// Initialize the video core
|
||||||
Core::System::ResultStatus Init(EmuWindow& emu_window) {
|
Core::System::ResultStatus Init(EmuWindow& emu_window, Memory::MemorySystem& memory) {
|
||||||
|
g_memory = &memory;
|
||||||
Pica::Init();
|
Pica::Init();
|
||||||
|
|
||||||
g_renderer = std::make_unique<OpenGL::RendererOpenGL>(emu_window);
|
g_renderer = std::make_unique<OpenGL::RendererOpenGL>(emu_window);
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
class EmuWindow;
|
class EmuWindow;
|
||||||
class RendererBase;
|
class RendererBase;
|
||||||
|
|
||||||
|
namespace Memory{
|
||||||
|
class MemorySystem;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Video Core namespace
|
// Video Core namespace
|
||||||
|
|
||||||
@ -33,8 +37,10 @@ extern void* g_screenshot_bits;
|
|||||||
extern std::function<void()> g_screenshot_complete_callback;
|
extern std::function<void()> g_screenshot_complete_callback;
|
||||||
extern Layout::FramebufferLayout g_screenshot_framebuffer_layout;
|
extern Layout::FramebufferLayout g_screenshot_framebuffer_layout;
|
||||||
|
|
||||||
|
extern Memory::MemorySystem* g_memory;
|
||||||
|
|
||||||
/// Initialize the video core
|
/// Initialize the video core
|
||||||
Core::System::ResultStatus Init(EmuWindow& emu_window);
|
Core::System::ResultStatus Init(EmuWindow& emu_window, Memory::MemorySystem& memory);
|
||||||
|
|
||||||
/// Shutdown the video core
|
/// Shutdown the video core
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
Loading…
Reference in New Issue
Block a user