mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
Refactor the GPU to be object-oriented (#1873)
* Refactor GPU3D to be an object - Who has two thumbs and is the sworn enemy of global state? This guy! * Refactor GPU itself to be an object - Wow, it's used in a lot of places - Also introduce a new `Melon` namespace for a few classes - I expect other classes will be moved into `Melon` over time * Change signature of Renderer3D::SetRenderSettings - Make it noexcept, and its argument const * Remove some stray whitespace
This commit is contained in:

committed by
GitHub

parent
88072a02c5
commit
4558be0d8e
@ -26,7 +26,7 @@
|
||||
using Platform::Log;
|
||||
using Platform::LogLevel;
|
||||
|
||||
DSi_NDMA::DSi_NDMA(u32 cpu, u32 num)
|
||||
DSi_NDMA::DSi_NDMA(u32 cpu, u32 num, Melon::GPU& gpu) : GPU(gpu)
|
||||
{
|
||||
CPU = cpu;
|
||||
Num = num;
|
||||
@ -125,7 +125,7 @@ void DSi_NDMA::WriteCnt(u32 val)
|
||||
if ((StartMode & 0x1F) == 0x10)
|
||||
Start();
|
||||
else if (StartMode == 0x0A)
|
||||
GPU3D::CheckFIFODMA();
|
||||
GPU.GPU3D.CheckFIFODMA();
|
||||
|
||||
// TODO: unsupported start modes:
|
||||
// * timers (00-03)
|
||||
@ -259,7 +259,7 @@ void DSi_NDMA::Run9()
|
||||
NDS::ResumeCPU(0, 1<<(Num+4));
|
||||
|
||||
if (StartMode == 0x0A)
|
||||
GPU3D::CheckFIFODMA();
|
||||
GPU.GPU3D.CheckFIFODMA();
|
||||
}
|
||||
|
||||
return;
|
||||
|
Reference in New Issue
Block a user