Skip to content

Commit b7fdb7c

Browse files
committed
feat(sdl) update to 3.2.0
1 parent 327b77e commit b7fdb7c

File tree

8 files changed

+36
-19
lines changed

8 files changed

+36
-19
lines changed

modules/lwjgl/sdl/src/generated/java/org/lwjgl/sdl/SDLHints.java

+1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ private Functions() {}
166166
SDL_HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP",
167167
SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK",
168168
SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH = "SDL_MAC_OPENGL_ASYNC_DISPATCH",
169+
SDL_HINT_MAC_OPTION_AS_ALT = "SDL_MAC_OPTION_AS_ALT",
169170
SDL_HINT_MAC_SCROLL_MOMENTUM = "SDL_MAC_SCROLL_MOMENTUM",
170171
SDL_HINT_MAIN_CALLBACK_RATE = "SDL_MAIN_CALLBACK_RATE",
171172
SDL_HINT_MOUSE_AUTO_CAPTURE = "SDL_MOUSE_AUTO_CAPTURE",

modules/lwjgl/sdl/src/generated/java/org/lwjgl/sdl/SDLStorage.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -332,20 +332,20 @@ public static boolean nSDL_EnumerateStorageDirectory(long storage, long path, lo
332332

333333
/** {@code bool SDL_EnumerateStorageDirectory(SDL_Storage * storage, char const * path, SDL_EnumerateDirectoryCallback callback, void * userdata)} */
334334
@NativeType("bool")
335-
public static boolean SDL_EnumerateStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") ByteBuffer path, @NativeType("SDL_EnumerateDirectoryCallback") SDL_EnumerateDirectoryCallbackI callback, @NativeType("void *") long userdata) {
335+
public static boolean SDL_EnumerateStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") @Nullable ByteBuffer path, @NativeType("SDL_EnumerateDirectoryCallback") SDL_EnumerateDirectoryCallbackI callback, @NativeType("void *") long userdata) {
336336
if (CHECKS) {
337-
checkNT1(path);
337+
checkNT1Safe(path);
338338
}
339-
return nSDL_EnumerateStorageDirectory(storage, memAddress(path), callback.address(), userdata);
339+
return nSDL_EnumerateStorageDirectory(storage, memAddressSafe(path), callback.address(), userdata);
340340
}
341341

