Graphics::FocusGameWindow Function

Gives keyboard focus to the game window.

Syntax

void Graphics::FocusGameWindow()

Return value

None.

Remarks

If the game does not receive focus upon opening, it might not process inputs from TMInterface, even when injected via SetInputState. You can call this function to ensure the game window has focus, preferably in the OnGameStateChanged callback.

This function internally calls the SetFocus API of Windows on the game window.