Skip to content

Commit

Permalink
Resource System: Fix output path for automatic savegame conversion
Browse files Browse the repository at this point in the history
As of this commit, legacy savegames are now automatically converted
when the a new game is added, the saved session repository is updated
and the newly converted .save session packages are available from the
Ring Zero UI.

Also convert legacy Chex Quest and Hacx savegames.
  • Loading branch information
danij-deng committed Mar 20, 2014
1 parent 900a2f7 commit 72c956d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doomsday/client/src/resource/resourcesystem.cpp
Expand Up @@ -1922,6 +1922,9 @@ DENG2_PIMPL(ResourceSystem)
if(gameId.beginsWith("doom")) return ".dsg";
if(gameId.beginsWith("heretic")) return ".hsg";
if(gameId.beginsWith("hexen")) return ".hxs";
if(gameId.beginsWith("doom")) return ".dsg";
if(gameId.beginsWith("chex")) return ".dsg";
if(gameId.beginsWith("hacx")) return ".dsg";
return "";
}

Expand Down Expand Up @@ -1951,6 +1954,8 @@ DENG2_PIMPL(ResourceSystem)
if(gameId.beginsWith("doom")) return App::app().nativeHomePath() / "savegame" / gameId;
if(gameId.beginsWith("heretic")) return App::app().nativeHomePath() / "savegame" / gameId;
if(gameId.beginsWith("hexen")) return App::app().nativeHomePath() / "hexndata" / gameId;
if(gameId.beginsWith("chex")) return App::app().nativeHomePath() / "savegame" / gameId;
if(gameId.beginsWith("hacx")) return App::app().nativeHomePath() / "savegame" / gameId;

return "";
}
Expand Down Expand Up @@ -1981,7 +1986,7 @@ DENG2_PIMPL(ResourceSystem)
void convertLegacySavegame(String const &sourcePath, String const &gameId)
{
String const repoPath = gameId / sourcePath.fileNameWithoutExtension();
String const outputPath = nativeSavePath / repoPath;
String const outputPath = nativeSavePath / gameId;

// Attempt the conversion via a plugin (each is tried in turn.
ddhook_savegame_convert_t parm;
Expand Down

0 comments on commit 72c956d

Please sign in to comment.