From 5166ca2b6103cb6c2e6c1fac4715528284b30b18 Mon Sep 17 00:00:00 2001 From: dborth Date: Wed, 17 Mar 2010 23:20:17 +0000 Subject: [PATCH] update some strings --- source/ngc/fileop.cpp | 10 +++------- source/ngc/networkop.cpp | 4 +--- source/ngc/vbasupport.cpp | 6 ++---- source/ngc/vmmem.cpp | 20 +++++++------------- 4 files changed, 13 insertions(+), 27 deletions(-) diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index 518750f..5ef233c 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -352,7 +352,7 @@ bool MountDVD(bool silent) if(silent) break; - retry = ErrorPromptRetry("Invalid DVD."); + retry = ErrorPromptRetry("Unrecognized DVD format."); } else { @@ -586,7 +586,6 @@ bool ParseDirEntries() int ParseDirectory(bool waitParse) { - char msg[128]; int retry = 1; bool mounted = false; @@ -603,10 +602,7 @@ ParseDirectory(bool waitParse) return -1; if(dirIter == NULL) - { - sprintf(msg, "Error opening %s", browser.dir); - retry = ErrorPromptRetry(msg); - } + retry = ErrorPromptRetry("Error opening directory"); } // if we can't open the dir, try higher levels @@ -711,7 +707,7 @@ LoadSzFile(char * filepath, unsigned char * rbuffer) } else { - ErrorPrompt("Error opening file"); + ErrorPrompt("Error opening file!"); } // go back to checking if devices were inserted/removed diff --git a/source/ngc/networkop.cpp b/source/ngc/networkop.cpp index 5dc0cbf..59dad22 100644 --- a/source/ngc/networkop.cpp +++ b/source/ngc/networkop.cpp @@ -191,7 +191,6 @@ void InitializeNetwork(bool silent) int retry = 1; char ip[16]; - char msg[150]; s32 initResult; if(!silent) @@ -217,8 +216,7 @@ void InitializeNetwork(bool silent) if(networkInit || silent) break; - sprintf(msg, "Unable to initialize network (Error #: %i)", initResult); - retry = ErrorPromptRetry(msg); + retry = ErrorPromptRetry("Unable to initialize network!"); } // do not automatically attempt a reconnection diff --git a/source/ngc/vbasupport.cpp b/source/ngc/vbasupport.cpp index 5859834..e35d655 100644 --- a/source/ngc/vbasupport.cpp +++ b/source/ngc/vbasupport.cpp @@ -896,14 +896,12 @@ bool LoadVBAROM() cartridgeType = 2; else if(utilIsGBImage(zippedFilename)) cartridgeType = 1; - else { - ErrorPrompt("Rom must be 1st file in zip, or unzipped!"); + else return false; - } } else // loading the file failed { - ErrorPrompt("Empty or invalid zip file!"); + ErrorPrompt("Empty or invalid ZIP file!"); return false; } } diff --git a/source/ngc/vmmem.cpp b/source/ngc/vmmem.cpp index 515d28d..87e0bec 100644 --- a/source/ngc/vmmem.cpp +++ b/source/ngc/vmmem.cpp @@ -274,7 +274,6 @@ static void VMInit( void ) int VMCPULoadROM() { int res; - char msg[512]; char filepath[MAXPATHLEN]; if(!MakeFilePath(filepath, FILE_ROM)) @@ -283,7 +282,7 @@ int VMCPULoadROM() // loading compressed files via VM is not supported if(!utilIsGBAImage(filepath)) { - InfoPrompt("Compressed GBA files are not supported!"); + ErrorPrompt("Compressed GBA files are not supported!"); return 0; } @@ -294,7 +293,7 @@ int VMCPULoadROM() if (romfile == NULL) { - InfoPrompt("Error opening file!"); + ErrorPrompt("Error opening file!"); return 0; } @@ -308,8 +307,7 @@ int VMCPULoadROM() res = fread(rom, 1, (1 << VMSHIFTBITS), romfile); if ( res != (1 << VMSHIFTBITS ) ) { - sprintf(msg, "Error reading file! %i \n",res); - InfoPrompt(msg); + ErrorPrompt("Error reading file!"); VMClose(); return 0; } @@ -338,12 +336,10 @@ int VMCPULoadROM() static void VMNewPage( int pageid ) { int res = fseek( romfile, pageid << VMSHIFTBITS, SEEK_SET ); - char msg[512]; if (res) // fseek returns non-zero on a failure { - sprintf(msg, "Seek error! - Offset %d / %08x %d\n", pageid, pageid << VMSHIFTBITS, res); - InfoPrompt(msg); + ErrorPrompt("Seek error!"); VMClose(); ExitApp(); } @@ -366,7 +362,6 @@ u32 VMRead32( u32 address ) } int pageid = address >> VMSHIFTBITS; - char msg[512]; switch( vmpage[pageid].pagetype ) { @@ -377,8 +372,7 @@ u32 VMRead32( u32 address ) return READ32LE( vmpage[pageid].pageptr + ( address & VMSHIFTMASK ) ); default: - sprintf(msg, "VM32 : Unknown page type! (%d) [%d]", vmpage[pageid].pagetype, pageid); - InfoPrompt(msg); + ErrorPrompt("VM32: Unknown page type!"); VMClose(); ExitApp(); return 0; @@ -408,7 +402,7 @@ u16 VMRead16( u32 address ) return READ16LE( vmpage[pageid].pageptr + ( address & VMSHIFTMASK ) ); default: - InfoPrompt("VM16 : Unknown page type!"); + ErrorPrompt("VM16: Unknown page type!"); VMClose(); ExitApp(); return 0; @@ -438,7 +432,7 @@ u8 VMRead8( u32 address ) return (u8)vmpage[pageid].pageptr[ (address & VMSHIFTMASK) ]; default: - InfoPrompt("VM8 : Unknown page type!"); + ErrorPrompt("VM8: Unknown page type!"); VMClose(); ExitApp(); return 0;