mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 08:15:45 -04:00
GameSettings: Disable analog mode forcing instead of forcing digital controller
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "common/state_wrapper.h"
|
||||
#include "common/string_util.h"
|
||||
#include "host_interface.h"
|
||||
#include "settings.h"
|
||||
#include "system.h"
|
||||
#include <cmath>
|
||||
Log_SetChannel(AnalogController);
|
||||
@ -31,7 +32,17 @@ void AnalogController::Reset()
|
||||
ResetRumbleConfig();
|
||||
|
||||
if (m_force_analog_on_reset)
|
||||
SetAnalogMode(true);
|
||||
{
|
||||
if (g_settings.controller_disable_analog_mode_forcing)
|
||||
{
|
||||
g_host_interface->AddOSDMessage(
|
||||
g_host_interface->TranslateStdString(
|
||||
"OSDMessage", "Analog mode forcing is disabled by game settings. Controller will start in digital mode."),
|
||||
10.0f);
|
||||
}
|
||||
else
|
||||
SetAnalogMode(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool AnalogController::DoState(StateWrapper& sw)
|
||||
|
@ -218,6 +218,7 @@ void Settings::Load(SettingsInterface& si)
|
||||
ParseControllerTypeName(
|
||||
si.GetStringValue("Controller2", "Type", GetControllerTypeName(DEFAULT_CONTROLLER_2_TYPE)).c_str())
|
||||
.value_or(DEFAULT_CONTROLLER_2_TYPE);
|
||||
controller_disable_analog_mode_forcing = false;
|
||||
|
||||
memory_card_types[0] =
|
||||
ParseMemoryCardTypeName(
|
||||
|
@ -175,6 +175,8 @@ struct Settings
|
||||
bool bios_patch_fast_boot = false;
|
||||
|
||||
std::array<ControllerType, NUM_CONTROLLER_AND_CARD_PORTS> controller_types{};
|
||||
bool controller_disable_analog_mode_forcing = false;
|
||||
|
||||
std::array<MemoryCardType, NUM_CONTROLLER_AND_CARD_PORTS> memory_card_types{};
|
||||
std::array<std::string, NUM_CONTROLLER_AND_CARD_PORTS> memory_card_paths{};
|
||||
bool memory_card_use_playlist_title = true;
|
||||
|
Reference in New Issue
Block a user