From 44b771813ae2151a74f380c3db965880c2860e66 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 13 Oct 2014 05:14:40 +0200 Subject: [PATCH] Start implementing g_extern.lifecycle_state as a way to pass commands to Rarch internally on next iteration --- runloop.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/runloop.c b/runloop.c index c4cf1d3438..f2ebf43179 100644 --- a/runloop.c +++ b/runloop.c @@ -654,6 +654,17 @@ int rarch_main_iterate(void) if (driver.flushing_input) driver.flushing_input = (input) ? input_flush(&input) : false; + if (g_extern.lifecycle_state != 0) + { + int key; + for (key = 0; key < RARCH_BIND_LIST_END; key++) + { + if (BIT64_GET(g_extern.lifecycle_state, key)) + BIT64_SET(input, key); + } + g_extern.lifecycle_state = 0; + } + trigger_input = input & ~old_input; if (time_to_exit(input))