summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-15 18:49:26 +0000
committerSND\ckain_cp <SND\ckain_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-02-15 18:49:26 +0000
commitd3236417509da28648e0ebf93b1181ada88379f2 (patch)
tree85628cb9ae1aba3ea56f320797eb72a5b517700c /gui
parentcc445563aa15e93d632dcbdb9ea6310fc576efab (diff)
downloadpcsxr-d3236417509da28648e0ebf93b1181ada88379f2.tar.gz
Enable 128MB full file buffer for emuLog when using interpreter CPU & PSXCPU_LOG.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82922 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'gui')
-rwxr-xr-xgui/LnxMain.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gui/LnxMain.c b/gui/LnxMain.c
index 24b883ae..0a553bad 100755
--- a/gui/LnxMain.c
+++ b/gui/LnxMain.c
@@ -307,6 +307,7 @@ int main(int argc, char *argv[]) {
if (i+1 >= argc) break;
strncpy(isofilename, argv[++i], MAXPATHLEN);
+ isofilename[MAXPATHLEN] = '\0';
if (isofilename[0] != '/') {
getcwd(path, MAXPATHLEN);
if (strlen(path) + strlen(isofilename) + 1 < MAXPATHLEN) {
@@ -467,7 +468,17 @@ int SysInit() {
#else
emuLog = stdout;
#endif
- setvbuf(emuLog, NULL, _IONBF, 0);
+#ifdef PSXCPU_LOG
+ if (Config.Cpu == CPU_INTERPRETER) {
+ const int BUFSZ = 1 * 512*512*512;
+ void* buf = malloc(BUFSZ);
+ setvbuf(emuLog, buf, _IOFBF, BUFSZ);
+ } else {
+ setvbuf(emuLog, NULL, _IONBF, NULL);
+ }
+#else
+ setvbuf(emuLog, NULL, _IONBF, NULL);
+#endif
#endif
if (EmuInit() == -1) {
@@ -520,7 +531,7 @@ void SysPrintf(const char *fmt, ...) {
#ifdef EMU_LOG
#ifndef LOG_STDOUT
- fprintf(emuLog, "%s", msg);
+ if (emuLog != NULL) fprintf(emuLog, "%s", msg);
#endif
#endif
}