Giter Club home page Giter Club logo

Comments (5)

madebr avatar madebr commented on September 13, 2024

I think that's fine, as long as we're 100% confident the function cannot fail, or we can encode an error condition in the result type.

from sdl.

slouken avatar slouken commented on September 13, 2024

To put some context around this question, here is a list of SDL_Get* functions and their current signatures, and as you can see, most of them return the thing that they're getting:

void* SDL_GetAndroidActivity(void)
const char* SDL_GetAndroidCachePath(void)
const char* SDL_GetAndroidExternalStoragePath(void)
int SDL_GetAndroidExternalStorageState(Uint32 *a)
const char*     SDL_GetAndroidInternalStoragePath(void)
void*    SDL_GetAndroidJNIEnv(void)
int      SDL_GetAndroidSDKVersion(void)
SDL_AssertionHandler    SDL_GetAssertionHandler(void **a)
const SDL_AssertData*   SDL_GetAssertionReport(void)
const int*      SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID a, int *b)
int      SDL_GetAudioDeviceFormat(SDL_AudioDeviceID a, SDL_AudioSpec *b, int *c)
float    SDL_GetAudioDeviceGain(SDL_AudioDeviceID a)
const char*     SDL_GetAudioDeviceName(SDL_AudioDeviceID a)
const char*     SDL_GetAudioDriver(int a)
SDL_AudioDeviceID*      SDL_GetAudioPlaybackDevices(int *a)
SDL_AudioDeviceID*      SDL_GetAudioRecordingDevices(int *a)
int     SDL_GetAudioStreamAvailable(SDL_AudioStream *a)
int     SDL_GetAudioStreamData(SDL_AudioStream *a, void *b, int c)
SDL_AudioDeviceID       SDL_GetAudioStreamDevice(SDL_AudioStream *a)
int     SDL_GetAudioStreamFormat(SDL_AudioStream *a, SDL_AudioSpec *b, SDL_AudioSpec *c)
float   SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream *a)
float   SDL_GetAudioStreamGain(SDL_AudioStream *a)
const int*      SDL_GetAudioStreamInputChannelMap(SDL_AudioStream *a, int *b)
const int* SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream *a, int *b)
SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream *a)
int SDL_GetAudioStreamQueued(SDL_AudioStream *a)
char* SDL_GetBasePath(void)
SDL_bool SDL_GetBooleanProperty(SDL_PropertiesID a, const char *b, SDL_bool c)
int SDL_GetCPUCacheLineSize(void)
int SDL_GetCPUCount(void)
const char* SDL_GetCameraDriver(int a)
int SDL_GetCameraFormat(SDL_Camera *a, SDL_CameraSpec *b)
SDL_CameraID SDL_GetCameraID(SDL_Camera *a)
const char* SDL_GetCameraName(SDL_CameraID a)
int SDL_GetCameraPermissionState(SDL_Camera *a)
SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID a)
SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera *a)
SDL_CameraSpec* SDL_GetCameraSupportedFormats(SDL_CameraID a, int *b)
SDL_CameraID* SDL_GetCameras(int *a)
void* SDL_GetClipboardData(const char *a, size_t *b)
char* SDL_GetClipboardText(void)
const SDL_DisplayMode* SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID a, int b, int c, float d, SDL_bool e)
const char* SDL_GetCurrentAudioDriver(void)
const char* SDL_GetCurrentCameraDriver(void)
const SDL_DisplayMode* SDL_GetCurrentDisplayMode(SDL_DisplayID a)
SDL_DisplayOrientation SDL_GetCurrentDisplayOrientation(SDL_DisplayID a)
int SDL_GetCurrentRenderOutputSize(SDL_Renderer *a, int *b, int *c)
SDL_ThreadID SDL_GetCurrentThreadID(void)
int SDL_GetCurrentTime(SDL_Time *a)
const char* SDL_GetCurrentVideoDriver(void)
SDL_Cursor* SDL_GetCursor(void)
int SDL_GetDateTimeLocalePreferences(SDL_DateFormat *a, SDL_TimeFormat *b)
int SDL_GetDayOfWeek(int a, int b, int c)
int SDL_GetDayOfYear(int a, int b, int c)
int SDL_GetDaysInMonth(int a, int b)
SDL_AssertionHandler SDL_GetDefaultAssertionHandler(void)
SDL_Cursor* SDL_GetDefaultCursor(void)
SDL_Keycode SDL_GetDefaultKeyFromScancode(SDL_Scancode a, SDL_Keymod b)
SDL_Scancode SDL_GetDefaultScancodeFromKey(SDL_Keycode a, SDL_Keymod *b)
const SDL_DisplayMode* SDL_GetDesktopDisplayMode(SDL_DisplayID a)
int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID a)
int SDL_GetDisplayBounds(SDL_DisplayID a, SDL_Rect *b)
float SDL_GetDisplayContentScale(SDL_DisplayID a)
SDL_DisplayID SDL_GetDisplayForPoint(const SDL_Point *a)
SDL_DisplayID SDL_GetDisplayForRect(const SDL_Rect *a)
SDL_DisplayID SDL_GetDisplayForWindow(SDL_Window *a)
const char* SDL_GetDisplayName(SDL_DisplayID a)
SDL_PropertiesID SDL_GetDisplayProperties(SDL_DisplayID a)
int SDL_GetDisplayUsableBounds(SDL_DisplayID a, SDL_Rect *b)
SDL_DisplayID* SDL_GetDisplays(int *a)
const char* SDL_GetError(void)
SDL_bool SDL_GetEventFilter(SDL_EventFilter *a, void **b)
float SDL_GetFloatProperty(SDL_PropertiesID a, const char *b, float c)
const SDL_DisplayMode** SDL_GetFullscreenDisplayModes(SDL_DisplayID a, int *b)
int SDL_GetGDKDefaultUser(XUserHandle *a)
int SDL_GetGDKTaskQueue(XTaskQueueHandle *a)
const char* SDL_GetGamepadAppleSFSymbolsNameForAxis(SDL_Gamepad *a, SDL_GamepadAxis b)
const char* SDL_GetGamepadAppleSFSymbolsNameForButton(SDL_Gamepad *a, SDL_GamepadButton b)
Sint16 SDL_GetGamepadAxis(SDL_Gamepad *a, SDL_GamepadAxis b)
SDL_GamepadAxis SDL_GetGamepadAxisFromString(const char *a)
SDL_GamepadBinding** SDL_GetGamepadBindings(SDL_Gamepad *a, int *b)
Uint8 SDL_GetGamepadButton(SDL_Gamepad *a, SDL_GamepadButton b)
SDL_GamepadButton SDL_GetGamepadButtonFromString(const char *a)
SDL_GamepadButtonLabel SDL_GetGamepadButtonLabel(SDL_Gamepad *a, SDL_GamepadButton b)
SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType a, SDL_GamepadButton b)
SDL_JoystickConnectionState SDL_GetGamepadConnectionState(SDL_Gamepad *a)
Uint16 SDL_GetGamepadFirmwareVersion(SDL_Gamepad *a)
SDL_Gamepad* SDL_GetGamepadFromID(SDL_JoystickID a)
SDL_Gamepad* SDL_GetGamepadFromPlayerIndex(int a)
SDL_JoystickGUID SDL_GetGamepadGUIDForID(SDL_JoystickID a)
SDL_JoystickID SDL_GetGamepadID(SDL_Gamepad *a)
SDL_Joystick* SDL_GetGamepadJoystick(SDL_Gamepad *a)
char* SDL_GetGamepadMapping(SDL_Gamepad *a)
char* SDL_GetGamepadMappingForGUID(SDL_JoystickGUID a)
char* SDL_GetGamepadMappingForID(SDL_JoystickID a)
char** SDL_GetGamepadMappings(int *a)
const char* SDL_GetGamepadName(SDL_Gamepad *a)
const char* SDL_GetGamepadNameForID(SDL_JoystickID a)
const char* SDL_GetGamepadPath(SDL_Gamepad *a)
const char* SDL_GetGamepadPathForID(SDL_JoystickID a)
int SDL_GetGamepadPlayerIndex(SDL_Gamepad *a)
int SDL_GetGamepadPlayerIndexForID(SDL_JoystickID a)
SDL_PowerState SDL_GetGamepadPowerInfo(SDL_Gamepad *a, int *b)
Uint16 SDL_GetGamepadProduct(SDL_Gamepad *a)
Uint16 SDL_GetGamepadProductForID(SDL_JoystickID a)
Uint16 SDL_GetGamepadProductVersion(SDL_Gamepad *a)
Uint16 SDL_GetGamepadProductVersionForID(SDL_JoystickID a)
SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad *a)
int SDL_GetGamepadSensorData(SDL_Gamepad *a, SDL_SensorType b, float *c, int d)
float SDL_GetGamepadSensorDataRate(SDL_Gamepad *a, SDL_SensorType b)
const char* SDL_GetGamepadSerial(SDL_Gamepad *a)
Uint64 SDL_GetGamepadSteamHandle(SDL_Gamepad *a)
const char* SDL_GetGamepadStringForAxis(SDL_GamepadAxis a)
const char* SDL_GetGamepadStringForButton(SDL_GamepadButton a)
const char* SDL_GetGamepadStringForType(SDL_GamepadType a)
int SDL_GetGamepadTouchpadFinger(SDL_Gamepad *a, int b, int c, Uint8 *d, float *e, float *f, float *g)
SDL_GamepadType SDL_GetGamepadType(SDL_Gamepad *a)
SDL_GamepadType SDL_GetGamepadTypeForID(SDL_JoystickID a)
SDL_GamepadType SDL_GetGamepadTypeFromString(const char *a)
Uint16 SDL_GetGamepadVendor(SDL_Gamepad *a)
Uint16 SDL_GetGamepadVendorForID(SDL_JoystickID a)
SDL_JoystickID* SDL_GetGamepads(int *a)
SDL_MouseButtonFlags SDL_GetGlobalMouseState(float *a, float *b)
SDL_PropertiesID SDL_GetGlobalProperties(void)
SDL_Window* SDL_GetGrabbedWindow(void)
int SDL_GetHapticEffectStatus(SDL_Haptic *a, int b)
Uint32 SDL_GetHapticFeatures(SDL_Haptic *a)
SDL_Haptic* SDL_GetHapticFromID(SDL_HapticID a)
SDL_HapticID SDL_GetHapticID(SDL_Haptic *a)
const char* SDL_GetHapticName(SDL_Haptic *a)
const char* SDL_GetHapticNameForID(SDL_HapticID a)
SDL_HapticID* SDL_GetHaptics(int *a)
const char* SDL_GetHint(const char *a)
SDL_bool SDL_GetHintBoolean(const char *a, SDL_bool b)
SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream *a)
Sint64 SDL_GetIOSize(SDL_IOStream *a)
SDL_IOStatus SDL_GetIOStatus(SDL_IOStream *a)
Sint16 SDL_GetJoystickAxis(SDL_Joystick *a, int b)
SDL_bool SDL_GetJoystickAxisInitialState(SDL_Joystick *a, int b, Sint16 *c)
int SDL_GetJoystickBall(SDL_Joystick *a, int b, int *c, int *d)
Uint8 SDL_GetJoystickButton(SDL_Joystick *a, int b)
SDL_JoystickConnectionState SDL_GetJoystickConnectionState(SDL_Joystick *a)
Uint16 SDL_GetJoystickFirmwareVersion(SDL_Joystick *a)
SDL_Joystick* SDL_GetJoystickFromID(SDL_JoystickID a)
SDL_Joystick* SDL_GetJoystickFromPlayerIndex(int a)
SDL_JoystickGUID SDL_GetJoystickGUID(SDL_Joystick *a)
SDL_JoystickGUID SDL_GetJoystickGUIDForID(SDL_JoystickID a)
SDL_JoystickGUID SDL_GetJoystickGUIDFromString(const char *a)
void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID a, Uint16 *b, Uint16 *c, Uint16 *d, Uint16 *e)
int SDL_GetJoystickGUIDString(SDL_JoystickGUID a, char *b, int c)
Uint8 SDL_GetJoystickHat(SDL_Joystick *a, int b)
SDL_JoystickID SDL_GetJoystickID(SDL_Joystick *a)
const char* SDL_GetJoystickName(SDL_Joystick *a)
const char* SDL_GetJoystickNameForID(SDL_JoystickID a)
const char* SDL_GetJoystickPath(SDL_Joystick *a)
const char* SDL_GetJoystickPathForID(SDL_JoystickID a)
int SDL_GetJoystickPlayerIndex(SDL_Joystick *a)
int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID a)
SDL_PowerState SDL_GetJoystickPowerInfo(SDL_Joystick *a, int *b)
Uint16 SDL_GetJoystickProduct(SDL_Joystick *a)
Uint16 SDL_GetJoystickProductForID(SDL_JoystickID a)
Uint16 SDL_GetJoystickProductVersion(SDL_Joystick *a)
Uint16 SDL_GetJoystickProductVersionForID(SDL_JoystickID a)
SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick *a)
const char* SDL_GetJoystickSerial(SDL_Joystick *a)
SDL_JoystickType SDL_GetJoystickType(SDL_Joystick *a)
SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID a)
Uint16 SDL_GetJoystickVendor(SDL_Joystick *a)
Uint16 SDL_GetJoystickVendorForID(SDL_JoystickID a)
SDL_JoystickID* SDL_GetJoysticks(int *a)
SDL_Keycode SDL_GetKeyFromName(const char *a)
SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode a, SDL_Keymod b)
const char* SDL_GetKeyName(SDL_Keycode a)
SDL_Window* SDL_GetKeyboardFocus(void)
const char* SDL_GetKeyboardNameForID(SDL_KeyboardID a)
const Uint8* SDL_GetKeyboardState(int *a)
SDL_KeyboardID* SDL_GetKeyboards(int *a)
void SDL_GetLogOutputFunction(SDL_LogOutputFunction *a, void **b)
SDL_LogPriority SDL_GetLogPriority(int a)
int SDL_GetMasksForPixelFormat(SDL_PixelFormat a, int *b, Uint32 *c, Uint32 *d, Uint32 *e, Uint32 *f)
int SDL_GetMaxHapticEffects(SDL_Haptic *a)
int SDL_GetMaxHapticEffectsPlaying(SDL_Haptic *a)
void SDL_GetMemoryFunctions(SDL_malloc_func *a, SDL_calloc_func *b, SDL_realloc_func *c, SDL_free_func *d)
SDL_MouseID* SDL_GetMice(int *a)
SDL_Keymod SDL_GetModState(void)
SDL_Window* SDL_GetMouseFocus(void)
const char* SDL_GetMouseNameForID(SDL_MouseID a)
SDL_MouseButtonFlags SDL_GetMouseState(float *a, float *b)
SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation(SDL_DisplayID a)
int SDL_GetNumAllocations(void)
int SDL_GetNumAudioDrivers(void)
int SDL_GetNumCameraDrivers(void)
int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *a, int b)
int SDL_GetNumGamepadTouchpads(SDL_Gamepad *a)
int SDL_GetNumHapticAxes(SDL_Haptic *a)
int SDL_GetNumJoystickAxes(SDL_Joystick *a)
int SDL_GetNumJoystickBalls(SDL_Joystick *a)
int SDL_GetNumJoystickButtons(SDL_Joystick *a)
int SDL_GetNumJoystickHats(SDL_Joystick *a)
int SDL_GetNumRenderDrivers(void)
int SDL_GetNumVideoDrivers(void)
Sint64 SDL_GetNumberProperty(SDL_PropertiesID a, const char *b, Sint64 c)
void SDL_GetOriginalMemoryFunctions(SDL_malloc_func *a, SDL_calloc_func *b, SDL_realloc_func *c, SDL_free_func *d)
int SDL_GetPathInfo(const char *a, SDL_PathInfo *b)
SDL_PenCapabilityFlags SDL_GetPenCapabilities(SDL_PenID a, SDL_PenCapabilityInfo *b)
SDL_PenID SDL_GetPenFromGUID(SDL_GUID a)
SDL_GUID SDL_GetPenGUID(SDL_PenID a)
const char* SDL_GetPenName(SDL_PenID a)
Uint32 SDL_GetPenStatus(SDL_PenID a, float *b, float *c, float *d, size_t e)
SDL_PenSubtype SDL_GetPenType(SDL_PenID a)
SDL_PenID* SDL_GetPens(int *a)
Uint64 SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceFrequency(void)
const SDL_PixelFormatDetails* SDL_GetPixelFormatDetails(SDL_PixelFormat a)
SDL_PixelFormat SDL_GetPixelFormatForMasks(int a, Uint32 b, Uint32 c, Uint32 d, Uint32 e)
const char* SDL_GetPixelFormatName(SDL_PixelFormat a)
const char* SDL_GetPlatform(void)
void* SDL_GetPointerProperty(SDL_PropertiesID a, const char *b, void *c)
SDL_PowerState SDL_GetPowerInfo(int *a, int *b)
char* SDL_GetPrefPath(const char *a, const char *b)
SDL_Locale* SDL_GetPreferredLocales(void)
SDL_DisplayID SDL_GetPrimaryDisplay(void)
char* SDL_GetPrimarySelectionText(void)
SDL_PropertyType SDL_GetPropertyType(SDL_PropertiesID a, const char *b)
void SDL_GetRGB(Uint32 a, const SDL_PixelFormatDetails *b, const SDL_Palette *c, Uint8 *d, Uint8 *e, Uint8 *f)
void SDL_GetRGBA(Uint32 a, const SDL_PixelFormatDetails *b, const SDL_Palette *c, Uint8 *d, Uint8 *e, Uint8 *f, Uint8 *g)
SDL_GamepadType SDL_GetRealGamepadType(SDL_Gamepad *a)
SDL_GamepadType SDL_GetRealGamepadTypeForID(SDL_JoystickID a)
SDL_bool SDL_GetRectAndLineIntersection(const SDL_Rect *a, int *b, int *c, int *d, int *e)
SDL_bool SDL_GetRectAndLineIntersectionFloat(const SDL_FRect *a, float *b, float *c, float *d, float *e)
SDL_bool SDL_GetRectEnclosingPoints(const SDL_Point *a, int b, const SDL_Rect *c, SDL_Rect *d)
SDL_bool SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *a, int b, const SDL_FRect *c, SDL_FRect *d)
SDL_bool SDL_GetRectIntersection(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c)
SDL_bool SDL_GetRectIntersectionFloat(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c)
int SDL_GetRectUnion(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c)
int SDL_GetRectUnionFloat(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c)
SDL_bool SDL_GetRelativeMouseMode(void)
SDL_MouseButtonFlags SDL_GetRelativeMouseState(float *a, float *b)
int SDL_GetRenderClipRect(SDL_Renderer *a, SDL_Rect *b)
int SDL_GetRenderColorScale(SDL_Renderer *a, float *b)
int SDL_GetRenderDrawBlendMode(SDL_Renderer *a, SDL_BlendMode *b)
int SDL_GetRenderDrawColor(SDL_Renderer *a, Uint8 *b, Uint8 *c, Uint8 *d, Uint8 *e)
int SDL_GetRenderDrawColorFloat(SDL_Renderer *a, float *b, float *c, float *d, float *e)
const char* SDL_GetRenderDriver(int a)
int SDL_GetRenderLogicalPresentation(SDL_Renderer *a, int *b, int *c, SDL_RendererLogicalPresentation *d, SDL_ScaleMode *e)
int SDL_GetRenderLogicalPresentationRect(SDL_Renderer *a, SDL_FRect *b)
void* SDL_GetRenderMetalCommandEncoder(SDL_Renderer *a)
void* SDL_GetRenderMetalLayer(SDL_Renderer *a)
int SDL_GetRenderOutputSize(SDL_Renderer *a, int *b, int *c)
int SDL_GetRenderScale(SDL_Renderer *a, float *b, float *c)
SDL_Texture* SDL_GetRenderTarget(SDL_Renderer *a)
int SDL_GetRenderVSync(SDL_Renderer *a, int *b)
int SDL_GetRenderViewport(SDL_Renderer *a, SDL_Rect *b)
SDL_Window* SDL_GetRenderWindow(SDL_Renderer *a)
SDL_Renderer* SDL_GetRenderer(SDL_Window *a)
SDL_Renderer* SDL_GetRendererFromTexture(SDL_Texture *a)
const char * SDL_GetRendererName(SDL_Renderer *a)
SDL_PropertiesID SDL_GetRendererProperties(SDL_Renderer *a)
const char* SDL_GetRevision(void)
size_t SDL_GetSIMDAlignment(void)
SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode a, SDL_Keymod *b)
SDL_Scancode SDL_GetScancodeFromName(const char *a)
const char* SDL_GetScancodeName(SDL_Scancode a)
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *a)
int SDL_GetSensorData(SDL_Sensor *a, float *b, int c)
SDL_Sensor* SDL_GetSensorFromID(SDL_SensorID a)
SDL_SensorID SDL_GetSensorID(SDL_Sensor *a)
const char* SDL_GetSensorName(SDL_Sensor *a)
const char* SDL_GetSensorNameForID(SDL_SensorID a)
int SDL_GetSensorNonPortableType(SDL_Sensor *a)
int SDL_GetSensorNonPortableTypeForID(SDL_SensorID a)
SDL_PropertiesID SDL_GetSensorProperties(SDL_Sensor *a)
SDL_SensorType SDL_GetSensorType(SDL_Sensor *a)
SDL_SensorType SDL_GetSensorTypeForID(SDL_SensorID a)
SDL_SensorID* SDL_GetSensors(int *a)
int SDL_GetSilenceValueForFormat(SDL_AudioFormat a)
int SDL_GetStorageFileSize(SDL_Storage *a, const char *b, Uint64 *c)
int SDL_GetStoragePathInfo(SDL_Storage *a, const char *b, SDL_PathInfo *c)
Uint64 SDL_GetStorageSpaceRemaining(SDL_Storage *a)
const char* SDL_GetStringProperty(SDL_PropertiesID a, const char *b, const char *c)
int SDL_GetSurfaceAlphaMod(SDL_Surface *a, Uint8 *b)
int SDL_GetSurfaceBlendMode(SDL_Surface *a, SDL_BlendMode *b)
int SDL_GetSurfaceClipRect(SDL_Surface *a, SDL_Rect *b)
int SDL_GetSurfaceColorKey(SDL_Surface *a, Uint32 *b)
int SDL_GetSurfaceColorMod(SDL_Surface *a, Uint8 *b, Uint8 *c, Uint8 *d)
SDL_Colorspace SDL_GetSurfaceColorspace(SDL_Surface *a)
SDL_Palette* SDL_GetSurfacePalette(SDL_Surface *a)
SDL_PropertiesID SDL_GetSurfaceProperties(SDL_Surface *a)
int SDL_GetSystemRAM(void)
SDL_SystemTheme SDL_GetSystemTheme(void)
void* SDL_GetTLS(SDL_TLSID a)
int SDL_GetTextInputArea(SDL_Window *a, SDL_Rect *b, int *c)
int SDL_GetTextureAlphaMod(SDL_Texture *a, Uint8 *b)
int SDL_GetTextureAlphaModFloat(SDL_Texture *a, float *b)
int SDL_GetTextureBlendMode(SDL_Texture *a, SDL_BlendMode *b)
int SDL_GetTextureColorMod(SDL_Texture *a, Uint8 *b, Uint8 *c, Uint8 *d)
int SDL_GetTextureColorModFloat(SDL_Texture *a, float *b, float *c, float *d)
SDL_PropertiesID SDL_GetTextureProperties(SDL_Texture *a)
int SDL_GetTextureScaleMode(SDL_Texture *a, SDL_ScaleMode *b)
int SDL_GetTextureSize(SDL_Texture *a, float *b, float *c)
SDL_ThreadID SDL_GetThreadID(SDL_Thread *a)
const char* SDL_GetThreadName(SDL_Thread *a)
Uint64 SDL_GetTicks(void)
Uint64 SDL_GetTicksNS(void)
const char* SDL_GetTouchDeviceName(SDL_TouchID a)
SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID a)
SDL_TouchID* SDL_GetTouchDevices(int *a)
SDL_Finger** SDL_GetTouchFingers(SDL_TouchID a, int *b)
char* SDL_GetUserFolder(SDL_Folder a)
int SDL_GetVersion(void)
const char* SDL_GetVideoDriver(int a)
SDL_WinRT_DeviceFamily SDL_GetWinRTDeviceFamily(void)
const char* SDL_GetWinRTFSPath(SDL_WinRT_Path a)
int SDL_GetWindowAspectRatio(SDL_Window *a, float *b, float *c)
int SDL_GetWindowBordersSize(SDL_Window *a, int *b, int *c, int *d, int *e)
float SDL_GetWindowDisplayScale(SDL_Window *a)
SDL_WindowFlags SDL_GetWindowFlags(SDL_Window *a)
SDL_Window* SDL_GetWindowFromID(SDL_WindowID a)
const SDL_DisplayMode* SDL_GetWindowFullscreenMode(SDL_Window *a)
void* SDL_GetWindowICCProfile(SDL_Window *a, size_t *b)
SDL_WindowID SDL_GetWindowID(SDL_Window *a)
SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window *a)
int SDL_GetWindowMaximumSize(SDL_Window *a, int *b, int *c)
int SDL_GetWindowMinimumSize(SDL_Window *a, int *b, int *c)
SDL_bool SDL_GetWindowMouseGrab(SDL_Window *a)
const SDL_Rect* SDL_GetWindowMouseRect(SDL_Window *a)
int SDL_GetWindowOpacity(SDL_Window *a, float *b)
SDL_Window* SDL_GetWindowParent(SDL_Window *a)
float SDL_GetWindowPixelDensity(SDL_Window *a)
SDL_PixelFormat SDL_GetWindowPixelFormat(SDL_Window *a)
int SDL_GetWindowPosition(SDL_Window *a, int *b, int *c)
SDL_PropertiesID SDL_GetWindowProperties(SDL_Window *a)
int SDL_GetWindowSize(SDL_Window *a, int *b, int *c)
int SDL_GetWindowSizeInPixels(SDL_Window *a, int *b, int *c)
SDL_Surface* SDL_GetWindowSurface(SDL_Window *a)
int SDL_GetWindowSurfaceVSync(SDL_Window *a, int *b)
const char* SDL_GetWindowTitle(SDL_Window *a)
SDL_Window** SDL_GetWindows(int *a)

