mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Update to SDL 3.1.1 API.
Changes are: * SDL_SetWindowGrab() was renamed to SDL_SetWindowMouseGrab(). * SDL doesn't give precalculated battery states anymore. Use the same scale as SDL 3.1.0, 20% is low and 1% is empty.
This commit is contained in:
parent
af82cfe978
commit
a675b654c6
2 changed files with 3 additions and 3 deletions
|
@ -887,11 +887,11 @@ IN_Update(void)
|
|||
{
|
||||
break;
|
||||
}
|
||||
if (event.jbattery.level == SDL_JOYSTICK_POWER_LOW)
|
||||
if (event.jbattery.percent <= 20)
|
||||
{
|
||||
Com_Printf("WARNING: Gamepad battery Low, it is recommended to connect it by cable.\n");
|
||||
}
|
||||
else if (event.jbattery.level == SDL_JOYSTICK_POWER_EMPTY)
|
||||
else if (event.jbattery.percent <= 1)
|
||||
{
|
||||
SCR_CenterPrint("ALERT: Gamepad battery almost Empty.\n");
|
||||
}
|
||||
|
|
|
@ -779,7 +779,7 @@ GLimp_GrabInput(qboolean grab)
|
|||
{
|
||||
if(window != NULL)
|
||||
{
|
||||
SDL_SetWindowGrab(window, grab ? SDL_TRUE : SDL_FALSE);
|
||||
SDL_SetWindowMouseGrab(window, grab ? SDL_TRUE : SDL_FALSE);
|
||||
}
|
||||
|
||||
if(SDL_SetRelativeMouseMode(grab ? SDL_TRUE : SDL_FALSE) < 0)
|
||||
|
|
Loading…
Reference in a new issue