HW/GPFifo: Refactor to class, move to Core::System.

This commit is contained in:
Admiral H. Curtiss 2023-01-05 05:18:24 +01:00
commit fbcaf83d30
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB
11 changed files with 150 additions and 81 deletions

View file

@ -13,6 +13,7 @@
#include "Core/HW/DVD/DVDInterface.h"
#include "Core/HW/DVD/DVDThread.h"
#include "Core/HW/EXI/EXI.h"
#include "Core/HW/GPFifo.h"
#include "Core/HW/Memmap.h"
#include "Core/HW/MemoryInterface.h"
#include "Core/HW/ProcessorInterface.h"
@ -30,6 +31,8 @@ namespace Core
{
struct System::Impl
{
explicit Impl(System& system) : m_gp_fifo(system) {}
std::unique_ptr<SoundStream> m_sound_stream;
bool m_sound_stream_running = false;
bool m_audio_dump_started = false;
@ -43,6 +46,7 @@ struct System::Impl
ExpansionInterface::ExpansionInterfaceState m_expansion_interface_state;
Fifo::FifoManager m_fifo;
GeometryShaderManager m_geometry_shader_manager;
GPFifo::GPFifoManager m_gp_fifo;
Memory::MemoryManager m_memory;
MemoryInterface::MemoryInterfaceState m_memory_interface_state;
PixelEngine::PixelEngineManager m_pixel_engine;
@ -54,7 +58,7 @@ struct System::Impl
VideoInterface::VideoInterfaceState m_video_interface_state;
};
System::System() : m_impl{std::make_unique<Impl>()}
System::System() : m_impl{std::make_unique<Impl>(*this)}
{
}
@ -142,6 +146,11 @@ GeometryShaderManager& System::GetGeometryShaderManager() const
return m_impl->m_geometry_shader_manager;
}
GPFifo::GPFifoManager& System::GetGPFifo() const
{
return m_impl->m_gp_fifo;
}
Memory::MemoryManager& System::GetMemory() const
{
return m_impl->m_memory;