twn_input.c: remove input_mouse_captured(), add ctx.mouse_capture
This commit is contained in:
@ -218,7 +218,7 @@ void input_state_deinit(InputState *input) {
|
||||
|
||||
void input_state_update(InputState *input) {
|
||||
/* TODO: don't spam it if it happens */
|
||||
if (SDL_SetRelativeMouseMode(input->mouse_captured) != 0)
|
||||
if (SDL_SetRelativeMouseMode(ctx.game_copy.mouse_capture) != 0)
|
||||
log_warn("(%s) Mouse capture isn't supported.", __func__);
|
||||
|
||||
int x, y;
|
||||
@ -326,11 +326,6 @@ Vec2 input_action_position(char const *action_name) {
|
||||
}
|
||||
|
||||
|
||||
void input_mouse_captured(bool enabled) {
|
||||
ctx.input.mouse_captured = enabled;
|
||||
}
|
||||
|
||||
|
||||
void input_reset_state(InputState *input) {
|
||||
for (size_t i = 0; i < shlenu(input->action_hash); ++i) {
|
||||
Action *action = &input->action_hash[i].value;
|
||||
|
Reference in New Issue
Block a user