From 26b62ba42e467e86ec7f6e5fdee5a76ba008fc0e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 2 Jun 2014 09:52:30 +0200 Subject: [PATCH] Don't abuse g_extern.lifecycle_state for setting RARCH_QUIT_KEY anymore --- android/native/jni/input_android.c | 4 ++-- blackberry-qnx/qnx_input.c | 2 +- gfx/context/androidegl_ctx.c | 2 +- gfx/context/bbqnx_ctx.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 59cadc9028..1f1fc517d8 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -1736,7 +1736,7 @@ static void android_input_set_keybinds(void *data, unsigned device, static void android_input_poll(void *data) { int ident; - uint64_t lifecycle_mask = (1ULL << RARCH_RESET) | (1ULL << RARCH_REWIND) | (1ULL << RARCH_FAST_FORWARD_KEY) | (1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_MUTE) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS) | (1ULL << RARCH_QUIT_KEY) | (1ULL << RARCH_MENU_TOGGLE); + uint64_t lifecycle_mask = (1ULL << RARCH_RESET) | (1ULL << RARCH_REWIND) | (1ULL << RARCH_FAST_FORWARD_KEY) | (1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_MUTE) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS) | (1ULL << RARCH_MENU_TOGGLE); uint64_t *lifecycle_state = &g_extern.lifecycle_state; struct android_app *android_app = (struct android_app*)g_android; android_input_t *android = (android_input_t*)data; @@ -1824,7 +1824,7 @@ static void android_input_poll(void *data) } else if (g_settings.input.back_behavior == BACK_BUTTON_QUIT) { - *lifecycle_state |= (1ULL << RARCH_QUIT_KEY); + g_extern.system.shutdown = true; AInputQueue_finishEvent(android_app->inputQueue, event, handled); break; } diff --git a/blackberry-qnx/qnx_input.c b/blackberry-qnx/qnx_input.c index 7c16d6aea1..b18c1d9878 100644 --- a/blackberry-qnx/qnx_input.c +++ b/blackberry-qnx/qnx_input.c @@ -509,7 +509,7 @@ static void handle_navigator_event(void *data, bps_event_t *event) } else if (bps_event_get_code(event_pause) == NAVIGATOR_EXIT) { - g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY); + g_extern.system.shutdown = true; break; } } diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index 8ce5e86b97..ee376b75c8 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -182,7 +182,7 @@ static void gfx_ctx_check_window(void *data, bool *quit, } // Check if we are exiting. - if (g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY)) + if (g_extern.system.shutdown) *quit = true; } diff --git a/gfx/context/bbqnx_ctx.c b/gfx/context/bbqnx_ctx.c index 9fa7b954f0..cd182caaca 100644 --- a/gfx/context/bbqnx_ctx.c +++ b/gfx/context/bbqnx_ctx.c @@ -311,7 +311,7 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit, } // Check if we are exiting. - if (g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY)) + if (g_extern.system.shutdown) *quit = true; }