mirror of
https://github.com/Oibaf66/fbzx-wii.git
synced 2024-12-27 00:51:52 +01:00
Exit in case of write protected SD card
This commit is contained in:
parent
a92b0a638c
commit
915d4ce996
@ -239,7 +239,7 @@ struct computer {
|
||||
unsigned char FTPUser[32];
|
||||
unsigned char FTPPwd[32];
|
||||
unsigned char FTPPath[512];
|
||||
unsigned char FTPIp[32];
|
||||
unsigned char FTPIp[64];
|
||||
unsigned char FTPPassive;
|
||||
unsigned short FTPPort;
|
||||
unsigned char autoconf;
|
||||
|
@ -1281,12 +1281,14 @@ int main(int argc,char *argv[]) {
|
||||
|
||||
FILE *f;
|
||||
|
||||
f=fopen("test4783.txt", "w");
|
||||
if (f == NULL) {printf("Impossible to open file test4783.txt in w\n");write_protection=1;}
|
||||
f=fopen("/test4783.txt", "w");
|
||||
if (f == NULL) write_protection=1; //Impossible to open file
|
||||
|
||||
if (fclose(f)==EOF) {printf("Impossible to close file test4783.txt\n");write_protection=1;}
|
||||
if (fclose(f)==EOF) write_protection=1; //Impossible to close file
|
||||
|
||||
unlink("test4783.txt");
|
||||
if (write_protection) {msgInfo("SD card is write protected. Can't continue",3000,NULL);exit(0);}
|
||||
|
||||
unlink("/test4783.txt");
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -111,8 +111,8 @@ static const char *screen_messages[] = {
|
||||
/*06*/ "Buffer resolution",
|
||||
/*07*/ "^|640X480|320X240",
|
||||
/*08*/ " ",
|
||||
/*09*/ "576p video mode",
|
||||
/*10*/ "^|on|off",
|
||||
/*09 "576p video mode",*/
|
||||
/*10 "^|on|off",*/
|
||||
NULL
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user