Added sitting for the screensaver. new images from the steering wheel.

This commit is contained in:
giantpune 2009-06-18 08:37:24 +00:00
parent 383aaa45e5
commit 2a35194fba
7 changed files with 71 additions and 6 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -152,6 +152,32 @@ UpdateGUI (void *arg)
return 0; return 0;
} }
} }
switch (Settings.screensaver)
{
case 1:
WPad_SetIdleTime(180);
break;
case 2:
WPad_SetIdleTime(300);
break;
case 3:
WPad_SetIdleTime(600);
break;
case 4:
WPad_SetIdleTime(1200);
break;
case 5:
WPad_SetIdleTime(1800);
break;
case 6:
WPad_SetIdleTime(3600);
break;
}
} }
return NULL; return NULL;
} }
@ -191,7 +217,7 @@ static int MenuDiscList()
char IDfull[7]; char IDfull[7];
//SCREENSAVER //SCREENSAVER
WPad_SetIdleTime(300); //needs the time in seconds //WPad_SetIdleTime(300); //needs the time in seconds
int check = 0; //to skip the first cycle when wiimote isn't completely connected int check = 0; //to skip the first cycle when wiimote isn't completely connected
datagB=0; datagB=0;
@ -1306,10 +1332,10 @@ static int MenuDiscList()
} }
} }
} }
/* to skip the first call of windowScreensaver at startup when wiimote is not connected */ // to skip the first call of windowScreensaver at startup when wiimote is not connected
if(IsWpadConnected()){check = 1;} if(IsWpadConnected()){check = 1;}
/* screensaver is called when wiimote shuts down, depending on the wiimotet idletime */ // screensaver is called when wiimote shuts down, depending on the wiimotet idletime
if(!IsWpadConnected() && check == 1) if(!IsWpadConnected() && check == 1)
{ {
WindowScreensaver(); WindowScreensaver();
@ -1756,6 +1782,8 @@ int MainMenu(int menu)
int currentMenu = menu; int currentMenu = menu;
char imgPath[100]; char imgPath[100];
#ifdef HW_RVL #ifdef HW_RVL
snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path);
pointer[0] = new GuiImageData(imgPath, player1_point_png); pointer[0] = new GuiImageData(imgPath, player1_point_png);
@ -1816,6 +1844,8 @@ int MainMenu(int menu)
currentMenu = MenuCheck(); currentMenu = MenuCheck();
break; break;
} }
} }
ExitGUIThreads(); ExitGUIThreads();

View File

