Fix glitch where some recent icons could remain on screen when loading game.

This commit is contained in:
Henrik Rydgard 2013-04-21 19:32:29 +02:00
parent e877821cca
commit 3ffc77baa1

View File

@ -291,11 +291,15 @@ void MenuScreen::render() {
color = whiteAlpha(ease((time_now_d() - ginfo->timeIconWasLoaded) * 2));
}
if (UITextureButton(ctx, (int)GEN_ID_LOOP(i), vgrid_recent, textureButtonWidth, textureButtonHeight, ginfo->iconTexture, ALIGN_LEFT, color, I_DROP_SHADOW)) {
UIEnd();
screenManager()->switchScreen(new EmuScreen(g_Config.recentIsos[i]));
return;
}
} else {
if (UIButton((int)GEN_ID_LOOP(i), vgrid_recent, textureButtonWidth, textureButtonHeight, filename.c_str(), ALIGN_LEFT)) {
UIEnd();
screenManager()->switchScreen(new EmuScreen(g_Config.recentIsos[i]));
return;
}
}
}
@ -880,8 +884,9 @@ void FileSelectScreen::render() {
ILOG("Selected: %i : %s", list_.selected, boot_filename.c_str());
list_.selected = -1;
g_Config.Save();
UIEnd();
screenManager()->switchScreen(new EmuScreen(boot_filename));
return;
}
}