-added a couple screensaver options under "GENERAL" section of wiiflow.ini

screensaver_idle_seconds = number of seconds before showing screensaver (default = 60)
screensaver_disabled = turn off screensaver (default = no)
This commit is contained in:
fledge68 2013-10-03 11:50:34 +00:00
parent dabf2018d3
commit 040459dcaa
3 changed files with 5 additions and 4 deletions

View File

@ -726,14 +726,14 @@ void DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color)
GX_SetTevOp(GX_TEVSTAGE0, GX_MODULATE);
}
void CVideo::screensaver(u32 no_input)
void CVideo::screensaver(u32 no_input, u32 max_no_input)
{
if(no_input == 0)
{
m_screensaver_alpha = 0;
return;
}
if(no_input > 60)
if(no_input > max_no_input)
{
DrawRectangle(0, 0, 640, 480, (GXColor){0,0,0,m_screensaver_alpha});
if(m_screensaver_alpha < 150)

View File

@ -54,7 +54,7 @@ public:
void renderToTexture(TexData &tex, bool clear);
void cleanup(void);
void setup2DProjection(bool setViewPort = true, bool noScale = false);
void screensaver(u32 no_input);
void screensaver(u32 no_input, u32 max_no_input);
u32 width(void) const { return m_rmode->fbWidth; }
u32 height(void) const { return m_rmode->efbHeight; }
GXRModeObj *vid_mode(void) const { return m_rmode; }

View File

@ -1882,7 +1882,8 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
ScanInput();
if(!m_vid.showingWaitMessage())
{
m_vid.screensaver(NoInputTime());
if(!m_cfg.getBool("GENERAL", "screensaver_disabled", false))
m_vid.screensaver(NoInputTime(), m_cfg.getInt("GENERAL", "screensaver_idle_seconds", 60));
m_vid.render();
}
if(Sys_Exiting())