Move to globals SDL vars
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
SDL_Window *SDLWindow;
|
SDL_Window *SDLWindow;
|
||||||
|
SDL_GLContext SDL_WindowGLContext;
|
||||||
|
SDL_Cursor *SDL_MouseCursor;
|
||||||
|
SDL_SystemCursor SDL_MouseCursorLastID;
|
||||||
bool IsInFullscreen;
|
bool IsInFullscreen;
|
||||||
int FullScreenSizeX, FullScreenSizeY;
|
int FullScreenSizeX, FullScreenSizeY;
|
||||||
int FullScreenPositionX, FullScreenPositionY;
|
int FullScreenPositionX, FullScreenPositionY;
|
||||||
|
|||||||
@@ -159,8 +159,6 @@ void SetMouseCursor(SDL_SystemCursor id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
SDL_Cursor *SDL_MouseCursor;
|
|
||||||
SDL_SystemCursor SDL_MouseCursorLastID;
|
|
||||||
void SetMouseCursor(SDL_SystemCursor id) {
|
void SetMouseCursor(SDL_SystemCursor id) {
|
||||||
if (SDL_MouseCursor == NULL || SDL_MouseCursorLastID != id) {
|
if (SDL_MouseCursor == NULL || SDL_MouseCursorLastID != id) {
|
||||||
if (SDL_MouseCursor != NULL) {
|
if (SDL_MouseCursor != NULL) {
|
||||||
@@ -1014,8 +1012,8 @@ int main(int argc, char **argv, char **envp)
|
|||||||
}
|
}
|
||||||
SDL_SetWindowPosition(SDLWindow, xhalf, yhalf);
|
SDL_SetWindowPosition(SDLWindow, xhalf, yhalf);
|
||||||
|
|
||||||
SDL_GLContext gl_context = SDL_GL_CreateContext(SDLWindow);
|
SDL_WindowGLContext = SDL_GL_CreateContext(SDLWindow);
|
||||||
SDL_GL_MakeCurrent(SDLWindow, gl_context);
|
SDL_GL_MakeCurrent(SDLWindow, SDL_WindowGLContext);
|
||||||
SDL_ShowWindow(SDLWindow);
|
SDL_ShowWindow(SDLWindow);
|
||||||
|
|
||||||
// Set icon
|
// Set icon
|
||||||
|
|||||||
Reference in New Issue
Block a user