diff options
author | notaz | 2010-12-15 12:50:22 +0200 |
---|---|---|
committer | notaz | 2010-12-16 18:37:56 +0200 |
commit | 15d46930b3898d3976eeb5b345f13cb33a4bce95 (patch) | |
tree | f9e9ea8c6ecbc79e7cbe3e64793c61e2086167f6 /frontend | |
parent | f2019b6ea4c2c745188fb2cab69d67c6f015c00d (diff) | |
download | pcsx_rearmed-15d46930b3898d3976eeb5b345f13cb33a4bce95.tar.gz pcsx_rearmed-15d46930b3898d3976eeb5b345f13cb33a4bce95.tar.bz2 pcsx_rearmed-15d46930b3898d3976eeb5b345f13cb33a4bce95.zip |
update inputs on vsync
flip is not called when emulation gets stuck, making
impossible to return to menu.
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/plugin_lib.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 7110b35..83ae892 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -93,15 +93,6 @@ int pl_fbdev_set_mode(int w, int h, int bpp) void pl_fbdev_flip(void) { - /* doing input here because the pad is polled - * thousands of times for some reason */ - int actions[IN_BINDTYPE_COUNT] = { 0, }; - - in_update(actions); - if (actions[IN_BINDTYPE_EMU] & PEV_MENU) - stop = 1; - keystate = actions[IN_BINDTYPE_PLAYER12]; - flip_cnt++; print_fps(); print_cpu_usage(); @@ -114,6 +105,16 @@ void pl_fbdev_finish(void) { } +static void update_input(void) +{ + int actions[IN_BINDTYPE_COUNT] = { 0, }; + + in_update(actions); + if (actions[IN_BINDTYPE_EMU] & PEV_MENU) + stop = 1; + keystate = actions[IN_BINDTYPE_PLAYER12]; +} + /* called on every vsync */ void pl_frame_limit(void) { @@ -121,6 +122,10 @@ void pl_frame_limit(void) static int oldsec; struct timeval tv; + /* doing input here because the pad is polled + * thousands of times per frame for some reason */ + update_input(); + pcnt_end(PCNT_ALL); gettimeofday(&tv, 0); |