from sdl.

slouken avatar slouken commented on September 13, 2024

Reading over this, the convention seems to be "return the thing that is being requested unless it's more than one thing, and then return an error code".

Unless anyone has any objections, I'll go ahead and standardize on that.

from sdl.

slouken avatar slouken commented on September 13, 2024

lol, after all that, these are the only functions that only return one thing and that thing is simple data with a clear failure value:

int SDL_GetAndroidExternalStorageState(Uint32 *a)
int SDL_GetRenderColorScale(SDL_Renderer *a, float *b)
int SDL_GetRenderDrawBlendMode(SDL_Renderer *a, SDL_BlendMode *b)
int SDL_GetSurfaceBlendMode(SDL_Surface *a, SDL_BlendMode *b)
int SDL_GetSurfaceColorKey(SDL_Surface *a, Uint32 *b)
int SDL_GetTextureBlendMode(SDL_Texture *a, SDL_BlendMode *b)
int SDL_GetTextureScaleMode(SDL_Texture *a, SDL_ScaleMode *b)

That seems like a reasonable list to tackle. I'll work on that now.

from sdl.

slouken avatar slouken commented on September 13, 2024

So applying these changes to external code doesn't actually improve anything, and within the context of the other Get* functions for renderers and surfaces, these stand out as outliers, so I'm going to back this change out.

from sdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.