Skip to content

Commit

Permalink
Revert "Release mouse" commits (kraflab#542)
Browse files Browse the repository at this point in the history
* Revert "Release mouse on fullscreen menu"

This reverts commit 3115e9b.

* Revert "Release mouse in intertext and finale"

This reverts commit c9ec9b3.
  • Loading branch information
Pedro-Beirao authored Dec 3, 2024
1 parent 40dee0d commit 36049f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions prboom2/src/SDL/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,11 @@ static dboolean MouseShouldBeGrabbed()
if (!window_focused)
return false;

// always grab the mouse when full screen (dont want to
// see the mouse pointer)
if (desired_fullscreen)
return true;

// if we specify not to grab the mouse, never grab
if (!mouse_enabled)
return false;
Expand All @@ -1570,8 +1575,7 @@ static dboolean MouseShouldBeGrabbed()
return false;

// only grab mouse when playing levels (but not demos)
return (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION)
&& !demoplayback && !advancedemo;
return !demoplayback;
}

// Update the value of window_focused when we get a focus event
Expand Down

0 comments on commit 36049f2

Please # to comment.