-fixed sourceflow to include the last source button

-fixed background song title display which decided not to work right anymore for some strange reason.
This commit is contained in:
Fledge68 2018-09-03 16:58:31 -05:00
parent 054f30e638
commit f11ccb2611
5 changed files with 10 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -374,7 +374,7 @@ void ListGenerator::createSFList(u8 maxBtns, Config &m_sourceMenuCfg, const stri
{ {
Clear(); Clear();
char btn_selected[256]; char btn_selected[256];
for(u8 i = 0; i < maxBtns; i++) for(u8 i = 0; i <= maxBtns; i++)
{ {
memset(btn_selected, 0, 256); memset(btn_selected, 0, 256);
strncpy(btn_selected, fmt("BUTTON_%i", i), 255); strncpy(btn_selected, fmt("BUTTON_%i", i), 255);

View File

@ -1778,14 +1778,16 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
{ {
m_btnMgr.setText(m_mainLblCurMusic, MusicPlayer.GetFileName(), false);// false for word wrap m_btnMgr.setText(m_mainLblCurMusic, MusicPlayer.GetFileName(), false);// false for word wrap
m_btnMgr.show(m_mainLblCurMusic); m_btnMgr.show(m_mainLblCurMusic);
MusicPlayer.DisplayTime = time(NULL); m_musicTimer = 180;
} }
// hide song title if it's displaying and been >3 seconds // hide song title if it's displaying and been >3 seconds
else if(MusicPlayer.DisplayTime > 0 && time(NULL) - MusicPlayer.DisplayTime > 3) if(m_musicTimer > 0)
{ {
MusicPlayer.DisplayTime = 0; if(--m_musicTimer == 0)
m_btnMgr.hide(m_mainLblCurMusic); {
if(MusicPlayer.OneSong) m_music_info = false; m_btnMgr.hide(m_mainLblCurMusic);
if(MusicPlayer.OneSong) m_music_info = false;
}
} }
//Take Screenshot //Take Screenshot

View File

@ -112,6 +112,7 @@ private:
bool m_source_autoboot; bool m_source_autoboot;
dir_discHdr m_autoboot_hdr; dir_discHdr m_autoboot_hdr;
s16 m_showtimer; s16 m_showtimer;
s16 m_musicTimer;
string m_curLanguage; string m_curLanguage;
string m_sourceDir; string m_sourceDir;

View File

@ -840,7 +840,7 @@ void CMenu::_initMainMenu()
m_mainBtnFavoritesOff = _addPicButton("MAIN/FAVORITES_OFF", texFavOff, texFavOffS, 288, 400, 64, 64); m_mainBtnFavoritesOff = _addPicButton("MAIN/FAVORITES_OFF", texFavOff, texFavOffS, 288, 400, 64, 64);
m_mainLblLetter = _addLabel("MAIN/LETTER", theme.titleFont, L"", 540, 40, 80, 80, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, emptyTex); m_mainLblLetter = _addLabel("MAIN/LETTER", theme.titleFont, L"", 540, 40, 80, 80, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, emptyTex);
m_mainLblNotice = _addLabel("MAIN/NOTICE", theme.titleFont, L"", 340, 40, 280, 80, theme.titleFontColor, FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_MIDDLE, emptyTex); m_mainLblNotice = _addLabel("MAIN/NOTICE", theme.titleFont, L"", 340, 40, 280, 80, theme.titleFontColor, FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_MIDDLE, emptyTex);
m_mainLblCurMusic = _addLabel("MAIN/MUSIC", theme.btnFont, L"", 0, 20, 900, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC); m_mainLblCurMusic = _addLabel("MAIN/MUSIC", theme.btnFont, L"", 0, 40, 640, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
//#ifdef SHOWMEM //#ifdef SHOWMEM
m_mem1FreeSize = _addLabel("MEM1", theme.btnFont, L"", 40, 300, 480, 56, theme.btnFontColor, FTGX_JUSTIFY_LEFT, emptyTex); m_mem1FreeSize = _addLabel("MEM1", theme.btnFont, L"", 40, 300, 480, 56, theme.btnFontColor, FTGX_JUSTIFY_LEFT, emptyTex);
m_mem2FreeSize = _addLabel("MEM2", theme.btnFont, L"", 40, 356, 480, 56, theme.btnFontColor, FTGX_JUSTIFY_LEFT, emptyTex); m_mem2FreeSize = _addLabel("MEM2", theme.btnFont, L"", 40, 356, 480, 56, theme.btnFontColor, FTGX_JUSTIFY_LEFT, emptyTex);