|
|
@ -1158,9 +1158,9 @@ void GMainWindow::InitializeWidgets() {
|
|
|
|
[this](const QPoint& menu_location) {
|
|
|
|
[this](const QPoint& menu_location) {
|
|
|
|
QMenu context_menu;
|
|
|
|
QMenu context_menu;
|
|
|
|
|
|
|
|
|
|
|
|
for (auto const& docked_mode_pair : Config::use_docked_mode_texts_map) {
|
|
|
|
for (auto const& [value, text] : Config::use_docked_mode_texts_map) {
|
|
|
|
context_menu.addAction(docked_mode_pair.second, [this, docked_mode_pair] {
|
|
|
|
context_menu.addAction(text, [this, value] {
|
|
|
|
if (docked_mode_pair.first != Settings::values.use_docked_mode.GetValue()) {
|
|
|
|
if (value != Settings::values.use_docked_mode.GetValue()) {
|
|
|
|
OnToggleDockedMode();
|
|
|
|
OnToggleDockedMode();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -3636,7 +3636,8 @@ void GMainWindow::OnTasReset() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::OnToggleDockedMode() {
|
|
|
|
void GMainWindow::OnToggleDockedMode() {
|
|
|
|
const bool is_docked = Settings::values.use_docked_mode.GetValue();
|
|
|
|
const bool is_docked =
|
|
|
|
|
|
|
|
Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked;
|
|
|
|
auto* player_1 = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1);
|
|
|
|
auto* player_1 = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1);
|
|
|
|
auto* handheld = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld);
|
|
|
|
auto* handheld = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld);
|
|
|
|
|
|
|
|
|
|
|
@ -3650,7 +3651,8 @@ void GMainWindow::OnToggleDockedMode() {
|
|
|
|
controller_dialog->refreshConfiguration();
|
|
|
|
controller_dialog->refreshConfiguration();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Settings::values.use_docked_mode.SetValue(!is_docked);
|
|
|
|
Settings::values.use_docked_mode.SetValue(is_docked ? Settings::ConsoleMode::Docked
|
|
|
|
|
|
|
|
: Settings::ConsoleMode::Handheld);
|
|
|
|
UpdateDockedButton();
|
|
|
|
UpdateDockedButton();
|
|
|
|
OnDockedModeChanged(is_docked, !is_docked, *system);
|
|
|
|
OnDockedModeChanged(is_docked, !is_docked, *system);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4080,8 +4082,8 @@ void GMainWindow::UpdateGPUAccuracyButton() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::UpdateDockedButton() {
|
|
|
|
void GMainWindow::UpdateDockedButton() {
|
|
|
|
const bool is_docked = Settings::values.use_docked_mode.GetValue();
|
|
|
|
const auto is_docked = Settings::values.use_docked_mode.GetValue();
|
|
|
|
dock_status_button->setChecked(is_docked);
|
|
|
|
dock_status_button->setChecked(is_docked == Settings::ConsoleMode::Docked);
|
|
|
|
dock_status_button->setText(
|
|
|
|
dock_status_button->setText(
|
|
|
|
Config::use_docked_mode_texts_map.find(is_docked)->second.toUpper());
|
|
|
|
Config::use_docked_mode_texts_map.find(is_docked)->second.toUpper());
|
|
|
|
}
|
|
|
|
}
|
|
|
|