mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
main: Fix docked mode button, clang 14 error
This commit is contained in:
parent
00af46c356
commit
1cdd11d9f5
1 changed files with 6 additions and 6 deletions
|
@ -1158,9 +1158,9 @@ void GMainWindow::InitializeWidgets() {
|
|||
[this](const QPoint& menu_location) {
|
||||
QMenu context_menu;
|
||||
|
||||
for (auto const& [value, text] : Config::use_docked_mode_texts_map) {
|
||||
context_menu.addAction(text, [&] {
|
||||
if (value != Settings::values.use_docked_mode.GetValue()) {
|
||||
for (auto const& pair : Config::use_docked_mode_texts_map) {
|
||||
context_menu.addAction(pair.second, [this, &pair] {
|
||||
if (pair.first != Settings::values.use_docked_mode.GetValue()) {
|
||||
OnToggleDockedMode();
|
||||
}
|
||||
});
|
||||
|
@ -3650,8 +3650,8 @@ void GMainWindow::OnToggleDockedMode() {
|
|||
controller_dialog->refreshConfiguration();
|
||||
}
|
||||
|
||||
Settings::values.use_docked_mode.SetValue(is_docked ? Settings::ConsoleMode::Docked
|
||||
: Settings::ConsoleMode::Handheld);
|
||||
Settings::values.use_docked_mode.SetValue(is_docked ? Settings::ConsoleMode::Handheld
|
||||
: Settings::ConsoleMode::Docked);
|
||||
UpdateDockedButton();
|
||||
OnDockedModeChanged(is_docked, !is_docked, *system);
|
||||
}
|
||||
|
@ -4082,7 +4082,7 @@ void GMainWindow::UpdateGPUAccuracyButton() {
|
|||
|
||||
void GMainWindow::UpdateDockedButton() {
|
||||
const auto console_mode = Settings::values.use_docked_mode.GetValue();
|
||||
dock_status_button->setChecked(console_mode == Settings::ConsoleMode::Docked);
|
||||
dock_status_button->setChecked(Settings::IsDockedMode());
|
||||
dock_status_button->setText(
|
||||
Config::use_docked_mode_texts_map.find(console_mode)->second.toUpper());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue