From dd756b9df9229de29d5522cc8495a3eb91d6e92f Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Fri, 16 Jan 2009 19:24:55 +0000 Subject: [PATCH] Fixed wiimote HOME bug and removed yohanes SDL --- Makefile | 2 +- Src/Display_SDL.h | 3 +++ Src/menu.cpp | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6a65168..745e3a0 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ LDFLAGS = -L$(DEVKITPRO)/SDL/lib -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lSDL_image -lSDL_ttf -ljpeg -lpng -lz -lSDL_yohanes -lfreetype -lfat -lwiiuse -lbte -logc -lm +LIBS := -lSDL_image -lSDL_ttf -ljpeg -lpng -lz -lSDL -lfreetype -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/Src/Display_SDL.h b/Src/Display_SDL.h index 89baeb2..6d55d7f 100644 --- a/Src/Display_SDL.h +++ b/Src/Display_SDL.h @@ -605,6 +605,9 @@ uint8 C64::poll_joystick(int port) wpad = WPAD_Data(controller); wpad_other = WPAD_Data(!controller); + if (!wpad && !wpad_other) + return 0xff; + held = wpad->btns_h; held_other = wpad_other->btns_h; diff --git a/Src/menu.cpp b/Src/menu.cpp index 8e480f3..6c5cfa6 100644 --- a/Src/menu.cpp +++ b/Src/menu.cpp @@ -272,6 +272,10 @@ static uint32_t wait_key_press(void) wpad = WPAD_Data(WPAD_CHAN_0); wpad_other = WPAD_Data(WPAD_CHAN_1); + + if (!wpad && !wpad_other) + return 0; + remote_keys = wpad->btns_d | wpad_other->btns_d; classic_keys = 0; @@ -357,7 +361,7 @@ static uint32_t wait_key_press(void) } if (keys != 0) return keys; - SDL_Delay(30); + SDL_Delay(100); } return keys;