diff options
| author | 2023-10-16 16:47:21 -0300 | |
|---|---|---|
| committer | 2023-10-16 16:47:21 -0300 | |
| commit | ae88d01d8dfc9c39206d3fb37938e44a3480c70f (patch) | |
| tree | 0503616d71aabcb55116c5c816a0c19fb266647d /src | |
| parent | More missed suggestions (diff) | |
| download | yuzu-ae88d01d8dfc9c39206d3fb37938e44a3480c70f.tar.gz yuzu-ae88d01d8dfc9c39206d3fb37938e44a3480c70f.tar.xz yuzu-ae88d01d8dfc9c39206d3fb37938e44a3480c70f.zip | |
.clear() instead = ""; and switch improved.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 90bb61c15..82b38fc07 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -2997,23 +2997,17 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt | |||
| 2997 | QMessageBox::StandardButtons buttons; | 2997 | QMessageBox::StandardButtons buttons; |
| 2998 | 2998 | ||
| 2999 | int result = 0; | 2999 | int result = 0; |
| 3000 | |||
| 3001 | switch (imsg) { | 3000 | switch (imsg) { |
| 3002 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: | 3001 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: |
| 3003 | buttons = QMessageBox::Yes | QMessageBox::No; | 3002 | buttons = QMessageBox::Yes | QMessageBox::No; |
| 3004 | |||
| 3005 | result = | 3003 | result = |
| 3006 | QMessageBox::information(parent, tr("Create Shortcut"), | 3004 | QMessageBox::information(parent, tr("Create Shortcut"), |
| 3007 | tr("Do you want to launch the game in fullscreen?"), buttons); | 3005 | tr("Do you want to launch the game in fullscreen?"), buttons); |
| 3008 | 3006 | return (result == QMessageBox::Yes); | |
| 3009 | LOG_INFO(Frontend, "Shortcut will launch in fullscreen"); | ||
| 3010 | return result == QMessageBox::Yes; | ||
| 3011 | |||
| 3012 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: | 3007 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: |
| 3013 | QMessageBox::information(parent, tr("Create Shortcut"), | 3008 | QMessageBox::information(parent, tr("Create Shortcut"), |
| 3014 | tr("Successfully created a shortcut to %1").arg(game_title)); | 3009 | tr("Successfully created a shortcut to %1").arg(game_title)); |
| 3015 | return true; | 3010 | break; |
| 3016 | |||
| 3017 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: | 3011 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: |
| 3018 | buttons = QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel; | 3012 | buttons = QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel; |
| 3019 | result = | 3013 | result = |
| @@ -3021,22 +3015,20 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt | |||
| 3021 | tr("This will create a shortcut to the current AppImage. This may " | 3015 | tr("This will create a shortcut to the current AppImage. This may " |
| 3022 | "not work well if you update. Continue?"), | 3016 | "not work well if you update. Continue?"), |
| 3023 | buttons); | 3017 | buttons); |
| 3024 | return result == QMessageBox::StandardButton::Ok; | 3018 | return (result == QMessageBox::Ok); |
| 3025 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: | 3019 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: |
| 3026 | buttons = QMessageBox::Ok; | 3020 | buttons = QMessageBox::Ok; |
| 3027 | QMessageBox::critical(parent, tr("Create Shortcut"), | 3021 | QMessageBox::critical(parent, tr("Create Shortcut"), |
| 3028 | tr("Cannot create shortcut in Apps. Restart yuzu as administrator."), | 3022 | tr("Cannot create shortcut in Apps. Restart yuzu as administrator."), |
| 3029 | buttons); | 3023 | buttons); |
| 3030 | LOG_ERROR(Frontend, "Cannot create shortcut in Apps. Restart yuzu as administrator."); | 3024 | break; |
| 3031 | return true; | ||
| 3032 | default: | 3025 | default: |
| 3033 | buttons = QMessageBox::Ok; | 3026 | buttons = QMessageBox::Ok; |
| 3034 | QMessageBox::critical(parent, tr("Create Shortcut"), | 3027 | QMessageBox::critical(parent, tr("Create Shortcut"), |
| 3035 | tr("Failed to create a shortcut to %1").arg(game_title), buttons); | 3028 | tr("Failed to create a shortcut to %1").arg(game_title), buttons); |
| 3036 | return true; | 3029 | break; |
| 3037 | } | 3030 | } |
| 3038 | 3031 | return false; | |
| 3039 | return true; | ||
| 3040 | } | 3032 | } |
| 3041 | 3033 | ||
| 3042 | bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, | 3034 | bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, |
| @@ -3058,7 +3050,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi | |||
| 3058 | tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.") | 3050 | tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.") |
| 3059 | .arg(QString::fromStdString(out_icon_path.string())), | 3051 | .arg(QString::fromStdString(out_icon_path.string())), |
| 3060 | QMessageBox::StandardButton::Ok); | 3052 | QMessageBox::StandardButton::Ok); |
| 3061 | out_icon_path = ""; // Reset path | 3053 | out_icon_path.clear(); |
| 3062 | return false; | 3054 | return false; |
| 3063 | } | 3055 | } |
| 3064 | 3056 | ||
| @@ -3165,7 +3157,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga | |||
| 3165 | arguments = "-f " + arguments; | 3157 | arguments = "-f " + arguments; |
| 3166 | } | 3158 | } |
| 3167 | const std::string comment = | 3159 | const std::string comment = |
| 3168 | tr("Start %1 with the yuzu Emulator").arg(QString::fromStdString(game_title)).toStdString(); | 3160 | tr("Start %1 with the yuzu Emulator").arg(qt_game_title).toStdString(); |
| 3169 | const std::string categories = "Game;Emulator;Qt;"; | 3161 | const std::string categories = "Game;Emulator;Qt;"; |
| 3170 | const std::string keywords = "Switch;Nintendo;"; | 3162 | const std::string keywords = "Switch;Nintendo;"; |
| 3171 | 3163 | ||