Skip to content

Commit

Permalink
Updated for latest SDL3 changes as of d00ccc1546c0943481f5d65459496a4…
Browse files Browse the repository at this point in the history
…7fe9721df

Fixes #149
  • Loading branch information
slouken committed Mar 28, 2024
1 parent 44fec4d commit 97c304e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/sdl2_compat.c
Expand Up @@ -4370,7 +4370,7 @@ static SDL_ScaleMode SDL_GetScaleMode(void)
DECLSPEC SDL_Texture * SDLCALL
SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int h)
{
SDL_Texture *texture = SDL3_CreateTexture(renderer, format, access, w, h);
SDL_Texture *texture = SDL3_CreateTexture(renderer, (SDL_PixelFormatEnum)format, access, w, h);
if (texture) {
SDL3_SetTextureScaleMode(texture, SDL_GetScaleMode());
}
Expand Down Expand Up @@ -6269,6 +6269,12 @@ SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)
SDL3_SetJoystickPlayerIndex(joystick, player_index);
}

DECLSPEC SDL_bool SDLCALL
SDL_IsTextInputShown()
{
return SDL_FALSE;
}

DECLSPEC void SDLCALL
SDL_SetTextInputRect(const SDL_Rect *rect)
{
Expand Down
5 changes: 0 additions & 5 deletions src/sdl3_include_wrapper.h
Expand Up @@ -820,7 +820,6 @@
#define SDL_SyncWindow IGNORE_THIS_VERSION_OF_SDL_SyncWindow
#define SDL_TellIO IGNORE_THIS_VERSION_OF_SDL_TellIO
#define SDL_TextInputActive IGNORE_THIS_VERSION_OF_SDL_TextInputActive
#define SDL_TextInputShown IGNORE_THIS_VERSION_OF_SDL_TextInputShown
#define SDL_TimeFromWindows IGNORE_THIS_VERSION_OF_SDL_TimeFromWindows
#define SDL_TimeToDateTime IGNORE_THIS_VERSION_OF_SDL_TimeToDateTime
#define SDL_TimeToWindows IGNORE_THIS_VERSION_OF_SDL_TimeToWindows
Expand Down Expand Up @@ -4216,10 +4215,6 @@
#undef SDL_TextInputActive
#endif

#ifdef SDL_TextInputShown
#undef SDL_TextInputShown
#endif

#ifdef SDL_TimeFromWindows
#undef SDL_TimeFromWindows
#endif
Expand Down
3 changes: 1 addition & 2 deletions src/sdl3_syms.h
Expand Up @@ -308,7 +308,7 @@ SDL3_SYM_PASSTHROUGH(SDL_Renderer*,CreateSoftwareRenderer,(SDL_Surface *a),(a),r
SDL3_SYM_PASSTHROUGH(SDL_Renderer*,GetRenderer,(SDL_Window *a),(a),return)
SDL3_SYM_PASSTHROUGH(int,GetRendererInfo,(SDL_Renderer *a, SDL_RendererInfo *b),(a,b),return)
SDL3_SYM_RENAMED(int,GetRendererOutputSize,GetRenderOutputSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),return)
SDL3_SYM(SDL_Texture*,CreateTexture,(SDL_Renderer *a, Uint32 b, int c, int d, int e),(a,b,c,d,e),return)
SDL3_SYM(SDL_Texture*,CreateTexture,(SDL_Renderer *a, SDL_PixelFormatEnum b, int c, int d, int e),(a,b,c,d,e),return)
SDL3_SYM(SDL_Texture*,CreateTextureFromSurface,(SDL_Renderer *a, SDL_Surface *b),(a,b),return)
SDL3_SYM_PASSTHROUGH(int,QueryTexture,(SDL_Texture *a, Uint32 *b, int *c, int *d, int *e),(a,b,c,d,e),return)
SDL3_SYM_PASSTHROUGH(int,SetTextureColorMod,(SDL_Texture *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
Expand Down Expand Up @@ -730,7 +730,6 @@ SDL3_SYM_PASSTHROUGH(void,hid_ble_scan,(SDL_bool a),(a),)
SDL3_SYM(int,PremultiplyAlpha,(int a, int b, SDL_PixelFormatEnum c, const void *d, int e, SDL_PixelFormatEnum f, void *g, int h),(a,b,c,d,e,f,g,h),return)
SDL3_SYM(const char*,GetTouchDeviceName,(SDL_TouchID a),(a),return)
SDL3_SYM_PASSTHROUGH(void,ClearComposition,(void),(),)
SDL3_SYM_RENAMED(SDL_bool,IsTextInputShown,TextInputShown,(void),(),return)
SDL3_SYM_RENAMED(SDL_bool,HasIntersectionF,HasRectIntersectionFloat,(const SDL_FRect *a, const SDL_FRect *b),(a,b),return)
SDL3_SYM_RENAMED(SDL_bool,IntersectFRect,GetRectIntersectionFloat,(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c),(a,b,c),return)
SDL3_SYM(int,GetRectUnionFloat,(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c),(a,b,c),return)
Expand Down

0 comments on commit 97c304e

Please sign in to comment.