Skip to content

Commit 94044a6

Browse files
committed
Merge branch 'mousecursor'
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
2 parents 16470e5 + ada32cd commit 94044a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

es-core/src/Renderer_init_sdlgl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ namespace Renderer
3636
return false;
3737
}
3838

39+
//hide mouse cursor early
40+
initialCursorState = SDL_ShowCursor(0) == 1;
41+
3942
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
4043
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
4144
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
@@ -108,9 +111,6 @@ namespace Renderer
108111
LOG(LogWarning) << "Tried to enable vsync, but failed! (" << SDL_GetError() << ")";
109112
}
110113

111-
//hide mouse cursor
112-
initialCursorState = SDL_ShowCursor(0) == 1;
113-
114114
return true;
115115
}
116116

0 commit comments

Comments
 (0)