From 6fb60c254d3aeea3a139fe9be633dacae22b2c1e Mon Sep 17 00:00:00 2001 From: Sara Date: Thu, 11 May 2023 21:08:13 +0200 Subject: [PATCH] renamed input_*down functions to input_get_*down --- src/corelib/input.c | 4 ++-- src/corelib/input.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/input.c b/src/corelib/input.c index 377bd9f..d4b5bf7 100644 --- a/src/corelib/input.c +++ b/src/corelib/input.c @@ -150,11 +150,11 @@ void input_notify_event(SDL_Event event) { } } -int input_keydown(SDL_Scancode scancode) { +int input_get_keydown(SDL_Scancode scancode) { return g_key_states[scancode]; } -int input_mousedown(int mousebtn) { +int input_get_mousedown(int mousebtn) { uint32_t mask = SDL_BUTTON(mousebtn); return (SDL_GetMouseState(NULL, NULL) & mask) != 0; } diff --git a/src/corelib/input.h b/src/corelib/input.h index 1913bb3..85d3cc8 100644 --- a/src/corelib/input.h +++ b/src/corelib/input.h @@ -54,9 +54,9 @@ extern void mouse_world_position(float* ox, float* oy); extern void input_init(); extern void update_input(); -extern int input_keydown(SDL_Scancode scancode); -extern int input_mousedown(int mousebtn); extern void input_notify_event(SDL_Event event); +extern int input_get_keydown(SDL_Scancode scancode); +extern int input_get_mousedown(int mousebtn); #ifdef __cplusplus }