From fcff79e7943932a9e35735efa986221ff7a61705 Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 22 Dec 2024 17:51:59 +0300 Subject: [PATCH] uae: fix double eject --- src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs index c424b5e5d2..355d25bbea 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/UAE.cs @@ -213,8 +213,15 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga 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))