1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Fixed bug with launch screen and double buffering

LinkApp::drawRun() assumes the layers below are already painted when
it is called, but this was not the case. With single buffering, the
previous frame was still there so it still looked good, but with
double buffering the buffer typically contains an outdated screen.

Long term I think the launch should happen at the outermost scope,
so all destructors get a chance to run. This commit is a small step
in that direction, by exiting the main loop before launching.
This commit is contained in:
Maarten ter Huurne
2013-08-16 10:41:16 +02:00
parent 8d38decc82
commit 965340a39c
4 changed files with 32 additions and 8 deletions

View File

@@ -372,7 +372,7 @@ void LinkApp::start() {
if (!selectordir.empty())
selector();
else
launch();
gmenu2x->queueLaunch(this, "");
}
void LinkApp::showManual() {
@@ -547,13 +547,11 @@ void LinkApp::selector(int startSelection, const string &selectorDir) {
selectordir = selectedDir;
}
gmenu2x->writeTmp(selection, selectedDir);
launch(selectedDir + sel.getFile());
gmenu2x->queueLaunch(this, selectedDir + sel.getFile());
}
}
void LinkApp::launch(const string &selectedFile) {
drawRun();
save();
if (isOpk()) {