SDL_CompareCallback_r - A callback used with SDL sorting and binary search functions.
Contents
Availability
This callback is available since SDL 3.2.0.
Function Parameters
userdata
the userdata pointer passed to the sort function.
a a pointer to the first element being compared.
b a pointer to the second element being compared.
Header File
Defined in SDL3/SDL_stdinc.h
Name
SDL_CompareCallback_r - A callback used with SDL sorting and binary search functions.
Return Value
Returns -1 if a should be sorted before b , 1 if b should be sorted before a , 0 if they are equal. If
two elements are equal, their order in the sorted array is undefined.
See Also
•(3), SDL_qsort_r(3), •(3), SDL_bsearch_r(3) Simple Directmedia Layer SDL 3.2.10 SDL_CompareCallback_r(3type)
Synopsis
#include"SDL3/SDL.h"typedefint(SDLCALL*SDL_CompareCallback_r)(void*userdata,constvoid*a,constvoid*b);
