forked from speed-dreams/speed-dreams-code
Re #197 (D31 : Save and restore Quick Race) Fixed broken load result file (immediate return to the Raceman menu)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3323 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 9fa05268836b21e2f8ddde877cab8286d499218b Former-commit-id: 348f66873188aa8f2361252c956825ccc9534fc6
This commit is contained in:
parent
07ff011f9f
commit
2bfa87668b
2 changed files with 11 additions and 3 deletions
|
@ -261,7 +261,6 @@ reOnLoadRaceFromFile(void *pPrevMenu)
|
||||||
const GfRaceManager* pRaceMan = ReGetRace()->getManager();
|
const GfRaceManager* pRaceMan = ReGetRace()->getManager();
|
||||||
|
|
||||||
fs.title = pRaceMan->getName();
|
fs.title = pRaceMan->getName();
|
||||||
fs.prevScreen = pPrevMenu;
|
|
||||||
fs.mode = RmFSModeLoad;
|
fs.mode = RmFSModeLoad;
|
||||||
|
|
||||||
std::string strDirPath = reGetLoadFileDir();
|
std::string strDirPath = reGetLoadFileDir();
|
||||||
|
@ -270,11 +269,17 @@ reOnLoadRaceFromFile(void *pPrevMenu)
|
||||||
// For race types with more than 1 event (= 1 race on 1 track), load a race result file,
|
// For race types with more than 1 event (= 1 race on 1 track), load a race result file,
|
||||||
// as the previous race standings has an influence on the next race starting grid.
|
// as the previous race standings has an influence on the next race starting grid.
|
||||||
if (pRaceMan->getEventCount() > 1)
|
if (pRaceMan->getEventCount() > 1)
|
||||||
|
{
|
||||||
fs.select = reLoadRaceFromResultsFile;
|
fs.select = reLoadRaceFromResultsFile;
|
||||||
|
fs.prevScreen = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// But for race types with only 1 event (= 1 race on 1 track), load a race config file.
|
// But for race types with only 1 event (= 1 race on 1 track), load a race config file.
|
||||||
else
|
else
|
||||||
|
{
|
||||||
fs.select = reLoadRaceFromConfigFile;
|
fs.select = reLoadRaceFromConfigFile;
|
||||||
|
fs.prevScreen = pPrevMenu;
|
||||||
|
}
|
||||||
|
|
||||||
// Fire the file selection menu.
|
// Fire the file selection menu.
|
||||||
GfuiScreenActivate(RmFileSelect(&fs));
|
GfuiScreenActivate(RmFileSelect(&fs));
|
||||||
|
@ -303,6 +308,8 @@ reOnSaveRaceToFile(void *pPrevMenu)
|
||||||
static void
|
static void
|
||||||
reOnActivate(void * /* dummy */)
|
reOnActivate(void * /* dummy */)
|
||||||
{
|
{
|
||||||
|
GfLogTrace("Entering Race Manager menu\n");
|
||||||
|
|
||||||
// Update GUI.
|
// Update GUI.
|
||||||
reOnRaceDataChanged();
|
reOnRaceDataChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,8 @@ rmOnDeactivate(void * /* dummy */ )
|
||||||
FileList = NULL;
|
FileList = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fire the return screen
|
// Fire the return screen if any.
|
||||||
|
if (RmFs->prevScreen)
|
||||||
GfuiScreenActivate(RmFs->prevScreen);
|
GfuiScreenActivate(RmFs->prevScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue