Minor Linux compilation fixes
This commit is contained in:
parent
52bb5ccbd8
commit
03ad29922f
|
@ -66,11 +66,12 @@ static void cfg_Parse(FILE *fp)
|
|||
for(;;)
|
||||
{
|
||||
int c = fgetc(fp);
|
||||
bool iswhitespace, iscommentchar, isnewline;
|
||||
if(c == -1)
|
||||
goto bail;
|
||||
bool iswhitespace = (c==' '||c=='\t');
|
||||
bool iscommentchar = (c=='#');
|
||||
bool isnewline = (c==10||c==13);
|
||||
iswhitespace = (c==' '||c=='\t');
|
||||
iscommentchar = (c=='#');
|
||||
isnewline = (c==10||c==13);
|
||||
switch(state)
|
||||
{
|
||||
case NEWLINE:
|
||||
|
|
|
@ -321,9 +321,9 @@ do { \
|
|||
} \
|
||||
FCEUI_DispMessage("Barcode: %s", bbuf); \
|
||||
} else { \
|
||||
if(is_shift) { \
|
||||
/*if(is_shift) { \
|
||||
FCEUI_SelectMovie(x,1); \
|
||||
} else { \
|
||||
} else */{ \
|
||||
FCEUI_SelectState(x,1); \
|
||||
} \
|
||||
} \
|
||||
|
|
|
@ -49,6 +49,33 @@ static void DriverKill(void);
|
|||
static int DriverInitialize(FCEUGI *gi);
|
||||
int gametype = 0;
|
||||
|
||||
char *DriverUsage=
|
||||
"--pal x Use PAL timing.\n\
|
||||
--gamegenie x, -g x Enable emulated Game Genie if x is nonzero.\n\
|
||||
--frameskip x Set # of frames to skip per emulated frame.\n\
|
||||
--(x/y)res x, -(x/y) x Set horizontal/vertical resolution to x for full screen mode.\n\
|
||||
--(x/y)scale x Multiply width/height by x (Real numbers >0 with OpenGL, otherwise integers >0).\n\
|
||||
--(x/y)stretch x Stretch to fill surface on x/y axis (fullscreen, only with OpenGL).\n\
|
||||
--bpp x, -b x Bits per pixel for SDL surface(and video mode in fs). 8, 16, 32.\n\
|
||||
--opengl x Enable OpenGL support if x is nonzero.\n\
|
||||
--doublebuf x Enable SDL double-buffering if x is nonzero.\n\
|
||||
--fullscreen x, -f x Select full screen mode if x is nonzero.\n\
|
||||
--color x ?\n\
|
||||
--hue x ?\n\
|
||||
--tint x ?\n\
|
||||
--palette p, -p p ?\n\
|
||||
--sound x, -s x Enable sound if x is nonzero.\n\
|
||||
--volume x Set volume to x%.\n\
|
||||
--lowpass x Enable low-pass filter if x is nonzero.\n\
|
||||
--soundrecord s Record sound to file s.\n\
|
||||
--inputcfg, -i Configure input device(s) on startup.\n\
|
||||
--net s, -n s Connect to server 's' for TCP/IP network play.\n\
|
||||
--port x, -p x Use TCP/IP port x for network play.\
|
||||
--user s, -u s Set the nickname to use in network play.\n\
|
||||
--pass s, -w s Password to use for connecting to the server.\n\
|
||||
--netkey s, -k s Use key 's' to create a unique session for the game loaded.\n\
|
||||
--players x, -l x Set the number of local players.\n";
|
||||
|
||||
|
||||
// global configuration object
|
||||
Config *g_config;
|
||||
|
@ -342,8 +369,8 @@ static char *s_linuxCompilerString = "g++ " __VERSION__;
|
|||
/**
|
||||
* Returns the compiler string.
|
||||
*/
|
||||
char *FCEUD_GetCompilerString() {
|
||||
return (char *)s_linuxCompilerString;
|
||||
const char *FCEUD_GetCompilerString() {
|
||||
return (const char *)s_linuxCompilerString;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -464,6 +491,29 @@ FCEUD_GetTimeFreq(void)
|
|||
return 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a textual message without adding a newline at the end.
|
||||
*
|
||||
* @param text The text of the message.
|
||||
*
|
||||
* TODO: This function should have a better name.
|
||||
**/
|
||||
void FCEUD_Message(const char *text)
|
||||
{
|
||||
fputs(text, stdout);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows an error message in a message box.
|
||||
* (For now: prints to stderr.)
|
||||
*
|
||||
* @param errormsg Text of the error message.
|
||||
**/
|
||||
void FCEUD_PrintError(const char *errormsg)
|
||||
{
|
||||
fprintf(stderr, "%s\n", errormsg);
|
||||
}
|
||||
|
||||
|
||||
// dummy functions
|
||||
|
||||
|
|
|
@ -176,12 +176,12 @@ FCEUD_NetworkConnect(void)
|
|||
uint8 md5out[16];
|
||||
|
||||
md5_starts(&md5);
|
||||
md5_update(&md5, GameInfo->MD5, 16);
|
||||
md5_update(&md5, (uint8*)&GameInfo->MD5.data, 16);
|
||||
md5_update(&md5, (uint8 *)key.c_str(), key.size());
|
||||
md5_finish(&md5, md5out);
|
||||
memcpy(sendbuf + 4, md5out, 16);
|
||||
} else {
|
||||
memcpy(sendbuf + 4, GameInfo->MD5, 16);
|
||||
memcpy(sendbuf + 4, (uint8*)&GameInfo->MD5.data, 16);
|
||||
}
|
||||
|
||||
if(password.size()) {
|
||||
|
|
|
@ -268,12 +268,13 @@ void LoadFM2(MovieData& movieData, FILE *fp)
|
|||
bool bail = false;
|
||||
for(;;)
|
||||
{
|
||||
bool iswhitespace, isrecchar, isnewline;
|
||||
int c = fgetc(fp);
|
||||
if(c == -1)
|
||||
goto bail;
|
||||
bool iswhitespace = (c==' '||c=='\t');
|
||||
bool isrecchar = (c=='|');
|
||||
bool isnewline = (c==10||c==13);
|
||||
iswhitespace = (c==' '||c=='\t');
|
||||
isrecchar = (c=='|');
|
||||
isnewline = (c==10||c==13);
|
||||
switch(state)
|
||||
{
|
||||
case NEWLINE:
|
||||
|
|
|
@ -4,7 +4,7 @@ endian.cpp
|
|||
general.cpp
|
||||
md5.cpp
|
||||
memory.cpp
|
||||
unzip.c
|
||||
unzip.cpp
|
||||
xstring.cpp
|
||||
""")
|
||||
|
||||
|
|
Loading…
Reference in New Issue