Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Revert "Release mouse" commits #542

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading