Only offer drive switching if more than one drive is present
This commit is contained in:
parent
3ef3f8ce96
commit
3e43a748b7
|
@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
return keyboardMap.ToArray();
|
||||
}
|
||||
|
||||
private static ControllerDefinition CreateControllerDefinition(SyncSettings settings)
|
||||
private static ControllerDefinition CreateControllerDefinition(SyncSettings settings, int floppyDiskCount, int cdROMCount)
|
||||
{
|
||||
var controller = new ControllerDefinition("DOSBox Controller");
|
||||
|
||||
|
@ -67,8 +67,8 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
}
|
||||
|
||||
// Adding drive management buttons
|
||||
controller.BoolButtons.Add(Inputs.NextFloppyDisk);
|
||||
controller.BoolButtons.Add(Inputs.NextCDROM);
|
||||
if (floppyDiskCount > 1) controller.BoolButtons.Add(Inputs.NextFloppyDisk);
|
||||
if (cdROMCount > 1) controller.BoolButtons.Add(Inputs.NextCDROM);
|
||||
|
||||
foreach (var (name, _) in _keyboardMap)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
DefaultFpsDenominator = LibDOSBox.VIDEO_DENOMINATOR_DOS
|
||||
};
|
||||
|
||||
private readonly List<IRomAsset> _roms;
|
||||
private readonly List<IRomAsset> _floppyDiskAssets;
|
||||
private readonly List<IDiscAsset> _discAssets;
|
||||
|
||||
// Drive management variables
|
||||
|
@ -52,20 +52,20 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
|
|||
public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
|
||||
: base(lp.Comm, DefaultConfig)
|
||||
{
|
||||
_roms = lp.Roms;
|
||||
_floppyDiskAssets = lp.Roms;
|
||||
_discAssets = lp.Discs;
|
||||
_syncSettings = lp.SyncSettings ?? new();
|
||||
|
||||
VsyncNumerator = (int) _syncSettings.FPSNumerator;
|
||||
VsyncDenominator = (int) _syncSettings.FPSDenominator;
|
||||
DriveLightEnabled = false;
|
||||
ControllerDefinition = CreateControllerDefinition(_syncSettings);
|
||||
ControllerDefinition = CreateControllerDefinition(_syncSettings, _floppyDiskAssets.Count, _discAssets.Count);
|
||||
|
||||
// Parsing input files
|
||||
var ConfigFiles = new List<IRomAsset>();
|
||||
|
||||
// Parsing rom files
|
||||
foreach (var file in _roms)
|
||||
foreach (var file in _floppyDiskAssets)
|
||||
{
|
||||
var ext = Path.GetExtension(file.RomPath);
|
||||
bool recognized = false;
|
||||
|
|
Loading…
Reference in New Issue