From 7ac5c6d7531e29fe569e6fc2d0947854afc3d4cb Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Mon, 23 Jan 2017 00:21:33 +0100 Subject: [PATCH] WIP: add partial cursor support (looks useless) --- misc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc.cpp b/misc.cpp index 5de4853..b2356a7 100644 --- a/misc.cpp +++ b/misc.cpp @@ -1,7 +1,7 @@ // misc.cpp // - +#include #include #include #include @@ -49,6 +49,7 @@ void LoadString(UINT nID, char *pBuffer, int lgBuffer) void ChangeSprite(int sprite) { HCURSOR hCursor = nullptr; + SDL_Cursor * cursor; if ( g_mouseType == MOUSETYPEGRA ) return; if ( g_lastSprite == sprite ) return; @@ -65,9 +66,11 @@ void ChangeSprite(int sprite) if ( sprite == SPRITE_ARROWDL ) hCursor = LoadCursor(g_hInstance, "IDC_ARROWDL"); if ( sprite == SPRITE_ARROWDR ) hCursor = LoadCursor(g_hInstance, "IDC_ARROWDR"); if ( sprite == SPRITE_WAIT ) hCursor = LoadCursor(g_hInstance, "IDC_WAIT"); + cursor = SDL_CreateSystemCursor (SDL_SYSTEM_CURSOR_WAIT); if ( sprite == SPRITE_EMPTY ) hCursor = LoadCursor(g_hInstance, "IDC_EMPTY"); if ( sprite == SPRITE_FILL ) hCursor = LoadCursor(g_hInstance, "IDC_FILL"); SetCursor(hCursor); + SDL_SetCursor (cursor); g_lastSprite = sprite; }