mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 23:29:55 -06:00
Allow CartGameSolarSensor::LightLevel
to be set explicitly (#2179)
* Allow `CartGameSolarSensor::LightLevel` to be set explicitly * Add `CartGameSolarSensor::GetLightLevel` * Update GBACart.cpp --------- Co-authored-by: Kemal Afzal <RSDuck@users.noreply.github.com>
This commit is contained in:
@ -582,6 +582,11 @@ int CartGameSolarSensor::SetInput(int num, bool pressed)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void CartGameSolarSensor::SetLightLevel(u8 level) noexcept
|
||||
{
|
||||
LightLevel = std::clamp<u8>(level, 0, 10);
|
||||
}
|
||||
|
||||
void CartGameSolarSensor::ProcessGPIO()
|
||||
{
|
||||
if (GPIO.data & 4) return; // Boktai chip select
|
||||
|
Reference in New Issue
Block a user