From 1fc116b9cbcd4c3478ddc8d2483477d1b59c71ed Mon Sep 17 00:00:00 2001 From: "Alice R." Date: Sun, 3 Nov 2024 21:12:06 -0700 Subject: [PATCH] Rename initialize_joysticks to platform_init_event. (#501) --- arch/3ds/event.c | 2 +- arch/djgpp/event.c | 2 +- arch/dreamcast/event.c | 2 +- arch/nds/event.c | 2 +- arch/wii/event.c | 2 +- src/event.c | 4 ++-- src/event.h | 2 +- src/event_sdl.c | 2 +- src/platform_dummy.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/3ds/event.c b/arch/3ds/event.c index 0c9db6d2c..99d4ea3f8 100644 --- a/arch/3ds/event.c +++ b/arch/3ds/event.c @@ -333,7 +333,7 @@ int ctr_get_subscreen_height(void) } } -void initialize_joysticks(void) +void platform_init_event(void) { struct buffered_status *status = store_status(); joystick_set_active(status, 0, true); diff --git a/arch/djgpp/event.c b/arch/djgpp/event.c index f0fa5f096..bcdc68a05 100644 --- a/arch/djgpp/event.c +++ b/arch/djgpp/event.c @@ -585,7 +585,7 @@ static void init_mouse(void) mouse_init = true; } -void initialize_joysticks(void) +void platform_init_event(void) { init_kbd(); init_mouse(); diff --git a/arch/dreamcast/event.c b/arch/dreamcast/event.c index 2cbbb8108..1b38e2105 100644 --- a/arch/dreamcast/event.c +++ b/arch/dreamcast/event.c @@ -26,7 +26,7 @@ extern struct input_status input; -void initialize_joysticks(void) +void platform_init_event(void) { } diff --git a/arch/nds/event.c b/arch/nds/event.c index 6caf4835a..1df9c2c69 100644 --- a/arch/nds/event.c +++ b/arch/nds/event.c @@ -73,7 +73,7 @@ enum focus_mode get_allow_focus_changes(void) return allow_focus_changes; } -void initialize_joysticks(void) +void platform_init_event(void) { struct buffered_status *status = store_status(); joystick_set_active(status, 0, true); diff --git a/arch/wii/event.c b/arch/wii/event.c index dd9a9f8dc..77d355554 100644 --- a/arch/wii/event.c +++ b/arch/wii/event.c @@ -1114,7 +1114,7 @@ void __warp_mouse(int x, int y) // Mouse warping doesn't work too well with the Wiimote } -void initialize_joysticks(void) +void platform_init_event(void) { struct buffered_status *status = store_status(); int i; diff --git a/src/event.c b/src/event.c index e93237d32..ed5854382 100644 --- a/src/event.c +++ b/src/event.c @@ -161,8 +161,8 @@ void init_event(struct config_info *conf) // Write the new global bindings over the game bindings. joystick_reset_game_map(); - // Now, initialize the joysticks (platform-dependent function). - initialize_joysticks(); + // Platform-specific events system initialization. + platform_init_event(); } uint32_t convert_internal_unicode(enum keycode key, boolean caps_lock) diff --git a/src/event.h b/src/event.h index f86ba51af..f39315fac 100644 --- a/src/event.h +++ b/src/event.h @@ -200,7 +200,7 @@ boolean has_unicode_input(void); uint32_t convert_internal_unicode(enum keycode key, boolean caps_lock); // Implemented by "drivers" (SDL, Wii, NDS, 3DS, etc.) -void initialize_joysticks(void); +void platform_init_event(void); boolean __update_event_status(void); boolean __peek_exit_input(void); void __wait_event(void); diff --git a/src/event_sdl.c b/src/event_sdl.c index 124e456a5..1f2fbfd3c 100644 --- a/src/event_sdl.c +++ b/src/event_sdl.c @@ -1664,7 +1664,7 @@ void __warp_mouse(int x, int y) SDL_WarpMouseInWindow(window, x, y); } -void initialize_joysticks(void) +void platform_init_event(void) { #if !SDL_VERSION_ATLEAST(2,0,0) || defined(CONFIG_SWITCH) || defined(CONFIG_PSVITA) \ || defined(CONFIG_3DS) diff --git a/src/platform_dummy.c b/src/platform_dummy.c index 33369ef00..864d7480f 100644 --- a/src/platform_dummy.c +++ b/src/platform_dummy.c @@ -63,7 +63,7 @@ void platform_quit(void) // stub } -void initialize_joysticks(void) +void platform_init_event(void) { // stub }