Skip to content

Commit

Permalink
Merge branch 'mousecursor'
Browse files Browse the repository at this point in the history
the mouse cursor initially was hidden after the call to SDL_CreateWindow.
This will cause a minimal flicker on startup, because it's shown for a
short period of time. The cursor is now disabled before the window creation.

Source: Aloshi#517
  • Loading branch information
mmatyas committed Aug 2, 2016
2 parents 16470e5 + ada32cd commit 94044a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions es-core/src/Renderer_init_sdlgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ namespace Renderer
return false;
}

//hide mouse cursor early
initialCursorState = SDL_ShowCursor(0) == 1;

SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
Expand Down Expand Up @@ -108,9 +111,6 @@ namespace Renderer
LOG(LogWarning) << "Tried to enable vsync, but failed! (" << SDL_GetError() << ")";
}

//hide mouse cursor
initialCursorState = SDL_ShowCursor(0) == 1;

return true;
}

Expand Down

0 comments on commit 94044a6

Please sign in to comment.