X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fplugin_lib.c;h=83ae892008f9526888bacce8e0b913cf3265b5b2;hp=26d5218e4dfa5dfc9d2cc59ed5ae812685de9edd;hb=15d46930b3898d3976eeb5b345f13cb33a4bce95;hpb=722285599b1ce45ca435f484b0f34a5e568487a1 diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 26d5218e..83ae8920 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -20,6 +20,7 @@ #include "common/fonts.h" #include "common/input.h" #include "omap.h" +#include "menu.h" #include "pcnt.h" #include "../libpcsxcore/new_dynarec/new_dynarec.h" @@ -85,20 +86,13 @@ int pl_fbdev_set_mode(int w, int h, int bpp) else pl_fbdev_buf = ret; + menu_notify_mode_change(w, h); + return (ret != NULL) ? 0 : -1; } 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(); @@ -111,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) { @@ -118,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);