Date:2013-09-07 23:02:38 (7 months 16 days ago)
Author:Paul Cercueil
Commit:0e4180460bcd8b99f42b445bdfe4b73cdd64874c
Message:Recover last session from main() instead of constructor

This fixes a bug where the apps using the file selector wouldn't be
launched at all when selecting a new file after a session recover.
Files: src/gmenu2x.cpp (2 diffs)

Change Details

src/gmenu2x.cpp
259259#ifdef ENABLE_CPUFREQ
260260    setClock(confInt["menuClock"]);
261261#endif
262    //recover last session
263    readTmp();
264    if (lastSelectorElement>-1 && menu->selLinkApp()!=NULL && (!menu->selLinkApp()->getSelectorDir().empty() || !lastSelectorDir.empty()))
265        menu->selLinkApp()->selector(lastSelectorElement,lastSelectorDir);
266
267262}
268263
269264GMenu2X::~GMenu2X() {
...... 
592587
593588    appToLaunch = nullptr;
594589
590    // Recover last session
591    readTmp();
592    if (lastSelectorElement > -1 && menu->selLinkApp() &&
593                (!menu->selLinkApp()->getSelectorDir().empty()
594                 || !lastSelectorDir.empty()))
595        menu->selLinkApp()->selector(lastSelectorElement, lastSelectorDir);
596
595597    while (true) {
596598        // Remove dismissed layers from the stack.
597599        for (auto it = layers.begin(); it != layers.end(); ) {

Archive Download the corresponding diff file



interactive