For some reason, need to disable the SDL joystick code to build PCMain on windows

This commit is contained in:
Henrik Rydgard 2014-02-05 14:46:21 +01:00
parent 63f7bae9c9
commit 841f04d369

View file

@ -8,10 +8,10 @@
#include <shlobj.h> #include <shlobj.h>
#include <shlwapi.h> #include <shlwapi.h>
#include <ShellAPI.h> #include <ShellAPI.h>
#include "SDL/SDL.h" #include "SDL.h"
#include "SDL/SDL_timer.h" #include "SDL_timer.h"
#include "SDL/SDL_audio.h" #include "SDL_audio.h"
#include "SDL/SDL_video.h" #include "SDL_video.h"
#else #else
#include <unistd.h> #include <unistd.h>
#include <pwd.h> #include <pwd.h>
@ -33,7 +33,10 @@
#include "base/NKCodeFromSDL.h" #include "base/NKCodeFromSDL.h"
#include "util/const_map.h" #include "util/const_map.h"
#include "math/math_util.h" #include "math/math_util.h"
#ifndef _WIN32
#include "SDL/SDLJoystick.h" #include "SDL/SDLJoystick.h"
#endif
#ifdef PPSSPP #ifdef PPSSPP
// Bad: PPSSPP includes from native // Bad: PPSSPP includes from native
@ -184,8 +187,10 @@ void EGL_Close() {
SDL_Joystick *ljoy = NULL; SDL_Joystick *ljoy = NULL;
SDL_Joystick *rjoy = NULL; SDL_Joystick *rjoy = NULL;
#else #else
#ifndef _WIN32
SDLJoystick *joystick = NULL; SDLJoystick *joystick = NULL;
#endif #endif
#endif
// Simple implementations of System functions // Simple implementations of System functions
@ -568,7 +573,9 @@ int main(int argc, char *argv[]) {
rjoy = SDL_JoystickOpen(1); rjoy = SDL_JoystickOpen(1);
} }
#else #else
#ifndef _WIN32
joystick = new SDLJoystick(); joystick = new SDLJoystick();
#endif
#endif #endif
EnableFZ(); EnableFZ();
@ -722,7 +729,9 @@ int main(int argc, char *argv[]) {
} }
break; break;
default: default:
#ifndef _WIN32
joystick->ProcessInput(event); joystick->ProcessInput(event);
#endif
break; break;
} }
} }
@ -768,8 +777,10 @@ int main(int argc, char *argv[]) {
framecount++; framecount++;
} }
#ifndef PANDORA #ifndef PANDORA
#ifndef _WIN32
delete joystick; delete joystick;
joystick = NULL; joystick = NULL;
#endif
#endif #endif
// Faster exit, thanks to the OS. Remove this if you want to debug shutdown // Faster exit, thanks to the OS. Remove this if you want to debug shutdown
// The speed difference is only really noticable on Linux. On Windows you do notice it though // The speed difference is only really noticable on Linux. On Windows you do notice it though