Some more tidying up

This commit is contained in:
Aurora
2016-04-02 18:48:31 +02:00
parent 3475cfe1e6
commit 24186a7148
8 changed files with 54 additions and 42 deletions

View File

@@ -80,7 +80,8 @@ int drawString(const char *string, int posX, int posY, u32 color)
posY += SPACING_Y;
line_i = 0;
i++;
} else if(line_i >= (SCREEN_TOP_WIDTH - posX) / SPACING_X)
}
else if(line_i >= (SCREEN_TOP_WIDTH - posX) / SPACING_X)
{
// Make sure we never get out of the screen.
posY += SPACING_Y;

View File

@@ -128,7 +128,8 @@ void setupCFW(void)
{
//If not 9.0 FIRM and B is pressed, attempt booting the second emuNAND
emuNAND = (mode && ((!(pressed & BUTTON_B)) == ((config >> 4) & 1))) ? 2 : 1;
} else emuNAND = 0;
}
else emuNAND = 0;
/* If tha FIRM patches version is different or user switched to/from A9LH,
delete all patched FIRMs */

View File

@@ -12,6 +12,7 @@ void memcpy(void *dest, const void *src, u32 size)
{
u8 *destc = (u8 *)dest;
const u8 *srcc = (const u8 *)src;
for(u32 i = 0; i < size; i++)
destc[i] = srcc[i];
}
@@ -19,6 +20,7 @@ void memcpy(void *dest, const void *src, u32 size)
void memset(void *dest, int filler, u32 size)
{
u8 *destc = (u8 *)dest;
for(u32 i = 0; i < size; i++)
destc[i] = (u8)filler;
}
@@ -26,6 +28,7 @@ void memset(void *dest, int filler, u32 size)
void memset32(void *dest, u32 filler, u32 size)
{
u32 *dest32 = (u32 *)dest;
for (u32 i = 0; i < size / 4; i++)
dest32[i] = filler;
}
@@ -34,6 +37,7 @@ int memcmp(const void *buf1, const void *buf2, u32 size)
{
const u8 *buf1c = (const u8 *)buf1;
const u8 *buf2c = (const u8 *)buf2;
for(u32 i = 0; i < size; i++)
{
int cmp = buf1c[i] - buf2c[i];

View File

@@ -40,7 +40,8 @@ static u16 waitInput(void)
if(key != HID_PAD) break;
if(i == 1) pressedKey = 1;
}
} while(!pressedKey);
}
while(!pressedKey);
return key;
}
@@ -85,7 +86,8 @@ void configureCFW(const char *configPath, const char *firm90Path)
}
pressed = waitInput();
} while(!(pressed & MENU_BUTTONS));
}
while(!(pressed & MENU_BUTTONS));
switch(pressed)
{