static int demo_buttn(int b, int d) { if (d) { if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) return demo_action(total ? gui_token(gui_click()) : GUI_BACK); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_EXIT, b)) return demo_action(GUI_BACK); } return 1; }
static int demo_keybd(int c, int d) { if (d) { if (c == KEY_EXIT) return demo_action(GUI_BACK, 0); } return 1; }
static int demo_buttn(int b, int d) { if (d) { int active = gui_active(); if (config_tst_d(CONFIG_JOYSTICK_BUTTON_A, b)) { if (total) return demo_action(gui_token(active), gui_value(active)); else return demo_action(GUI_BACK, 0); } if (config_tst_d(CONFIG_JOYSTICK_BUTTON_B, b)) return demo_action(GUI_BACK, 0); } return 1; }