diff --git a/Source/options.cpp b/Source/options.cpp index 876f68689..dffaa51f8 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -53,6 +53,12 @@ namespace devilution { #define DEFAULT_AUDIO_RESAMPLING_QUALITY 5 #endif +#if defined(VIRTUAL_GAMEPAD) && !defined(USE_SDL1) +#define AUTO_PICKUP_DEFAULT(bValue) true +#else +#define AUTO_PICKUP_DEFAULT(bValue) bValue +#endif + namespace { std::string GetIniPath() @@ -219,7 +225,7 @@ void LoadOptions() sgOptions.Audio.nSoundVolume = GetIniInt("Audio", "Sound Volume", VOLUME_MAX); sgOptions.Audio.nMusicVolume = GetIniInt("Audio", "Music Volume", VOLUME_MAX); 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.nChannels = GetIniInt("Audio", "Channels", DEFAULT_AUDIO_CHANNELS); @@ -263,13 +269,13 @@ void LoadOptions() sgOptions.Gameplay.bTestBarbarian = GetIniBool("Game", "Test Barbarian", false); sgOptions.Gameplay.bExperienceBar = GetIniBool("Game", "Experience 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.bAutoEquipWeapons = GetIniBool("Game", "Auto Equip Weapons", true); - sgOptions.Gameplay.bAutoEquipArmor = GetIniBool("Game", "Auto Equip Armor", false); - sgOptions.Gameplay.bAutoEquipHelms = GetIniBool("Game", "Auto Equip Helms", false); - sgOptions.Gameplay.bAutoEquipShields = GetIniBool("Game", "Auto Equip Shields", false); - sgOptions.Gameplay.bAutoEquipJewelry = GetIniBool("Game", "Auto Equip Jewelry", false); + sgOptions.Gameplay.bAutoEquipWeapons = GetIniBool("Game", "Auto Equip Weapons", AUTO_PICKUP_DEFAULT(true)); + sgOptions.Gameplay.bAutoEquipArmor = GetIniBool("Game", "Auto Equip Armor", AUTO_PICKUP_DEFAULT(false)); + sgOptions.Gameplay.bAutoEquipHelms = GetIniBool("Game", "Auto Equip Helms", AUTO_PICKUP_DEFAULT(false)); + sgOptions.Gameplay.bAutoEquipShields = GetIniBool("Game", "Auto Equip Shields", AUTO_PICKUP_DEFAULT(false)); + sgOptions.Gameplay.bAutoEquipJewelry = GetIniBool("Game", "Auto Equip Jewelry", AUTO_PICKUP_DEFAULT(false)); sgOptions.Gameplay.bRandomizeQuests = GetIniBool("Game", "Randomize Quests", true); sgOptions.Gameplay.bShowMonsterType = GetIniBool("Game", "Show Monster Type", false); sgOptions.Gameplay.bDisableCripplingShrines = GetIniBool("Game", "Disable Crippling Shrines", false);