Skip to content

Commit

Permalink
puae: fix drives population with slots
Browse files Browse the repository at this point in the history
  • Loading branch information
vadosnaprimer committed Dec 14, 2024
1 parent 8f384c6 commit 4274b75
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,17 @@ public PUAE(CoreLoadParameters<object, PUAESyncSettings> lp)
SkipMemoryConsistencyCheck = lp.Comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck),
}, new Delegate[] { _ledCallback });

for (var index = 0; index < _syncSettings.FloppyDrives; index++)
for (var index = 0; index < lp.Roms.Count; index++)
{
if (index < lp.Roms.Count)
var rom = lp.Roms[index];
_exe.AddReadonlyFile(rom.FileData, FileNames.FD + index);
if (index < _syncSettings.FloppyDrives)
{
var rom = lp.Roms[index];
_exe.AddReadonlyFile(rom.FileData, FileNames.FD + index);
_drives.Add(GetFullName(rom));
AppendSetting($"floppy{index}={FileNames.FD}{index}");
AppendSetting($"floppy{index}type={(int) DriveType.DRV_35_DD}");
AppendSetting("floppy_write_protect=true");
}
else
{
_drives.Add("empty");
}
}

var (kickstartData, kickstartInfo) = CoreComm.CoreFileProvider.GetFirmwareWithGameInfoOrThrow(
Expand Down Expand Up @@ -256,6 +252,10 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
{
_currentDrive++;
_currentDrive %= _syncSettings.FloppyDrives;
if (_drives.Count <= _currentDrive)
{
_drives.Add("empty");
}
CoreComm.Notify($"Selected drive FD{_currentDrive}: {_drives[_currentDrive]}", _messageDuration);
}
}
Expand Down

0 comments on commit 4274b75

Please sign in to comment.