mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
Qt: disable shortcuts completely if disable kb hotkeys is enabled
This commit is contained in:
parent
7cec2d0e18
commit
82c85c1a9c
1 changed files with 16 additions and 5 deletions
|
@ -68,8 +68,6 @@ gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon,
|
||||||
, m_start_games_fullscreen(force_fullscreen)
|
, m_start_games_fullscreen(force_fullscreen)
|
||||||
, m_renderer(g_cfg.video.renderer)
|
, m_renderer(g_cfg.video.renderer)
|
||||||
{
|
{
|
||||||
load_gui_settings();
|
|
||||||
|
|
||||||
m_window_title = Emu.GetFormattedTitle(0);
|
m_window_title = Emu.GetFormattedTitle(0);
|
||||||
|
|
||||||
if (!g_cfg_recording.load())
|
if (!g_cfg_recording.load())
|
||||||
|
@ -121,8 +119,7 @@ gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon,
|
||||||
create();
|
create();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_shortcut_handler = new shortcut_handler(gui::shortcuts::shortcut_handler_id::game_window, this, m_gui_settings);
|
load_gui_settings();
|
||||||
connect(m_shortcut_handler, &shortcut_handler::shortcut_activated, this, &gs_frame::handle_shortcut);
|
|
||||||
|
|
||||||
// Change cursor when in fullscreen.
|
// Change cursor when in fullscreen.
|
||||||
connect(this, &QWindow::visibilityChanged, this, [this](QWindow::Visibility visibility)
|
connect(this, &QWindow::visibilityChanged, this, [this](QWindow::Visibility visibility)
|
||||||
|
@ -174,6 +171,20 @@ void gs_frame::load_gui_settings()
|
||||||
m_lock_mouse_in_fullscreen = m_gui_settings->GetValue(gui::gs_lockMouseFs).toBool();
|
m_lock_mouse_in_fullscreen = m_gui_settings->GetValue(gui::gs_lockMouseFs).toBool();
|
||||||
m_hide_mouse_after_idletime = m_gui_settings->GetValue(gui::gs_hideMouseIdle).toBool();
|
m_hide_mouse_after_idletime = m_gui_settings->GetValue(gui::gs_hideMouseIdle).toBool();
|
||||||
m_hide_mouse_idletime = m_gui_settings->GetValue(gui::gs_hideMouseIdleTime).toUInt();
|
m_hide_mouse_idletime = m_gui_settings->GetValue(gui::gs_hideMouseIdleTime).toUInt();
|
||||||
|
|
||||||
|
if (m_disable_kb_hotkeys)
|
||||||
|
{
|
||||||
|
if (m_shortcut_handler)
|
||||||
|
{
|
||||||
|
m_shortcut_handler->deleteLater();
|
||||||
|
m_shortcut_handler = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!m_shortcut_handler)
|
||||||
|
{
|
||||||
|
m_shortcut_handler = new shortcut_handler(gui::shortcuts::shortcut_handler_id::game_window, this, m_gui_settings);
|
||||||
|
connect(m_shortcut_handler, &shortcut_handler::shortcut_activated, this, &gs_frame::handle_shortcut);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gs_frame::update_shortcuts()
|
void gs_frame::update_shortcuts()
|
||||||
|
@ -1101,7 +1112,7 @@ void gs_frame::handle_cursor(QWindow::Visibility visibility, bool visibility_cha
|
||||||
|
|
||||||
void gs_frame::mouse_hide_timeout()
|
void gs_frame::mouse_hide_timeout()
|
||||||
{
|
{
|
||||||
// Our idle timeout occured, so we update the cursor
|
// Our idle timeout occurred, so we update the cursor
|
||||||
if (m_hide_mouse_after_idletime && m_show_mouse)
|
if (m_hide_mouse_after_idletime && m_show_mouse)
|
||||||
{
|
{
|
||||||
handle_cursor(visibility(), false, false, false);
|
handle_cursor(visibility(), false, false, false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue