Fix build on Mingw CXX_BUILD.

This commit is contained in:
Themaister 2012-03-30 19:15:18 +02:00
parent 5d4e32ef9d
commit 35a9123bf8
2 changed files with 8 additions and 1 deletions

View File

@ -32,6 +32,10 @@
// Avoid possible naming collitions during link since we prefer to use the actual name.
#define getopt_long(argc, argv, optstring, longopts, longindex) __getopt_long_ssnes(argc, argv, optstring, longopts, longindex)
#ifdef __cplusplus
extern "C" {
#endif
struct option
{
const char *name;
@ -46,6 +50,9 @@ int getopt_long(int argc, char *argv[],
const char *optstring, const struct option *longopts, int *longindex);
extern char *optarg;
extern int optind, opterr, optopt;
#ifdef __cplusplus
}
#endif
#endif
#endif

View File

@ -69,7 +69,7 @@ static BOOL CALLBACK enum_joypad_cb(const DIDEVICEINSTANCE *inst, void *p)
unsigned n;
for (n = 0; n < MAX_PLAYERS; n++)
{
if (!di->joypad[n] && g_settings.input.joypad_map[n] == di->joypad_cnt)
if (!di->joypad[n] && g_settings.input.joypad_map[n] == (int)di->joypad_cnt)
break;
if (di->joypad[n])