mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-05 06:35:04 -06:00
gui/input: disable stick anti deadzone in pad navigation
This is only meant to be used during emulation.
This commit is contained in:
parent
1d05cf9ce5
commit
53c33cd812
@ -137,7 +137,7 @@ bool gui_pad_thread::init()
|
|||||||
for (usz i = 0; i < g_cfg_input.player.size(); i++)
|
for (usz i = 0; i < g_cfg_input.player.size(); i++)
|
||||||
{
|
{
|
||||||
std::shared_ptr<PadHandlerBase> handler;
|
std::shared_ptr<PadHandlerBase> handler;
|
||||||
gui_pad_thread::InitPadConfig(g_cfg_input.player[i]->config, g_cfg_input.player[i]->handler, handler);
|
gui_pad_thread::init_pad_config(g_cfg_input.player[i]->config, g_cfg_input.player[i]->handler, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reload with proper defaults
|
// Reload with proper defaults
|
||||||
@ -153,13 +153,17 @@ bool gui_pad_thread::init()
|
|||||||
cfg_player* cfg = g_cfg_input.player[i];
|
cfg_player* cfg = g_cfg_input.player[i];
|
||||||
|
|
||||||
const pad_handler handler_type = cfg->handler.get();
|
const pad_handler handler_type = cfg->handler.get();
|
||||||
std::shared_ptr<PadHandlerBase> cur_pad_handler = GetHandler(handler_type);
|
std::shared_ptr<PadHandlerBase> cur_pad_handler = get_handler(handler_type);
|
||||||
|
|
||||||
if (!cur_pad_handler)
|
if (!cur_pad_handler)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable stick anti-deadzone. We are not trying to emulate the PS3's behavior here.
|
||||||
|
cfg->config.lstick_anti_deadzone.set(0);
|
||||||
|
cfg->config.rstick_anti_deadzone.set(0);
|
||||||
|
|
||||||
cur_pad_handler->Init();
|
cur_pad_handler->Init();
|
||||||
|
|
||||||
m_handler = cur_pad_handler;
|
m_handler = cur_pad_handler;
|
||||||
@ -229,7 +233,7 @@ bool gui_pad_thread::init()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<PadHandlerBase> gui_pad_thread::GetHandler(pad_handler type)
|
std::shared_ptr<PadHandlerBase> gui_pad_thread::get_handler(pad_handler type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -265,14 +269,14 @@ std::shared_ptr<PadHandlerBase> gui_pad_thread::GetHandler(pad_handler type)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_pad_thread::InitPadConfig(cfg_pad& cfg, pad_handler type, std::shared_ptr<PadHandlerBase>& handler)
|
void gui_pad_thread::init_pad_config(cfg_pad& cfg, pad_handler type, std::shared_ptr<PadHandlerBase>& handler)
|
||||||
{
|
{
|
||||||
// We need to restore the original defaults first.
|
// We need to restore the original defaults first.
|
||||||
cfg.restore_defaults();
|
cfg.restore_defaults();
|
||||||
|
|
||||||
if (!handler)
|
if (!handler)
|
||||||
{
|
{
|
||||||
handler = GetHandler(type);
|
handler = get_handler(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handler)
|
if (handler)
|
||||||
|
|||||||
@ -19,8 +19,8 @@ public:
|
|||||||
|
|
||||||
void update_settings(const std::shared_ptr<gui_settings>& settings);
|
void update_settings(const std::shared_ptr<gui_settings>& settings);
|
||||||
|
|
||||||
static std::shared_ptr<PadHandlerBase> GetHandler(pad_handler type);
|
static std::shared_ptr<PadHandlerBase> get_handler(pad_handler type);
|
||||||
static void InitPadConfig(cfg_pad& cfg, pad_handler type, std::shared_ptr<PadHandlerBase>& handler);
|
static void init_pad_config(cfg_pad& cfg, pad_handler type, std::shared_ptr<PadHandlerBase>& handler);
|
||||||
|
|
||||||
static void reset()
|
static void reset()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user