widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #16418
[Merge] lp:~widelands-dev/widelands/bug-1822437-missing-savegames into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1822437-missing-savegames into lp:widelands.
Commit message:
Show all savegame files in save game menu.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1822437 in widelands: "Savegame menu is not showing multiplayer savegames"
https://bugs.launchpad.net/widelands/+bug/1822437
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1822437-missing-savegames/+merge/365319
Multiplayer savegame files are missing in the save game menu. This fixes it.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1822437-missing-savegames into lp:widelands.
=== modified file 'src/wui/load_or_save_game.cc'
--- src/wui/load_or_save_game.cc 2019-02-23 11:00:49 +0000
+++ src/wui/load_or_save_game.cc 2019-03-30 20:28:33 +0000
@@ -385,8 +385,9 @@
SavegameData gamedata;
std::string savename = gamefilename;
- if (filetype_ == FileType::kReplay)
+ if (filetype_ == FileType::kReplay) {
savename += kSavegameExtension;
+ }
if (!g_fs->file_exists(savename.c_str())) {
continue;
@@ -400,7 +401,8 @@
gamedata.gametype = gpdp.get_gametype();
- if (filetype_ != FileType::kReplay) {
+ // Skip singleplayer games in multiplayer mode and vice versa
+ if (filetype_ != FileType::kReplay && filetype_ != FileType::kShowAll) {
if (filetype_ == FileType::kGameMultiPlayer) {
if (gamedata.gametype == GameController::GameType::kSingleplayer) {
continue;
Follow ups