mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
Rename touch joystick variants for code clarity
This commit is contained in:
parent
c22ad4c1e9
commit
d90e12b5dc
@ -28,7 +28,7 @@ typedef struct touch_event_s {
|
||||
|
||||
static touch_event_s *touchEventQ = NULL;
|
||||
|
||||
static GLTouchJoyVariant happyHappyJoyJoy = { 0 };
|
||||
static GLTouchJoyVariant joyVariant = { 0 };
|
||||
|
||||
static struct {
|
||||
void (*buttonDrawCallback)(char newChar);
|
||||
@ -347,27 +347,27 @@ static uint8_t *touchjoy_rosetteChars(void) {
|
||||
static void _init_gltouchjoy_joy(void) {
|
||||
LOG("Registering OpenGL software touch joystick (joystick variant)");
|
||||
|
||||
happyHappyJoyJoy.variant = &touchjoy_variant;
|
||||
happyHappyJoyJoy.resetState = &touchjoy_resetState;
|
||||
happyHappyJoyJoy.setup = &touchjoy_setup;
|
||||
happyHappyJoyJoy.shutdown = &touchjoy_shutdown;
|
||||
joyVariant.variant = &touchjoy_variant;
|
||||
joyVariant.resetState = &touchjoy_resetState;
|
||||
joyVariant.setup = &touchjoy_setup;
|
||||
joyVariant.shutdown = &touchjoy_shutdown;
|
||||
|
||||
happyHappyJoyJoy.prefsChanged = &touchjoy_prefsChanged;
|
||||
joyVariant.prefsChanged = &touchjoy_prefsChanged;
|
||||
|
||||
happyHappyJoyJoy.buttonDown = &touchjoy_buttonDown;
|
||||
happyHappyJoyJoy.buttonMove = &touchjoy_buttonMove;
|
||||
happyHappyJoyJoy.buttonUp = &touchjoy_buttonUp;
|
||||
joyVariant.buttonDown = &touchjoy_buttonDown;
|
||||
joyVariant.buttonMove = &touchjoy_buttonMove;
|
||||
joyVariant.buttonUp = &touchjoy_buttonUp;
|
||||
|
||||
happyHappyJoyJoy.axisDown = &touchjoy_axisDown;
|
||||
happyHappyJoyJoy.axisMove = &touchjoy_axisMove;
|
||||
happyHappyJoyJoy.axisUp = &touchjoy_axisUp;
|
||||
joyVariant.axisDown = &touchjoy_axisDown;
|
||||
joyVariant.axisMove = &touchjoy_axisMove;
|
||||
joyVariant.axisUp = &touchjoy_axisUp;
|
||||
|
||||
happyHappyJoyJoy.rosetteChars = &touchjoy_rosetteChars;
|
||||
joyVariant.rosetteChars = &touchjoy_rosetteChars;
|
||||
|
||||
joys.tapDelayMutex = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;
|
||||
joys.tapDelayCond = (pthread_cond_t)PTHREAD_COND_INITIALIZER;
|
||||
|
||||
gltouchjoy_registerVariant(TOUCH_DEVICE_JOYSTICK, &happyHappyJoyJoy);
|
||||
gltouchjoy_registerVariant(TOUCH_DEVICE_JOYSTICK, &joyVariant);
|
||||
}
|
||||
|
||||
static __attribute__((constructor)) void __init_gltouchjoy_joy(void) {
|
||||
|
@ -82,7 +82,7 @@ static struct {
|
||||
|
||||
} kpad = { 0 };
|
||||
|
||||
static GLTouchJoyVariant kpadJoy = { 0 };
|
||||
static GLTouchJoyVariant kpadVariant = { 0 };
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// repeat key callback scheduling and unscheduling
|
||||
@ -577,24 +577,24 @@ static void _init_gltouchjoy_kpad(void) {
|
||||
|
||||
kpad.currButtonDisplayChar = ' ';
|
||||
|
||||
kpadJoy.variant = &touchkpad_variant;
|
||||
kpadJoy.resetState = &touchkpad_resetState;
|
||||
kpadJoy.setup = &touchkpad_setup;
|
||||
kpadJoy.shutdown = &touchkpad_shutdown;
|
||||
kpadVariant.variant = &touchkpad_variant;
|
||||
kpadVariant.resetState = &touchkpad_resetState;
|
||||
kpadVariant.setup = &touchkpad_setup;
|
||||
kpadVariant.shutdown = &touchkpad_shutdown;
|
||||
|
||||
kpadJoy.prefsChanged = &touchkpad_prefsChanged;
|
||||
kpadVariant.prefsChanged = &touchkpad_prefsChanged;
|
||||
|
||||
kpadJoy.buttonDown = &touchkpad_buttonDown;
|
||||
kpadJoy.buttonMove = &touchkpad_buttonMove;
|
||||
kpadJoy.buttonUp = &touchkpad_buttonUp;
|
||||
kpadVariant.buttonDown = &touchkpad_buttonDown;
|
||||
kpadVariant.buttonMove = &touchkpad_buttonMove;
|
||||
kpadVariant.buttonUp = &touchkpad_buttonUp;
|
||||
|
||||
kpadJoy.axisDown = &touchkpad_axisDown;
|
||||
kpadJoy.axisMove = &touchkpad_axisMove;
|
||||
kpadJoy.axisUp = &touchkpad_axisUp;
|
||||
kpadVariant.axisDown = &touchkpad_axisDown;
|
||||
kpadVariant.axisMove = &touchkpad_axisMove;
|
||||
kpadVariant.axisUp = &touchkpad_axisUp;
|
||||
|
||||
kpadJoy.rosetteChars = &touchkpad_rosetteChars;
|
||||
kpadVariant.rosetteChars = &touchkpad_rosetteChars;
|
||||
|
||||
gltouchjoy_registerVariant(TOUCH_DEVICE_JOYSTICK_KEYPAD, &kpadJoy);
|
||||
gltouchjoy_registerVariant(TOUCH_DEVICE_JOYSTICK_KEYPAD, &kpadVariant);
|
||||
}
|
||||
|
||||
static __attribute__((constructor)) void __init_gltouchjoy_kpad(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user