mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-29 15:51:45 +00:00
windowed_mouse_always gibt mit 0 immer frei, bindet mit 1 immer und
arbeitet mit 2 nun automagisch
This commit is contained in:
parent
9daee656b4
commit
d59744effc
2 changed files with 9 additions and 3 deletions
4
README
4
README
|
@ -237,7 +237,9 @@ My OpenGL is not working!
|
|||
|
||||
How do I open the console?
|
||||
- Press "^" or "~", depending on your keyboard layout. If you want
|
||||
Quake II to never grap the mouse set "windowed_mouse_always" to 1.
|
||||
Quake II to never grap the mouse set "windowed_mouse_always" to 0, if
|
||||
Quake II should never release the mouse set 0, for releasing the
|
||||
mouse when open the console set to 2. The default is 2.
|
||||
|
||||
How do I get the frame counter?
|
||||
- Set cl_drawfps to 1
|
||||
|
|
|
@ -71,7 +71,7 @@ static cvar_t *windowed_mouse_always;
|
|||
|
||||
void RW_IN_PlatformInit() {
|
||||
windowed_mouse = ri.Cvar_Get ("windowed_mouse", "1", CVAR_ARCHIVE);
|
||||
windowed_mouse_always = ri.Cvar_Get ("windowed_mouse_always", "1", CVAR_ARCHIVE);
|
||||
windowed_mouse_always = ri.Cvar_Get ("windowed_mouse_always", "2", CVAR_ARCHIVE);
|
||||
}
|
||||
|
||||
void RW_IN_Activate(qboolean active)
|
||||
|
@ -527,7 +527,7 @@ void KBD_Update(void)
|
|||
if (SDL_BUTTON(7) & bstate)
|
||||
mouse_buttonstate |= (1 << 4);
|
||||
|
||||
if (windowed_mouse_always->value == 1)
|
||||
if (windowed_mouse_always->value == 2)
|
||||
{
|
||||
if (old_windowed_mouse != windowed_mouse->value) {
|
||||
old_windowed_mouse = windowed_mouse->value;
|
||||
|
@ -539,6 +539,10 @@ void KBD_Update(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (windowed_mouse_always->value == 1)
|
||||
{
|
||||
SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
|
|
Loading…
Reference in a new issue