mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 07:39:56 -06:00
properly stop any started cameras upon reset/shutdown
This commit is contained in:
@ -83,6 +83,12 @@ void Reset()
|
||||
NDS::ScheduleEvent(NDS::Event_DSi_CamIRQ, true, kIRQInterval, IRQ, 0);
|
||||
}
|
||||
|
||||
void Stop()
|
||||
{
|
||||
Camera0->Stop();
|
||||
Camera1->Stop();
|
||||
}
|
||||
|
||||
void DoSavestate(Savestate* file)
|
||||
{
|
||||
file->Section("CAMi");
|
||||
@ -418,6 +424,8 @@ void Camera::DoSavestate(Savestate* file)
|
||||
|
||||
void Camera::Reset()
|
||||
{
|
||||
Platform::Camera_Stop(Num);
|
||||
|
||||
DataPos = 0;
|
||||
RegAddr = 0;
|
||||
RegData = 0;
|
||||
@ -439,6 +447,11 @@ void Camera::Reset()
|
||||
memset(FrameBuffer, 0, (640*480/2)*sizeof(u32));
|
||||
}
|
||||
|
||||
void Camera::Stop()
|
||||
{
|
||||
Platform::Camera_Stop(Num);
|
||||
}
|
||||
|
||||
bool Camera::IsActivated()
|
||||
{
|
||||
if (StandbyCnt & (1<<14)) return false; // standby
|
||||
|
Reference in New Issue
Block a user