Skip to content

Commit ae63284

Browse files
committed
Renamed SDL_Get/SetProperty() to SDL_Get/SetPointerProperty()
This is consistent with the naming for the functions that affect other data types Fixes libsdl-org#10241
1 parent f531003 commit ae63284

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+221
-257
lines changed

Diff for: docs/README-migration.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1800,32 +1800,32 @@ The information previously available in SDL_GetWindowWMInfo() is now available a
18001800
becomes:
18011801
```c
18021802
#if defined(SDL_PLATFORM_WIN32)
1803-
HWND hwnd = (HWND)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
1803+
HWND hwnd = (HWND)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
18041804
if (hwnd) {
18051805
...
18061806
}
18071807
#elif defined(SDL_PLATFORM_MACOS)
1808-
NSWindow *nswindow = (__bridge NSWindow *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, NULL);
1808+
NSWindow *nswindow = (__bridge NSWindow *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, NULL);
18091809
if (nswindow) {
18101810
...
18111811
}
18121812
#elif defined(SDL_PLATFORM_LINUX)
18131813
if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0) {
1814-
Display *xdisplay = (Display *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
1814+
Display *xdisplay = (Display *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
18151815
Window xwindow = (Window)SDL_GetNumberProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0);
18161816
if (xdisplay && xwindow) {
18171817
...
18181818
}
18191819
} else if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0) {
1820-
struct wl_display *display = (struct wl_display *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, NULL);
1821-
struct wl_surface *surface = (struct wl_surface *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, NULL);
1820+
struct wl_display *display = (struct wl_display *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, NULL);
1821+
struct wl_surface *surface = (struct wl_surface *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, NULL);
18221822
if (display && surface) {
18231823
...
18241824
}
18251825
}
18261826
#elif defined(SDL_PLATFORM_IOS)
18271827
SDL_PropertiesID props = SDL_GetWindowProperties(window);
1828-
UIWindow *uiwindow = (__bridge UIWindow *)SDL_GetProperty(props, SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER, NULL);
1828+
UIWindow *uiwindow = (__bridge UIWindow *)SDL_GetPointerProperty(props, SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER, NULL);
18291829
if (uiwindow) {
18301830
GLuint framebuffer = (GLuint)SDL_GetNumberProperty(props, SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER, 0);
18311831
GLuint colorbuffer = (GLuint)SDL_GetNumberProperty(props, SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER, 0);

Diff for: docs/README-wayland.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
153153
}
154154

155155
/* Set SDL to use the existing wl_display object from Qt and initialize. */
156-
SDL_SetProperty(SDL_GetGlobalProperties(), SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER, display);
156+
SDL_SetPointerProperty(SDL_GetGlobalProperties(), SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER, display);
157157
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
158158

159159
/* Create a basic, frameless QWindow */
@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
175175
* Qt objects should not be flagged as DPI-aware or protocol violations will result.
176176
*/
177177
props = SDL_CreateProperties();
178-
SDL_SetProperty(props, SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER, surface);
178+
SDL_SetPointerProperty(props, SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER, surface);
179179
SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN, SDL_TRUE);
180180
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, 640);
181181
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, 480);

Diff for: include/SDL3/SDL_audio.h

-3
Original file line numberDiff line numberDiff line change
@@ -953,9 +953,6 @@ extern SDL_DECLSPEC SDL_AudioStream *SDLCALL SDL_CreateAudioStream(const SDL_Aud
953953
* SDL_GetError() for more information.
954954
*
955955
* \since This function is available since SDL 3.0.0.
956-
*
957-
* \sa SDL_GetProperty
958-
* \sa SDL_SetProperty
959956
*/
960957
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
961958

Diff for: include/SDL3/SDL_camera.h

-3
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,6 @@ extern SDL_DECLSPEC SDL_CameraDeviceID SDLCALL SDL_GetCameraInstanceID(SDL_Camer
368368
* \threadsafety It is safe to call this function from any thread.
369369
*
370370
* \since This function is available since SDL 3.0.0.
371-
*
372-
* \sa SDL_GetProperty
373-
* \sa SDL_SetProperty
374371
*/
375372
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetCameraProperties(SDL_Camera *camera);
376373

Diff for: include/SDL3/SDL_gamepad.h

-3
Original file line numberDiff line numberDiff line change
@@ -725,9 +725,6 @@ extern SDL_DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromPlayerIndex(int playe
725725
* SDL_GetError() for more information.
726726
*
727727
* \since This function is available since SDL 3.0.0.
728-
*
729-
* \sa SDL_GetProperty
730-
* \sa SDL_SetProperty
731728
*/
732729
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGamepadProperties(SDL_Gamepad *gamepad);
733730

Diff for: include/SDL3/SDL_iostream.h

-3
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,6 @@ extern SDL_DECLSPEC int SDLCALL SDL_CloseIO(SDL_IOStream *context);
395395
* SDL_GetError() for more information.
396396
*
397397
* \since This function is available since SDL 3.0.0.
398-
*
399-
* \sa SDL_GetProperty
400-
* \sa SDL_SetProperty
401398
*/
402399
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetIOProperties(SDL_IOStream *context);
403400

Diff for: include/SDL3/SDL_joystick.h

-3
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,6 @@ extern SDL_DECLSPEC int SDLCALL SDL_SendJoystickVirtualSensorData(SDL_Joystick *
654654
* SDL_GetError() for more information.
655655
*
656656
* \since This function is available since SDL 3.0.0.
657-
*
658-
* \sa SDL_GetProperty
659-
* \sa SDL_SetProperty
660657
*/
661658
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joystick *joystick);
662659

Diff for: include/SDL3/SDL_properties.h

+13-16
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* Properties can be added to and retrieved from a property set through the
3333
* following functions:
3434
*
35-
* - SDL_SetProperty and SDL_GetProperty operate on `void*` pointer types.
35+
* - SDL_SetPointerProperty and SDL_GetPointerProperty operate on `void*` pointer types.
3636
* - SDL_SetStringProperty and SDL_GetStringProperty operate on string types.
3737
* - SDL_SetNumberProperty and SDL_GetNumberProperty operate on signed 64-bit
3838
* integer types.
@@ -86,9 +86,6 @@ typedef enum SDL_PropertyType
8686
* SDL_GetError() for more information.
8787
*
8888
* \since This function is available since SDL 3.0.0.
89-
*
90-
* \sa SDL_GetProperty
91-
* \sa SDL_SetProperty
9289
*/
9390
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetGlobalProperties(void);
9491

@@ -113,7 +110,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_CreateProperties(void);
113110
*
114111
* Copy all the properties from one set of properties to another, with the
115112
* exception of properties requiring cleanup (set using
116-
* SDL_SetPropertyWithCleanup()), which will not be copied. Any property that
113+
* SDL_SetPointerPropertyWithCleanup()), which will not be copied. Any property that
117114
* already exists on `dst` will be overwritten.
118115
*
119116
* \param src the properties to copy.
@@ -173,7 +170,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props);
173170
* This callback is set per-property. Different properties in the same set can
174171
* have different cleanup callbacks.
175172
*
176-
* This callback will be called _during_ SDL_SetPropertyWithCleanup if the
173+
* This callback will be called _during_ SDL_SetPointerPropertyWithCleanup if the
177174
* function fails for any reason.
178175
*
179176
* \param userdata an app-defined pointer passed to the callback.
@@ -184,7 +181,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnlockProperties(SDL_PropertiesID props);
184181
*
185182
* \since This datatype is available since SDL 3.0.0.
186183
*
187-
* \sa SDL_SetPropertyWithCleanup
184+
* \sa SDL_SetPointerPropertyWithCleanup
188185
*/
189186
typedef void (SDLCALL *SDL_CleanupPropertyCallback)(void *userdata, void *value);
190187

@@ -213,11 +210,11 @@ typedef void (SDLCALL *SDL_CleanupPropertyCallback)(void *userdata, void *value)
213210
*
214211
* \since This function is available since SDL 3.0.0.
215212
*
216-
* \sa SDL_GetProperty
217-
* \sa SDL_SetProperty
213+
* \sa SDL_GetPointerProperty
214+
* \sa SDL_SetPointerProperty
218215
* \sa SDL_CleanupPropertyCallback
219216
*/
220-
extern SDL_DECLSPEC int SDLCALL SDL_SetPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata);
217+
extern SDL_DECLSPEC int SDLCALL SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata);
221218

222219
/**
223220
* Set a property on a set of properties.
@@ -232,15 +229,15 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetPropertyWithCleanup(SDL_PropertiesID prop
232229
*
233230
* \since This function is available since SDL 3.0.0.
234231
*
235-
* \sa SDL_GetProperty
232+
* \sa SDL_GetPointerProperty
236233
* \sa SDL_HasProperty
237234
* \sa SDL_SetBooleanProperty
238235
* \sa SDL_SetFloatProperty
239236
* \sa SDL_SetNumberProperty
240-
* \sa SDL_SetPropertyWithCleanup
237+
* \sa SDL_SetPointerPropertyWithCleanup
241238
* \sa SDL_SetStringProperty
242239
*/
243-
extern SDL_DECLSPEC int SDLCALL SDL_SetProperty(SDL_PropertiesID props, const char *name, void *value);
240+
extern SDL_DECLSPEC int SDLCALL SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value);
244241

245242
/**
246243
* Set a string property on a set of properties.
@@ -360,7 +357,7 @@ extern SDL_DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesI
360357
*
361358
* \threadsafety It is safe to call this function from any thread, although
362359
* the data returned is not protected and could potentially be
363-
* freed if you call SDL_SetProperty() or SDL_ClearProperty() on
360+
* freed if you call SDL_SetPointerProperty() or SDL_ClearProperty() on
364361
* these properties from another thread. If you need to avoid
365362
* this, use SDL_LockProperties() and SDL_UnlockProperties().
366363
*
@@ -372,9 +369,9 @@ extern SDL_DECLSPEC SDL_PropertyType SDLCALL SDL_GetPropertyType(SDL_PropertiesI
372369
* \sa SDL_GetPropertyType
373370
* \sa SDL_GetStringProperty
374371
* \sa SDL_HasProperty
375-
* \sa SDL_SetProperty
372+
* \sa SDL_SetPointerProperty
376373
*/
377-
extern SDL_DECLSPEC void *SDLCALL SDL_GetProperty(SDL_PropertiesID props, const char *name, void *default_value);
374+
extern SDL_DECLSPEC void *SDLCALL SDL_GetPointerProperty(SDL_PropertiesID props, const char *name, void *default_value);
378375

379376
/**
380377
* Get a string property on a set of properties.

Diff for: include/SDL3/SDL_render.h

-6
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,6 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetRendererName(SDL_Renderer *render
413413
* SDL_GetError() for more information.
414414
*
415415
* \since This function is available since SDL 3.0.0.
416-
*
417-
* \sa SDL_GetProperty
418-
* \sa SDL_SetProperty
419416
*/
420417
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetRendererProperties(SDL_Renderer *renderer);
421418

@@ -758,9 +755,6 @@ extern SDL_DECLSPEC SDL_Texture *SDLCALL SDL_CreateTextureWithProperties(SDL_Ren
758755
* SDL_GetError() for more information.
759756
*
760757
* \since This function is available since SDL 3.0.0.
761-
*
762-
* \sa SDL_GetProperty
763-
* \sa SDL_SetProperty
764758
*/
765759
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Texture *texture);
766760

Diff for: include/SDL3/SDL_sensor.h

-3
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ extern SDL_DECLSPEC SDL_Sensor *SDLCALL SDL_GetSensorFromInstanceID(SDL_SensorID
217217
* SDL_GetError() for more information.
218218
*
219219
* \since This function is available since SDL 3.0.0.
220-
*
221-
* \sa SDL_GetProperty
222-
* \sa SDL_SetProperty
223220
*/
224221
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSensorProperties(SDL_Sensor *sensor);
225222

Diff for: include/SDL3/SDL_surface.h

-3
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroySurface(SDL_Surface *surface);
211211
* SDL_GetError() for more information.
212212
*
213213
* \since This function is available since SDL 3.0.0.
214-
*
215-
* \sa SDL_GetProperty
216-
* \sa SDL_SetProperty
217214
*/
218215
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surface *surface);
219216

Diff for: include/SDL3/SDL_video.h

-6
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,6 @@ extern SDL_DECLSPEC SDL_DisplayID SDLCALL SDL_GetPrimaryDisplay(void);
429429
* SDL_GetError() for more information.
430430
*
431431
* \since This function is available since SDL 3.0.0.
432-
*
433-
* \sa SDL_GetProperty
434-
* \sa SDL_SetProperty
435432
*/
436433
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetDisplayProperties(SDL_DisplayID displayID);
437434

@@ -1225,9 +1222,6 @@ extern SDL_DECLSPEC SDL_Window *SDLCALL SDL_GetWindowParent(SDL_Window *window);
12251222
* SDL_GetError() for more information.
12261223
*
12271224
* \since This function is available since SDL 3.0.0.
1228-
*
1229-
* \sa SDL_GetProperty
1230-
* \sa SDL_GetNumberProperty
12311225
*/
12321226
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window *window);
12331227

Diff for: src/SDL_properties.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int SDL_PrivateSetProperty(SDL_PropertiesID props, const char *name, SDL_
336336
return result;
337337
}
338338

339-
int SDL_SetPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata)
339+
int SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata)
340340
{
341341
SDL_Property *property;
342342

@@ -362,7 +362,7 @@ int SDL_SetPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *v
362362
return SDL_PrivateSetProperty(props, name, property);
363363
}
364364

365-
int SDL_SetProperty(SDL_PropertiesID props, const char *name, void *value)
365+
int SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value)
366366
{
367367
SDL_Property *property;
368368

@@ -386,7 +386,7 @@ static void SDLCALL CleanupFreeableProperty(void *userdata, void *value)
386386

387387
int SDL_SetFreeableProperty(SDL_PropertiesID props, const char *name, void *value)
388388
{
389-
return SDL_SetPropertyWithCleanup(props, name, value, CleanupFreeableProperty, NULL);
389+
return SDL_SetPointerPropertyWithCleanup(props, name, value, CleanupFreeableProperty, NULL);
390390
}
391391

392392
static void SDLCALL CleanupSurface(void *userdata, void *value)
@@ -398,7 +398,7 @@ static void SDLCALL CleanupSurface(void *userdata, void *value)
398398

399399
int SDL_SetSurfaceProperty(SDL_PropertiesID props, const char *name, SDL_Surface *surface)
400400
{
401-
return SDL_SetPropertyWithCleanup(props, name, surface, CleanupSurface, NULL);
401+
return SDL_SetPointerPropertyWithCleanup(props, name, surface, CleanupSurface, NULL);
402402
}
403403

404404
int SDL_SetStringProperty(SDL_PropertiesID props, const char *name, const char *value)
@@ -492,7 +492,7 @@ SDL_PropertyType SDL_GetPropertyType(SDL_PropertiesID props, const char *name)
492492
return type;
493493
}
494494

495-
void *SDL_GetProperty(SDL_PropertiesID props, const char *name, void *default_value)
495+
void *SDL_GetPointerProperty(SDL_PropertiesID props, const char *name, void *default_value)
496496
{
497497
SDL_Properties *properties = NULL;
498498
void *value = default_value;
@@ -775,7 +775,7 @@ static void SDLCALL SDL_DumpPropertiesCallback(void *userdata, SDL_PropertiesID
775775
{
776776
switch (SDL_GetPropertyType(props, name)) {
777777
case SDL_PROPERTY_TYPE_POINTER:
778-
SDL_Log("%s: %p\n", name, SDL_GetProperty(props, name, NULL));
778+
SDL_Log("%s: %p\n", name, SDL_GetPointerProperty(props, name, NULL));
779779
break;
780780
case SDL_PROPERTY_TYPE_STRING:
781781
SDL_Log("%s: \"%s\"\n", name, SDL_GetStringProperty(props, name, ""));

Diff for: src/camera/mediafoundation/SDL_camera_mediafoundation.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static int MEDIAFOUNDATION_AcquireFrame(SDL_CameraDevice *device, SDL_Surface *f
468468
} else {
469469
frame->pixels = pixels;
470470
frame->pitch = (int) pitch;
471-
if (SDL_SetPropertyWithCleanup(surfprops, PROP_SURFACE_IMFOBJS_POINTER, objs, CleanupIMF2DBuffer2, NULL) == -1) {
471+
if (SDL_SetPointerPropertyWithCleanup(surfprops, PROP_SURFACE_IMFOBJS_POINTER, objs, CleanupIMF2DBuffer2, NULL) == -1) {
472472
retval = -1;
473473
}
474474
}
@@ -480,7 +480,7 @@ static int MEDIAFOUNDATION_AcquireFrame(SDL_CameraDevice *device, SDL_Surface *f
480480
} else {
481481
frame->pixels = pixels;
482482
frame->pitch = (int) pitch;
483-
if (SDL_SetPropertyWithCleanup(surfprops, PROP_SURFACE_IMFOBJS_POINTER, objs, CleanupIMF2DBuffer, NULL) == -1) {
483+
if (SDL_SetPointerPropertyWithCleanup(surfprops, PROP_SURFACE_IMFOBJS_POINTER, objs, CleanupIMF2DBuffer, NULL) == -1) {
484484
retval = -1;
485485
}
486486
}
@@ -497,7 +497,7 @@ static int MEDIAFOUNDATION_AcquireFrame(SDL_CameraDevice *device, SDL_Surface *f
497497
}
498498
frame->pixels = pixels;
499499
frame->pitch = (int) pitch;
500-
if (SDL_SetPropertyWithCleanup(surfprops, PROP_SURFACE_IMFOBJS_POINTER, objs, CleanupIMFMediaBuffer, NULL) == -1) {
500+
if (SDL_SetPointerPropertyWithCleanup(surfprops, PROP_SURFACE_IMFOBJS_POINTER, objs, CleanupIMFMediaBuffer, NULL) == -1) {
501501
retval = -1;
502502
}
503503
}

Diff for: src/core/linux/SDL_fcitx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ void SDL_Fcitx_UpdateTextInputArea(SDL_Window *window)
422422
#ifdef SDL_VIDEO_DRIVER_X11
423423
{
424424
SDL_PropertiesID props = SDL_GetWindowProperties(window);
425-
Display *x_disp = (Display *)SDL_GetProperty(props, SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
425+
Display *x_disp = (Display *)SDL_GetPointerProperty(props, SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
426426
int x_screen = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_SCREEN_NUMBER, 0);
427427
Window x_win = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0);
428428
Window unused;

Diff for: src/core/linux/SDL_ibus.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ void SDL_IBus_UpdateTextInputArea(SDL_Window *window)
703703
#ifdef SDL_VIDEO_DRIVER_X11
704704
{
705705
SDL_PropertiesID props = SDL_GetWindowProperties(window);
706-
Display *x_disp = (Display *)SDL_GetProperty(props, SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
706+
Display *x_disp = (Display *)SDL_GetPointerProperty(props, SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
707707
int x_screen = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_SCREEN_NUMBER, 0);
708708
Window x_win = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0);
709709
Window unused;

Diff for: src/dialog/cocoa/SDL_cocoadialog.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void show_file_dialog(cocoa_FileDialogType type, SDL_DialogFileCallback callback
130130
NSWindow *w = NULL;
131131

132132
if (window) {
133-
w = (__bridge NSWindow *)SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, NULL);
133+
w = (__bridge NSWindow *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, NULL);
134134
}
135135

136136
if (w) {

Diff for: src/dialog/windows/SDL_windowsdialog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void windows_ShowFileDialog(void *ptr)
101101
HWND window = NULL;
102102

103103
if (parent) {
104-
window = (HWND) SDL_GetProperty(SDL_GetWindowProperties(parent), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
104+
window = (HWND) SDL_GetPointerProperty(SDL_GetWindowProperties(parent), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
105105
}
106106

107107
wchar_t *filebuffer; /* lpstrFile */
@@ -391,7 +391,7 @@ void windows_ShowFolderDialog(void* ptr)
391391
HWND parent = NULL;
392392

393393
if (window) {
394-
parent = (HWND) SDL_GetProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
394+
parent = (HWND) SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
395395
}
396396

397397
wchar_t buffer[MAX_PATH];

0 commit comments

Comments
 (0)