mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-17 16:58:13 +00:00
Renamed SDL_Get/SetProperty() to SDL_Get/SetPointerProperty()
This is consistent with the naming for the functions that affect other data types Fixes https://github.com/libsdl-org/SDL/issues/10241
This commit is contained in:
@@ -361,10 +361,10 @@ SDL_Thread *SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props,
|
||||
}
|
||||
#endif
|
||||
|
||||
SDL_ThreadFunction fn = (SDL_ThreadFunction) SDL_GetProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, NULL);
|
||||
SDL_ThreadFunction fn = (SDL_ThreadFunction) SDL_GetPointerProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, NULL);
|
||||
const char *name = SDL_GetStringProperty(props, SDL_PROP_THREAD_CREATE_NAME_STRING, NULL);
|
||||
const size_t stacksize = (size_t) SDL_GetNumberProperty(props, SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER, 0);
|
||||
void *userdata = SDL_GetProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, NULL);
|
||||
void *userdata = SDL_GetPointerProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, NULL);
|
||||
|
||||
if (!fn) {
|
||||
SDL_SetError("Thread entry function is NULL");
|
||||
@@ -411,9 +411,9 @@ SDL_Thread *SDL_CreateThreadRuntime(SDL_ThreadFunction fn,
|
||||
SDL_FunctionPointer pfnEndThread)
|
||||
{
|
||||
const SDL_PropertiesID props = SDL_CreateProperties();
|
||||
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, (void *) fn);
|
||||
SDL_SetPointerProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, (void *) fn);
|
||||
SDL_SetStringProperty(props, SDL_PROP_THREAD_CREATE_NAME_STRING, name);
|
||||
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, userdata);
|
||||
SDL_SetPointerProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, userdata);
|
||||
SDL_Thread *thread = SDL_CreateThreadWithPropertiesRuntime(props, pfnBeginThread, pfnEndThread);
|
||||
SDL_DestroyProperties(props);
|
||||
return thread;
|
||||
@@ -423,9 +423,9 @@ SDL_Thread *SDL_CreateThreadRuntime(SDL_ThreadFunction fn,
|
||||
SDL_Thread *SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, size_t stacksize, void *userdata)
|
||||
{
|
||||
const SDL_PropertiesID props = SDL_CreateProperties();
|
||||
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, (void *) fn);
|
||||
SDL_SetPointerProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, (void *) fn);
|
||||
SDL_SetStringProperty(props, SDL_PROP_THREAD_CREATE_NAME_STRING, name);
|
||||
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, userdata);
|
||||
SDL_SetPointerProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, userdata);
|
||||
SDL_SetNumberProperty(props, SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER, (Sint64) stacksize);
|
||||
SDL_Thread *thread = SDL_CreateThreadWithProperties(props);
|
||||
SDL_DestroyProperties(props);
|
||||
|
Reference in New Issue
Block a user