Skip to content

Commit

Permalink
UI|All Games: Quitting the game returns to Home screen
Browse files Browse the repository at this point in the history
IssueID #1975
  • Loading branch information
skyjake committed Mar 25, 2016
1 parent 825e797 commit 7d675ca
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/dd_main.cpp
Expand Up @@ -1069,7 +1069,7 @@ static void initialize()
// A server is presently useless without a game, as shell
// connections can only be made after a game is loaded and the
// server mode started.
/// @todo Allow shell connections in ringzero mode, too.
/// @todo Allow shell connections in Home, too.
App_Error("No playable games available.");
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/ui/widgets/tutorialwidget.cpp
Expand Up @@ -170,7 +170,7 @@ DENG_GUI_PIMPL(TutorialWidget)
forever
{
bool skip = false;
if(!App_GameLoaded()) // in Ring Zero
if(!App_GameLoaded()) // in Home
{
if(s == RendererAppearance) skip = true;
}
Expand Down
6 changes: 3 additions & 3 deletions doomsday/apps/libdoomsday/src/doomsdayapp.cpp
Expand Up @@ -625,7 +625,7 @@ void DoomsdayApp::makeGameCurrent(Game const &newGame)

if(!isShuttingDown())
{
// Re-initialize subsystems needed even when in ringzero.
// Re-initialize subsystems needed even when in Home.
if(!plugins().exchangeGameEntryPoints(newGame.pluginId()))
{
throw Plugins::EntryPointError("DoomsdayApp::makeGameCurrent",
Expand Down Expand Up @@ -678,7 +678,7 @@ bool DoomsdayApp::changeGame(Game const &newGame,

/*
* If we aren't shutting down then we are either loading a game or switching
* to ringzero (the current game will have already been unloaded).
* to Home (the current game will have already been unloaded).
*/
if(!isShuttingDown())
{
Expand Down Expand Up @@ -722,7 +722,7 @@ bool DoomsdayApp::changeGame(Game const &newGame,
if(newGame.isNull())
{
gameChangeTasks[0].name = "Unloading game...";
gameChangeTasks[3].name = "Switching to ringzero...";
gameChangeTasks[3].name = "Switching to Home...";
}
// kludge end

Expand Down
16 changes: 15 additions & 1 deletion doomsday/apps/plugins/common/src/g_game.cpp
Expand Up @@ -1278,13 +1278,27 @@ static void runGameAction()
#define QUITWAIT_MILLISECONDS 1500

static uint quitTime = 0;
static bool unloadTriggered = false;

// Run the quit countdown?
if(::quitInProgress)
{
if(Timer_RealMilliseconds() > quitTime + QUITWAIT_MILLISECONDS)
{
Sys_Quit();
if(!unloadTriggered)
{
unloadTriggered = true;
if(CommandLine_Exists("-game"))
{
// Launched directly into game, so quit the engine altogether.
Sys_Quit();
}
else
{
// Launched to Home, so return there.
DD_Execute(true, "after 1 unload");
}
}
}
else
{
Expand Down

0 comments on commit 7d675ca

Please sign in to comment.