Пример #1
0
void hack_jump_trash_events(int r0, int r1, int button) {
	switch (button) {
	case 4: // JUMP_UP
		button_handler(BUTTON_RELEASE, TRUE);
		break;
	case 5: // JUMP_DOWN
		button_handler(BUTTON_JUMP, TRUE);
		break;
	case 8: // TRASH_UP
		button_handler(BUTTON_RELEASE, TRUE);
		break;
	case 9: // TRASH_DOWN
		button_handler(BUTTON_TRASH, TRUE);
		break;
	}
}
Пример #2
0
int menu_event_handler(dialog_t * dialog, int *r1, gui_event_t event, int *r3, int r4, int r5, int r6, int code) {
	int ret;
	button_t button;

// FW:FF915990
// this seems to be one of the addresses where the handler is called

// standard menu 55-63
#ifdef ENABLE_DEBUG
	// print the dialog structure and diff the both cases of menu creation
	debug_log("_BTN_ [%s][guimode:%08X]", debug_btn_name(event), FLAG_GUI_MODE);
	//debug_log("_BTN_: 84=[%08X] 88=[%08X]", GET_FROM_MEM(menu_handler+0x84), GET_FROM_MEM(menu_handler+0x88) );
	//debug_log("_BTN_: r1=[%08X], r3=[%08X], 90=[%08X]", *r1, *r3, /* *(int*) */(*(int*)((int)dialog+0x90)) );
	//debug_log("_BTN_: r4=[%08X], r5=[%08X], r6=[%08X]", r4, r5, r6);
#endif

	switch (event) {
	case GUI_BUTTON_MENU            : button = BUTTON_MENU;     break;
//	case GUI_BUTTON_DISP            : button = BUTTON_DISP;     break;
	case GUI_BUTTON_JUMP            : button = BUTTON_JUMP;     break;
	case GUI_BUTTON_PLAY            : button = BUTTON_PLAY;     break;
	case GUI_BUTTON_TRASH           : button = BUTTON_TRASH;    break;
	case GUI_BUTTON_UP              : button = BUTTON_UP;       break;
	case GUI_BUTTON_DOWN            : button = BUTTON_DOWN;     break;
	case GUI_BUTTON_ZOOM_OUT_PRESS  : button = BUTTON_ZOOM_OUT; break;
	case GUI_BUTTON_ZOOM_IN_PRESS   : button = BUTTON_ZOOM_IN;  break;
	default:
		goto pass_event;
	}

	if (button_handler(button, true))
		return false;

pass_event:
	ret = InfoCreativeAppProc(dialog, r1, event, r3, r4, r5, r6, code);

#ifdef ENABLE_DEBUG
	printf_log(1,6, "_BTN_ after: r1=[%08X], r3=[%08X]", *r1, *r3);
#endif

	return ret;
}
Пример #3
0
static int button7_handler(int irq, FAR void *context)
{
  button_handler(7, irq);
  return OK;
}
Пример #4
0
void background_service_platform() {
	button_handler(&select_btn);
	button_handler(&down_btn);
}
/**************************************************************************//**
 * @brief GPIOInterrupt Handler
 *****************************************************************************/
void GPIO_IRQHandler_2(void)
{
  pb1_is_pushed = !pb1_is_pushed;
  button_handler();
  GPIO_IntClear(1 << PB1_PIN);
}
/**************************************************************************//**
 * @brief GPIO Interrupt Handler
 *****************************************************************************/
void GPIO_IRQHandler_1(void)
{
  pb0_is_pushed = !pb0_is_pushed;
  button_handler();
  GPIO_IntClear(1 << PB0_PIN);
}