aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/cdriso.c4
-rw-r--r--libpcsxcore/ppf.c3
-rw-r--r--libpcsxcore/ppf.h2
-rw-r--r--libpcsxcore/psxcommon.c7
-rw-r--r--libpcsxcore/psxcounters.c2
-rw-r--r--libpcsxcore/sio.c2
-rw-r--r--libpcsxcore/socket.c2
7 files changed, 14 insertions, 8 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index 2d371dd..eb92281 100644
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -833,7 +833,7 @@ static long CALLBACK ISOgetTD(unsigned char track, unsigned char *buffer) {
unsigned int sect;
unsigned char time[3];
sect = msf2sec(ti[numtracks].start) + msf2sec(ti[numtracks].length);
- sec2msf(sect, time);
+ sec2msf(sect, (char *)time);
buffer[2] = time[0];
buffer[1] = time[1];
buffer[0] = time[2];
@@ -913,7 +913,7 @@ static long CALLBACK ISOplay(unsigned char *time) {
return 0;
// find the track
- sect = msf2sec(time);
+ sect = msf2sec((char *)time);
for (i = numtracks; i > 1; i--)
if (msf2sec(ti[i].start) <= sect + 2 * 75)
break;
diff --git a/libpcsxcore/ppf.c b/libpcsxcore/ppf.c
index 268ed1c..ee32d8b 100644
--- a/libpcsxcore/ppf.c
+++ b/libpcsxcore/ppf.c
@@ -335,7 +335,7 @@ void BuildPPFCache() {
unsigned char *sbi_sectors;
int LoadSBI(const char *fname, int sector_count) {
- char buffer[16], sbifile[MAXPATHLEN];
+ char buffer[16];
FILE *sbihandle;
u8 sbitime[3];
int s;
@@ -344,7 +344,6 @@ int LoadSBI(const char *fname, int sector_count) {
if (sbihandle == NULL)
return -1;
-if (sbi_sectors != NULL) printf("sbi_sectors?\n");
sbi_sectors = calloc(1, sector_count / 8);
if (sbi_sectors == NULL)
return -1;
diff --git a/libpcsxcore/ppf.h b/libpcsxcore/ppf.h
index fdb11eb..aad85c9 100644
--- a/libpcsxcore/ppf.h
+++ b/libpcsxcore/ppf.h
@@ -32,6 +32,8 @@ void UnloadSBI(void);
extern unsigned char *sbi_sectors;
+#include "cdrom.h"
+
static inline int CheckSBI(const u8 *t)
{
int s;
diff --git a/libpcsxcore/psxcommon.c b/libpcsxcore/psxcommon.c
index ea655df..8313304 100644
--- a/libpcsxcore/psxcommon.c
+++ b/libpcsxcore/psxcommon.c
@@ -57,7 +57,12 @@ void EmuUpdate() {
SysUpdate();
ApplyCheats();
- pl_frame_limit();
+
+ // reamed hack
+ {
+ extern void pl_frame_limit(void);
+ pl_frame_limit();
+ }
}
void __Log(char *fmt, ...) {
diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c
index 1c514e8..f6c1bc4 100644
--- a/libpcsxcore/psxcounters.c
+++ b/libpcsxcore/psxcounters.c
@@ -100,7 +100,7 @@ void verboseLog( s32 level, const char *str, ... )
vsprintf( buf, str, va );
va_end( va );
- printf( buf );
+ printf( "%s", buf );
fflush( stdout );
}
}
diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c
index 8a30797..df130e8 100644
--- a/libpcsxcore/sio.c
+++ b/libpcsxcore/sio.c
@@ -673,7 +673,7 @@ void ConvertMcd(char *mcd, char *data) {
}
void GetMcdBlockInfo(int mcd, int block, McdBlock *Info) {
- unsigned char *data = NULL, *ptr, *str, *sstr;
+ char *data = NULL, *ptr, *str, *sstr;
unsigned short clut[16];
unsigned short c;
int i, x;
diff --git a/libpcsxcore/socket.c b/libpcsxcore/socket.c
index 2e0dc87..31f82e2 100644
--- a/libpcsxcore/socket.c
+++ b/libpcsxcore/socket.c
@@ -190,7 +190,7 @@ int ReadSocket(char * buffer, int len) {
}
int RawReadSocket(char * buffer, int len) {
- int r;
+ int r = 0;
int mlen = len < ptr ? len : ptr;
if (!client_socket)