aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorhizzlekizzle2019-08-02 08:38:48 -0500
committerGitHub2019-08-02 08:38:48 -0500
commitfcb84f0c6ad095c355d8c0835fc6c5fcdc2a6813 (patch)
tree00fe89450ca22056153f2296a56cd6bf1f26bfb7 /libpcsxcore
parent735de186017c42bb563933b77165f8827dbb6d7a (diff)
parent208177a7ea246a6e26222500da945a414b292b57 (diff)
downloadpcsx_rearmed-fcb84f0c6ad095c355d8c0835fc6c5fcdc2a6813.tar.gz
pcsx_rearmed-fcb84f0c6ad095c355d8c0835fc6c5fcdc2a6813.tar.bz2
pcsx_rearmed-fcb84f0c6ad095c355d8c0835fc6c5fcdc2a6813.zip
Merge pull request #325 from retro-wertz/SysPrintf_to_retro_log
SysPrintf to retro_log and silence some warnings
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/cdriso.c25
-rw-r--r--libpcsxcore/debug.c2
-rw-r--r--libpcsxcore/misc.c2
-rw-r--r--libpcsxcore/plugins.c12
-rw-r--r--libpcsxcore/r3000a.c2
-rw-r--r--libpcsxcore/socket.c2
6 files changed, 23 insertions, 22 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index 975105e..daed921 100644
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -1349,6 +1349,7 @@ static long CALLBACK ISOopen(void) {
boolean isMode1ISO = FALSE;
char alt_bin_filename[MAXPATHLEN];
const char *bin_filename;
+ char image_str[1024] = {0};
if (cdHandle != NULL) {
return 0; // it's already open
@@ -1361,7 +1362,7 @@ static long CALLBACK ISOopen(void) {
return -1;
}
- SysPrintf(_("Loaded CD Image: %s"), GetIsoFile());
+ sprintf(image_str, "Loaded CD Image: %s", GetIsoFile());
cddaBigEndian = FALSE;
subChanMixed = FALSE;
@@ -1374,40 +1375,40 @@ static long CALLBACK ISOopen(void) {
cdimg_read_func = cdread_normal;
if (parsetoc(GetIsoFile()) == 0) {
- SysPrintf("[+toc]");
+ strcat(image_str, "[+toc]");
}
else if (parseccd(GetIsoFile()) == 0) {
- SysPrintf("[+ccd]");
+ strcat(image_str, "[+ccd]");
}
else if (parsemds(GetIsoFile()) == 0) {
- SysPrintf("[+mds]");
+ strcat(image_str, "[+mds]");
}
else if (parsecue(GetIsoFile()) == 0) {
- SysPrintf("[+cue]");
+ strcat(image_str, "[+cue]");
}
if (handlepbp(GetIsoFile()) == 0) {
- SysPrintf("[pbp]");
+ strcat(image_str, "[+pbp]");
CDR_getBuffer = ISOgetBuffer_compr;
cdimg_read_func = cdread_compressed;
}
else if (handlecbin(GetIsoFile()) == 0) {
- SysPrintf("[cbin]");
+ strcat(image_str, "[+cbin]");
CDR_getBuffer = ISOgetBuffer_compr;
cdimg_read_func = cdread_compressed;
}
#ifdef HAVE_CHD
else if (handlechd(GetIsoFile()) == 0) {
- SysPrintf("[chd]");
+ strcat(image_str, "[+chd]");
CDR_getBuffer = ISOgetBuffer_chd;
cdimg_read_func = cdread_chd;
}
#endif
if (!subChanMixed && opensubfile(GetIsoFile()) == 0) {
- SysPrintf("[+sub]");
+ strcat(image_str, "[+sub]");
}
if (opensbifile(GetIsoFile()) == 0) {
- SysPrintf("[+sbi]");
+ strcat(image_str, "[+sbi]");
}
fseeko(cdHandle, 0, SEEK_END);
@@ -1445,13 +1446,13 @@ static long CALLBACK ISOopen(void) {
fseek(cdHandle, 0, SEEK_SET);
fread(&modeTest, 4, 1, cdHandle);
if (SWAP32(modeTest) != 0xffffff00) {
- SysPrintf("[2048]");
+ strcat(image_str, "[2048]");
isMode1ISO = TRUE;
}
}
fseek(cdHandle, 0, SEEK_SET);
- SysPrintf(".\n");
+ SysPrintf("%s.\n", image_str);
PrintTracks();
diff --git a/libpcsxcore/debug.c b/libpcsxcore/debug.c
index 763dc45..4ba7f57 100644
--- a/libpcsxcore/debug.c
+++ b/libpcsxcore/debug.c
@@ -445,7 +445,7 @@ static void ProcessCommands() {
sprintf(reply, "200 %s\r\n", arguments == NULL ? "OK" : arguments);
break;
case 0x101:
- sprintf(reply, "201 %s\r\n", PACKAGE_VERSION);
+ sprintf(reply, "201 %s\r\n", PCSX_VERSION);
break;
case 0x102:
sprintf(reply, "202 1.0\r\n");
diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c
index bb34e5b..433d4be 100644
--- a/libpcsxcore/misc.c
+++ b/libpcsxcore/misc.c
@@ -557,7 +557,7 @@ struct PcsxSaveFuncs SaveFuncs = {
zlib_open, zlib_read, zlib_write, zlib_seek, zlib_close
};
-static const char PcsxHeader[32] = "STv4 PCSX v" PACKAGE_VERSION;
+static const char PcsxHeader[32] = "STv4 PCSX v" PCSX_VERSION;
// Savestate Versioning!
// If you make changes to the savestate version, please increment the value below.
diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c
index afe3f3b..4f52ed2 100644
--- a/libpcsxcore/plugins.c
+++ b/libpcsxcore/plugins.c
@@ -1141,11 +1141,11 @@ void ReleasePlugins() {
if (Config.UseNet && hNETDriver != NULL) NET_shutdown();
- if (hCDRDriver != NULL) SysCloseLibrary(hCDRDriver); hCDRDriver = NULL;
- if (hGPUDriver != NULL) SysCloseLibrary(hGPUDriver); hGPUDriver = NULL;
- if (hSPUDriver != NULL) SysCloseLibrary(hSPUDriver); hSPUDriver = NULL;
- if (hPAD1Driver != NULL) SysCloseLibrary(hPAD1Driver); hPAD1Driver = NULL;
- if (hPAD2Driver != NULL) SysCloseLibrary(hPAD2Driver); hPAD2Driver = NULL;
+ if (hCDRDriver != NULL) { SysCloseLibrary(hCDRDriver); hCDRDriver = NULL; }
+ if (hGPUDriver != NULL) { SysCloseLibrary(hGPUDriver); hGPUDriver = NULL; }
+ if (hSPUDriver != NULL) { SysCloseLibrary(hSPUDriver); hSPUDriver = NULL; }
+ if (hPAD1Driver != NULL) { SysCloseLibrary(hPAD1Driver); hPAD1Driver = NULL; }
+ if (hPAD2Driver != NULL) { SysCloseLibrary(hPAD2Driver); hPAD2Driver = NULL; }
if (Config.UseNet && hNETDriver != NULL) {
SysCloseLibrary(hNETDriver); hNETDriver = NULL;
@@ -1164,7 +1164,7 @@ void ReleasePlugins() {
int ReloadCdromPlugin()
{
if (hCDRDriver != NULL || cdrIsoActive()) CDR_shutdown();
- if (hCDRDriver != NULL) SysCloseLibrary(hCDRDriver); hCDRDriver = NULL;
+ if (hCDRDriver != NULL) { SysCloseLibrary(hCDRDriver); hCDRDriver = NULL; }
if (UsingIso()) {
LoadCDRplugin(NULL);
diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c
index 22341c5..0433c20 100644
--- a/libpcsxcore/r3000a.c
+++ b/libpcsxcore/r3000a.c
@@ -30,7 +30,7 @@ R3000Acpu *psxCpu = NULL;
psxRegisters psxRegs;
int psxInit() {
- SysPrintf(_("Running PCSX Version %s (%s).\n"), PACKAGE_VERSION, __DATE__);
+ SysPrintf(_("Running PCSX Version %s (%s).\n"), PCSX_VERSION, __DATE__);
#ifdef PSXREC
if (Config.Cpu == CPU_INTERPRETER) {
diff --git a/libpcsxcore/socket.c b/libpcsxcore/socket.c
index c408bc3..df768e6 100644
--- a/libpcsxcore/socket.c
+++ b/libpcsxcore/socket.c
@@ -135,7 +135,7 @@ void GetClient() {
}
#endif
- sprintf(hello, "000 PCSX Version %s - Debug console\r\n", PACKAGE_VERSION);
+ sprintf(hello, "000 PCSX Version %s - Debug console\r\n", PCSX_VERSION);
WriteSocket(hello, strlen(hello));
ptr = 0;
}