From 7a7fffc7d824262ac386e9a9bfadd5447891555a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 4 Jun 2014 06:22:29 +0200 Subject: [PATCH] (GX) Make input driver more generic --- input/gx_input.c | 16 ++++++++++++---- wii/mem2_manager.c | 6 +++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/input/gx_input.c b/input/gx_input.c index 0ff4fc7db1..015f5171d8 100644 --- a/input/gx_input.c +++ b/input/gx_input.c @@ -16,10 +16,12 @@ */ #include +#ifdef HW_RVL #include #include -#ifdef HW_RVL #include +#else +#include #endif #include #include @@ -32,6 +34,12 @@ #include "../libretro.h" #include +#ifdef GEKKO +#define WPADInit WPAD_Init +#define WPADDisconnect WPAD_Disconnect +#define WPADProbe WPAD_Probe +#endif + enum { GX_GC_A = 0, @@ -379,7 +387,7 @@ static void gx_input_free_input(void *data) #ifdef HW_RVL WPAD_Flush(i); - WPAD_Disconnect(i); + WPADDisconnect(i); #endif } @@ -716,7 +724,7 @@ static void *gx_input_init(void) USB_Initialize(); #endif #ifdef HW_RVL - WPAD_Init(); + WPADInit(); #endif SYS_SetResetCallback(reset_cb); #ifdef HW_RVL @@ -794,7 +802,7 @@ static void gx_input_poll(void *data) #ifdef HW_RVL uint32_t ptype = 0; - uint32_t connected = WPAD_Probe(port, &ptype); + uint32_t connected = WPADProbe(port, &ptype); #ifdef HAVE_LIBSICKSAXIS USB_DeviceChangeNotifyAsync(USB_CLASS_HID, change_cb, (void*)&lol); diff --git a/wii/mem2_manager.c b/wii/mem2_manager.c index 565e719366..6a84dde69c 100644 --- a/wii/mem2_manager.c +++ b/wii/mem2_manager.c @@ -68,7 +68,7 @@ static u32 __lwp_heap_block_size(heap_cntrl *theheap, void *ptr) static heap_cntrl gx_mem2_heap; -bool gx_init_mem2() +bool gx_init_mem2(void) { u32 level; _CPU_ISR_Disable(level); @@ -185,14 +185,14 @@ char *_mem2_strndup(const char *s, size_t n) return ptr; } -u32 gx_mem2_used() +u32 gx_mem2_used(void) { heap_iblock info; __lwp_heap_getinfo(&gx_mem2_heap, &info); return info.used_size; } -u32 gx_mem2_total() +u32 gx_mem2_total(void) { heap_iblock info; __lwp_heap_getinfo(&gx_mem2_heap, &info);