summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorboludoz <francomaro@gmail.com>2023-10-16 21:11:24 +0200
committerboludoz <francomaro@gmail.com>2023-10-16 21:11:24 +0200
commitd759de9f96faa8f530b3724b79ccc04ab0d01a09 (patch)
treec588c83861a268b37a8cf793ff2744314523ab35 /src
parentSugestions and fixes. (diff)
downloadyuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar
yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar.gz
yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar.bz2
yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar.lz
yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar.xz
yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar.zst
yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index feb455763..90bb61c15 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2995,12 +2995,10 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path,
// Messages in pre-defined message boxes for less code spaghetti
bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title) {
QMessageBox::StandardButtons buttons;
- std::string_view game_title_sv = game_title.toStdString();
int result = 0;
switch (imsg) {
-
case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES:
buttons = QMessageBox::Yes | QMessageBox::No;
@@ -3009,12 +3007,11 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt
tr("Do you want to launch the game in fullscreen?"), buttons);
LOG_INFO(Frontend, "Shortcut will launch in fullscreen");
- return (result == QMessageBox::No) ? false : true;
+ return result == QMessageBox::Yes;
case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS:
QMessageBox::information(parent, tr("Create Shortcut"),
tr("Successfully created a shortcut to %1").arg(game_title));
- LOG_INFO(Frontend, "Successfully created a shortcut to {}", game_title_sv);
return true;
case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING:
@@ -3024,7 +3021,7 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt
tr("This will create a shortcut to the current AppImage. This may "
"not work well if you update. Continue?"),
buttons);
- return (result == QMessageBox::StandardButton::Cancel) ? true : false;
+ return result == QMessageBox::StandardButton::Ok;
case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN:
buttons = QMessageBox::Ok;
QMessageBox::critical(parent, tr("Create Shortcut"),
@@ -3036,7 +3033,6 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt
buttons = QMessageBox::Ok;
QMessageBox::critical(parent, tr("Create Shortcut"),
tr("Failed to create a shortcut to %1").arg(game_title), buttons);
- LOG_ERROR(Frontend, "Failed to create a shortcut to {}", game_title_sv);
return true;
}