mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 09:35:40 +00:00
Merge pull request #1195 from ggrtk/analog-controller
AnalogController: Clarify option for forcing analog mode
This commit is contained in:
commit
d2218f6f1c
|
@ -14,7 +14,7 @@ ForcePGXPCPUMode = true
|
|||
# Doom (USA) (Rev 1) (SLUS-00077)
|
||||
[SLUS-00077]
|
||||
DisableUpscaling = true
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
# Pop'n Music 6 (Japan) (SLPM-87089)
|
||||
[SLPM-87089]
|
||||
|
@ -113,94 +113,94 @@ DisplayActiveEndOffset = 68
|
|||
[SLUS-00297]
|
||||
DisableUpscaling = true
|
||||
DisablePGXP = true
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SCUS-94350 (Destruction Derby 2 (USA))
|
||||
[SCUS-94350]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SCUS-94900 (Crash Bandicoot (USA))
|
||||
[SCUS-94900]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# PCPX-96085 (Gran Turismo (Japan) (Demo 1))
|
||||
[PCPX-96085]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00590 (Need for Speed - V-Rally (USA))
|
||||
[SLUS-00590]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00403 (Rage Racer (USA))
|
||||
[SLUS-00403]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SCUS-94300 (Ridge Racer (USA))
|
||||
[SCUS-94300]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00214 (Ridge Racer Revolution (USA))
|
||||
[SLUS-00214]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00204 (Road & Track Presents - The Need for Speed (USA))
|
||||
[SLUS-00204]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00006 (Tekken (USA))
|
||||
[SLUS-00006]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00213 (Tekken 2 (USA))
|
||||
[SLUS-00213]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SCES-00344 (Crash Bandicoot (Europe))
|
||||
[SCES-00344]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00355 (Duke Nukem - Total Meltdown (USA))
|
||||
[SLUS-00355]
|
||||
DisableUpscaling = true
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00331 (Final Doom (USA))
|
||||
[SLUS-00331]
|
||||
DisableUpscaling = true
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00106 (Grand Theft Auto (USA))
|
||||
[SLUS-00106]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00005 (Rayman (USA))
|
||||
[SLUS-00005]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-01265 (Rayman Brain Games (USA))
|
||||
[SLUS-01265]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00601 (Skullmonkeys (USA))
|
||||
[SLUS-00601]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLPS-00435 (Megatudo 2096 (Japan))
|
||||
|
@ -240,17 +240,17 @@ ForcePGXPVertexCache = true
|
|||
|
||||
# SLPM-86023 (Akumajou Dracula X: Gekka no Yasoukyoku)
|
||||
[SLPM-86023]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00067 (Castlevania - Symphony of the Night (USA))
|
||||
[SLUS-00067]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLES-00524 (Castlevania - Symphony of the Night (Europe))
|
||||
[SLES-00524]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLPS-00712 (Tenga Seiha (Japan))
|
||||
|
@ -270,7 +270,7 @@ ForceInterpreter = true
|
|||
|
||||
# SLPS-02459 (Otona no Asobi (Japan))
|
||||
[SLPS-02459]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLPM-86750 (Shiritsu Justice Gakuen: Nekketsu Seishun Nikki 2 (Japan))
|
||||
|
@ -285,93 +285,93 @@ ForceInterlacing = true
|
|||
|
||||
# PowerSlave (SLUS-00102)
|
||||
[SLUS-00102]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Tomb Raider (SLUS-00152)
|
||||
[SLUS-00152]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Megaman Legends (SLUS-00603)
|
||||
[SLUS-00603]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Hexen (SLUS-00348)
|
||||
[SLUS-00348]
|
||||
DisableUpscaling = true
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Gex (SLUS-00042)
|
||||
[SLUS-00042]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Megaman x4 (SLUS-00561)
|
||||
[SLUS-00561]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Road Rash (SLUS-00035)
|
||||
[SLUS-00035]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# StarBlade Alpha (SLUS-00057)
|
||||
[SLUS-00057]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Spot Goes to Hollywood (SLUS-00014)
|
||||
[SLUS-00014]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Philsoma (SCUS-94403)
|
||||
[SCUS-94403]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Rampage World Tour (SLUS-00549)
|
||||
[SLUS-00549]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Soul Blade (SLUS-00240)
|
||||
[SLUS-00240]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Blood Omen Legacy of Kain (SLUS-00027)
|
||||
[SLUS-00027]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Die Hard Trilogy (SLUS-00119)
|
||||
[SLUS-00119]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Disrupter (SLUS-00224)
|
||||
[SLUS-00224]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Megaman 8 (SLUS-00453)
|
||||
[SLUS-00453]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# R-Types (SLUS-00753)
|
||||
[SLUS-00753]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# Guardian's Crusade (SLUS-00811)
|
||||
[SLUS-00811]
|
||||
ForceDigitalController = true
|
||||
DisableAnalogModeForcing = true
|
||||
|
||||
|
||||
# SLUS-00208 (Buster Bros. Collection (USA))
|
||||
|
|
|
@ -31,7 +31,7 @@ def parse_ini(path):
|
|||
"DisablePGXPTextureCorrection",
|
||||
"ForcePGXPVertexCache",
|
||||
"ForcePGXPCPUMode",
|
||||
"ForceDigitalController",
|
||||
"DisableAnalogModeForcing",
|
||||
"ForceRecompilerMemoryExceptions",
|
||||
"ForceRecompilerICache"
|
||||
]
|
||||
|
|
|
@ -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);
|
||||
|
@ -30,8 +31,18 @@ void AnalogController::Reset()
|
|||
|
||||
ResetRumbleConfig();
|
||||
|
||||
if (m_auto_enable_analog)
|
||||
SetAnalogMode(true);
|
||||
if (m_force_analog_on_reset)
|
||||
{
|
||||
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)
|
||||
|
@ -679,8 +690,9 @@ u32 AnalogController::StaticGetVibrationMotorCount()
|
|||
Controller::SettingList AnalogController::StaticGetSettings()
|
||||
{
|
||||
static constexpr std::array<SettingInfo, 4> settings = {
|
||||
{{SettingInfo::Type::Boolean, "AutoEnableAnalog", TRANSLATABLE("AnalogController", "Enable Analog Mode on Reset"),
|
||||
TRANSLATABLE("AnalogController", "Automatically enables analog mode when the console is reset/powered on."),
|
||||
{{SettingInfo::Type::Boolean, "ForceAnalogOnReset", TRANSLATABLE("AnalogController", "Force Analog Mode on Reset"),
|
||||
TRANSLATABLE("AnalogController", "Forces the controller to analog mode when the console is reset/powered on. May "
|
||||
"cause issues with games, so it is recommended to leave this option off."),
|
||||
"false"},
|
||||
{SettingInfo::Type::Boolean, "AnalogDPadInDigitalMode",
|
||||
TRANSLATABLE("AnalogController", "Use Analog Sticks for D-Pad in Digital Mode"),
|
||||
|
@ -704,7 +716,7 @@ Controller::SettingList AnalogController::StaticGetSettings()
|
|||
void AnalogController::LoadSettings(const char* section)
|
||||
{
|
||||
Controller::LoadSettings(section);
|
||||
m_auto_enable_analog = g_host_interface->GetBoolSettingValue(section, "AutoEnableAnalog", false);
|
||||
m_force_analog_on_reset = g_host_interface->GetBoolSettingValue(section, "ForceAnalogOnReset", false);
|
||||
m_analog_dpad_in_digital_mode = g_host_interface->GetBoolSettingValue(section, "AnalogDPadInDigitalMode", false);
|
||||
m_axis_scale =
|
||||
std::clamp(std::abs(g_host_interface->GetFloatSettingValue(section, "AxisScale", 1.00f)), 0.01f, 1.50f);
|
||||
|
|
|
@ -144,7 +144,7 @@ private:
|
|||
|
||||
u32 m_index;
|
||||
|
||||
bool m_auto_enable_analog = false;
|
||||
bool m_force_analog_on_reset = false;
|
||||
bool m_analog_dpad_in_digital_mode = false;
|
||||
float m_axis_scale = 1.00f;
|
||||
u8 m_rumble_bias = 8;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -19,7 +19,7 @@ std::unique_ptr<GameSettings::Entry> GetSettingsForGame(const std::string& game_
|
|||
if (game_code == "SLUS-00077")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::DisableUpscaling);
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
|
@ -138,111 +138,111 @@ std::unique_ptr<GameSettings::Entry> GetSettingsForGame(const std::string& game_
|
|||
{
|
||||
gs->AddTrait(GameSettings::Trait::DisableUpscaling);
|
||||
gs->AddTrait(GameSettings::Trait::DisablePGXP);
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SCUS-94350")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SCUS-94900")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "PCPX-96085")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00590")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00403")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SCUS-94300")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00214")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00204")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00006")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00213")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SCES-00344")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00355")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::DisableUpscaling);
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00331")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::DisableUpscaling);
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00106")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00005")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-01265")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00601")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
|
@ -290,19 +290,19 @@ std::unique_ptr<GameSettings::Entry> GetSettingsForGame(const std::string& game_
|
|||
|
||||
if (game_code == "SLPM-86023")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00067")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLES-00524")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ std::unique_ptr<GameSettings::Entry> GetSettingsForGame(const std::string& game_
|
|||
|
||||
if (game_code == "SLPS-02459")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
|
@ -344,110 +344,110 @@ std::unique_ptr<GameSettings::Entry> GetSettingsForGame(const std::string& game_
|
|||
|
||||
if (game_code == "SLUS-00102")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00152")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00603")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00348")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::DisableUpscaling);
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00042")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00561")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00035")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00057")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00014")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SCUS-94403")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00549")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00240")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00027")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00119")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00224")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00453")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00753")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
if (game_code == "SLUS-00811")
|
||||
{
|
||||
gs->AddTrait(GameSettings::Trait::ForceDigitalController);
|
||||
gs->AddTrait(GameSettings::Trait::DisableAnalogModeForcing);
|
||||
return gs;
|
||||
}
|
||||
|
||||
|
|
|
@ -753,9 +753,10 @@ static std::array<retro_core_option_definition, 49> s_option_definitions = {{
|
|||
{"PlayStationMouse", "PlayStation Mouse"},
|
||||
{"NeGcon", "NeGcon"}},
|
||||
"DigitalController"},
|
||||
{"duckstation_Controller1.AutoEnableAnalog",
|
||||
"Controller 1 Auto Analog Mode",
|
||||
"Automatically enables analog mode in supported controllers at start/reset.",
|
||||
{"duckstation_Controller1.ForceAnalogOnReset",
|
||||
"Controller 1 Force Analog Mode on Reset",
|
||||
"Forces analog mode in Analog Controller (DualShock) at start/reset. May cause issues with some games. Only use "
|
||||
"this option for games that support analog mode but do not automatically enable it themselves.",
|
||||
{{"true", "Enabled"}, {"false", "Disabled"}},
|
||||
"false"},
|
||||
{"duckstation_Controller1.AnalogDPadInDigitalMode",
|
||||
|
@ -778,9 +779,10 @@ static std::array<retro_core_option_definition, 49> s_option_definitions = {{
|
|||
{"PlayStationMouse", "PlayStation Mouse"},
|
||||
{"NeGcon", "NeGcon"}},
|
||||
"None"},
|
||||
{"duckstation_Controller2.AutoEnableAnalog",
|
||||
"Controller 2 Auto Analog Mode",
|
||||
"Automatically enables analog mode in supported controllers at start/reset.",
|
||||
{"duckstation_Controller2.ForceAnalogOnReset",
|
||||
"Controller 2 Force Analog Mode on Reset",
|
||||
"Forces analog mode in Analog Controller (DualShock) at start/reset. May cause issues with some games. Only use "
|
||||
"this option for games that support analog mode but do not automatically enable it themselves.",
|
||||
{{"true", "Enabled"}, {"false", "Disabled"}},
|
||||
"false"},
|
||||
{"duckstation_Controller2.AnalogDPadInDigitalMode",
|
||||
|
|
|
@ -34,7 +34,7 @@ std::array<std::pair<const char*, const char*>, static_cast<u32>(Trait::Count)>
|
|||
{"DisablePGXPTextureCorrection", TRANSLATABLE("GameSettingsTrait", "Disable PGXP Texture Correction")},
|
||||
{"ForcePGXPVertexCache", TRANSLATABLE("GameSettingsTrait", "Force PGXP Vertex Cache")},
|
||||
{"ForcePGXPCPUMode", TRANSLATABLE("GameSettingsTrait", "Force PGXP CPU Mode")},
|
||||
{"ForceDigitalController", TRANSLATABLE("GameSettingsTrait", "Force Digital Controller")},
|
||||
{"DisableAnalogModeForcing", TRANSLATABLE("GameSettingsTrait", "Disable Forcing Controller Analog Mode on Reset")},
|
||||
{"ForceRecompilerMemoryExceptions", TRANSLATABLE("GameSettingsTrait", "Force Recompiler Memory Exceptions")},
|
||||
{"ForceRecompilerICache", TRANSLATABLE("GameSettingsTrait", "Force Recompiler ICache")},
|
||||
}};
|
||||
|
@ -207,13 +207,13 @@ static void ParseIniSection(Entry* entry, const char* section, const CSimpleIniA
|
|||
entry->display_active_start_offset = static_cast<s16>(lvalue);
|
||||
lvalue = ini.GetLongValue(section, "DisplayActiveEndOffset", 0);
|
||||
if (lvalue != 0)
|
||||
entry->display_active_end_offset = static_cast<s8>(lvalue);
|
||||
entry->display_active_end_offset = static_cast<s16>(lvalue);
|
||||
lvalue = ini.GetLongValue(section, "DisplayLineStartOffset", 0);
|
||||
if (lvalue != 0)
|
||||
entry->display_line_start_offset = static_cast<s8>(lvalue);
|
||||
lvalue = ini.GetLongValue(section, "DisplayLineEndOffset", 0);
|
||||
if (lvalue != 0)
|
||||
entry->display_line_end_offset = static_cast<s16>(lvalue);
|
||||
entry->display_line_end_offset = static_cast<s8>(lvalue);
|
||||
lvalue = ini.GetLongValue(section, "DMAMaxSliceTicks", 0);
|
||||
if (lvalue > 0)
|
||||
entry->dma_max_slice_ticks = static_cast<u32>(lvalue);
|
||||
|
@ -709,23 +709,9 @@ void Entry::ApplySettings(bool display_osd_messages) const
|
|||
g_settings.gpu_pgxp_cpu = true;
|
||||
}
|
||||
|
||||
if (HasTrait(Trait::ForceDigitalController))
|
||||
if (HasTrait(Trait::DisableAnalogModeForcing))
|
||||
{
|
||||
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
|
||||
{
|
||||
if (g_settings.controller_types[i] == ControllerType::AnalogController)
|
||||
{
|
||||
if (display_osd_messages)
|
||||
{
|
||||
g_host_interface->AddFormattedOSDMessage(
|
||||
osd_duration,
|
||||
g_host_interface->TranslateString("OSDMessage", "Controller %u changed to digital by game settings."),
|
||||
i + 1u);
|
||||
}
|
||||
|
||||
g_settings.controller_types[i] = ControllerType::DigitalController;
|
||||
}
|
||||
}
|
||||
g_settings.controller_disable_analog_mode_forcing = true;
|
||||
}
|
||||
|
||||
if (HasTrait(Trait::ForceRecompilerMemoryExceptions))
|
||||
|
|
|
@ -24,7 +24,7 @@ enum class Trait : u32
|
|||
DisablePGXPTextureCorrection,
|
||||
ForcePGXPVertexCache,
|
||||
ForcePGXPCPUMode,
|
||||
ForceDigitalController,
|
||||
DisableAnalogModeForcing,
|
||||
ForceRecompilerMemoryExceptions,
|
||||
ForceRecompilerICache,
|
||||
|
||||
|
|
Loading…
Reference in a new issue