diff --git a/src/d_main.cpp b/src/d_main.cpp index 90b94f770..b6c048149 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -235,15 +235,15 @@ CUSTOM_CVAR (String, vid_cursor, "None", CVAR_ARCHIVE | CVAR_NOINITCALL) if (!stricmp(self, "None" ) && gameinfo.CursorPic.IsNotEmpty()) { - res = I_SetCursor(TexMan.GetTextureByName(gameinfo.CursorPic)); + res = I_SetCursor(TexMan.GetGameTextureByName(gameinfo.CursorPic)); } else { - res = I_SetCursor(TexMan.GetTextureByName(self)); + res = I_SetCursor(TexMan.GetGameTextureByName(self)); } if (!res) { - I_SetCursor(TexMan.GetTextureByName("cursor")); + I_SetCursor(TexMan.GetGameTextureByName("cursor")); } } diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 704dbaf91..824b42904 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -798,7 +798,7 @@ CUSTOM_CVAR(Bool, vid_hidpi, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINI // --------------------------------------------------------------------------- -bool I_SetCursor(FTexture *cursorpic) +bool I_SetCursor(FGameTexture *cursorpic) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; NSCursor* cursor = nil; @@ -807,7 +807,7 @@ bool I_SetCursor(FTexture *cursorpic) { // Create bitmap image representation - auto sbuffer = cursorpic->CreateTexBuffer(0); + auto sbuffer = cursorpic->GetTexture()->CreateTexBuffer(0); const NSInteger imageWidth = sbuffer.mWidth; const NSInteger imageHeight = sbuffer.mHeight; diff --git a/src/posix/i_system.h b/src/posix/i_system.h index 61bc8356b..09473091e 100644 --- a/src/posix/i_system.h +++ b/src/posix/i_system.h @@ -97,8 +97,8 @@ TArray I_GetGogPaths(); // The ini could not be saved at exit bool I_WriteIniFailed (); -class FTexture; -bool I_SetCursor(FTexture *); +class FGameTexture; +bool I_SetCursor(FGameTexture *); static inline char *strlwr(char *str) diff --git a/src/posix/sdl/i_gui.cpp b/src/posix/sdl/i_gui.cpp index 8ad9c8b92..27c429f5c 100644 --- a/src/posix/sdl/i_gui.cpp +++ b/src/posix/sdl/i_gui.cpp @@ -39,14 +39,14 @@ #include "v_palette.h" #include "textures.h" -bool I_SetCursor(FTexture *cursorpic) +bool I_SetCursor(FGameTexture *cursorpic) { static SDL_Cursor *cursor; static SDL_Surface *cursorSurface; if (cursorpic != NULL && cursorpic->isValid()) { - auto src = cursorpic->GetBgraBitmap(nullptr); + auto src = cursorpic->GetTexture()->GetBgraBitmap(nullptr); // Must be no larger than 32x32. if (src.GetWidth() > 32 || src.GetHeight() > 32) { diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 960ddbf1d..9b8073ef3 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -638,13 +638,13 @@ int I_PickIWad(WadStuff *wads, int numwads, bool showwin, int defaultiwad) // //========================================================================== -bool I_SetCursor(FTexture *cursorpic) +bool I_SetCursor(FGameTexture *cursorpic) { HCURSOR cursor; if (cursorpic != NULL && cursorpic->isValid()) { - auto image = cursorpic->GetBgraBitmap(nullptr); + auto image = cursorpic->GetTexture()->GetBgraBitmap(nullptr); // Must be no larger than 32x32. (is this still necessary? if (image.GetWidth() > 32 || image.GetHeight() > 32) { diff --git a/src/win32/i_system.h b/src/win32/i_system.h index fb5a49014..18cc68aac 100644 --- a/src/win32/i_system.h +++ b/src/win32/i_system.h @@ -79,8 +79,8 @@ void I_Quit (void); // Set the mouse cursor. The texture must be 32x32. -class FTexture; -bool I_SetCursor(FTexture *cursor); +class FGameTexture; +bool I_SetCursor(FGameTexture *cursor); // Repaint the pre-game console void I_PaintConsole (void);