Skip to content

Commit

Permalink
MorphOS: release 2.28.0
Browse files Browse the repository at this point in the history
Update STUB and version
  • Loading branch information
BeWorld2018 committed Jun 21, 2023
1 parent 821d9a5 commit 3d46fbc
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile.mos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sdl2-config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/core/morphos/SDL_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -882,4 +882,8 @@
STUB(SDL_HasPrimarySelectionText)
STUB(SDL_ResetHints)
STUB(SDL_strcasestr)
// 2.28.0
STUB(SDL_HasWindowSurface)
STUB(SDL_DestroyWindowSurface)


3 changes: 3 additions & 0 deletions src/core/morphos/sdk/clib/sdl2_protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 2 additions & 0 deletions src/core/morphos/sdk/fd/sdl2_lib.fd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
26 changes: 21 additions & 5 deletions src/core/morphos/sdk/ppcinline/sdl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");\
Expand Down Expand Up @@ -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");\
Expand All @@ -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");\
Expand Down Expand Up @@ -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");\
Expand Down Expand Up @@ -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");\
Expand Down Expand Up @@ -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 */

0 comments on commit 3d46fbc

Please sign in to comment.