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