summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu/game_list.cpp4
-rw-r--r--src/yuzu/game_list.h3
-rw-r--r--src/yuzu/main.cpp14
-rw-r--r--src/yuzu/main.h3
4 files changed, 12 insertions, 12 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 62acc3720..9be6a5a2f 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -502,10 +502,10 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, std::string pat
502 navigate_to_gamedb_entry->setVisible(it != compatibility_list.end() && program_id != 0); 502 navigate_to_gamedb_entry->setVisible(it != compatibility_list.end() && program_id != 0);
503 503
504 connect(open_save_location, &QAction::triggered, [this, program_id, path]() { 504 connect(open_save_location, &QAction::triggered, [this, program_id, path]() {
505 emit OpenFolderRequested(GameListOpenTarget::SaveData, path); 505 emit OpenFolderRequested(program_id, GameListOpenTarget::SaveData, path);
506 }); 506 });
507 connect(open_mod_location, &QAction::triggered, [this, program_id, path]() { 507 connect(open_mod_location, &QAction::triggered, [this, program_id, path]() {
508 emit OpenFolderRequested(GameListOpenTarget::ModData, path); 508 emit OpenFolderRequested(program_id, GameListOpenTarget::ModData, path);
509 }); 509 });
510 connect(open_transferable_shader_cache, &QAction::triggered, 510 connect(open_transferable_shader_cache, &QAction::triggered,
511 [this, program_id]() { emit OpenTransferableShaderCacheRequested(program_id); }); 511 [this, program_id]() { emit OpenTransferableShaderCacheRequested(program_id); });
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h
index 483835cce..78e2ba169 100644
--- a/src/yuzu/game_list.h
+++ b/src/yuzu/game_list.h
@@ -84,7 +84,8 @@ public:
84signals: 84signals:
85 void GameChosen(QString game_path); 85 void GameChosen(QString game_path);
86 void ShouldCancelWorker(); 86 void ShouldCancelWorker();
87 void OpenFolderRequested(GameListOpenTarget target, const std::string& game_path); 87 void OpenFolderRequested(u64 program_id, GameListOpenTarget target,
88 const std::string& game_path);
88 void OpenTransferableShaderCacheRequested(u64 program_id); 89 void OpenTransferableShaderCacheRequested(u64 program_id);
89 void RemoveInstalledEntryRequested(u64 program_id, InstalledEntryType type); 90 void RemoveInstalledEntryRequested(u64 program_id, InstalledEntryType type);
90 void RemoveFileRequested(u64 program_id, GameListRemoveTarget target); 91 void RemoveFileRequested(u64 program_id, GameListRemoveTarget target);
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 592993c36..f711a337f 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1239,20 +1239,18 @@ void GMainWindow::OnGameListLoadFile(QString game_path) {
1239 BootGame(game_path); 1239 BootGame(game_path);
1240} 1240}
1241 1241
1242void GMainWindow::OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path) { 1242void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target,
1243 const std::string& game_path) {
1243 std::string path; 1244 std::string path;
1244 QString open_target; 1245 QString open_target;
1245 1246
1247 FileSys::PatchManager pm{program_id};
1248 const auto control = pm.GetControlMetadata();
1246 const auto v_file = Core::GetGameFileFromPath(vfs, game_path); 1249 const auto v_file = Core::GetGameFileFromPath(vfs, game_path);
1247 const auto loader = Loader::GetLoader(v_file); 1250 const auto loader = Loader::GetLoader(v_file);
1248 FileSys::NACP control{};
1249 u64 program_id{};
1250 1251
1251 loader->ReadControlData(control); 1252 const bool has_user_save{control.first->GetDefaultNormalSaveSize() > 0};
1252 loader->ReadProgramId(program_id); 1253 const bool has_device_save{control.first->GetDeviceSaveDataSize() > 0};
1253
1254 const bool has_user_save{control.GetDefaultNormalSaveSize() > 0};
1255 const bool has_device_save{control.GetDeviceSaveDataSize() > 0};
1256 1254
1257 ASSERT_MSG(has_user_save != has_device_save, "Game uses both user and device savedata?"); 1255 ASSERT_MSG(has_user_save != has_device_save, "Game uses both user and device savedata?");
1258 1256
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 73a44a3bf..42a8e583c 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -198,7 +198,8 @@ private slots:
198 void OnOpenFAQ(); 198 void OnOpenFAQ();
199 /// Called whenever a user selects a game in the game list widget. 199 /// Called whenever a user selects a game in the game list widget.
200 void OnGameListLoadFile(QString game_path); 200 void OnGameListLoadFile(QString game_path);
201 void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path); 201 void OnGameListOpenFolder(u64 program_id, GameListOpenTarget target,
202 const std::string& game_path);
202 void OnTransferableShaderCacheOpenFile(u64 program_id); 203 void OnTransferableShaderCacheOpenFile(u64 program_id);
203 void OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryType type); 204 void OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryType type);
204 void OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target); 205 void OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target);