group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
input_capture Namespace Reference

Functions

void acquireGameplayInputCapture (SDL_Window *window)
 Put the window into relative-mouse mode for in-game look, draining any stale state.
void releaseGameplayInputCapture (SDL_Window *window)
 Fully release mouse capture so menu screens get a normal desktop cursor.

Function Documentation

◆ acquireGameplayInputCapture()

void input_capture::acquireGameplayInputCapture ( SDL_Window * window)

Put the window into relative-mouse mode for in-game look, draining any stale state.

Stops text input (in case ImGui left it on), enables relative mouse mode, pumps events so the platform commits the change, and drains the queued relative delta so the first frame after capture does not see a camera jump.

Here is the caller graph for this function:

◆ releaseGameplayInputCapture()

void input_capture::releaseGameplayInputCapture ( SDL_Window * window)

Fully release mouse capture so menu screens get a normal desktop cursor.

Disables relative mouse mode, drops any window mouse grab, ensures the cursor is visible, and pumps events so the change takes effect before the next screen renders.

Here is the caller graph for this function: