reverted to using if else statements
as cant use strings with case statements using c99
This commit is contained in:
parent
aa455bf8b4
commit
b02b6f020d
@ -39,7 +39,6 @@ void drawBox(short x, short y, short width, short height, display_context_t disp
|
||||
void drawBoxNumber(display_context_t disp, int box);
|
||||
|
||||
void printText(char *msg, int x, int y, display_context_t dcon);
|
||||
void lprintText(char *msg, int x, int y, display_context_t dcon);
|
||||
void sleep(unsigned long int ms);
|
||||
void clearScreen(display_context_t disp);
|
||||
|
||||
|
39
src/menu.c
39
src/menu.c
@ -3778,12 +3778,9 @@ int main(void)
|
||||
|
||||
sprintf(extension, "%s", (pch + 1)); //0123456
|
||||
|
||||
//load the rom using its extension
|
||||
switch (extension)
|
||||
//load the rom using its file extension
|
||||
if (strcmp(extension, "Z64") == 0 || strcmp(extension, "V64") == 0 || strcmp(extension, "N64") == 0)
|
||||
{
|
||||
case "Z64":
|
||||
case "V64":
|
||||
case "N64":
|
||||
while (!(disp = display_lock()))
|
||||
;
|
||||
clearScreen(disp);
|
||||
@ -3803,9 +3800,9 @@ int main(void)
|
||||
|
||||
//rom loaded mapping
|
||||
input_mapping = 4;
|
||||
break;
|
||||
case "GB": //gb
|
||||
case "GBC": //gbc rom
|
||||
}
|
||||
else if (strcmp(extension, "GB") == 0 || strcmp(extension, "GBC") == 0)
|
||||
{
|
||||
while (!(disp = display_lock()))
|
||||
;
|
||||
clearScreen(disp);
|
||||
@ -3820,8 +3817,9 @@ int main(void)
|
||||
loadgbrom(disp, name_file);
|
||||
|
||||
display_show(disp);
|
||||
break;
|
||||
case "NES": //nes
|
||||
}
|
||||
else if (strcmp(extension, "NES") == 0)
|
||||
{
|
||||
while (!(disp = display_lock()))
|
||||
;
|
||||
clearScreen(disp);
|
||||
@ -3836,8 +3834,9 @@ int main(void)
|
||||
loadnesrom(disp, name_file);
|
||||
|
||||
display_show(disp);
|
||||
break;
|
||||
case "GG": //gg
|
||||
}
|
||||
else if (strcmp(extension, "GG") == 0)
|
||||
{
|
||||
while (!(disp = display_lock()))
|
||||
;
|
||||
clearScreen(disp);
|
||||
@ -3852,8 +3851,9 @@ int main(void)
|
||||
loadggrom(disp, name_file);
|
||||
|
||||
display_show(disp);
|
||||
break;
|
||||
case "MSX": //msx2
|
||||
}
|
||||
else if (strcmp(extension, "MSX") == 0)
|
||||
{
|
||||
while (!(disp = display_lock()))
|
||||
;
|
||||
clearScreen(disp);
|
||||
@ -3868,11 +3868,12 @@ int main(void)
|
||||
loadmsx2rom(disp, name_file);
|
||||
|
||||
display_show(disp);
|
||||
break;
|
||||
case "MPK": //mempak
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else if (strcmp(extension, "MPK") == 0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user