@ -13,7 +13,7 @@
#include "filelist.h" #include "filelist.h"
#include "sys.h" #include "sys.h"
#define MAXOPTIONS 11 #define MAXOPTIONS 12
/*** Extern functions ***/ /*** Extern functions ***/
extern void ResumeGui(); extern void ResumeGui();
@ -479,6 +479,7 @@ int MenuSettings()
options2.SetName(8, "%s",LANGUAGE.Rumble); options2.SetName(8, "%s",LANGUAGE.Rumble);
options2.SetName(9, "%s",LANGUAGE.Unicodefix); options2.SetName(9, "%s",LANGUAGE.Unicodefix);
options2.SetName(10, "%s",LANGUAGE.XMLTitles); options2.SetName(10, "%s",LANGUAGE.XMLTitles);
options2.SetName(11, "Screensaver");
for(int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL); for(int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL);
optionBrowser2.SetScrollbar(1); optionBrowser2.SetScrollbar(1);
w.Append(&optionBrowser2); w.Append(&optionBrowser2);
@ -515,6 +516,8 @@ int MenuSettings()
Settings.wiilight = 0; Settings.wiilight = 0;
if(Settings.rumble >= settings_rumble_max) if(Settings.rumble >= settings_rumble_max)
Settings.rumble = 0; //RUMBLE Settings.rumble = 0; //RUMBLE
if(Settings.screensaver >= settings_screensaver_max)
Settings.screensaver = 0; //RUMBLE
if ( Settings.unicodefix > 3 ) if ( Settings.unicodefix > 3 )
Settings.unicodefix = 0; Settings.unicodefix = 0;
if(Settings.titlesOverride >= 2) if(Settings.titlesOverride >= 2)
@ -565,6 +568,14 @@ int MenuSettings()
if (Settings.titlesOverride == 0) options2.SetValue(10,"%s",LANGUAGE.OFF); if (Settings.titlesOverride == 0) options2.SetValue(10,"%s",LANGUAGE.OFF);
else if (Settings.titlesOverride == 1) options2.SetValue(10,"%s",LANGUAGE.ON); else if (Settings.titlesOverride == 1) options2.SetValue(10,"%s",LANGUAGE.ON);
if (Settings.screensaver == 0) options2.SetValue(11,"%s",LANGUAGE.OFF);
else if (Settings.screensaver == 1) options2.SetValue(11,"3 min");
else if (Settings.screensaver == 2) options2.SetValue(11,"5 min");
else if (Settings.screensaver == 3) options2.SetValue(11,"10 min");
else if (Settings.screensaver == 4) options2.SetValue(11,"20 min");
else if (Settings.screensaver == 5) options2.SetValue(11,"30 min");
else if (Settings.screensaver == 6) options2.SetValue(11,"1 hour");
if(backBtn.GetState() == STATE_CLICKED) if(backBtn.GetState() == STATE_CLICKED)
{ {
backBtn.ResetState(); backBtn.ResetState();
@ -680,7 +691,11 @@ int MenuSettings()
//__Menu_GetEntries(); //__Menu_GetEntries();
//ResumeGui(); //ResumeGui();
break; break;
} case 11:
Settings.screensaver++;
break;
}
} }
optionBrowser2.SetEffect(EFFECT_FADE, -20); optionBrowser2.SetEffect(EFFECT_FADE, -20);
while(optionBrowser2.GetEffect() > 0) usleep(50); while(optionBrowser2.GetEffect() > 0) usleep(50);

View File

@ -330,6 +330,7 @@ void Global_Default(void)
Settings.wiilight = 1; Settings.wiilight = 1;
Settings.patchcountrystrings = 0; Settings.patchcountrystrings = 0;
Settings.titlesOverride = 0; Settings.titlesOverride = 0;
Settings.screensaver = 3;
Settings.error002 = 0; Settings.error002 = 0;
} }
@ -981,6 +982,13 @@ void global_cfg_set(char *name, char *val)
} }
return; return;
} }
else if (strcmp(name, "screensaver") == 0) {
int i;
if (sscanf(val, "%d", &i) == 1) {
Settings.screensaver = i;
}
return;
}
cfg_bool("godmode", &Settings.godmode); cfg_bool("godmode", &Settings.godmode);
@ -1215,6 +1223,7 @@ bool cfg_save_global()// save global settings
fprintf(f, "Cheatcodespath = %s\n ", Settings.Cheatcodespath); fprintf(f, "Cheatcodespath = %s\n ", Settings.Cheatcodespath);
fprintf(f, "titlesOverride = %d\n ", Settings.titlesOverride); fprintf(f, "titlesOverride = %d\n ", Settings.titlesOverride);
fprintf(f, "patchcountrystrings = %d\n ", Settings.patchcountrystrings); fprintf(f, "patchcountrystrings = %d\n ", Settings.patchcountrystrings);
fprintf(f, "screensaver = %d\n ", Settings.screensaver);
fprintf(f, "error002 = %d\n ", Settings.error002); fprintf(f, "error002 = %d\n ", Settings.error002);
fclose(f); fclose(f);
return true; return true;

View File

@ -272,6 +272,16 @@ enum {
settings_tooltips_max // always the last entry settings_tooltips_max // always the last entry
}; };
enum {
min3=1,
min5,
min10,
min20,
min30,
min60,
settings_screensaver_max // always the last entry
};
enum { enum {
no=0, no=0,
yes, yes,
@ -323,6 +333,7 @@ struct SSettings {
int wiilight; int wiilight;
int gameDisplay; int gameDisplay;
int patchcountrystrings; int patchcountrystrings;
int screensaver;
short godmode; short godmode;
char covers_path[100]; char covers_path[100];
char theme_path[100]; char theme_path[100];