342342
/** {@code bool SDL_EnumerateStorageDirectory(SDL_Storage * storage, char const * path, SDL_EnumerateDirectoryCallback callback, void * userdata)} */
343343
@NativeType("bool")
344-
public static boolean SDL_EnumerateStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") CharSequence path, @NativeType("SDL_EnumerateDirectoryCallback") SDL_EnumerateDirectoryCallbackI callback, @NativeType("void *") long userdata) {
344+
public static boolean SDL_EnumerateStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") @Nullable CharSequence path, @NativeType("SDL_EnumerateDirectoryCallback") SDL_EnumerateDirectoryCallbackI callback, @NativeType("void *") long userdata) {
345345
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
346346
try {
347-
stack.nUTF8(path, true);
348-
long pathEncoded = stack.getPointerAddress();
347+
stack.nUTF8Safe(path, true);
348+
long pathEncoded = path == null ? NULL : stack.getPointerAddress();
349349
return nSDL_EnumerateStorageDirectory(storage, pathEncoded, callback.address(), userdata);
350350
} finally {
351351
stack.setPointer(stackPointer);
@@ -515,15 +515,15 @@ public static long nSDL_GlobStorageDirectory(long storage, long path, long patte
515515

516516
/** {@code char ** SDL_GlobStorageDirectory(SDL_Storage * storage, char const * path, char const * pattern, SDL_GlobFlags flags, int * count)} */
517517
@NativeType("char **")
518-
public static @Nullable PointerBuffer SDL_GlobStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") ByteBuffer path, @NativeType("char const *") @Nullable ByteBuffer pattern, @NativeType("SDL_GlobFlags") int flags) {
518+
public static @Nullable PointerBuffer SDL_GlobStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") @Nullable ByteBuffer path, @NativeType("char const *") @Nullable ByteBuffer pattern, @NativeType("SDL_GlobFlags") int flags) {
519519
if (CHECKS) {
520-
checkNT1(path);
520+
checkNT1Safe(path);
521521
checkNT1Safe(pattern);
522522
}
523523
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
524524
IntBuffer count = stack.callocInt(1);
525525
try {
526-
long __result = nSDL_GlobStorageDirectory(storage, memAddress(path), memAddressSafe(pattern), flags, memAddress(count));
526+
long __result = nSDL_GlobStorageDirectory(storage, memAddressSafe(path), memAddressSafe(pattern), flags, memAddress(count));
527527
return memPointerBufferSafe(__result, count.get(0));
528528
} finally {
529529
stack.setPointer(stackPointer);
@@ -532,12 +532,12 @@ public static long nSDL_GlobStorageDirectory(long storage, long path, long patte
532532

533533
/** {@code char ** SDL_GlobStorageDirectory(SDL_Storage * storage, char const * path, char const * pattern, SDL_GlobFlags flags, int * count)} */
534534
@NativeType("char **")
535-
public static @Nullable PointerBuffer SDL_GlobStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") CharSequence path, @NativeType("char const *") @Nullable CharSequence pattern, @NativeType("SDL_GlobFlags") int flags) {
535+
public static @Nullable PointerBuffer SDL_GlobStorageDirectory(@NativeType("SDL_Storage *") long storage, @NativeType("char const *") @Nullable CharSequence path, @NativeType("char const *") @Nullable CharSequence pattern, @NativeType("SDL_GlobFlags") int flags) {
536536
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
537537
try {
538538
IntBuffer count = stack.callocInt(1);
539-
stack.nUTF8(path, true);
540-
long pathEncoded = stack.getPointerAddress();
539+
stack.nUTF8Safe(path, true);
540+
long pathEncoded = path == null ? NULL : stack.getPointerAddress();
541541
stack.nUTF8Safe(pattern, true);
542542
long patternEncoded = pattern == null ? NULL : stack.getPointerAddress();
543543
long __result = nSDL_GlobStorageDirectory(storage, pathEncoded, patternEncoded, flags, memAddress(count));

modules/lwjgl/sdl/src/generated/java/org/lwjgl/sdl/SDLTray.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ private Functions() {}
4949
DestroyTray = apiGetFunctionAddress(SDL.getLibrary(), "SDL_DestroyTray"),
5050
GetTrayEntryParent = apiGetFunctionAddress(SDL.getLibrary(), "SDL_GetTrayEntryParent"),
5151
GetTrayMenuParentEntry = apiGetFunctionAddress(SDL.getLibrary(), "SDL_GetTrayMenuParentEntry"),
52-
GetTrayMenuParentTray = apiGetFunctionAddress(SDL.getLibrary(), "SDL_GetTrayMenuParentTray");
52+
GetTrayMenuParentTray = apiGetFunctionAddress(SDL.getLibrary(), "SDL_GetTrayMenuParentTray"),
53+
UpdateTrays = apiGetFunctionAddress(SDL.getLibrary(), "SDL_UpdateTrays");
5354

5455
}
5556

@@ -430,4 +431,12 @@ public static long SDL_GetTrayMenuParentTray(@NativeType("SDL_TrayMenu *") long
430431
return invokePP(menu, __functionAddress);
431432
}
432433

434+
// --- [ SDL_UpdateTrays ] ---
435+
436+
/** {@code void SDL_UpdateTrays(void)} */
437+
public static void SDL_UpdateTrays() {
438+
long __functionAddress = Functions.UpdateTrays;
439+
invokeV(__functionAddress);
440+
}
441+
433442
}

modules/lwjgl/sdl/src/generated/java/org/lwjgl/sdl/SDLVersion.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ private Functions() {}
2929

3030
public static final int SDL_MAJOR_VERSION = 3;
3131

32-
public static final int SDL_MINOR_VERSION = 1;
32+
public static final int SDL_MINOR_VERSION = 2;
3333

34-
public static final int SDL_MICRO_VERSION = 10;
34+
public static final int SDL_MICRO_VERSION = 0;
3535

3636
public static final int SDL_VERSION = SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION);
3737

modules/lwjgl/sdl/src/templates/kotlin/sdl/templates/SDL_hints.kt

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ val SDL_hints = "SDLHints".nativeClassSDL("SDL_hints") {
137137
"HINT_MAC_BACKGROUND_APP".."SDL_MAC_BACKGROUND_APP",
138138
"HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK".."SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK",
139139
"HINT_MAC_OPENGL_ASYNC_DISPATCH".."SDL_MAC_OPENGL_ASYNC_DISPATCH",
140+
"HINT_MAC_OPTION_AS_ALT".."SDL_MAC_OPTION_AS_ALT",
140141
"HINT_MAC_SCROLL_MOMENTUM".."SDL_MAC_SCROLL_MOMENTUM",
141142
"HINT_MAIN_CALLBACK_RATE".."SDL_MAIN_CALLBACK_RATE",
142143
"HINT_MOUSE_AUTO_CAPTURE".."SDL_MOUSE_AUTO_CAPTURE",

modules/lwjgl/sdl/src/templates/kotlin/sdl/templates/SDL_storage.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ val SDL_storage = "SDLStorage".nativeClassSDL("SDL_storage") {
8585
"EnumerateStorageDirectory",
8686

8787
SDL_Storage.p("storage"),
88-
charUTF8.const.p("path"),
88+
nullable..charUTF8.const.p("path"),
8989
SDL_EnumerateDirectoryCallback("callback"),
9090
nullable..opaque_p("userdata")
9191
)
@@ -131,7 +131,7 @@ val SDL_storage = "SDLStorage".nativeClassSDL("SDL_storage") {
131131
"GlobStorageDirectory",
132132

133133
SDL_Storage.p("storage"),
134-
charUTF8.const.p("path"),
134+
nullable..charUTF8.const.p("path"),
135135
nullable..charUTF8.const.p("pattern"),
136136
SDL_GlobFlags("flags"),
137137
AutoSizeResult..int.p("count")

modules/lwjgl/sdl/src/templates/kotlin/sdl/templates/SDL_tray.kt

+6
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,10 @@ val SDL_tray = "SDLTray".nativeClassSDL("SDL_tray") {
159159

160160
SDL_TrayMenu.p("menu")
161161
)
162+
163+
void(
164+
"UpdateTrays",
165+
166+
void()
167+
)
162168
}

modules/lwjgl/sdl/src/templates/kotlin/sdl/templates/SDL_version.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import sdl.*
99

1010
val SDL_version = "SDLVersion".nativeClassSDL("SDL_version") {
1111
IntConstant("MAJOR_VERSION".."3")
12-
IntConstant("MINOR_VERSION".."1")
13-
IntConstant("MICRO_VERSION".."10")
12+
IntConstant("MINOR_VERSION".."2")
13+
IntConstant("MICRO_VERSION".."0")
1414

1515
int("GetVersion", void())
1616
charASCII.const.p("GetRevision", void())

0 commit comments

Comments
 (0)