mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Hotkeys: Add "Toggle USB Keyboard" hotkey
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
#include "Core/Core.h"
|
||||
#include "Core/IOS/IOS.h"
|
||||
|
||||
#include "DolphinQt/Settings.h"
|
||||
#include "DolphinQt/Settings/USBDeviceAddToWhitelistDialog.h"
|
||||
|
||||
#include "UICommon/USBUtils.h"
|
||||
@ -73,6 +74,8 @@ void WiiPane::ConnectLayout()
|
||||
connect(m_pal60_mode_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_sd_card_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
|
||||
connect(m_connect_keyboard_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);
|
||||
connect(&Settings::Instance(), &Settings::USBKeyboardConnectionChanged,
|
||||
m_connect_keyboard_checkbox, &QCheckBox::setChecked);
|
||||
|
||||
// Whitelisted USB Passthrough Devices
|
||||
connect(m_whitelist_usb_list, &QListWidget::itemClicked, this, &WiiPane::ValidateSelectionState);
|
||||
@ -190,7 +193,6 @@ void WiiPane::OnEmulationStateChanged(bool running)
|
||||
m_screensaver_checkbox->setEnabled(!running);
|
||||
m_pal60_mode_checkbox->setEnabled(!running);
|
||||
m_sd_card_checkbox->setEnabled(!running);
|
||||
m_connect_keyboard_checkbox->setEnabled(!running);
|
||||
m_system_language_choice->setEnabled(!running);
|
||||
m_aspect_ratio_choice->setEnabled(!running);
|
||||
m_wiimote_motor->setEnabled(!running);
|
||||
@ -203,7 +205,7 @@ void WiiPane::LoadConfig()
|
||||
{
|
||||
m_screensaver_checkbox->setChecked(Config::Get(Config::SYSCONF_SCREENSAVER));
|
||||
m_pal60_mode_checkbox->setChecked(Config::Get(Config::SYSCONF_PAL60));
|
||||
m_connect_keyboard_checkbox->setChecked(SConfig::GetInstance().m_WiiKeyboard);
|
||||
m_connect_keyboard_checkbox->setChecked(Settings::Instance().IsUSBKeyboardConnected());
|
||||
m_sd_card_checkbox->setChecked(SConfig::GetInstance().m_WiiSDCard);
|
||||
m_aspect_ratio_choice->setCurrentIndex(Config::Get(Config::SYSCONF_WIDESCREEN));
|
||||
m_system_language_choice->setCurrentIndex(Config::Get(Config::SYSCONF_LANGUAGE));
|
||||
@ -221,7 +223,7 @@ void WiiPane::OnSaveConfig()
|
||||
{
|
||||
Config::SetBase(Config::SYSCONF_SCREENSAVER, m_screensaver_checkbox->isChecked());
|
||||
Config::SetBase(Config::SYSCONF_PAL60, m_pal60_mode_checkbox->isChecked());
|
||||
SConfig::GetInstance().m_WiiKeyboard = m_connect_keyboard_checkbox->isChecked();
|
||||
Settings::Instance().SetUSBKeyboardConnected(m_connect_keyboard_checkbox->isChecked());
|
||||
SConfig::GetInstance().m_WiiSDCard = m_sd_card_checkbox->isChecked();
|
||||
Config::SetBase<u32>(Config::SYSCONF_SENSOR_BAR_POSITION,
|
||||
TranslateSensorBarPosition(m_wiimote_ir_sensor_position->currentIndex()));
|
||||
|
Reference in New Issue
Block a user