mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-24 17:25:44 +00:00
main: Fix docked mode button, clang 14 error
This commit is contained in:
parent
00af46c356
commit
1cdd11d9f5
|
@ -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& [value, text] : Config::use_docked_mode_texts_map) {
|
for (auto const& pair : Config::use_docked_mode_texts_map) {
|
||||||
context_menu.addAction(text, [&] {
|
context_menu.addAction(pair.second, [this, &pair] {
|
||||||
if (value != Settings::values.use_docked_mode.GetValue()) {
|
if (pair.first != Settings::values.use_docked_mode.GetValue()) {
|
||||||
OnToggleDockedMode();
|
OnToggleDockedMode();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -3650,8 +3650,8 @@ void GMainWindow::OnToggleDockedMode() {
|
||||||
controller_dialog->refreshConfiguration();
|
controller_dialog->refreshConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::values.use_docked_mode.SetValue(is_docked ? Settings::ConsoleMode::Docked
|
Settings::values.use_docked_mode.SetValue(is_docked ? Settings::ConsoleMode::Handheld
|
||||||
: Settings::ConsoleMode::Handheld);
|
: Settings::ConsoleMode::Docked);
|
||||||
UpdateDockedButton();
|
UpdateDockedButton();
|
||||||
OnDockedModeChanged(is_docked, !is_docked, *system);
|
OnDockedModeChanged(is_docked, !is_docked, *system);
|
||||||
}
|
}
|
||||||
|
@ -4082,7 +4082,7 @@ void GMainWindow::UpdateGPUAccuracyButton() {
|
||||||
|
|
||||||
void GMainWindow::UpdateDockedButton() {
|
void GMainWindow::UpdateDockedButton() {
|
||||||
const auto console_mode = Settings::values.use_docked_mode.GetValue();
|
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(
|
dock_status_button->setText(
|
||||||
Config::use_docked_mode_texts_map.find(console_mode)->second.toUpper());
|
Config::use_docked_mode_texts_map.find(console_mode)->second.toUpper());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue