fix: update application version to dev37 and streamline playback logging
Some checks failed
Build (3DS) / build (push) Failing after 1m58s
Some checks failed
Build (3DS) / build (push) Failing after 1m58s
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#define mice_main_h
|
||||
|
||||
/* Application version */
|
||||
#define MICE_VERSION "dev36"
|
||||
#define MICE_VERSION "dev37"
|
||||
|
||||
/* Default folder */
|
||||
#define DEFAULT_DIR "sdmc:/"
|
||||
|
||||
@@ -383,10 +383,7 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
||||
if(isPlaying() == false)
|
||||
continue;
|
||||
|
||||
if(togglePlayback() == true)
|
||||
addLogMessage("Paused");
|
||||
else
|
||||
addLogMessage("Playing");
|
||||
togglePlayback();
|
||||
|
||||
keyLComboPressed = true;
|
||||
// distinguish between L+R and L+Up
|
||||
@@ -406,13 +403,10 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
||||
// if R is pressed first
|
||||
if ((kHeld & KEY_R) && (kDown & KEY_L))
|
||||
{
|
||||
if(isPlaying() == false)
|
||||
if(isPlaying() == false)
|
||||
continue;
|
||||
|
||||
if(togglePlayback() == true)
|
||||
addLogMessage("Paused");
|
||||
else
|
||||
addLogMessage("Playing");
|
||||
togglePlayback();
|
||||
|
||||
keyLComboPressed = true;
|
||||
keyRComboPressed = true;
|
||||
@@ -428,9 +422,6 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
||||
// one line taken up by cwd, other by ../
|
||||
if(fileMax - fileNum > MAX_LIST-2 && from != 0)
|
||||
from--;
|
||||
|
||||
if(listDir(from, MAX_LIST, fileNum, dirList) < 0)
|
||||
err_print("Unable to list directory.");
|
||||
}
|
||||
|
||||
if((kDown & KEY_DOWN ||
|
||||
@@ -442,9 +433,6 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
||||
if(fileNum >= MAX_LIST && fileMax - fileNum >= 0 &&
|
||||
from < fileMax - MAX_LIST)
|
||||
from++;
|
||||
|
||||
if(listDir(from, MAX_LIST, fileNum, dirList) < 0)
|
||||
err_print("Unable to list directory.");
|
||||
}
|
||||
|
||||
if((kDown & KEY_LEFT ||
|
||||
@@ -621,7 +609,7 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
||||
/* Render GUI elements */
|
||||
const char** fileList;
|
||||
int fileListCount;
|
||||
buildFileListForGUI(dirList, &fileList, &fileListCount, from);
|
||||
buildFileListForGUI(dirList, &fileList, &fileListCount, 0);
|
||||
|
||||
/* Display metadata if we have any */
|
||||
if(currentMetadata.title[0] || currentMetadata.artist[0] || currentMetadata.album[0])
|
||||
@@ -631,8 +619,15 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
||||
guiDisplayMetadata(¤tMetadata, currentFile);
|
||||
}
|
||||
|
||||
/* Calculate scroll position to keep selection visible (14 lines visible) */
|
||||
int scroll = from;
|
||||
if(fileNum < scroll)
|
||||
scroll = fileNum;
|
||||
else if(fileNum >= scroll + 14)
|
||||
scroll = fileNum - 13;
|
||||
|
||||
/* Display file list on bottom screen */
|
||||
guiDisplayFileList(fileList, fileListCount, fileNum, from);
|
||||
guiDisplayFileList(fileList, fileListCount, fileNum, scroll);
|
||||
|
||||
/* Display logs on top screen */
|
||||
guiDisplayLog((const char**)logMessages, logMessageCount, logScroll);
|
||||
|
||||
Reference in New Issue
Block a user