diff --git a/sc2/src/sc2code/libs/graphics/sdl/canvas.c b/sc2/src/sc2code/libs/graphics/sdl/canvas.c index 4a9f29d12..6059b2265 100644 --- a/sc2/src/sc2code/libs/graphics/sdl/canvas.c +++ b/sc2/src/sc2code/libs/graphics/sdl/canvas.c @@ -1541,14 +1541,6 @@ TFB_DrawCanvas_Unlock (TFB_Canvas canvas) SDL_UnlockSurface (surf); } -// This function should only be called from the graphics thread, -// like from a TFB_DrawCommand_Callback command. -TFB_Canvas -TFB_DrawCanvas_GetScreenCanvas (SCREEN screen) -{ - return (TFB_Canvas) SDL_Screens[screen]; -} - void TFB_DrawCanvas_GetScreenFormat (TFB_PixelFormat *fmt) { diff --git a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c index 25f38ada6..af5af7fd8 100644 --- a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c +++ b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c @@ -341,6 +341,14 @@ TFB_DisplayFormatAlpha (SDL_Surface *surface) return newsurf; } +// This function should only be called from the graphics thread, +// like from a TFB_DrawCommand_Callback command. +TFB_Canvas +TFB_GetScreenCanvas (SCREEN screen) +{ + return (TFB_Canvas) SDL_Screens[screen]; +} + void TFB_BlitSurface (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, int blend_numer, int blend_denom) { diff --git a/sc2/src/sc2code/libs/graphics/tfb_draw.h b/sc2/src/sc2code/libs/graphics/tfb_draw.h index be97f3c53..92171a510 100644 --- a/sc2/src/sc2code/libs/graphics/tfb_draw.h +++ b/sc2/src/sc2code/libs/graphics/tfb_draw.h @@ -153,10 +153,11 @@ void TFB_DrawCanvas_CopyTransparencyInfo (TFB_Canvas src, TFB_Canvas dst); void TFB_DrawCanvas_Initialize (void); void TFB_DrawCanvas_Lock (TFB_Canvas canvas); void TFB_DrawCanvas_Unlock (TFB_Canvas canvas); -TFB_Canvas TFB_DrawCanvas_GetScreenCanvas (SCREEN screen); void TFB_DrawCanvas_GetScreenFormat (TFB_PixelFormat *fmt); int TFB_DrawCanvas_GetStride (TFB_Canvas canvas); void *TFB_DrawCanvas_GetLine (TFB_Canvas canvas, int line); void TFB_DrawCanvas_GetPixel (TFB_Canvas canvas, int x, int y, int *r, int *g, int *b); +TFB_Canvas TFB_GetScreenCanvas (SCREEN screen); + #endif