Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
02bae94
Port hlsdl to SDL3
nspitko Sep 18, 2025
6a710ce
Enable -DDOWNLOAD-DEPENDENCIES for linux
nspitko Sep 18, 2025
d15aea9
Remove syswm.h include, add linux deps
nspitko Sep 18, 2025
2fa3309
Remove extra terminator
nspitko Sep 18, 2025
0625c8e
Remove syntactically significant whitespace
nspitko Sep 18, 2025
a2feaee
Remove dead code for HL_MOBILE
nspitko Sep 18, 2025
feeb331
Update Makefile
nspitko Sep 18, 2025
6aaf85f
Try building SDL locally on linux runners
nspitko Sep 18, 2025
959fd04
Remove setup SDL action, it's broken
nspitko Sep 18, 2025
6d9c5ea
Fix memory leaks, manually install SDL on linux
nspitko Sep 19, 2025
bf21e88
Fix build errors
nspitko Sep 19, 2025
c53a6b0
SDL_Free -> SDL_free, fix warning
nspitko Sep 19, 2025
d077ea3
Workflow fix
nspitko Sep 19, 2025
8dd0195
SDL_GetJoysticks returns SDL_JoystickID*, not SDL_Joystick*
nspitko Sep 19, 2025
1ecc107
Remove -I $(BREW_SDL_PREFIX)/include/SDL3, fix IOS
nspitko Sep 19, 2025
163800e
Fix controller hotplug
nspitko Sep 20, 2025
61eb575
Merge branch 'HaxeFoundation:master' into sdl3
nspitko Sep 20, 2025
9881974
Maintain API compatibility with SDL2
nspitko Sep 20, 2025
eb9440a
Merge branch 'sdl3' of https://github.com/nspitko/hashlink into sdl3
nspitko Sep 20, 2025
67c2dfd
Add missing window flags, fix SDL_SetEventEnabled
nspitko Sep 20, 2025
2971fec
Emulate SDL_GRAB_KEYBOARD
nspitko Sep 20, 2025
146c810
Add missing cast
nspitko Sep 20, 2025
5b84dea
Fix missing bool
nspitko Sep 20, 2025
a45b7ce
jdevice->gdevice
nspitko Sep 21, 2025
1849d6f
add getJoysticks. Bump version.
nspitko Sep 23, 2025
21bfe52
SDL_Joystick -> SDL_JoystickID
nspitko Sep 23, 2025
c03200b
Update haxelib.json
nspitko Sep 25, 2025
71b8f2d
fix text input
nspitko Oct 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/sdl/haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license" : "BSD",
"contributors" : ["ncannasse"],
"description" : "SDL/GL support for Haxe/HL.",
"version" : "1.16.0",
"version" : "1.17.0",
"releasenote" : "",
"dependencies": {}
}
17 changes: 17 additions & 0 deletions libs/sdl/sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,23 @@ DEFINE_PRIM(_BOOL, joy_get_button, TJOY _I32);
DEFINE_PRIM(_I32, joy_get_id, TJOY);
DEFINE_PRIM(_BYTES, joy_get_name, TJOY);


// SDL3 Joystick API
HL_PRIM varray *HL_NAME(get_joysticks)(SDL_Joystick *joystick) {
SDL_JoystickID *sticks;
int count;
sticks = SDL_GetJoysticks( &count );
varray *result = hl_alloc_array(&hlt_i32, count);
int *idx = hl_aptr(result,SDL_Joystick);
while( *sticks )
{
*idx++ = *sticks++;
}
return result;
}

DEFINE_PRIM(_ARR, get_joysticks, _NO_ARG );

// surface


Expand Down
8 changes: 8 additions & 0 deletions libs/sdl/sdl/Sdl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ class Sdl {
private static function _getError() : hl.Bytes {
return null;
}


//
// SDL3 Joystick API
//
public static function getJoysticks() : hl.NativeArray<Int> {
return null;
}
}

enum abstract SDLHint(String) from String to String {
Expand Down
Loading