mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-01 00:15:10 +01:00
improve 7z error messages, minor bugfixes
This commit is contained in:
parent
a08c2783d1
commit
8500962719
@ -265,15 +265,15 @@ typedef struct _SzFileInStream
|
||||
} SzFileInStream;
|
||||
|
||||
// 7zip error list
|
||||
static char szerrormsg[][30] = {
|
||||
"7z: Data error",
|
||||
"7z: Out of memory",
|
||||
"7z: CRC Error",
|
||||
"7z: Not implemented",
|
||||
"7z: Fail",
|
||||
"7z: Data read failure",
|
||||
"7z: Archive error",
|
||||
"7z: Dictionary too large",
|
||||
static char szerrormsg[][50] = {
|
||||
"File is corrupt.", // 7z: Data error
|
||||
"Archive contains too many files.", // 7z: Out of memory
|
||||
"File is corrupt (CRC mismatch).", // 7z: CRC Error
|
||||
"File uses unsupported compression settings.", // 7z: Not implemented
|
||||
"File is corrupt.", // 7z: Fail
|
||||
"Failed to read file data.", // 7z: Data read failure
|
||||
"File is corrupt.", // 7z: Archive error
|
||||
"File uses too high of compression settings.", // 7z: Dictionary too large
|
||||
};
|
||||
|
||||
static SZ_RESULT SzRes;
|
||||
@ -315,7 +315,9 @@ Is7ZipFile (char *buffer)
|
||||
// display an error message
|
||||
static void SzDisplayError(SZ_RESULT res)
|
||||
{
|
||||
ErrorPrompt(szerrormsg[(res - 1)]);
|
||||
char msg[1024];
|
||||
sprintf(msg, "7z decompression failed: %s", szerrormsg[(res - 1)]);
|
||||
ErrorPrompt(msg);
|
||||
}
|
||||
|
||||
// function used by the 7zip SDK to read data from SD/USB/DVD/SMB
|
||||
|
@ -279,7 +279,6 @@ ConnectShare (bool silent)
|
||||
GCSettings.smbshare, GCSettings.smbip))
|
||||
{
|
||||
networkShareInit = true;
|
||||
sprintf(rootdir, "smb:");
|
||||
}
|
||||
|
||||
if(!silent)
|
||||
@ -290,6 +289,9 @@ ConnectShare (bool silent)
|
||||
ErrorPrompt("Failed to connect to network share.");
|
||||
}
|
||||
|
||||
if(networkShareInit)
|
||||
sprintf(rootdir, "smb:");
|
||||
|
||||
return networkShareInit;
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "oggplayer.h"
|
||||
#include <gccore.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* OGG control */
|
||||
|
||||
|
@ -531,7 +531,7 @@ SavePrefs (bool silent)
|
||||
// We'll save using the first available method (probably SD) since this
|
||||
// is the method preferences will be loaded from by default
|
||||
if(method == METHOD_AUTO)
|
||||
autoSaveMethod(silent);
|
||||
method = autoSaveMethod(silent);
|
||||
|
||||
if(method == METHOD_AUTO)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user