Skip to content

Commit

Permalink
uae: fix double eject
Browse files Browse the repository at this point in the history
  • Loading branch information
vadosnaprimer committed Dec 22, 2024
1 parent 0e300fc commit fcff79e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,15 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
if (!_ejectPressed)
{
fi.Action = LibUAE.DriveAction.EjectDisk;
CoreComm.Notify($"Ejected drive FD{_currentDrive}: {GetFullName(_roms[_driveSlots[_currentDrive]])}", _messageDuration);
_driveSlots[_currentDrive] = _driveNullOrEmpty;
if (_driveSlots[_currentDrive] == _driveNullOrEmpty)
{
CoreComm.Notify($"Drive FD{_currentDrive} is already empty!", _messageDuration);
}
else
{
CoreComm.Notify($"Ejected drive FD{_currentDrive}: {GetFullName(_roms[_driveSlots[_currentDrive]])}", _messageDuration);
_driveSlots[_currentDrive] = _driveNullOrEmpty;
}
}
}
else if (controller.IsPressed(Inputs.InsertDisk))
Expand Down

0 comments on commit fcff79e

Please sign in to comment.