Add small test for RETRO_KEYBOARD to libretro-test.

This commit is contained in:
Themaister 2012-08-10 00:03:14 +02:00
parent f4ecdf2bce
commit 92d18ec2f1

View File

@ -3,6 +3,7 @@
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
static uint16_t *frame_buf;
@ -115,6 +116,9 @@ static void update_input(void)
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT))
dir_x++;
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_RETURN))
fprintf(stderr, "Return key is pressed!\n");
dir_x += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X) / 2000;
dir_y += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 2000;
//dir_x += input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X) / 2000;