mirror of
https://github.com/libretro/RetroArch
synced 2024-12-27 15:29:23 +00:00
(GX) Make input driver more generic
This commit is contained in:
parent
3abff4c01f
commit
7a7fffc7d8
@ -16,10 +16,12 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#ifdef HW_RVL
|
||||
#include <gccore.h>
|
||||
#include <ogc/pad.h>
|
||||
#ifdef HW_RVL
|
||||
#include <wiiuse/wpad.h>
|
||||
#else
|
||||
#include <cafe/pads/wpad/wpad.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
@ -32,6 +34,12 @@
|
||||
#include "../libretro.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user