mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-04 06:11:17 +00:00
(GX) Add way to handle power callback
This commit is contained in:
parent
27b84d349f
commit
8caee50fcd
@ -141,11 +141,12 @@ static void gx_devthread(void *a)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOGGER
|
||||
static int gx_logger_net(struct _reent *r, int fd, const char *ptr, size_t len)
|
||||
{
|
||||
#ifdef HAVE_LOGGER
|
||||
static char temp[4000];
|
||||
size_t l = len >= 4000 ? 3999 : len - 1;
|
||||
size_t l = (len >= 4000) ? 3999 : len - 1;
|
||||
memcpy(temp, ptr, l);
|
||||
temp[l] = 0;
|
||||
logger_send("%s", temp);
|
||||
@ -156,6 +157,8 @@ static int gx_logger_net(struct _reent *r, int fd, const char *ptr, size_t len)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef IS_SALAMANDER
|
||||
extern char gx_rom_path[PATH_MAX_LENGTH];
|
||||
#endif
|
||||
|
@ -102,9 +102,10 @@ extern uint64_t lifecycle_state;
|
||||
static uint64_t pad_state[MAX_PADS];
|
||||
static uint32_t pad_type[MAX_PADS] = { WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER };
|
||||
static int16_t analog_state[MAX_PADS][2][2];
|
||||
static bool g_menu;
|
||||
static bool g_menu = false;
|
||||
|
||||
#ifdef HW_RVL
|
||||
static bool g_quit;
|
||||
static bool g_quit = false;
|
||||
|
||||
static void power_callback(void)
|
||||
{
|
||||
@ -326,6 +327,12 @@ static void gx_joypad_poll(void)
|
||||
gcpad = PAD_ScanPads();
|
||||
|
||||
#ifdef HW_RVL
|
||||
if (g_quit)
|
||||
{
|
||||
runloop_ctl(RUNLOOP_CTL_SET_SHUTDOWN, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
WPAD_ReadPending(WPAD_CHAN_ALL, NULL);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user