mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-11 11:29:09 +01:00
-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:
parent
dabf2018d3
commit
040459dcaa
@ -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)
|
||||
|
@ -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; }
|
||||
|
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user