Create struct out of mouse input

This commit is contained in:
twinaphex 2015-10-23 09:18:37 +02:00
parent 896a80d6b8
commit fcaf64c69d
2 changed files with 19 additions and 17 deletions

View File

@ -83,23 +83,7 @@ typedef struct menu_input
uint64_t devices_mask;
struct
{
int16_t x;
int16_t y;
bool left;
bool right;
bool oldleft;
bool oldright;
bool wheelup;
bool wheeldown;
bool hwheelup;
bool hwheeldown;
bool scrollup;
bool scrolldown;
unsigned ptr;
uint64_t state;
} mouse;
menu_input_mouse_t mouse;
struct
{

View File

@ -100,6 +100,24 @@ enum menu_input_bind_mode
MENU_INPUT_BIND_ALL
};
typedef struct menu_input_mouse
{
int16_t x;
int16_t y;
bool left;
bool right;
bool oldleft;
bool oldright;
bool wheelup;
bool wheeldown;
bool hwheelup;
bool hwheeldown;
bool scrollup;
bool scrolldown;
unsigned ptr;
uint64_t state;
} menu_input_mouse_t;
void menu_input_key_event(bool down, unsigned keycode, uint32_t character,
uint16_t key_modifiers);