Skip to content

Commit

Permalink
MorphOS: add SDL_GameControllerGetSteamHandle
Browse files Browse the repository at this point in the history
add SDL_GameControllerGetSteamHandle STUB
Update library version
  • Loading branch information
BeWorld2018 committed Jan 5, 2024
1 parent 352440a commit 595bb4b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/morphos/SDL_mosversion.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define str(s) #s
#define xstr(s) str(s)
#define VERSION 53
#define REVISION 12
#define REVISION 13
#define VERSTAG "\0$VER: sdl2.library " xstr(VERSION) "." xstr(REVISION) " (" __AMIGADATE__ ") © Bruno Peloille, Szilárd Biró, Ilkka Lehtoranta"
3 changes: 2 additions & 1 deletion src/core/morphos/SDL_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -885,5 +885,6 @@
// 2.28.0
STUB(SDL_HasWindowSurface)
STUB(SDL_DestroyWindowSurface)

//
STUB(SDL_GameControllerGetSteamHandle)

2 changes: 2 additions & 0 deletions src/core/morphos/sdk/clib/sdl2_protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,8 @@ 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);
/* */
Uint64 SDL_GameControllerGetSteamHandle(SDL_GameController *gamecontroller);
#endif

#endif /* CLIB_SDL2_PROTOS_H */
1 change: 1 addition & 0 deletions src/core/morphos/sdk/fd/sdl2_lib.fd
Original file line number Diff line number Diff line change
Expand Up @@ -802,3 +802,4 @@ SDL_ResetHints()(sysv,r12base)
SDL_strcasestr(haystack,needle)(sysv,r12base)
SDL_HasWindowSurface(window)(sysv,r12base)
SDL_DestroyWindowSurface(window)(sysv,r12base)
SDL_GameControllerGetSteamHandle(gamecontroller)(sysv,r12base)
8 changes: 8 additions & 0 deletions src/core/morphos/sdk/ppcinline/sdl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -7024,4 +7024,12 @@
(((int (*)(SDL_Window *))*(void**)(__base - 4804))(__t__p0));\
})

#define SDL_GameControllerGetSteamHandle(__p0) \
({ \
SDL_GameController * __t__p0 = __p0;\
long __base = (long)(SDL2_BASE_NAME);\
__asm volatile("mr 12,%0": :"r"(__base):"r12");\
(((Uint64 (*)(SDL_GameController *))*(void**)(__base - 4810))(__t__p0));\
})

#endif /* !_PPCINLINE_SDL2_H */

0 comments on commit 595bb4b

Please sign in to comment.