/* * Class: com_Revsoft_Wabbitemu_CalcInterface * Method: ReleaseKey * Signature: (II)V */ JNIEXPORT void JNICALL Java_com_Revsoft_Wabbitemu_calc_CalcInterface_ReleaseKey (JNIEnv *env, jclass classObj, jint group, jint bit) { checkThread(); if (!lpCalc) { return; } keypad_release(&lpCalc->cpu, (int) group, (int) bit); }
void calc_turn_on(LPCALC lpCalc) { BOOL running = lpCalc->running; lpCalc->running = TRUE; calc_run_seconds(lpCalc, 2.0); keypad_press(&lpCalc->cpu, KEYGROUP_ON, KEYBIT_ON); calc_run_seconds(lpCalc, 1.0); keypad_release(&lpCalc->cpu, KEYGROUP_ON, KEYBIT_ON); #ifdef QUICKLOOK calc_run_seconds(lpCalc, 0.5); #endif lpCalc->running = running; }
keyprog_t *keypad_key_release(CPU_t *cpu, unsigned int vk) { keypad_t *keypad = cpu->pio.keypad; if (keypad == NULL) { return NULL; } for (int i = 0; i < NumElm(keygrps); i++) { if (keygrps[i].vk == vk) { keypad_release(cpu, keygrps[i].group, keygrps[i].bit); return &keygrps[i]; } } return NULL; }