NES 2.0: Updated controller type field code to match changes in spec

This commit is contained in:
Sour 2019-01-19 13:27:23 -05:00
parent 75cc1fe6f0
commit 346c496004
5 changed files with 9 additions and 7 deletions

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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
};