mirror of
https://github.com/Oibaf66/uae-wii.git
synced 2024-11-25 03:56:55 +01:00
Hard-code ENTERGUI and FIRE button setting. I hope this is possible to get rid of...
This commit is contained in:
parent
d5bf95ec6e
commit
ac460970ab
@ -317,16 +317,27 @@ static void keyboard_options(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
|
int fire_buttons[] = {3,7,9,10};
|
||||||
char buf[80];
|
char buf[80];
|
||||||
if (snprintf(buf, 80, "input.1.joystick.%d.button.%d",
|
int j;
|
||||||
i, sdl_key) >= 255)
|
|
||||||
{
|
snprintf(buf, 80, "input.1.joystick.%d.button.%d", i, sdl_key);
|
||||||
fprintf(stderr, "Buffer overflow. Something is wrong\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
read_inputdevice_config (&changed_prefs, buf, key);
|
read_inputdevice_config (&changed_prefs, buf, key);
|
||||||
|
|
||||||
|
snprintf(buf, 80, "input.1.joystick.%d.button.6", i);
|
||||||
|
read_inputdevice_config (&changed_prefs, buf, "SPC_ENTERGUI");
|
||||||
|
snprintf(buf, 80, "input.1.joystick.%d.button.19", i);
|
||||||
|
read_inputdevice_config (&changed_prefs, buf, "SPC_ENTERGUI");
|
||||||
|
|
||||||
|
for (j = 0; j < sizeof(fire_buttons) / sizeof(fire_buttons[0]); j++)
|
||||||
|
{
|
||||||
|
snprintf(buf, 80, "input.1.joystick.%d.button.%d",
|
||||||
|
i, fire_buttons[j]);
|
||||||
|
read_inputdevice_config (&changed_prefs, buf,
|
||||||
|
i == 0 ? "JOY2_FIRE_BUTTON" : "JOY1_FIRE_BUTTON");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prefs_has_changed = 1;
|
prefs_has_changed = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user