Skip to content

Commit

Permalink
re-enable mouse-lock on SAPP_EVENTTYPE_FOCUSED (see floooh/sokol#1056)
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed May 25, 2024
1 parent fb47dda commit e87eb25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/doomgeneric_sokol.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ static int AccelerateMouse(int val) {
}

void input(const sapp_event* ev) {
if (ev->type == SAPP_EVENTTYPE_FOCUSED) {
sapp_lock_mouse(false);
sapp_lock_mouse(true);
}
if (app.state == APP_STATE_WAITING) {
if ((ev->type == SAPP_EVENTTYPE_KEY_DOWN) ||
(ev->type == SAPP_EVENTTYPE_MOUSE_DOWN) ||
Expand Down

0 comments on commit e87eb25

Please sign in to comment.