mirror of
https://github.com/libretro/Mesen.git
synced 2025-02-18 15:49:12 +00:00
NES 2.0: Updated controller type field code to match changes in spec
This commit is contained in:
parent
75cc1fe6f0
commit
346c496004
@ -219,7 +219,7 @@ GameInputType GameDatabase::GetInputType(GameSystem system, string inputType)
|
||||
} else if(inputType.compare("VsSwapAB") == 0) {
|
||||
return GameInputType::VsSystemSwapAB;
|
||||
} else {
|
||||
return GameInputType::Default;
|
||||
return GameInputType::StandardControllers;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ shared_ptr<BaseMapper> MapperFactory::InitializeFromFile(shared_ptr<Console> con
|
||||
if(loader.LoadFile(romFilename, fileData)) {
|
||||
RomData romData = loader.GetRomData();
|
||||
|
||||
if(romData.Info.IsInDatabase || romData.Info.IsNes20Header) {
|
||||
if((romData.Info.IsInDatabase || romData.Info.IsNes20Header) && romData.Info.InputType != GameInputType::Unspecified) {
|
||||
//If in DB or a NES 2.0 file, auto-configure the inputs
|
||||
if(console->GetSettings()->CheckFlag(EmulationFlags::AutoConfigureInput)) {
|
||||
console->GetSettings()->InitializeInputDevices(romData.Info.InputType, romData.Info.System, false);
|
||||
|
@ -203,9 +203,9 @@ GameInputType NESHeader::GetInputType()
|
||||
}
|
||||
|
||||
MessageManager::Log("[iNes] Unknown controller type.");
|
||||
return GameInputType::Default;
|
||||
return GameInputType::Unspecified;
|
||||
} else {
|
||||
return GameInputType::Default;
|
||||
return GameInputType::Unspecified;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ struct RomInfo
|
||||
|
||||
GameSystem System = GameSystem::Unknown;
|
||||
VsSystemType VsType = VsSystemType::Default;
|
||||
GameInputType InputType = GameInputType::Default;
|
||||
GameInputType InputType = GameInputType::Unspecified;
|
||||
PpuModel VsPpuModel = PpuModel::Ppu2C02;
|
||||
|
||||
bool HasChrRam = false;
|
||||
|
@ -373,8 +373,8 @@ enum class VsSystemType
|
||||
|
||||
enum class GameInputType
|
||||
{
|
||||
Default = 0,
|
||||
FamicomControllers = 1,
|
||||
Unspecified = 0,
|
||||
StandardControllers = 1,
|
||||
FourScore = 2,
|
||||
FourPlayerAdapter = 3,
|
||||
VsSystem = 4,
|
||||
@ -417,6 +417,8 @@ enum class GameInputType
|
||||
SnesMouse = 0x29,
|
||||
GenericMulticart = 0x2A, //not supported yet
|
||||
SnesControllers = 0x2B,
|
||||
RacermateBicycle = 0x2C, //not supported yet
|
||||
UForce = 0x2D, //not supported yet
|
||||
LastEntry
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user