diff --git a/README.md b/README.md index 180f12f..e315ac6 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,8 @@ Run `make` to build (defaults to `VERSION=us`) ``` make VERSION=jp -j6 # build (J) version with 6 jobs -make VERSION=us WINDOWS_BUILD=1 # builds a (U) Windows executable +make VERSION=us WINDOWS_BUILD=1 # builds a (U) Windows executable (under Windows, compiling for Windows under Linux is not supported) +make BETTERCAMERA=0 # builds an executable with the original SM64 camera (no analog/mouse support) make TARGET_RPI=1 # targets an executable for a Raspberry Pi ``` diff --git a/src/pc/controller/controller_sdl.c b/src/pc/controller/controller_sdl.c index 1a148bc..9e1b7a4 100644 --- a/src/pc/controller/controller_sdl.c +++ b/src/pc/controller/controller_sdl.c @@ -14,10 +14,13 @@ extern int16_t rightx; extern int16_t righty; + +#ifdef BETTERCAMERA int mouse_x; int mouse_y; extern u8 newcam_mouse; +#endif static bool init_ok; static SDL_GameController *sdl_cntrl; @@ -28,9 +31,11 @@ static void controller_sdl_init(void) { return; } +#ifdef BETTERCAMERA if (newcam_mouse == 1) SDL_SetRelativeMouseMode(SDL_TRUE); SDL_GetRelativeMouseState(&mouse_x, &mouse_y); +#endif init_ok = true; } @@ -40,15 +45,16 @@ static void controller_sdl_read(OSContPad *pad) { return; } +#ifdef BETTERCAMERA if (newcam_mouse == 1) SDL_SetRelativeMouseMode(SDL_TRUE); else SDL_SetRelativeMouseMode(SDL_FALSE); - + SDL_GetRelativeMouseState(&mouse_x, &mouse_y); +#endif SDL_GameControllerUpdate(); - SDL_GetRelativeMouseState(&mouse_x, &mouse_y); if (sdl_cntrl != NULL && !SDL_GameControllerGetAttached(sdl_cntrl)) { SDL_GameControllerClose(sdl_cntrl);