mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
input/overlays: add option to lock overlay input to player one
This commit is contained in:
parent
9ecfecb83e
commit
7b64cd2a8e
@ -223,6 +223,11 @@ namespace rsx
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pad_index > 0 && g_cfg.io.lock_overlay_input_to_player_one)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!pad)
|
||||
{
|
||||
rsx_log.fatal("Pad %d is nullptr", pad_index);
|
||||
|
@ -277,6 +277,7 @@ struct cfg_root : cfg::node
|
||||
cfg::uint<0, 100'000> pad_sleep{this, "Pad handler sleep (microseconds)", 1'000, true};
|
||||
cfg::_bool background_input_enabled{this, "Background input enabled", true, true};
|
||||
cfg::_bool show_move_cursor{this, "Show move cursor", false, true};
|
||||
cfg::_bool lock_overlay_input_to_player_one{this, "Lock overlay input to player one", false, true};
|
||||
cfg::string midi_devices{ this, "Emulated Midi devices", "ßßß@@@ßßß@@@ßßß@@@" };
|
||||
} io{ this };
|
||||
|
||||
|
@ -411,6 +411,9 @@ void pad_thread::operator()()
|
||||
|
||||
for (usz i = 0; i < m_pads.size() && !ps_button_pressed; i++)
|
||||
{
|
||||
if (i > 0 && g_cfg.io.lock_overlay_input_to_player_one)
|
||||
break;
|
||||
|
||||
const auto& pad = m_pads[i];
|
||||
|
||||
if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
|
||||
|
@ -144,6 +144,7 @@ enum class emu_settings_type
|
||||
// Input / Output
|
||||
BackgroundInput,
|
||||
ShowMoveCursor,
|
||||
LockOvlIptToP1,
|
||||
PadHandlerMode,
|
||||
PadConnection,
|
||||
KeyboardHandler,
|
||||
@ -327,6 +328,7 @@ inline static const QMap<emu_settings_type, cfg_location> settings_location =
|
||||
// Input / Output
|
||||
{ emu_settings_type::BackgroundInput, { "Input/Output", "Background input enabled"}},
|
||||
{ emu_settings_type::ShowMoveCursor, { "Input/Output", "Show move cursor"}},
|
||||
{ emu_settings_type::LockOvlIptToP1, { "Input/Output", "Lock overlay input to player one"}},
|
||||
{ emu_settings_type::PadHandlerMode, { "Input/Output", "Pad handler mode"}},
|
||||
{ emu_settings_type::PadConnection, { "Input/Output", "Keep pads connected" }},
|
||||
{ emu_settings_type::KeyboardHandler, { "Input/Output", "Keyboard"}},
|
||||
|
@ -1244,6 +1244,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
m_emu_settings->EnhanceCheckBox(ui->showMoveCursorBox, emu_settings_type::ShowMoveCursor);
|
||||
SubscribeTooltip(ui->showMoveCursorBox, tooltips.settings.show_move_cursor);
|
||||
|
||||
m_emu_settings->EnhanceCheckBox(ui->lockOverlayInputToPlayerOne, emu_settings_type::LockOvlIptToP1);
|
||||
SubscribeTooltip(ui->lockOverlayInputToPlayerOne, tooltips.settings.lock_overlay_input_to_player_one);
|
||||
|
||||
// Midi
|
||||
const QString midi_none = m_emu_settings->m_midi_creator.get_none();
|
||||
const midi_device def_midi_device{ .type = midi_device_type::keyboard, .name = midi_none.toStdString() };
|
||||
|
@ -1803,6 +1803,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="lockOverlayInputToPlayerOne">
|
||||
<property name="text">
|
||||
<string>Lock Overlay Input To Player One</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacerIoAdditionalSettings">
|
||||
<property name="orientation">
|
||||
|
@ -227,6 +227,8 @@ public:
|
||||
const QString show_move_cursor = tr("Shows the raw position of the PS Move input.\nThis can be very helpful during calibration screens.");
|
||||
const QString midi_devices = tr("Select up to 3 emulated midi devices and their type.");
|
||||
|
||||
const QString lock_overlay_input_to_player_one = tr("Locks the native overlay input to the first player.");
|
||||
|
||||
// network
|
||||
|
||||
const QString net_status = tr("If set to Connected, RPCS3 will allow programs to use your internet connection.");
|
||||
|
Loading…
Reference in New Issue
Block a user