Merge pull request #22 from Hyenadae/master

L (Trigger) is real (now). Added key_l to config. L_TRIG and CONT_L inputs are now accepted by Mario 64
This commit is contained in:
y0shin 2020-05-09 06:21:20 -04:00 committed by GitHub
commit 879958617f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

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

View File

@ -5,6 +5,7 @@ extern bool configFullscreen;
extern unsigned int configKeyA; extern unsigned int configKeyA;
extern unsigned int configKeyB; extern unsigned int configKeyB;
extern unsigned int configKeyStart; extern unsigned int configKeyStart;
extern unsigned int configKeyL;
extern unsigned int configKeyR; extern unsigned int configKeyR;
extern unsigned int configKeyZ; extern unsigned int configKeyZ;
extern unsigned int configKeyCUp; extern unsigned int configKeyCUp;

View File

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