X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fplugin_lib.c;h=a2fb49515a843c92aaeb7e3ed3baa740794f95ab;hp=17ed79a98e107782083f31a8e28f07669a43e481;hb=799b0b8773d6add1de99efd582c93701b82e970d;hpb=c89cd762a63a78e30a59955e705e29ff3d5ae3b8;ds=sidebyside diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 17ed79a9..a2fb4951 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -24,10 +25,11 @@ #include "menu.h" #include "pcnt.h" #include "../libpcsxcore/new_dynarec/new_dynarec.h" +#include "../libpcsxcore/psemu_plugin_defs.h" void *pl_fbdev_buf; int pl_frame_interval; -int keystate; +int in_type, in_keystate, in_a1[2], in_a2[2]; static int pl_fbdev_w, pl_fbdev_h, pl_fbdev_bpp; static int flip_cnt, vsync_cnt, flips_per_sec, tick_per_sec; static float vsps_cur; @@ -124,13 +126,15 @@ static void update_input(void) int actions[IN_BINDTYPE_COUNT] = { 0, }; in_update(actions); + if (in_type == PSE_PAD_TYPE_ANALOGPAD) + in_update_analogs(); if (actions[IN_BINDTYPE_EMU] & PEV_MENU) stop = 1; - keystate = actions[IN_BINDTYPE_PLAYER12]; + in_keystate = actions[IN_BINDTYPE_PLAYER12]; #ifdef X11 extern int x11_update_keys(void); - keystate |= x11_update_keys(); + in_keystate |= x11_update_keys(); #endif } @@ -268,6 +272,10 @@ static void *watchdog_thread(void *unused) int seen_dead = 0; int sleep_time = 5; +#ifndef NDEBUG + // don't interfere with debug + return NULL; +#endif while (1) { sleep(sleep_time);