Fix compilation on !WIN32

This commit is contained in:
riccardom 2009-03-15 14:33:55 +00:00
parent f955afe276
commit f16052595d
2 changed files with 7 additions and 2 deletions

View File

@ -36,6 +36,10 @@ static u32 cheatsCurrentGet = 0;
static u8 *cheatsStack = NULL; static u8 *cheatsStack = NULL;
static u16 cheatsNumStack = 0; static u16 cheatsNumStack = 0;
#ifndef WIN32
#define sscanf_s sscanf
#endif
void cheatsClear() void cheatsClear()
{ {
@ -134,7 +138,7 @@ BOOL cheatsSave()
{ {
for (int t = 0; t < cheats[i].num; t++) for (int t = 0; t < cheats[i].num; t++)
{ {
fprintf(fcheat, "Data=%08X%08X", cheats[i].hi[t], cheats[i].lo[t]); fprintf(fcheat, "Data=%08lX%08lX", cheats[i].hi[t], cheats[i].lo[t]);
if (t < (cheats[i].num - 1)) fputs(",", fcheat); if (t < (cheats[i].num - 1)) fputs(",", fcheat);
} }
fputs("\n", fcheat); fputs("\n", fcheat);

View File

@ -21,6 +21,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <string.h>
#include "common.h" #include "common.h"
u8 gba_header_data_0x04[156] = { u8 gba_header_data_0x04[156] = {
@ -105,4 +106,4 @@ u32 strlen_ws(char *buf) // length without last spaces
if (buf[i]!=32) return (i-1); // space if (buf[i]!=32) return (i-1); // space
} }
return 0; return 0;
} }