Browse Source

Enable 'auto' options by default when virtual gamepad is active

pull/3142/head
staphen 5 years ago committed by Anders Jenbo
parent
commit
1db945367a
  1. 20
      Source/options.cpp

20
Source/options.cpp

@ -53,6 +53,12 @@ namespace devilution {
#define DEFAULT_AUDIO_RESAMPLING_QUALITY 5 #define DEFAULT_AUDIO_RESAMPLING_QUALITY 5
#endif #endif
#if defined(VIRTUAL_GAMEPAD) && !defined(USE_SDL1)
#define AUTO_PICKUP_DEFAULT(bValue) true
#else
#define AUTO_PICKUP_DEFAULT(bValue) bValue
#endif
namespace { namespace {
std::string GetIniPath() std::string GetIniPath()
@ -219,7 +225,7 @@ void LoadOptions()
sgOptions.Audio.nSoundVolume = GetIniInt("Audio", "Sound Volume", VOLUME_MAX); sgOptions.Audio.nSoundVolume = GetIniInt("Audio", "Sound Volume", VOLUME_MAX);
sgOptions.Audio.nMusicVolume = GetIniInt("Audio", "Music Volume", VOLUME_MAX); sgOptions.Audio.nMusicVolume = GetIniInt("Audio", "Music Volume", VOLUME_MAX);
sgOptions.Audio.bWalkingSound = GetIniBool("Audio", "Walking Sound", true); sgOptions.Audio.bWalkingSound = GetIniBool("Audio", "Walking Sound", true);
sgOptions.Audio.bAutoEquipSound = GetIniBool("Audio", "Auto Equip Sound", false); sgOptions.Audio.bAutoEquipSound = GetIniBool("Audio", "Auto Equip Sound", AUTO_PICKUP_DEFAULT(false));
sgOptions.Audio.nSampleRate = GetIniInt("Audio", "Sample Rate", DEFAULT_AUDIO_SAMPLE_RATE); sgOptions.Audio.nSampleRate = GetIniInt("Audio", "Sample Rate", DEFAULT_AUDIO_SAMPLE_RATE);
sgOptions.Audio.nChannels = GetIniInt("Audio", "Channels", DEFAULT_AUDIO_CHANNELS); sgOptions.Audio.nChannels = GetIniInt("Audio", "Channels", DEFAULT_AUDIO_CHANNELS);
@ -263,13 +269,13 @@ void LoadOptions()
sgOptions.Gameplay.bTestBarbarian = GetIniBool("Game", "Test Barbarian", false); sgOptions.Gameplay.bTestBarbarian = GetIniBool("Game", "Test Barbarian", false);
sgOptions.Gameplay.bExperienceBar = GetIniBool("Game", "Experience Bar", false); sgOptions.Gameplay.bExperienceBar = GetIniBool("Game", "Experience Bar", false);
sgOptions.Gameplay.bEnemyHealthBar = GetIniBool("Game", "Enemy Health Bar", false); sgOptions.Gameplay.bEnemyHealthBar = GetIniBool("Game", "Enemy Health Bar", false);
sgOptions.Gameplay.bAutoGoldPickup = GetIniBool("Game", "Auto Gold Pickup", false); sgOptions.Gameplay.bAutoGoldPickup = GetIniBool("Game", "Auto Gold Pickup", AUTO_PICKUP_DEFAULT(false));
sgOptions.Gameplay.bAdriaRefillsMana = GetIniBool("Game", "Adria Refills Mana", false); sgOptions.Gameplay.bAdriaRefillsMana = GetIniBool("Game", "Adria Refills Mana", false);
sgOptions.Gameplay.bAutoEquipWeapons = GetIniBool("Game", "Auto Equip Weapons", true); sgOptions.Gameplay.bAutoEquipWeapons = GetIniBool("Game", "Auto Equip Weapons", AUTO_PICKUP_DEFAULT(true));
sgOptions.Gameplay.bAutoEquipArmor = GetIniBool("Game", "Auto Equip Armor", false); sgOptions.Gameplay.bAutoEquipArmor = GetIniBool("Game", "Auto Equip Armor", AUTO_PICKUP_DEFAULT(false));
sgOptions.Gameplay.bAutoEquipHelms = GetIniBool("Game", "Auto Equip Helms", false); sgOptions.Gameplay.bAutoEquipHelms = GetIniBool("Game", "Auto Equip Helms", AUTO_PICKUP_DEFAULT(false));
sgOptions.Gameplay.bAutoEquipShields = GetIniBool("Game", "Auto Equip Shields", false); sgOptions.Gameplay.bAutoEquipShields = GetIniBool("Game", "Auto Equip Shields", AUTO_PICKUP_DEFAULT(false));
sgOptions.Gameplay.bAutoEquipJewelry = GetIniBool("Game", "Auto Equip Jewelry", false); sgOptions.Gameplay.bAutoEquipJewelry = GetIniBool("Game", "Auto Equip Jewelry", AUTO_PICKUP_DEFAULT(false));
sgOptions.Gameplay.bRandomizeQuests = GetIniBool("Game", "Randomize Quests", true); sgOptions.Gameplay.bRandomizeQuests = GetIniBool("Game", "Randomize Quests", true);
sgOptions.Gameplay.bShowMonsterType = GetIniBool("Game", "Show Monster Type", false); sgOptions.Gameplay.bShowMonsterType = GetIniBool("Game", "Show Monster Type", false);
sgOptions.Gameplay.bDisableCripplingShrines = GetIniBool("Game", "Disable Crippling Shrines", false); sgOptions.Gameplay.bDisableCripplingShrines = GetIniBool("Game", "Disable Crippling Shrines", false);

Loading…
Cancel
Save