mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
input: add background input option
Adds an option to disable background input to the IO tab in the settings dialog. This will disable pad input as well as ps move and overlays input when the window is unfocused.
This commit is contained in:
parent
c8c035eeef
commit
4823d4c32a
16 changed files with 196 additions and 92 deletions
|
@ -55,6 +55,13 @@ LOG_CHANNEL(gui_log, "GUI");
|
|||
extern atomic_t<bool> g_user_asked_for_frame_capture;
|
||||
extern atomic_t<bool> g_disable_frame_limit;
|
||||
|
||||
atomic_t<bool> g_game_window_focused = false;
|
||||
|
||||
bool is_input_allowed()
|
||||
{
|
||||
return g_game_window_focused || g_cfg.io.background_input_enabled;
|
||||
}
|
||||
|
||||
constexpr auto qstr = QString::fromStdString;
|
||||
|
||||
gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon, std::shared_ptr<gui_settings> gui_settings)
|
||||
|
@ -115,6 +122,7 @@ gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon,
|
|||
// Change cursor when this window gets or loses focus.
|
||||
connect(this, &QWindow::activeChanged, this, [this]()
|
||||
{
|
||||
g_game_window_focused = isActive();
|
||||
handle_cursor(visibility(), false, true);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue