mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Add small test for RETRO_KEYBOARD to libretro-test.
This commit is contained in:
parent
f4ecdf2bce
commit
92d18ec2f1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user