mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-30 19:09:43 -06:00
Move GBACart-related global state into objects (#1870)
- RAII will now do the heavy lifting - Mark some methods as const or noexcept - Once the `NDS` object is finalized, most of these `assert`s can go away
This commit is contained in:

committed by
GitHub

parent
b4ff911fa3
commit
8b47178add
@ -384,7 +384,8 @@ void EmuThread::run()
|
||||
|
||||
if (Input::HotkeyPressed(HK_SolarSensorDecrease))
|
||||
{
|
||||
int level = GBACart::SetInput(GBACart::Input_SolarSensorDown, true);
|
||||
assert(NDS::GBACartSlot != nullptr);
|
||||
int level = NDS::GBACartSlot->SetInput(GBACart::Input_SolarSensorDown, true);
|
||||
if (level != -1)
|
||||
{
|
||||
char msg[64];
|
||||
@ -394,7 +395,8 @@ void EmuThread::run()
|
||||
}
|
||||
if (Input::HotkeyPressed(HK_SolarSensorIncrease))
|
||||
{
|
||||
int level = GBACart::SetInput(GBACart::Input_SolarSensorUp, true);
|
||||
assert(NDS::GBACartSlot != nullptr);
|
||||
int level = NDS::GBACartSlot->SetInput(GBACart::Input_SolarSensorUp, true);
|
||||
if (level != -1)
|
||||
{
|
||||
char msg[64];
|
||||
|
Reference in New Issue
Block a user