mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
(GX) Cleanups
This commit is contained in:
parent
5f08605680
commit
219793a1db
@ -50,6 +50,8 @@ typedef struct gx_input
|
|||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
int mouse_max;
|
int mouse_max;
|
||||||
gx_input_mouse_t *mouse;
|
gx_input_mouse_t *mouse;
|
||||||
|
#else
|
||||||
|
void *empty;
|
||||||
#endif
|
#endif
|
||||||
} gx_input_t;
|
} gx_input_t;
|
||||||
|
|
||||||
@ -129,8 +131,10 @@ static int16_t gx_mouse_state(gx_input_t *gx, unsigned id, uint16_t joy_idx)
|
|||||||
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
||||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_MOUSE_RIGHT);
|
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_MOUSE_RIGHT);
|
||||||
default:
|
default:
|
||||||
return 0;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -235,9 +239,7 @@ static void gx_input_poll_mouse(gx_input_t *gx)
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
if (count != gx->mouse_max)
|
if (count != gx->mouse_max)
|
||||||
{
|
{
|
||||||
gx_input_mouse_t* tmp = NULL;
|
gx_input_mouse_t *tmp = (gx_input_mouse_t*)realloc(
|
||||||
|
|
||||||
tmp = (gx_input_mouse_t*)realloc(
|
|
||||||
gx->mouse, count * sizeof(gx_input_mouse_t));
|
gx->mouse, count * sizeof(gx_input_mouse_t));
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
free(gx->mouse);
|
free(gx->mouse);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user