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
|
#define mice_main_h
|
||||||
|
|
||||||
/* Application version */
|
/* Application version */
|
||||||
#define MICE_VERSION "dev36"
|
#define MICE_VERSION "dev37"
|
||||||
|
|
||||||
/* Default folder */
|
/* Default folder */
|
||||||
#define DEFAULT_DIR "sdmc:/"
|
#define DEFAULT_DIR "sdmc:/"
|
||||||
|
|||||||
@@ -383,10 +383,7 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
|||||||
if(isPlaying() == false)
|
if(isPlaying() == false)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(togglePlayback() == true)
|
togglePlayback();
|
||||||
addLogMessage("Paused");
|
|
||||||
else
|
|
||||||
addLogMessage("Playing");
|
|
||||||
|
|
||||||
keyLComboPressed = true;
|
keyLComboPressed = true;
|
||||||
// distinguish between L+R and L+Up
|
// distinguish between L+R and L+Up
|
||||||
@@ -409,10 +406,7 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
|||||||
if(isPlaying() == false)
|
if(isPlaying() == false)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(togglePlayback() == true)
|
togglePlayback();
|
||||||
addLogMessage("Paused");
|
|
||||||
else
|
|
||||||
addLogMessage("Playing");
|
|
||||||
|
|
||||||
keyLComboPressed = true;
|
keyLComboPressed = true;
|
||||||
keyRComboPressed = 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 ../
|
// one line taken up by cwd, other by ../
|
||||||
if(fileMax - fileNum > MAX_LIST-2 && from != 0)
|
if(fileMax - fileNum > MAX_LIST-2 && from != 0)
|
||||||
from--;
|
from--;
|
||||||
|
|
||||||
if(listDir(from, MAX_LIST, fileNum, dirList) < 0)
|
|
||||||
err_print("Unable to list directory.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if((kDown & KEY_DOWN ||
|
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 &&
|
if(fileNum >= MAX_LIST && fileMax - fileNum >= 0 &&
|
||||||
from < fileMax - MAX_LIST)
|
from < fileMax - MAX_LIST)
|
||||||
from++;
|
from++;
|
||||||
|
|
||||||
if(listDir(from, MAX_LIST, fileNum, dirList) < 0)
|
|
||||||
err_print("Unable to list directory.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if((kDown & KEY_LEFT ||
|
if((kDown & KEY_LEFT ||
|
||||||
@@ -621,7 +609,7 @@ int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
|
|||||||
/* Render GUI elements */
|
/* Render GUI elements */
|
||||||
const char** fileList;
|
const char** fileList;
|
||||||
int fileListCount;
|
int fileListCount;
|
||||||
buildFileListForGUI(dirList, &fileList, &fileListCount, from);
|
buildFileListForGUI(dirList, &fileList, &fileListCount, 0);
|
||||||
|
|
||||||
/* Display metadata if we have any */
|
/* Display metadata if we have any */
|
||||||
if(currentMetadata.title[0] || currentMetadata.artist[0] || currentMetadata.album[0])
|
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);
|
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 */
|
/* Display file list on bottom screen */
|
||||||
guiDisplayFileList(fileList, fileListCount, fileNum, from);
|
guiDisplayFileList(fileList, fileListCount, fileNum, scroll);
|
||||||
|
|
||||||
/* Display logs on top screen */
|
/* Display logs on top screen */
|
||||||
guiDisplayLog((const char**)logMessages, logMessageCount, logScroll);
|
guiDisplayLog((const char**)logMessages, logMessageCount, logScroll);
|
||||||
|
|||||||
Reference in New Issue
Block a user