Beispiel #1
0
static PRESULT sudoku_callback(POBJECT_HEAD obj, VEVENT event, UINT32 param1, UINT32 param2)
{
    UINT32 vkey;
    UINT8 key_repeat_cnt;
    UINT8 key_status;
    PRESULT ret = PROC_PASS;

    switch (event)
    {
    case EVN_UNKNOWNKEY_GOT:
        ret = PROC_LOOP;
		msg_code_to_key_count(param1, &key_repeat_cnt);
		msg_code_to_key_state(param1, &key_status);
        ap_hk_to_vk(0, param1, &vkey);

        ret = game_key_proc(vkey, key_repeat_cnt, key_status);
        break;
    }

    return ret;
}
Beispiel #2
0
static PRESULT game_callback(POBJECT_HEAD obj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT32 vkey;
	UINT8 key_repeat_cnt;
	UINT8 key_status;
	PRESULT ret = PROC_PASS;

	switch (event)
	{
		case EVN_UNKNOWNKEY_GOT:
			ret = PROC_LOOP;
			key_repeat_cnt = (UINT8)(param1 >> 16)&0xFF;
			key_status = (UINT8)(param1 >> 28)&0x01;
			ap_hk_to_vk(0, param1, &vkey);

			ret = game_key_proc(vkey, key_repeat_cnt, key_status);
			break;
	}

	return ret;
}