From 3d46fbc5edce5bb822bfd0412f5dfe9a07bc6097 Mon Sep 17 00:00:00 2001 From: BeWorld <36823759+BeWorld2018@users.noreply.github.com> Date: Wed, 21 Jun 2023 18:49:07 +0200 Subject: [PATCH] MorphOS: release 2.28.0 Update STUB and version --- Makefile.mos | 4 ++-- sdl2-config | 2 +- src/core/morphos/SDL_stubs.h | 4 ++++ src/core/morphos/sdk/clib/sdl2_protos.h | 3 +++ src/core/morphos/sdk/fd/sdl2_lib.fd | 2 ++ src/core/morphos/sdk/ppcinline/sdl2.h | 26 ++++++++++++++++++++----- 6 files changed, 33 insertions(+), 8 deletions(-) diff --git a/Makefile.mos b/Makefile.mos index cce218fd4c455..1498520d8849d 100644 --- a/Makefile.mos +++ b/Makefile.mos @@ -6,11 +6,11 @@ # Enable debug with -D__SDL_DEBUG # -CDEFS = -DAROS_ALMOST_COMPATIBLE -DBUILD_SDL2_LIBRARY -D__SDL_DEBUG +CDEFS = -DAROS_ALMOST_COMPATIBLE -DBUILD_SDL2_LIBRARY CC = ppc-morphos-gcc-11 -noixemul AMIGADATE = $(shell date +"%-d.%-m.%Y") INCLUDE = -I./include -D__AMIGADATE__=\"$(AMIGADATE)\" -CFLAGS = -mcpu=750 -mtune=7450 -O1 -g $(INCLUDE) -mresident32 -Wall -Wno-pointer-sign -fno-strict-aliasing $(CDEFS) +CFLAGS = -mcpu=750 -mtune=7450 -O2 $(INCLUDE) -mresident32 -Wall -Wno-pointer-sign -fno-strict-aliasing $(CDEFS) AR = ppc-morphos-ar ECHE = echo -e diff --git a/sdl2-config b/sdl2-config index ebe6eba0b9ca8..a518481049b48 100644 --- a/sdl2-config +++ b/sdl2-config @@ -38,7 +38,7 @@ while test $# -gt 0; do echo $exec_prefix ;; --version) - echo 2.27.0 + echo 2.28.0 ;; --cflags) echo -noixemul -I${prefix}/include/SDL2 diff --git a/src/core/morphos/SDL_stubs.h b/src/core/morphos/SDL_stubs.h index dbac0e17a4730..4076f8996cdd7 100644 --- a/src/core/morphos/SDL_stubs.h +++ b/src/core/morphos/SDL_stubs.h @@ -882,4 +882,8 @@ STUB(SDL_HasPrimarySelectionText) STUB(SDL_ResetHints) STUB(SDL_strcasestr) + // 2.28.0 + STUB(SDL_HasWindowSurface) + STUB(SDL_DestroyWindowSurface) + \ No newline at end of file diff --git a/src/core/morphos/sdk/clib/sdl2_protos.h b/src/core/morphos/sdk/clib/sdl2_protos.h index a335d7790e64c..fe936e5241903 100644 --- a/src/core/morphos/sdk/clib/sdl2_protos.h +++ b/src/core/morphos/sdk/clib/sdl2_protos.h @@ -876,6 +876,9 @@ char * SDL_GetPrimarySelectionText(void); SDL_bool SDL_HasPrimarySelectionText(void); void SDL_ResetHints(void); char *SDL_strcasestr(const char *haystack, const char *needle); +/* 2.28.0 */ +SDL_bool SDL_HasWindowSurface(SDL_Window *window); +int SDL_DestroyWindowSurface(SDL_Window *window); #endif #endif /* CLIB_SDL2_PROTOS_H */ diff --git a/src/core/morphos/sdk/fd/sdl2_lib.fd b/src/core/morphos/sdk/fd/sdl2_lib.fd index b6b93a84fb574..b74cece0d8f32 100644 --- a/src/core/morphos/sdk/fd/sdl2_lib.fd +++ b/src/core/morphos/sdk/fd/sdl2_lib.fd @@ -800,3 +800,5 @@ SDL_GetPrimarySelectionText()(sysv,r12base) SDL_HasPrimarySelectionText()(sysv,r12base) SDL_ResetHints()(sysv,r12base) SDL_strcasestr(haystack,needle)(sysv,r12base) +SDL_HasWindowSurface(window)(sysv,r12base) +SDL_DestroyWindowSurface(window)(sysv,r12base) diff --git a/src/core/morphos/sdk/ppcinline/sdl2.h b/src/core/morphos/sdk/ppcinline/sdl2.h index 602a64cec0551..ae631fc1bdcab 100644 --- a/src/core/morphos/sdk/ppcinline/sdl2.h +++ b/src/core/morphos/sdk/ppcinline/sdl2.h @@ -34,7 +34,7 @@ #define SDL_VSetError(__p0, __p1) \ ({ \ const char * __t__p0 = __p0;\ - va_list __t__p1;\ + va_list __t__p1;\ va_copy(__t__p1, __p1);\ long __base = (long)(SDL2_BASE_NAME);\ __asm volatile("mr 12,%0": :"r"(__base):"r12");\ @@ -511,7 +511,7 @@ ({ \ const char * __t__p0 = __p0;\ const char * __t__p1 = __p1;\ - va_list __t__p2;\ + va_list __t__p2;\ va_copy(__t__p2, __p2);\ long __base = (long)(SDL2_BASE_NAME);\ __asm volatile("mr 12,%0": :"r"(__base):"r12");\ @@ -523,7 +523,7 @@ char * __t__p0 = __p0;\ size_t __t__p1 = __p1;\ const char * __t__p2 = __p2;\ - va_list __t__p3;\ + va_list __t__p3;\ va_copy(__t__p3, __p3);\ long __base = (long)(SDL2_BASE_NAME);\ __asm volatile("mr 12,%0": :"r"(__base):"r12");\ @@ -2066,7 +2066,7 @@ int __t__p0 = __p0;\ SDL_LogPriority __t__p1 = __p1;\ const char * __t__p2 = __p2;\ - va_list __t__p3;\ + va_list __t__p3;\ va_copy(__t__p3, __p3);\ long __base = (long)(SDL2_BASE_NAME);\ __asm volatile("mr 12,%0": :"r"(__base):"r12");\ @@ -6383,7 +6383,7 @@ ({ \ char ** __t__p0 = __p0;\ const char * __t__p1 = __p1;\ - va_list __t__p2;\ + va_list __t__p2;\ va_copy(__t__p2, __p2);\ long __base = (long)(SDL2_BASE_NAME);\ __asm volatile("mr 12,%0": :"r"(__base):"r12");\ @@ -7008,4 +7008,20 @@ (((char *(*)(const char *, const char *))*(void**)(__base - 4792))(__t__p0, __t__p1));\ }) +#define SDL_HasWindowSurface(__p0) \ + ({ \ + SDL_Window * __t__p0 = __p0;\ + long __base = (long)(SDL2_BASE_NAME);\ + __asm volatile("mr 12,%0": :"r"(__base):"r12");\ + (((SDL_bool (*)(SDL_Window *))*(void**)(__base - 4798))(__t__p0));\ + }) + +#define SDL_DestroyWindowSurface(__p0) \ + ({ \ + SDL_Window * __t__p0 = __p0;\ + long __base = (long)(SDL2_BASE_NAME);\ + __asm volatile("mr 12,%0": :"r"(__base):"r12");\ + (((int (*)(SDL_Window *))*(void**)(__base - 4804))(__t__p0));\ + }) + #endif /* !_PPCINLINE_SDL2_H */