Browse Source

L (Trigger) is real. Keyboard only for now.

master
Hyenadae 2 years ago
parent
commit
f43c06303f
  1. 2
      src/pc/configfile.c
  2. 3
      src/pc/controller/controller_keyboard.c

2
src/pc/configfile.c

@ -34,6 +34,7 @@ bool configFullscreen = false;
unsigned int configKeyA = 0x26;
unsigned int configKeyB = 0x33;
unsigned int configKeyStart = 0x39;
unsigned int configKeyL = 0x35;
unsigned int configKeyR = 0x36;
unsigned int configKeyZ = 0x25;
unsigned int configKeyCUp = 0x148;
@ -51,6 +52,7 @@ static const struct ConfigOption options[] = {
{.name = "key_a", .type = CONFIG_TYPE_UINT, .uintValue = &configKeyA},
{.name = "key_b", .type = CONFIG_TYPE_UINT, .uintValue = &configKeyB},
{.name = "key_start", .type = CONFIG_TYPE_UINT, .uintValue = &configKeyStart},
{.name = "key_l", .type = CONFIG_TYPE_UINT, .uintValue = &configKeyL},
{.name = "key_r", .type = CONFIG_TYPE_UINT, .uintValue = &configKeyR},
{.name = "key_z", .type = CONFIG_TYPE_UINT, .uintValue = &configKeyZ},
{.name = "key_cup", .type = CONFIG_TYPE_UINT, .uintValue = &configKeyCUp},

3
src/pc/controller/controller_keyboard.c

@ -11,7 +11,7 @@
static int keyboard_buttons_down;
static int keyboard_mapping[13][2];
static int keyboard_mapping[14][2];
static int keyboard_map_scancode(int scancode) {
int ret = 0;
@ -58,6 +58,7 @@ static void keyboard_init(void) {
set_keyboard_mapping(i++, L_CBUTTONS, configKeyCLeft);
set_keyboard_mapping(i++, D_CBUTTONS, configKeyCDown);
set_keyboard_mapping(i++, R_CBUTTONS, configKeyCRight);
set_keyboard_mapping(i++, L_TRIG, configKeyL);
set_keyboard_mapping(i++, R_TRIG, configKeyR);
set_keyboard_mapping(i++, START_BUTTON, configKeyStart);

Loading…
Cancel
Save