mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 03:52:12 -04:00
set window focus on startup (#641)
* clear out any events waiting at the start and center the mouse * actually we just need to set window_focused = true as in Chocolate Doom Clearing events at startup disables gamepad recognition.
This commit is contained in:
parent
3b7e955c75
commit
3ad830f5aa
@ -292,7 +292,7 @@ int grabmouse = 1;
|
|||||||
// Flag indicating whether the screen is currently visible:
|
// Flag indicating whether the screen is currently visible:
|
||||||
// when the screen isnt visible, don't render the screen
|
// when the screen isnt visible, don't render the screen
|
||||||
boolean screenvisible;
|
boolean screenvisible;
|
||||||
static boolean window_focused;
|
static boolean window_focused = true;
|
||||||
boolean fullscreen;
|
boolean fullscreen;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -697,8 +697,6 @@ void I_GetEvent(void)
|
|||||||
{
|
{
|
||||||
SDL_Event sdlevent;
|
SDL_Event sdlevent;
|
||||||
|
|
||||||
SDL_PumpEvents();
|
|
||||||
|
|
||||||
while (SDL_PollEvent(&sdlevent))
|
while (SDL_PollEvent(&sdlevent))
|
||||||
{
|
{
|
||||||
switch (sdlevent.type)
|
switch (sdlevent.type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user