*Fixed OGG Menu Crash after changing the path

This commit is contained in:
dimok321 2009-06-06 19:39:48 +00:00
parent cfb976a35a
commit e1523224e8
2 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,3 @@
#include <string.h>
#include <unistd.h>
#include "menu.h"
@ -997,16 +996,19 @@ int MenuSettings()
optionBrowser2.SetEffect(EFFECT_FADE, 20);
while(optionBrowser2.GetEffect() > 0) usleep(50);
char * oggfile;
oggfile = strrchr(Settings.ogg_path, '/')+1;
while(!exit)
{
VIDEO_WaitVSync ();
if(!strcmp("notset", Settings.ogg_path) || !strcmp("",Settings.oggload_path))
bool returnhere = true;
if(!strcmp("notset", Settings.ogg_path))
options2.SetValue(0, "%s", LANGUAGE.Standard);
else {
oggfile = strrchr(Settings.ogg_path, '/')+1;
options2.SetValue(0, "%s", oggfile);
}
@ -1066,7 +1068,6 @@ int MenuSettings()
w.SetEffect(EFFECT_FADE, -20);
while(w.GetEffect()>0) usleep(50);
mainWindow->Remove(&w);
bool returnhere = true;
while(returnhere)
returnhere = MenuOGG();
HaltGui();

View File

@ -180,6 +180,11 @@ bool MenuOGG()
while(!returnhere)
{
if(shutdown == 1)
Sys_Shutdown();
if(reset == 1)
Sys_Reboot();
if (backBtn.GetState() == STATE_CLICKED) {
if(nothingchanged == 1 && countoggs > 0) {
if(!strcmp("", Settings.oggload_path) || !strcmp("notset", Settings.ogg_path)) {
@ -188,6 +193,7 @@ bool MenuOGG()
bgMusic->PlayOggFile(Settings.ogg_path);
}
}
backBtn.ResetState();
break;
}
@ -425,6 +431,11 @@ int MenuLanguageSelect()
while(!returnhere)
{
if(shutdown == 1)
Sys_Shutdown();
if(reset == 1)
Sys_Reboot();
if (backBtn.GetState() == STATE_CLICKED) {
backBtn.ResetState();