mirror of
https://github.com/rvtr/TDT.git
synced 2025-10-31 13:51:07 -04:00
Minor code cleanup
This commit is contained in:
parent
643bc4143c
commit
580d98535b
@ -91,7 +91,8 @@ static int _mainMenu(int cursor)
|
||||
return result;
|
||||
}
|
||||
|
||||
void fifoHandler(u32 value32, void* userdata) {
|
||||
void fifoHandler(u32 value32, void* userdata)
|
||||
{
|
||||
if (value32 == 0x54495845) // 'EXIT'
|
||||
programEnd = true;
|
||||
}
|
||||
@ -157,7 +158,8 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case MAIN_MENU_FIX:
|
||||
if(nandio_unlock_writing()) {
|
||||
if (nandio_unlock_writing())
|
||||
{
|
||||
nandio_force_fat_fix();
|
||||
nandio_lock_writing();
|
||||
messageBox("Mismatch in FAT copies will be\nfixed on close.\n");
|
||||
|
||||
@ -93,7 +93,8 @@ bool randomConfirmBox(char* message)
|
||||
int sequencePosition = 0;
|
||||
|
||||
u8 sequence[8];
|
||||
for(int i = 0; i < sizeof(sequence); i++) {
|
||||
for (int i = 0; i < sizeof(sequence); i++)
|
||||
{
|
||||
sequence[i] = rand() % (sizeof(keys) / sizeof(keys[0]));
|
||||
}
|
||||
|
||||
@ -111,19 +112,22 @@ bool randomConfirmBox(char* message)
|
||||
|
||||
//Print sequence
|
||||
iprintf("\x1b[%d;0H", choiceRow);
|
||||
for(int i = 0; i < sizeof(sequence); i++) {
|
||||
for (int i = 0; i < sizeof(sequence); i++)
|
||||
{
|
||||
iprintf("\x1B[%0om", i < sequencePosition ? 032 : 047);
|
||||
iprintf("%s ", keysLabels[sequence[i]]);
|
||||
}
|
||||
|
||||
if (keysDown() & (KEY_UP | KEY_DOWN | KEY_RIGHT | KEY_LEFT | KEY_A | KEY_B | KEY_X | KEY_Y)) {
|
||||
if (keysDown() & (KEY_UP | KEY_DOWN | KEY_RIGHT | KEY_LEFT | KEY_A | KEY_B | KEY_X | KEY_Y))
|
||||
{
|
||||
if (keysDown() & keys[sequence[sequencePosition]])
|
||||
sequencePosition++;
|
||||
else
|
||||
sequencePosition = 0;
|
||||
}
|
||||
|
||||
if (keysDown() & KEY_START) {
|
||||
if (keysDown() & KEY_START)
|
||||
{
|
||||
sequencePosition = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -202,7 +202,8 @@ bool nandio_clear_status()
|
||||
|
||||
bool nandio_shutdown()
|
||||
{
|
||||
if(nandWritten) {
|
||||
if (nandWritten)
|
||||
{
|
||||
// at cleanup we synchronize the FAT statgings
|
||||
// A FatFS might have multiple copies of the FAT.
|
||||
// we will get them back synchonized as we just worked on the first copy
|
||||
|
||||
Loading…
Reference in New Issue
Block a user