Skip to content

Commit

Permalink
Resource System: Sleep for a short while after initiating a savegame …
Browse files Browse the repository at this point in the history
…conversion

To give the converter a chance to finish the job before attempting
to repopulate the /savegame folder. Note that this does not block
the main/UI thread.

Todo for later: Use a background Task for conversion.
  • Loading branch information
danij-deng committed Mar 20, 2014
1 parent 8ce0edc commit 1f42e81
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doomsday/client/src/resource/resourcesystem.cpp
Expand Up @@ -1958,8 +1958,11 @@ DENG2_PIMPL(ResourceSystem)

if(success)
{
/// Update the /savegame folder. @todo necessary?
Folder &outputFolder = App::rootFolder().locate<Folder>("/savegame");
/// @todo kludge: Give the converter a chance to complete.
TimeDelta::fromMilliSeconds(1000).sleep();

/// Update the /savegame folder.
Folder &outputFolder = App::rootFolder().locate<Folder>(String("/savegame") / gameId);
outputFolder.populate(Folder::PopulateOnlyThisFolder);

addSavedSession(repoPath);
Expand Down

0 comments on commit 1f42e81

Please sign in to comment.