mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-26 04:24:16 +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;
|
} SzFileInStream;
|
||||||
|
|
||||||
// 7zip error list
|
// 7zip error list
|
||||||
static char szerrormsg[][30] = {
|
static char szerrormsg[][50] = {
|
||||||
"7z: Data error",
|
"File is corrupt.", // 7z: Data error
|
||||||
"7z: Out of memory",
|
"Archive contains too many files.", // 7z: Out of memory
|
||||||
"7z: CRC Error",
|
"File is corrupt (CRC mismatch).", // 7z: CRC Error
|
||||||
"7z: Not implemented",
|
"File uses unsupported compression settings.", // 7z: Not implemented
|
||||||
"7z: Fail",
|
"File is corrupt.", // 7z: Fail
|
||||||
"7z: Data read failure",
|
"Failed to read file data.", // 7z: Data read failure
|
||||||
"7z: Archive error",
|
"File is corrupt.", // 7z: Archive error
|
||||||
"7z: Dictionary too large",
|
"File uses too high of compression settings.", // 7z: Dictionary too large
|
||||||
};
|
};
|
||||||
|
|
||||||
static SZ_RESULT SzRes;
|
static SZ_RESULT SzRes;
|
||||||
@ -315,7 +315,9 @@ Is7ZipFile (char *buffer)
|
|||||||
// display an error message
|
// display an error message
|
||||||
static void SzDisplayError(SZ_RESULT res)
|
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
|
// 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))
|
GCSettings.smbshare, GCSettings.smbip))
|
||||||
{
|
{
|
||||||
networkShareInit = true;
|
networkShareInit = true;
|
||||||
sprintf(rootdir, "smb:");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!silent)
|
if(!silent)
|
||||||
@ -290,6 +289,9 @@ ConnectShare (bool silent)
|
|||||||
ErrorPrompt("Failed to connect to network share.");
|
ErrorPrompt("Failed to connect to network share.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(networkShareInit)
|
||||||
|
sprintf(rootdir, "smb:");
|
||||||
|
|
||||||
return networkShareInit;
|
return networkShareInit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "oggplayer.h"
|
#include "oggplayer.h"
|
||||||
#include <gccore.h>
|
#include <gccore.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
/* OGG control */
|
/* OGG control */
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ SavePrefs (bool silent)
|
|||||||
// We'll save using the first available method (probably SD) since this
|
// We'll save using the first available method (probably SD) since this
|
||||||
// is the method preferences will be loaded from by default
|
// is the method preferences will be loaded from by default
|
||||||
if(method == METHOD_AUTO)
|
if(method == METHOD_AUTO)
|
||||||
autoSaveMethod(silent);
|
method = autoSaveMethod(silent);
|
||||||
|
|
||||||
if(method == METHOD_AUTO)
|
if(method == METHOD_AUTO)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user