1 2 // Copyright 2018 - 2021 Michael D. Parker 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 7 module bindbc.sdl.dynload; 8 9 version(BindBC_Static) {} 10 else version(BindSDL_Static) {} 11 else: 12 13 import bindbc.loader; 14 import bindbc.sdl.config, 15 bindbc.sdl.bind; 16 17 private { 18 SharedLib lib; 19 SDLSupport loadedVersion; 20 } 21 22 @nogc nothrow: 23 void unloadSDL() 24 { 25 if(lib != invalidHandle) { 26 lib.unload(); 27 } 28 } 29 30 SDLSupport loadedSDLVersion() { return loadedVersion; } 31 32 bool isSDLLoaded() 33 { 34 return lib != invalidHandle; 35 } 36 37 SDLSupport loadSDL() 38 { 39 // #1778 prevents me from using static arrays here :( 40 version(Windows) { 41 const(char)[][1] libNames = ["SDL2.dll"]; 42 } 43 else version(OSX) { 44 const(char)[][7] libNames = [ 45 "libSDL2.dylib", 46 "/usr/local/lib/libSDL2.dylib", 47 "/usr/local/lib/libSDL2/libSDL2.dylib", 48 "../Frameworks/SDL2.framework/SDL2", 49 "/Library/Frameworks/SDL2.framework/SDL2", 50 "/System/Library/Frameworks/SDL2.framework/SDL2", 51 "/opt/local/lib/libSDL2.dylib" 52 ]; 53 } 54 else version(Posix) { 55 const(char)[][6] libNames = [ 56 "libSDL2.so", 57 "/usr/local/lib/libSDL2.so", 58 "libSDL2-2.0.so", 59 "/usr/local/lib/libSDL2-2.0.so", 60 "libSDL2-2.0.so.0", 61 "/usr/local/lib/libSDL2-2.0.so.0" 62 ]; 63 } 64 else static assert(0, "bindbc-sdl is not yet supported on this platform."); 65 66 SDLSupport ret; 67 foreach(name; libNames) { 68 ret = loadSDL(name.ptr); 69 if(ret != SDLSupport.noLibrary) break; 70 } 71 return ret; 72 } 73 74 SDLSupport loadSDL(const(char)* libName) 75 { 76 lib = load(libName); 77 if(lib == invalidHandle) { 78 return SDLSupport.noLibrary; 79 } 80 81 auto errCount = errorCount(); 82 loadedVersion = SDLSupport.badLibrary; 83 84 lib.bindSymbol(cast(void**)&SDL_Init, "SDL_Init"); 85 lib.bindSymbol(cast(void**)&SDL_InitSubSystem, "SDL_InitSubSystem"); 86 lib.bindSymbol(cast(void**)&SDL_QuitSubSystem, "SDL_QuitSubSystem"); 87 lib.bindSymbol(cast(void**)&SDL_WasInit, "SDL_WasInit"); 88 lib.bindSymbol(cast(void**)&SDL_Quit, "SDL_Quit"); 89 lib.bindSymbol(cast(void**)&SDL_SetAssertionHandler, "SDL_SetAssertionHandler"); 90 lib.bindSymbol(cast(void**)&SDL_GetAssertionReport, "SDL_GetAssertionReport"); 91 lib.bindSymbol(cast(void**)&SDL_ResetAssertionReport, "SDL_ResetAssertionReport"); 92 lib.bindSymbol(cast(void**)&SDL_AtomicCAS, "SDL_AtomicCAS"); 93 lib.bindSymbol(cast(void**)&SDL_AtomicCASPtr, "SDL_AtomicCASPtr"); 94 lib.bindSymbol(cast(void**)&SDL_GetNumAudioDrivers, "SDL_GetNumAudioDrivers"); 95 lib.bindSymbol(cast(void**)&SDL_GetAudioDriver, "SDL_GetAudioDriver"); 96 lib.bindSymbol(cast(void**)&SDL_AudioInit, "SDL_AudioInit"); 97 lib.bindSymbol(cast(void**)&SDL_AudioQuit, "SDL_AudioQuit"); 98 lib.bindSymbol(cast(void**)&SDL_GetCurrentAudioDriver, "SDL_GetCurrentAudioDriver"); 99 lib.bindSymbol(cast(void**)&SDL_OpenAudio, "SDL_OpenAudio"); 100 lib.bindSymbol(cast(void**)&SDL_GetNumAudioDevices, "SDL_GetNumAudioDevices"); 101 lib.bindSymbol(cast(void**)&SDL_GetAudioDeviceName, "SDL_GetAudioDeviceName"); 102 lib.bindSymbol(cast(void**)&SDL_OpenAudioDevice, "SDL_OpenAudioDevice"); 103 lib.bindSymbol(cast(void**)&SDL_GetAudioStatus, "SDL_GetAudioStatus"); 104 lib.bindSymbol(cast(void**)&SDL_GetAudioDeviceStatus, "SDL_GetAudioDeviceStatus"); 105 lib.bindSymbol(cast(void**)&SDL_PauseAudio, "SDL_PauseAudio"); 106 lib.bindSymbol(cast(void**)&SDL_PauseAudioDevice, "SDL_PauseAudioDevice"); 107 lib.bindSymbol(cast(void**)&SDL_LoadWAV_RW, "SDL_LoadWAV_RW"); 108 lib.bindSymbol(cast(void**)&SDL_FreeWAV, "SDL_FreeWAV"); 109 lib.bindSymbol(cast(void**)&SDL_BuildAudioCVT, "SDL_BuildAudioCVT"); 110 lib.bindSymbol(cast(void**)&SDL_ConvertAudio, "SDL_ConvertAudio"); 111 lib.bindSymbol(cast(void**)&SDL_MixAudio, "SDL_MixAudio"); 112 lib.bindSymbol(cast(void**)&SDL_MixAudioFormat, "SDL_MixAudioFormat"); 113 lib.bindSymbol(cast(void**)&SDL_LockAudio, "SDL_LockAudio"); 114 lib.bindSymbol(cast(void**)&SDL_LockAudioDevice, "SDL_LockAudioDevice"); 115 lib.bindSymbol(cast(void**)&SDL_UnlockAudio, "SDL_UnlockAudio"); 116 lib.bindSymbol(cast(void**)&SDL_UnlockAudioDevice, "SDL_UnlockAudioDevice"); 117 lib.bindSymbol(cast(void**)&SDL_CloseAudio, "SDL_CloseAudio"); 118 lib.bindSymbol(cast(void**)&SDL_CloseAudioDevice, "SDL_CloseAudioDevice"); 119 lib.bindSymbol(cast(void**)&SDL_SetClipboardText, "SDL_SetClipboardText"); 120 lib.bindSymbol(cast(void**)&SDL_GetClipboardText, "SDL_GetClipboardText"); 121 lib.bindSymbol(cast(void**)&SDL_HasClipboardText, "SDL_HasClipboardText"); 122 lib.bindSymbol(cast(void**)&SDL_GetCPUCount, "SDL_GetCPUCount"); 123 lib.bindSymbol(cast(void**)&SDL_GetCPUCacheLineSize, "SDL_GetCPUCacheLineSize"); 124 lib.bindSymbol(cast(void**)&SDL_HasRDTSC, "SDL_HasRDTSC"); 125 lib.bindSymbol(cast(void**)&SDL_HasAltiVec, "SDL_HasAltiVec"); 126 lib.bindSymbol(cast(void**)&SDL_HasMMX, "SDL_HasMMX"); 127 lib.bindSymbol(cast(void**)&SDL_Has3DNow, "SDL_Has3DNow"); 128 lib.bindSymbol(cast(void**)&SDL_HasSSE, "SDL_HasSSE"); 129 lib.bindSymbol(cast(void**)&SDL_HasSSE2, "SDL_HasSSE2"); 130 lib.bindSymbol(cast(void**)&SDL_HasSSE3, "SDL_HasSSE3"); 131 lib.bindSymbol(cast(void**)&SDL_HasSSE41, "SDL_HasSSE41"); 132 lib.bindSymbol(cast(void**)&SDL_HasSSE42, "SDL_HasSSE42"); 133 lib.bindSymbol(cast(void**)&SDL_SetError, "SDL_SetError"); 134 lib.bindSymbol(cast(void**)&SDL_GetError, "SDL_GetError"); 135 lib.bindSymbol(cast(void**)&SDL_ClearError, "SDL_ClearError"); 136 lib.bindSymbol(cast(void**)&SDL_PumpEvents, "SDL_PumpEvents"); 137 lib.bindSymbol(cast(void**)&SDL_PeepEvents, "SDL_PeepEvents"); 138 lib.bindSymbol(cast(void**)&SDL_HasEvent, "SDL_HasEvent"); 139 lib.bindSymbol(cast(void**)&SDL_HasEvents, "SDL_HasEvents"); 140 lib.bindSymbol(cast(void**)&SDL_FlushEvent, "SDL_FlushEvent"); 141 lib.bindSymbol(cast(void**)&SDL_FlushEvents, "SDL_FlushEvents"); 142 lib.bindSymbol(cast(void**)&SDL_PollEvent, "SDL_PollEvent"); 143 lib.bindSymbol(cast(void**)&SDL_WaitEvent, "SDL_WaitEvent"); 144 lib.bindSymbol(cast(void**)&SDL_WaitEventTimeout, "SDL_WaitEventTimeout"); 145 lib.bindSymbol(cast(void**)&SDL_PushEvent, "SDL_PushEvent"); 146 lib.bindSymbol(cast(void**)&SDL_SetEventFilter, "SDL_SetEventFilter"); 147 lib.bindSymbol(cast(void**)&SDL_GetEventFilter, "SDL_GetEventFilter"); 148 lib.bindSymbol(cast(void**)&SDL_AddEventWatch, "SDL_AddEventWatch"); 149 lib.bindSymbol(cast(void**)&SDL_DelEventWatch, "SDL_DelEventWatch"); 150 lib.bindSymbol(cast(void**)&SDL_FilterEvents, "SDL_FilterEvents"); 151 lib.bindSymbol(cast(void**)&SDL_EventState, "SDL_EventState"); 152 lib.bindSymbol(cast(void**)&SDL_RegisterEvents, "SDL_RegisterEvents"); 153 lib.bindSymbol(cast(void**)&SDL_GameControllerAddMapping, "SDL_GameControllerAddMapping"); 154 lib.bindSymbol(cast(void**)&SDL_GameControllerMappingForGUID, "SDL_GameControllerMappingForGUID"); 155 lib.bindSymbol(cast(void**)&SDL_GameControllerMapping, "SDL_GameControllerMapping"); 156 lib.bindSymbol(cast(void**)&SDL_IsGameController, "SDL_IsGameController"); 157 lib.bindSymbol(cast(void**)&SDL_GameControllerNameForIndex, "SDL_GameControllerNameForIndex"); 158 lib.bindSymbol(cast(void**)&SDL_GameControllerOpen, "SDL_GameControllerOpen"); 159 lib.bindSymbol(cast(void**)&SDL_GameControllerName, "SDL_GameControllerName"); 160 lib.bindSymbol(cast(void**)&SDL_GameControllerGetAttached, "SDL_GameControllerGetAttached"); 161 lib.bindSymbol(cast(void**)&SDL_GameControllerGetJoystick, "SDL_GameControllerGetJoystick"); 162 lib.bindSymbol(cast(void**)&SDL_GameControllerEventState, "SDL_GameControllerEventState"); 163 lib.bindSymbol(cast(void**)&SDL_GameControllerUpdate, "SDL_GameControllerUpdate"); 164 lib.bindSymbol(cast(void**)&SDL_GameControllerGetAxisFromString, "SDL_GameControllerGetAxisFromString"); 165 lib.bindSymbol(cast(void**)&SDL_GameControllerGetStringForAxis, "SDL_GameControllerGetStringForAxis"); 166 lib.bindSymbol(cast(void**)&SDL_GameControllerGetBindForAxis, "SDL_GameControllerGetBindForAxis"); 167 lib.bindSymbol(cast(void**)&SDL_GameControllerGetAxis, "SDL_GameControllerGetAxis"); 168 lib.bindSymbol(cast(void**)&SDL_GameControllerGetButtonFromString, "SDL_GameControllerGetButtonFromString"); 169 lib.bindSymbol(cast(void**)&SDL_GameControllerGetStringForButton, "SDL_GameControllerGetStringForButton"); 170 lib.bindSymbol(cast(void**)&SDL_GameControllerGetBindForButton, "SDL_GameControllerGetBindForButton"); 171 lib.bindSymbol(cast(void**)&SDL_GameControllerGetButton, "SDL_GameControllerGetButton"); 172 lib.bindSymbol(cast(void**)&SDL_GameControllerClose, "SDL_GameControllerClose"); 173 lib.bindSymbol(cast(void**)&SDL_RecordGesture, "SDL_RecordGesture"); 174 lib.bindSymbol(cast(void**)&SDL_SaveAllDollarTemplates, "SDL_SaveAllDollarTemplates"); 175 lib.bindSymbol(cast(void**)&SDL_SaveDollarTemplate, "SDL_SaveDollarTemplate"); 176 lib.bindSymbol(cast(void**)&SDL_LoadDollarTemplates, "SDL_LoadDollarTemplates"); 177 lib.bindSymbol(cast(void**)&SDL_NumHaptics, "SDL_NumHaptics"); 178 lib.bindSymbol(cast(void**)&SDL_HapticName, "SDL_HapticName"); 179 lib.bindSymbol(cast(void**)&SDL_HapticOpen, "SDL_HapticOpen"); 180 lib.bindSymbol(cast(void**)&SDL_HapticOpened, "SDL_HapticOpened"); 181 lib.bindSymbol(cast(void**)&SDL_HapticIndex, "SDL_HapticIndex"); 182 lib.bindSymbol(cast(void**)&SDL_MouseIsHaptic, "SDL_MouseIsHaptic"); 183 lib.bindSymbol(cast(void**)&SDL_HapticOpenFromMouse, "SDL_HapticOpenFromMouse"); 184 lib.bindSymbol(cast(void**)&SDL_JoystickIsHaptic, "SDL_JoystickIsHaptic"); 185 lib.bindSymbol(cast(void**)&SDL_HapticOpenFromJoystick, "SDL_HapticOpenFromJoystick"); 186 lib.bindSymbol(cast(void**)&SDL_HapticClose, "SDL_HapticClose"); 187 lib.bindSymbol(cast(void**)&SDL_HapticNumEffects, "SDL_HapticNumEffects"); 188 lib.bindSymbol(cast(void**)&SDL_HapticNumEffectsPlaying, "SDL_HapticNumEffectsPlaying"); 189 lib.bindSymbol(cast(void**)&SDL_HapticQuery, "SDL_HapticQuery"); 190 lib.bindSymbol(cast(void**)&SDL_HapticNumAxes, "SDL_HapticNumAxes"); 191 lib.bindSymbol(cast(void**)&SDL_HapticEffectSupported, "SDL_HapticEffectSupported"); 192 lib.bindSymbol(cast(void**)&SDL_HapticNewEffect, "SDL_HapticNewEffect"); 193 lib.bindSymbol(cast(void**)&SDL_HapticUpdateEffect, "SDL_HapticUpdateEffect"); 194 lib.bindSymbol(cast(void**)&SDL_HapticRunEffect, "SDL_HapticRunEffect"); 195 lib.bindSymbol(cast(void**)&SDL_HapticStopEffect, "SDL_HapticStopEffect"); 196 lib.bindSymbol(cast(void**)&SDL_HapticDestroyEffect, "SDL_HapticDestroyEffect"); 197 lib.bindSymbol(cast(void**)&SDL_HapticGetEffectStatus, "SDL_HapticGetEffectStatus"); 198 lib.bindSymbol(cast(void**)&SDL_HapticSetGain, "SDL_HapticSetGain"); 199 lib.bindSymbol(cast(void**)&SDL_HapticSetAutocenter, "SDL_HapticSetAutocenter"); 200 lib.bindSymbol(cast(void**)&SDL_HapticPause, "SDL_HapticPause"); 201 lib.bindSymbol(cast(void**)&SDL_HapticUnpause, "SDL_HapticUnpause"); 202 lib.bindSymbol(cast(void**)&SDL_HapticStopAll, "SDL_HapticStopAll"); 203 lib.bindSymbol(cast(void**)&SDL_HapticRumbleSupported, "SDL_HapticRumbleSupported"); 204 lib.bindSymbol(cast(void**)&SDL_HapticRumbleInit, "SDL_HapticRumbleInit"); 205 lib.bindSymbol(cast(void**)&SDL_HapticRumblePlay, "SDL_HapticRumblePlay"); 206 lib.bindSymbol(cast(void**)&SDL_HapticRumbleStop, "SDL_HapticRumbleStop"); 207 lib.bindSymbol(cast(void**)&SDL_SetHintWithPriority, "SDL_SetHintWithPriority"); 208 lib.bindSymbol(cast(void**)&SDL_SetHint, "SDL_SetHint"); 209 lib.bindSymbol(cast(void**)&SDL_GetHint, "SDL_GetHint"); 210 lib.bindSymbol(cast(void**)&SDL_AddHintCallback, "SDL_AddHintCallback"); 211 lib.bindSymbol(cast(void**)&SDL_DelHintCallback, "SDL_DelHintCallback"); 212 lib.bindSymbol(cast(void**)&SDL_ClearHints, "SDL_ClearHints"); 213 lib.bindSymbol(cast(void**)&SDL_NumJoysticks, "SDL_NumJoysticks"); 214 lib.bindSymbol(cast(void**)&SDL_JoystickNameForIndex, "SDL_JoystickNameForIndex"); 215 lib.bindSymbol(cast(void**)&SDL_JoystickOpen, "SDL_JoystickOpen"); 216 lib.bindSymbol(cast(void**)&SDL_JoystickName, "SDL_JoystickName"); 217 lib.bindSymbol(cast(void**)&SDL_JoystickGetDeviceGUID, "SDL_JoystickGetDeviceGUID"); 218 lib.bindSymbol(cast(void**)&SDL_JoystickGetGUID, "SDL_JoystickGetGUID"); 219 lib.bindSymbol(cast(void**)&SDL_JoystickGetGUIDString, "SDL_JoystickGetGUIDString"); 220 lib.bindSymbol(cast(void**)&SDL_JoystickGetGUIDFromString, "SDL_JoystickGetGUIDFromString"); 221 lib.bindSymbol(cast(void**)&SDL_JoystickGetAttached, "SDL_JoystickGetAttached"); 222 lib.bindSymbol(cast(void**)&SDL_JoystickInstanceID, "SDL_JoystickInstanceID"); 223 lib.bindSymbol(cast(void**)&SDL_JoystickNumAxes, "SDL_JoystickNumAxes"); 224 lib.bindSymbol(cast(void**)&SDL_JoystickNumBalls, "SDL_JoystickNumBalls"); 225 lib.bindSymbol(cast(void**)&SDL_JoystickNumHats, "SDL_JoystickNumHats"); 226 lib.bindSymbol(cast(void**)&SDL_JoystickNumButtons, "SDL_JoystickNumButtons"); 227 lib.bindSymbol(cast(void**)&SDL_JoystickUpdate, "SDL_JoystickUpdate"); 228 lib.bindSymbol(cast(void**)&SDL_JoystickEventState, "SDL_JoystickEventState"); 229 lib.bindSymbol(cast(void**)&SDL_JoystickGetAxis, "SDL_JoystickGetAxis"); 230 lib.bindSymbol(cast(void**)&SDL_JoystickGetHat, "SDL_JoystickGetHat"); 231 lib.bindSymbol(cast(void**)&SDL_JoystickGetBall, "SDL_JoystickGetBall"); 232 lib.bindSymbol(cast(void**)&SDL_JoystickGetButton, "SDL_JoystickGetButton"); 233 lib.bindSymbol(cast(void**)&SDL_JoystickClose, "SDL_JoystickClose"); 234 lib.bindSymbol(cast(void**)&SDL_GetKeyboardFocus, "SDL_GetKeyboardFocus"); 235 lib.bindSymbol(cast(void**)&SDL_GetKeyboardState, "SDL_GetKeyboardState"); 236 lib.bindSymbol(cast(void**)&SDL_GetModState, "SDL_GetModState"); 237 lib.bindSymbol(cast(void**)&SDL_SetModState, "SDL_SetModState"); 238 lib.bindSymbol(cast(void**)&SDL_GetKeyFromScancode, "SDL_GetKeyFromScancode"); 239 lib.bindSymbol(cast(void**)&SDL_GetScancodeFromKey, "SDL_GetScancodeFromKey"); 240 lib.bindSymbol(cast(void**)&SDL_GetScancodeName, "SDL_GetScancodeName"); 241 lib.bindSymbol(cast(void**)&SDL_GetScancodeFromName, "SDL_GetScancodeFromName"); 242 lib.bindSymbol(cast(void**)&SDL_GetKeyName, "SDL_GetKeyName"); 243 lib.bindSymbol(cast(void**)&SDL_GetKeyFromName, "SDL_GetKeyFromName"); 244 lib.bindSymbol(cast(void**)&SDL_StartTextInput, "SDL_StartTextInput"); 245 lib.bindSymbol(cast(void**)&SDL_IsTextInputActive, "SDL_IsTextInputActive"); 246 lib.bindSymbol(cast(void**)&SDL_StopTextInput, "SDL_StopTextInput"); 247 lib.bindSymbol(cast(void**)&SDL_SetTextInputRect, "SDL_SetTextInputRect"); 248 lib.bindSymbol(cast(void**)&SDL_HasScreenKeyboardSupport, "SDL_HasScreenKeyboardSupport"); 249 lib.bindSymbol(cast(void**)&SDL_IsScreenKeyboardShown, "SDL_IsScreenKeyboardShown"); 250 lib.bindSymbol(cast(void**)&SDL_LoadObject, "SDL_LoadObject"); 251 lib.bindSymbol(cast(void**)&SDL_LoadFunction, "SDL_LoadFunction"); 252 lib.bindSymbol(cast(void**)&SDL_UnloadObject, "SDL_UnloadObject"); 253 lib.bindSymbol(cast(void**)&SDL_LogSetAllPriority, "SDL_LogSetAllPriority"); 254 lib.bindSymbol(cast(void**)&SDL_LogSetPriority, "SDL_LogSetPriority"); 255 lib.bindSymbol(cast(void**)&SDL_LogGetPriority, "SDL_LogGetPriority"); 256 lib.bindSymbol(cast(void**)&SDL_LogResetPriorities, "SDL_LogResetPriorities"); 257 lib.bindSymbol(cast(void**)&SDL_Log, "SDL_Log"); 258 lib.bindSymbol(cast(void**)&SDL_LogVerbose, "SDL_LogVerbose"); 259 lib.bindSymbol(cast(void**)&SDL_LogDebug, "SDL_LogDebug"); 260 lib.bindSymbol(cast(void**)&SDL_LogInfo, "SDL_LogInfo"); 261 lib.bindSymbol(cast(void**)&SDL_LogWarn, "SDL_LogWarn"); 262 lib.bindSymbol(cast(void**)&SDL_LogError, "SDL_LogError"); 263 lib.bindSymbol(cast(void**)&SDL_LogCritical, "SDL_LogCritical"); 264 lib.bindSymbol(cast(void**)&SDL_LogMessage, "SDL_LogMessage"); 265 lib.bindSymbol(cast(void**)&SDL_LogMessageV, "SDL_LogMessageV"); 266 lib.bindSymbol(cast(void**)&SDL_LogGetOutputFunction, "SDL_LogGetOutputFunction"); 267 lib.bindSymbol(cast(void**)&SDL_LogSetOutputFunction, "SDL_LogSetOutputFunction"); 268 lib.bindSymbol(cast(void**)&SDL_ShowMessageBox, "SDL_ShowMessageBox"); 269 lib.bindSymbol(cast(void**)&SDL_ShowSimpleMessageBox, "SDL_ShowSimpleMessageBox"); 270 lib.bindSymbol(cast(void**)&SDL_GetMouseFocus, "SDL_GetMouseFocus"); 271 lib.bindSymbol(cast(void**)&SDL_GetMouseState, "SDL_GetMouseState"); 272 lib.bindSymbol(cast(void**)&SDL_GetRelativeMouseState, "SDL_GetRelativeMouseState"); 273 lib.bindSymbol(cast(void**)&SDL_WarpMouseInWindow, "SDL_WarpMouseInWindow"); 274 lib.bindSymbol(cast(void**)&SDL_SetRelativeMouseMode, "SDL_SetRelativeMouseMode"); 275 lib.bindSymbol(cast(void**)&SDL_GetRelativeMouseMode, "SDL_GetRelativeMouseMode"); 276 lib.bindSymbol(cast(void**)&SDL_CreateCursor, "SDL_CreateCursor"); 277 lib.bindSymbol(cast(void**)&SDL_CreateColorCursor, "SDL_CreateColorCursor"); 278 lib.bindSymbol(cast(void**)&SDL_CreateSystemCursor, "SDL_CreateSystemCursor"); 279 lib.bindSymbol(cast(void**)&SDL_SetCursor, "SDL_SetCursor"); 280 lib.bindSymbol(cast(void**)&SDL_GetCursor, "SDL_GetCursor"); 281 lib.bindSymbol(cast(void**)&SDL_GetDefaultCursor, "SDL_GetDefaultCursor"); 282 lib.bindSymbol(cast(void**)&SDL_FreeCursor, "SDL_FreeCursor"); 283 lib.bindSymbol(cast(void**)&SDL_ShowCursor, "SDL_ShowCursor"); 284 lib.bindSymbol(cast(void**)&SDL_CreateMutex, "SDL_CreateMutex"); 285 lib.bindSymbol(cast(void**)&SDL_LockMutex, "SDL_LockMutex"); 286 lib.bindSymbol(cast(void**)&SDL_TryLockMutex, "SDL_TryLockMutex"); 287 lib.bindSymbol(cast(void**)&SDL_UnlockMutex, "SDL_UnlockMutex"); 288 lib.bindSymbol(cast(void**)&SDL_DestroyMutex, "SDL_DestroyMutex"); 289 lib.bindSymbol(cast(void**)&SDL_CreateSemaphore, "SDL_CreateSemaphore"); 290 lib.bindSymbol(cast(void**)&SDL_DestroySemaphore, "SDL_DestroySemaphore"); 291 lib.bindSymbol(cast(void**)&SDL_SemWait, "SDL_SemWait"); 292 lib.bindSymbol(cast(void**)&SDL_SemWaitTimeout, "SDL_SemWaitTimeout"); 293 lib.bindSymbol(cast(void**)&SDL_SemPost, "SDL_SemPost"); 294 lib.bindSymbol(cast(void**)&SDL_SemValue, "SDL_SemValue"); 295 lib.bindSymbol(cast(void**)&SDL_CreateCond, "SDL_CreateCond"); 296 lib.bindSymbol(cast(void**)&SDL_DestroyCond, "SDL_DestroyCond"); 297 lib.bindSymbol(cast(void**)&SDL_CondSignal, "SDL_CondSignal"); 298 lib.bindSymbol(cast(void**)&SDL_CondBroadcast, "SDL_CondBroadcast"); 299 lib.bindSymbol(cast(void**)&SDL_CondWait, "SDL_CondWait"); 300 lib.bindSymbol(cast(void**)&SDL_CondWaitTimeout, "SDL_CondWaitTimeout"); 301 lib.bindSymbol(cast(void**)&SDL_GetPixelFormatName, "SDL_GetPixelFormatName"); 302 lib.bindSymbol(cast(void**)&SDL_PixelFormatEnumToMasks, "SDL_PixelFormatEnumToMasks"); 303 lib.bindSymbol(cast(void**)&SDL_MasksToPixelFormatEnum, "SDL_MasksToPixelFormatEnum"); 304 lib.bindSymbol(cast(void**)&SDL_AllocFormat, "SDL_AllocFormat"); 305 lib.bindSymbol(cast(void**)&SDL_FreeFormat, "SDL_FreeFormat"); 306 lib.bindSymbol(cast(void**)&SDL_AllocPalette, "SDL_AllocPalette"); 307 lib.bindSymbol(cast(void**)&SDL_SetPixelFormatPalette, "SDL_SetPixelFormatPalette"); 308 lib.bindSymbol(cast(void**)&SDL_SetPaletteColors, "SDL_SetPaletteColors"); 309 lib.bindSymbol(cast(void**)&SDL_FreePalette, "SDL_FreePalette"); 310 lib.bindSymbol(cast(void**)&SDL_MapRGB, "SDL_MapRGB"); 311 lib.bindSymbol(cast(void**)&SDL_MapRGBA, "SDL_MapRGBA"); 312 lib.bindSymbol(cast(void**)&SDL_GetRGB, "SDL_GetRGB"); 313 lib.bindSymbol(cast(void**)&SDL_GetRGBA, "SDL_GetRGBA"); 314 lib.bindSymbol(cast(void**)&SDL_CalculateGammaRamp, "SDL_CalculateGammaRamp"); 315 lib.bindSymbol(cast(void**)&SDL_GetPlatform, "SDL_GetPlatform"); 316 lib.bindSymbol(cast(void**)&SDL_GetPowerInfo, "SDL_GetPowerInfo"); 317 lib.bindSymbol(cast(void**)&SDL_HasIntersection, "SDL_HasIntersection"); 318 lib.bindSymbol(cast(void**)&SDL_IntersectRect, "SDL_IntersectRect"); 319 lib.bindSymbol(cast(void**)&SDL_UnionRect, "SDL_UnionRect"); 320 lib.bindSymbol(cast(void**)&SDL_EnclosePoints, "SDL_EnclosePoints"); 321 lib.bindSymbol(cast(void**)&SDL_IntersectRectAndLine, "SDL_IntersectRectAndLine"); 322 lib.bindSymbol(cast(void**)&SDL_GetNumRenderDrivers, "SDL_GetNumRenderDrivers"); 323 lib.bindSymbol(cast(void**)&SDL_GetRenderDriverInfo, "SDL_GetRenderDriverInfo"); 324 lib.bindSymbol(cast(void**)&SDL_CreateWindowAndRenderer, "SDL_CreateWindowAndRenderer"); 325 lib.bindSymbol(cast(void**)&SDL_CreateRenderer, "SDL_CreateRenderer"); 326 lib.bindSymbol(cast(void**)&SDL_CreateSoftwareRenderer, "SDL_CreateSoftwareRenderer"); 327 lib.bindSymbol(cast(void**)&SDL_GetRenderer, "SDL_GetRenderer"); 328 lib.bindSymbol(cast(void**)&SDL_GetRendererInfo, "SDL_GetRendererInfo"); 329 lib.bindSymbol(cast(void**)&SDL_GetRendererOutputSize, "SDL_GetRendererOutputSize"); 330 lib.bindSymbol(cast(void**)&SDL_CreateTexture, "SDL_CreateTexture"); 331 lib.bindSymbol(cast(void**)&SDL_CreateTextureFromSurface, "SDL_CreateTextureFromSurface"); 332 lib.bindSymbol(cast(void**)&SDL_QueryTexture, "SDL_QueryTexture"); 333 lib.bindSymbol(cast(void**)&SDL_SetTextureColorMod, "SDL_SetTextureColorMod"); 334 lib.bindSymbol(cast(void**)&SDL_GetTextureColorMod, "SDL_GetTextureColorMod"); 335 lib.bindSymbol(cast(void**)&SDL_SetTextureAlphaMod, "SDL_SetTextureAlphaMod"); 336 lib.bindSymbol(cast(void**)&SDL_GetTextureAlphaMod, "SDL_GetTextureAlphaMod"); 337 lib.bindSymbol(cast(void**)&SDL_SetTextureBlendMode, "SDL_SetTextureBlendMode"); 338 lib.bindSymbol(cast(void**)&SDL_GetTextureBlendMode, "SDL_GetTextureBlendMode"); 339 lib.bindSymbol(cast(void**)&SDL_UpdateTexture, "SDL_UpdateTexture"); 340 lib.bindSymbol(cast(void**)&SDL_LockTexture, "SDL_LockTexture"); 341 lib.bindSymbol(cast(void**)&SDL_UnlockTexture, "SDL_UnlockTexture"); 342 lib.bindSymbol(cast(void**)&SDL_RenderTargetSupported, "SDL_RenderTargetSupported"); 343 lib.bindSymbol(cast(void**)&SDL_SetRenderTarget, "SDL_SetRenderTarget"); 344 lib.bindSymbol(cast(void**)&SDL_GetRenderTarget, "SDL_GetRenderTarget"); 345 lib.bindSymbol(cast(void**)&SDL_RenderSetClipRect, "SDL_RenderSetClipRect"); 346 lib.bindSymbol(cast(void**)&SDL_RenderGetClipRect, "SDL_RenderGetClipRect"); 347 lib.bindSymbol(cast(void**)&SDL_RenderSetLogicalSize, "SDL_RenderSetLogicalSize"); 348 lib.bindSymbol(cast(void**)&SDL_RenderGetLogicalSize, "SDL_RenderGetLogicalSize"); 349 lib.bindSymbol(cast(void**)&SDL_RenderSetViewport, "SDL_RenderSetViewport"); 350 lib.bindSymbol(cast(void**)&SDL_RenderGetViewport, "SDL_RenderGetViewport"); 351 lib.bindSymbol(cast(void**)&SDL_RenderSetScale, "SDL_RenderSetScale"); 352 lib.bindSymbol(cast(void**)&SDL_RenderGetScale, "SDL_RenderGetScale"); 353 lib.bindSymbol(cast(void**)&SDL_SetRenderDrawColor, "SDL_SetRenderDrawColor"); 354 lib.bindSymbol(cast(void**)&SDL_GetRenderDrawColor, "SDL_GetRenderDrawColor"); 355 lib.bindSymbol(cast(void**)&SDL_SetRenderDrawBlendMode, "SDL_SetRenderDrawBlendMode"); 356 lib.bindSymbol(cast(void**)&SDL_GetRenderDrawBlendMode, "SDL_GetRenderDrawBlendMode"); 357 lib.bindSymbol(cast(void**)&SDL_RenderClear, "SDL_RenderClear"); 358 lib.bindSymbol(cast(void**)&SDL_RenderDrawPoint, "SDL_RenderDrawPoint"); 359 lib.bindSymbol(cast(void**)&SDL_RenderDrawPoints, "SDL_RenderDrawPoints"); 360 lib.bindSymbol(cast(void**)&SDL_RenderDrawLine, "SDL_RenderDrawLine"); 361 lib.bindSymbol(cast(void**)&SDL_RenderDrawLines, "SDL_RenderDrawLines"); 362 lib.bindSymbol(cast(void**)&SDL_RenderDrawRect, "SDL_RenderDrawRect"); 363 lib.bindSymbol(cast(void**)&SDL_RenderDrawRects, "SDL_RenderDrawRects"); 364 lib.bindSymbol(cast(void**)&SDL_RenderFillRect, "SDL_RenderFillRect"); 365 lib.bindSymbol(cast(void**)&SDL_RenderFillRects, "SDL_RenderFillRects"); 366 lib.bindSymbol(cast(void**)&SDL_RenderCopy, "SDL_RenderCopy"); 367 lib.bindSymbol(cast(void**)&SDL_RenderCopyEx, "SDL_RenderCopyEx"); 368 lib.bindSymbol(cast(void**)&SDL_RenderReadPixels, "SDL_RenderReadPixels"); 369 lib.bindSymbol(cast(void**)&SDL_RenderPresent, "SDL_RenderPresent"); 370 lib.bindSymbol(cast(void**)&SDL_DestroyTexture, "SDL_DestroyTexture"); 371 lib.bindSymbol(cast(void**)&SDL_DestroyRenderer, "SDL_DestroyRenderer"); 372 lib.bindSymbol(cast(void**)&SDL_GL_BindTexture, "SDL_GL_BindTexture"); 373 lib.bindSymbol(cast(void**)&SDL_GL_UnbindTexture, "SDL_GL_UnbindTexture"); 374 lib.bindSymbol(cast(void**)&SDL_RWFromFile, "SDL_RWFromFile"); 375 lib.bindSymbol(cast(void**)&SDL_RWFromFP, "SDL_RWFromFP"); 376 lib.bindSymbol(cast(void**)&SDL_RWFromMem, "SDL_RWFromMem"); 377 lib.bindSymbol(cast(void**)&SDL_RWFromConstMem, "SDL_RWFromConstMem"); 378 lib.bindSymbol(cast(void**)&SDL_AllocRW, "SDL_AllocRW"); 379 lib.bindSymbol(cast(void**)&SDL_FreeRW, "SDL_FreeRW"); 380 lib.bindSymbol(cast(void**)&SDL_ReadU8, "SDL_ReadU8"); 381 lib.bindSymbol(cast(void**)&SDL_ReadLE16, "SDL_ReadLE16"); 382 lib.bindSymbol(cast(void**)&SDL_ReadBE16, "SDL_ReadBE16"); 383 lib.bindSymbol(cast(void**)&SDL_ReadLE32, "SDL_ReadLE32"); 384 lib.bindSymbol(cast(void**)&SDL_ReadBE32, "SDL_ReadBE32"); 385 lib.bindSymbol(cast(void**)&SDL_ReadLE64, "SDL_ReadLE64"); 386 lib.bindSymbol(cast(void**)&SDL_ReadBE64, "SDL_ReadBE64"); 387 lib.bindSymbol(cast(void**)&SDL_WriteU8, "SDL_WriteU8"); 388 lib.bindSymbol(cast(void**)&SDL_WriteLE16, "SDL_WriteLE16"); 389 lib.bindSymbol(cast(void**)&SDL_WriteBE16, "SDL_WriteBE16"); 390 lib.bindSymbol(cast(void**)&SDL_WriteLE32, "SDL_WriteLE32"); 391 lib.bindSymbol(cast(void**)&SDL_WriteBE32, "SDL_WriteBE32"); 392 lib.bindSymbol(cast(void**)&SDL_WriteLE64, "SDL_WriteLE64"); 393 lib.bindSymbol(cast(void**)&SDL_WriteBE64, "SDL_WriteBE64"); 394 lib.bindSymbol(cast(void**)&SDL_CreateShapedWindow, "SDL_CreateShapedWindow"); 395 lib.bindSymbol(cast(void**)&SDL_IsShapedWindow, "SDL_IsShapedWindow"); 396 lib.bindSymbol(cast(void**)&SDL_SetWindowShape, "SDL_SetWindowShape"); 397 lib.bindSymbol(cast(void**)&SDL_GetShapedWindowMode, "SDL_GetShapedWindowMode"); 398 lib.bindSymbol(cast(void**)&SDL_free, "SDL_free"); 399 lib.bindSymbol(cast(void**)&SDL_CreateRGBSurface, "SDL_CreateRGBSurface"); 400 lib.bindSymbol(cast(void**)&SDL_CreateRGBSurfaceFrom, "SDL_CreateRGBSurfaceFrom"); 401 lib.bindSymbol(cast(void**)&SDL_FreeSurface, "SDL_FreeSurface"); 402 lib.bindSymbol(cast(void**)&SDL_SetSurfacePalette, "SDL_SetSurfacePalette"); 403 lib.bindSymbol(cast(void**)&SDL_LockSurface, "SDL_LockSurface"); 404 lib.bindSymbol(cast(void**)&SDL_UnlockSurface, "SDL_UnlockSurface"); 405 lib.bindSymbol(cast(void**)&SDL_LoadBMP_RW, "SDL_LoadBMP_RW"); 406 lib.bindSymbol(cast(void**)&SDL_SaveBMP_RW, "SDL_SaveBMP_RW"); 407 lib.bindSymbol(cast(void**)&SDL_SetSurfaceRLE, "SDL_SetSurfaceRLE"); 408 lib.bindSymbol(cast(void**)&SDL_SetColorKey, "SDL_SetColorKey"); 409 lib.bindSymbol(cast(void**)&SDL_GetColorKey, "SDL_GetColorKey"); 410 lib.bindSymbol(cast(void**)&SDL_SetSurfaceColorMod, "SDL_SetSurfaceColorMod"); 411 lib.bindSymbol(cast(void**)&SDL_GetSurfaceColorMod, "SDL_GetSurfaceColorMod"); 412 lib.bindSymbol(cast(void**)&SDL_SetSurfaceAlphaMod, "SDL_SetSurfaceAlphaMod"); 413 lib.bindSymbol(cast(void**)&SDL_GetSurfaceAlphaMod, "SDL_GetSurfaceAlphaMod"); 414 lib.bindSymbol(cast(void**)&SDL_SetSurfaceBlendMode, "SDL_SetSurfaceBlendMode"); 415 lib.bindSymbol(cast(void**)&SDL_GetSurfaceBlendMode, "SDL_GetSurfaceBlendMode"); 416 lib.bindSymbol(cast(void**)&SDL_SetClipRect, "SDL_SetClipRect"); 417 lib.bindSymbol(cast(void**)&SDL_GetClipRect, "SDL_GetClipRect"); 418 lib.bindSymbol(cast(void**)&SDL_ConvertSurface, "SDL_ConvertSurface"); 419 lib.bindSymbol(cast(void**)&SDL_ConvertSurfaceFormat, "SDL_ConvertSurfaceFormat"); 420 lib.bindSymbol(cast(void**)&SDL_ConvertPixels, "SDL_ConvertPixels"); 421 lib.bindSymbol(cast(void**)&SDL_FillRect, "SDL_FillRect"); 422 lib.bindSymbol(cast(void**)&SDL_FillRects, "SDL_FillRects"); 423 lib.bindSymbol(cast(void**)&SDL_UpperBlit, "SDL_UpperBlit"); 424 lib.bindSymbol(cast(void**)&SDL_LowerBlit, "SDL_LowerBlit"); 425 lib.bindSymbol(cast(void**)&SDL_SoftStretch, "SDL_SoftStretch"); 426 lib.bindSymbol(cast(void**)&SDL_UpperBlitScaled, "SDL_UpperBlitScaled"); 427 lib.bindSymbol(cast(void**)&SDL_LowerBlitScaled, "SDL_LowerBlitScaled"); 428 version(Android) { 429 lib.bindSymbol(cast(void**)&SDL_AndroidGetJNIEnv, "SDL_AndroidGetJNIEnv"); 430 lib.bindSymbol(cast(void**)&SDL_AndroidGetActivity, "SDL_AndroidGetActivity"); 431 432 lib.bindSymbol(cast(void**)&SDL_AndroidGetInternalStoragePath, "SDL_AndroidGetInternalStoragePath"); 433 434 lib.bindSymbol(cast(void**)&SDL_AndroidGetExternalStoragePath, "SDL_AndroidGetExternalStoragePath"); 435 lib.bindSymbol(cast(void**)&SDL_AndroidGetExternalStorageState, "SDL_AndroidGetExternalStorageState"); 436 } 437 lib.bindSymbol(cast(void**)&SDL_GetWindowWMInfo, "SDL_GetWindowWMInfo"); 438 lib.bindSymbol(cast(void**)&SDL_CreateThread, "SDL_CreateThread"); 439 lib.bindSymbol(cast(void**)&SDL_GetThreadName, "SDL_GetThreadName"); 440 lib.bindSymbol(cast(void**)&SDL_ThreadID, "SDL_ThreadID"); 441 lib.bindSymbol(cast(void**)&SDL_GetThreadID, "SDL_GetThreadID"); 442 lib.bindSymbol(cast(void**)&SDL_SetThreadPriority, "SDL_SetThreadPriority"); 443 lib.bindSymbol(cast(void**)&SDL_WaitThread, "SDL_WaitThread"); 444 lib.bindSymbol(cast(void**)&SDL_TLSCreate, "SDL_TLSCreate"); 445 lib.bindSymbol(cast(void**)&SDL_TLSGet, "SDL_TLSGet"); 446 lib.bindSymbol(cast(void**)&SDL_TLSSet, "SDL_TLSSet"); 447 lib.bindSymbol(cast(void**)&SDL_GetTicks, "SDL_GetTicks"); 448 lib.bindSymbol(cast(void**)&SDL_GetPerformanceCounter, "SDL_GetPerformanceCounter"); 449 lib.bindSymbol(cast(void**)&SDL_GetPerformanceFrequency, "SDL_GetPerformanceFrequency"); 450 lib.bindSymbol(cast(void**)&SDL_Delay, "SDL_Delay"); 451 lib.bindSymbol(cast(void**)&SDL_AddTimer, "SDL_AddTimer"); 452 lib.bindSymbol(cast(void**)&SDL_RemoveTimer, "SDL_RemoveTimer"); 453 lib.bindSymbol(cast(void**)&SDL_GetNumTouchDevices, "SDL_GetNumTouchDevices"); 454 lib.bindSymbol(cast(void**)&SDL_GetTouchDevice, "SDL_GetTouchDevice"); 455 lib.bindSymbol(cast(void**)&SDL_GetNumTouchFingers, "SDL_GetNumTouchFingers"); 456 lib.bindSymbol(cast(void**)&SDL_GetTouchFinger, "SDL_GetTouchFinger"); 457 lib.bindSymbol(cast(void**)&SDL_GetVersion, "SDL_GetVersion"); 458 lib.bindSymbol(cast(void**)&SDL_GetRevision, "SDL_GetRevision"); 459 lib.bindSymbol(cast(void**)&SDL_GetRevisionNumber, "SDL_GetRevisionNumber"); 460 lib.bindSymbol(cast(void**)&SDL_GetNumVideoDrivers, "SDL_GetNumVideoDrivers"); 461 lib.bindSymbol(cast(void**)&SDL_GetVideoDriver, "SDL_GetVideoDriver"); 462 lib.bindSymbol(cast(void**)&SDL_VideoInit, "SDL_VideoInit"); 463 lib.bindSymbol(cast(void**)&SDL_VideoQuit, "SDL_VideoQuit"); 464 lib.bindSymbol(cast(void**)&SDL_GetCurrentVideoDriver, "SDL_GetCurrentVideoDriver"); 465 lib.bindSymbol(cast(void**)&SDL_GetNumVideoDisplays, "SDL_GetNumVideoDisplays"); 466 lib.bindSymbol(cast(void**)&SDL_GetDisplayName, "SDL_GetDisplayName"); 467 lib.bindSymbol(cast(void**)&SDL_GetDisplayBounds, "SDL_GetDisplayBounds"); 468 lib.bindSymbol(cast(void**)&SDL_GetNumDisplayModes, "SDL_GetNumDisplayModes"); 469 lib.bindSymbol(cast(void**)&SDL_GetDisplayMode, "SDL_GetDisplayMode"); 470 lib.bindSymbol(cast(void**)&SDL_GetDesktopDisplayMode, "SDL_GetDesktopDisplayMode"); 471 lib.bindSymbol(cast(void**)&SDL_GetCurrentDisplayMode, "SDL_GetCurrentDisplayMode"); 472 lib.bindSymbol(cast(void**)&SDL_GetClosestDisplayMode, "SDL_GetClosestDisplayMode"); 473 lib.bindSymbol(cast(void**)&SDL_GetWindowDisplayIndex, "SDL_GetWindowDisplayIndex"); 474 lib.bindSymbol(cast(void**)&SDL_SetWindowDisplayMode, "SDL_SetWindowDisplayMode"); 475 lib.bindSymbol(cast(void**)&SDL_GetWindowDisplayMode, "SDL_GetWindowDisplayMode"); 476 lib.bindSymbol(cast(void**)&SDL_GetWindowPixelFormat, "SDL_GetWindowPixelFormat"); 477 lib.bindSymbol(cast(void**)&SDL_CreateWindow, "SDL_CreateWindow"); 478 lib.bindSymbol(cast(void**)&SDL_CreateWindowFrom, "SDL_CreateWindowFrom"); 479 lib.bindSymbol(cast(void**)&SDL_GetWindowID, "SDL_GetWindowID"); 480 lib.bindSymbol(cast(void**)&SDL_GetWindowFromID, "SDL_GetWindowFromID"); 481 lib.bindSymbol(cast(void**)&SDL_GetWindowFlags, "SDL_GetWindowFlags"); 482 lib.bindSymbol(cast(void**)&SDL_SetWindowTitle, "SDL_SetWindowTitle"); 483 lib.bindSymbol(cast(void**)&SDL_GetWindowTitle, "SDL_GetWindowTitle"); 484 lib.bindSymbol(cast(void**)&SDL_SetWindowIcon, "SDL_SetWindowIcon"); 485 lib.bindSymbol(cast(void**)&SDL_SetWindowData, "SDL_SetWindowData"); 486 lib.bindSymbol(cast(void**)&SDL_GetWindowData, "SDL_GetWindowData"); 487 lib.bindSymbol(cast(void**)&SDL_SetWindowPosition, "SDL_SetWindowPosition"); 488 lib.bindSymbol(cast(void**)&SDL_GetWindowPosition, "SDL_GetWindowPosition"); 489 lib.bindSymbol(cast(void**)&SDL_SetWindowSize, "SDL_SetWindowSize"); 490 lib.bindSymbol(cast(void**)&SDL_GetWindowSize, "SDL_GetWindowSize"); 491 lib.bindSymbol(cast(void**)&SDL_SetWindowMinimumSize, "SDL_SetWindowMinimumSize"); 492 lib.bindSymbol(cast(void**)&SDL_GetWindowMinimumSize, "SDL_GetWindowMinimumSize"); 493 lib.bindSymbol(cast(void**)&SDL_SetWindowMaximumSize, "SDL_SetWindowMaximumSize"); 494 lib.bindSymbol(cast(void**)&SDL_GetWindowMaximumSize, "SDL_GetWindowMaximumSize"); 495 lib.bindSymbol(cast(void**)&SDL_SetWindowBordered, "SDL_SetWindowBordered"); 496 lib.bindSymbol(cast(void**)&SDL_ShowWindow, "SDL_ShowWindow"); 497 lib.bindSymbol(cast(void**)&SDL_HideWindow, "SDL_HideWindow"); 498 lib.bindSymbol(cast(void**)&SDL_RaiseWindow, "SDL_RaiseWindow"); 499 lib.bindSymbol(cast(void**)&SDL_MaximizeWindow, "SDL_MaximizeWindow"); 500 lib.bindSymbol(cast(void**)&SDL_MinimizeWindow, "SDL_MinimizeWindow"); 501 lib.bindSymbol(cast(void**)&SDL_RestoreWindow, "SDL_RestoreWindow"); 502 lib.bindSymbol(cast(void**)&SDL_SetWindowFullscreen, "SDL_SetWindowFullscreen"); 503 lib.bindSymbol(cast(void**)&SDL_GetWindowSurface, "SDL_GetWindowSurface"); 504 lib.bindSymbol(cast(void**)&SDL_UpdateWindowSurface, "SDL_UpdateWindowSurface"); 505 lib.bindSymbol(cast(void**)&SDL_UpdateWindowSurfaceRects, "SDL_UpdateWindowSurfaceRects"); 506 lib.bindSymbol(cast(void**)&SDL_SetWindowGrab, "SDL_SetWindowGrab"); 507 lib.bindSymbol(cast(void**)&SDL_GetWindowGrab, "SDL_GetWindowGrab"); 508 lib.bindSymbol(cast(void**)&SDL_SetWindowBrightness, "SDL_SetWindowBrightness"); 509 lib.bindSymbol(cast(void**)&SDL_GetWindowBrightness, "SDL_GetWindowBrightness"); 510 lib.bindSymbol(cast(void**)&SDL_SetWindowGammaRamp, "SDL_SetWindowGammaRamp"); 511 lib.bindSymbol(cast(void**)&SDL_GetWindowGammaRamp, "SDL_GetWindowGammaRamp"); 512 lib.bindSymbol(cast(void**)&SDL_DestroyWindow, "SDL_DestroyWindow"); 513 lib.bindSymbol(cast(void**)&SDL_IsScreenSaverEnabled, "SDL_IsScreenSaverEnabled"); 514 lib.bindSymbol(cast(void**)&SDL_EnableScreenSaver, "SDL_EnableScreenSaver"); 515 lib.bindSymbol(cast(void**)&SDL_DisableScreenSaver, "SDL_DisableScreenSaver"); 516 lib.bindSymbol(cast(void**)&SDL_GL_LoadLibrary, "SDL_GL_LoadLibrary"); 517 lib.bindSymbol(cast(void**)&SDL_GL_GetProcAddress, "SDL_GL_GetProcAddress"); 518 lib.bindSymbol(cast(void**)&SDL_GL_UnloadLibrary, "SDL_GL_UnloadLibrary"); 519 lib.bindSymbol(cast(void**)&SDL_GL_ExtensionSupported, "SDL_GL_ExtensionSupported"); 520 lib.bindSymbol(cast(void**)&SDL_GL_SetAttribute, "SDL_GL_SetAttribute"); 521 lib.bindSymbol(cast(void**)&SDL_GL_GetAttribute, "SDL_GL_GetAttribute"); 522 lib.bindSymbol(cast(void**)&SDL_GL_CreateContext, "SDL_GL_CreateContext"); 523 lib.bindSymbol(cast(void**)&SDL_GL_MakeCurrent, "SDL_GL_MakeCurrent"); 524 lib.bindSymbol(cast(void**)&SDL_GL_GetCurrentWindow, "SDL_GL_GetCurrentWindow"); 525 lib.bindSymbol(cast(void**)&SDL_GL_GetCurrentContext, "SDL_GL_GetCurrentContext"); 526 lib.bindSymbol(cast(void**)&SDL_GL_SetSwapInterval, "SDL_GL_SetSwapInterval"); 527 lib.bindSymbol(cast(void**)&SDL_GL_GetSwapInterval, "SDL_GL_GetSwapInterval"); 528 lib.bindSymbol(cast(void**)&SDL_GL_SwapWindow, "SDL_GL_SwapWindow"); 529 lib.bindSymbol(cast(void**)&SDL_GL_DeleteContext, "SDL_GL_DeleteContext"); 530 531 if(errorCount() != errCount) return SDLSupport.badLibrary; 532 else loadedVersion = SDLSupport.sdl200; 533 534 static if(sdlSupport >= SDLSupport.sdl201) { 535 lib.bindSymbol(cast(void**)&SDL_GetSystemRAM, "SDL_GetSystemRAM"); 536 lib.bindSymbol(cast(void**)&SDL_GetBasePath, "SDL_GetBasePath"); 537 lib.bindSymbol(cast(void**)&SDL_GetPrefPath, "SDL_GetPrefPath"); 538 lib.bindSymbol(cast(void**)&SDL_UpdateYUVTexture, "SDL_UpdateYUVTexture"); 539 lib.bindSymbol(cast(void**)&SDL_GL_GetDrawableSize, "SDL_GL_GetDrawableSize"); 540 541 version(Windows) { 542 lib.bindSymbol(cast(void**)&SDL_Direct3D9GetAdapterIndex, "SDL_Direct3D9GetAdapterIndex") ; 543 lib.bindSymbol(cast(void**)&SDL_RenderGetD3D9Device, "SDL_RenderGetD3D9Device"); 544 } 545 546 if(errorCount() != errCount) return SDLSupport.badLibrary; 547 else loadedVersion = SDLSupport.sdl201; 548 } 549 550 static if(sdlSupport >= SDLSupport.sdl202) { 551 lib.bindSymbol(cast(void**)&SDL_GetDefaultAssertionHandler, "SDL_GetDefaultAssertionHandler"); 552 lib.bindSymbol(cast(void**)&SDL_GetAssertionHandler, "SDL_GetAssertionHandler"); 553 lib.bindSymbol(cast(void**)&SDL_HasAVX, "SDL_HasAVX"); 554 lib.bindSymbol(cast(void**)&SDL_GameControllerAddMappingsFromRW, "SDL_GameControllerAddMappingsFromRW"); 555 lib.bindSymbol(cast(void**)&SDL_GL_ResetAttributes, "SDL_GL_ResetAttributes"); 556 lib.bindSymbol(cast(void**)&SDL_DetachThread, "SDL_DetachThread"); 557 558 version(Windows) { 559 lib.bindSymbol(cast(void**)&SDL_DXGIGetOutputInfo, "SDL_DXGIGetOutputInfo"); 560 } 561 562 if(errorCount() != errCount) return SDLSupport.badLibrary; 563 else loadedVersion = SDLSupport.sdl202; 564 } 565 566 static if(sdlSupport >= SDLSupport.sdl203) { 567 lib.bindSymbol(cast(void**)&SDL_AtomicSet, "SDL_AtomicSet"); 568 lib.bindSymbol(cast(void**)&SDL_AtomicGet, "SDL_AtomicGet"); 569 lib.bindSymbol(cast(void**)&SDL_AtomicAdd, "SDL_AtomicAdd"); 570 lib.bindSymbol(cast(void**)&SDL_AtomicSetPtr, "SDL_AtomicSetPtr"); 571 lib.bindSymbol(cast(void**)&SDL_AtomicGetPtr, "SDL_AtomicGetPtr"); 572 573 if(errorCount() != errCount) return SDLSupport.badLibrary; 574 loadedVersion = SDLSupport.sdl203; 575 } 576 577 static if(sdlSupport >= SDLSupport.sdl204) { 578 lib.bindSymbol(cast(void**)&SDL_ClearQueuedAudio, "SDL_ClearQueuedAudio"); 579 lib.bindSymbol(cast(void**)&SDL_GetQueuedAudioSize, "SDL_GetQueuedAudioSize"); 580 lib.bindSymbol(cast(void**)&SDL_QueueAudio, "SDL_QueueAudio"); 581 lib.bindSymbol(cast(void**)&SDL_HasAVX2, "SDL_HasAVX2"); 582 lib.bindSymbol(cast(void**)&SDL_GameControllerFromInstanceID, "SDL_GameControllerFromInstanceID"); 583 lib.bindSymbol(cast(void**)&SDL_JoystickCurrentPowerLevel, "SDL_JoystickCurrentPowerLevel"); 584 lib.bindSymbol(cast(void**)&SDL_JoystickFromInstanceID, "SDL_JoystickFromInstanceID"); 585 lib.bindSymbol(cast(void**)&SDL_CaptureMouse, "SDL_CaptureMouse"); 586 lib.bindSymbol(cast(void**)&SDL_GetGlobalMouseState, "SDL_GetGlobalMouseState"); 587 lib.bindSymbol(cast(void**)&SDL_WarpMouseGlobal, "SDL_WarpMouseGlobal"); 588 lib.bindSymbol(cast(void**)&SDL_RenderIsClipEnabled, "SDL_RenderIsClipEnabled"); 589 lib.bindSymbol(cast(void**)&SDL_GetDisplayDPI, "SDL_GetDisplayDPI"); 590 lib.bindSymbol(cast(void**)&SDL_GetGrabbedWindow, "SDL_GetGrabbedWindow"); 591 lib.bindSymbol(cast(void**)&SDL_SetWindowHitTest, "SDL_SetWindowHitTest"); 592 593 version(Windows) { 594 lib.bindSymbol(cast(void**)&SDL_SetWindowsMessageHook, "SDL_SetWindowsMessageHook"); 595 } 596 597 if(errorCount() != errCount) return SDLSupport.badLibrary; 598 else loadedVersion = SDLSupport.sdl204; 599 } 600 601 static if(sdlSupport >= SDLSupport.sdl205) { 602 lib.bindSymbol(cast(void**)&SDL_DequeueAudio, "SDL_DequeueAudio"); 603 lib.bindSymbol(cast(void**)&SDL_GetHintBoolean, "SDL_GetHintBoolean"); 604 lib.bindSymbol(cast(void**)&SDL_RenderGetIntegerScale, "SDL_RenderGetIntegerScale"); 605 lib.bindSymbol(cast(void**)&SDL_RenderSetIntegerScale, "SDL_RenderSetIntegerScale"); 606 lib.bindSymbol(cast(void**)&SDL_CreateRGBSurfaceWithFormat, "SDL_CreateRGBSurfaceWithFormat"); 607 lib.bindSymbol(cast(void**)&SDL_CreateRGBSurfaceWithFormatFrom, "SDL_CreateRGBSurfaceWithFormatFrom"); 608 lib.bindSymbol(cast(void**)&SDL_GetDisplayUsableBounds, "SDL_GetDisplayUsableBounds"); 609 lib.bindSymbol(cast(void**)&SDL_GetWindowBordersSize, "SDL_GetWindowBordersSize"); 610 lib.bindSymbol(cast(void**)&SDL_GetWindowOpacity, "SDL_GetWindowOpacity"); 611 lib.bindSymbol(cast(void**)&SDL_SetWindowInputFocus, "SDL_SetWindowInputFocus"); 612 lib.bindSymbol(cast(void**)&SDL_SetWindowModalFor, "SDL_SetWindowModalFor"); 613 lib.bindSymbol(cast(void**)&SDL_SetWindowOpacity, "SDL_SetWindowOpacity"); 614 lib.bindSymbol(cast(void**)&SDL_SetWindowResizable, "SDL_SetWindowResizable"); 615 616 if(errorCount() != errCount) return SDLSupport.badLibrary; 617 else loadedVersion = SDLSupport.sdl205; 618 } 619 620 static if(sdlSupport >= SDLSupport.sdl206) { 621 lib.bindSymbol(cast(void**)&SDL_ComposeCustomBlendMode, "SDL_ComposeCustomBlendMode"); 622 lib.bindSymbol(cast(void**)&SDL_HasNEON, "SDL_HasNEON"); 623 lib.bindSymbol(cast(void**)&SDL_GameControllerGetVendor, "SDL_GameControllerGetVendor"); 624 lib.bindSymbol(cast(void**)&SDL_GameControllerGetProduct, "SDL_GameControllerGetProduct"); 625 lib.bindSymbol(cast(void**)&SDL_GameControllerGetProductVersion, "SDL_GameControllerGetProductVersion"); 626 lib.bindSymbol(cast(void**)&SDL_GameControllerMappingForIndex, "SDL_GameControllerMappingForIndex"); 627 lib.bindSymbol(cast(void**)&SDL_GameControllerNumMappings, "SDL_GameControllerNumMappings"); 628 lib.bindSymbol(cast(void**)&SDL_JoystickGetAxisInitialState, "SDL_JoystickGetAxisInitialState"); 629 lib.bindSymbol(cast(void**)&SDL_JoystickGetDeviceVendor, "SDL_JoystickGetDeviceVendor"); 630 lib.bindSymbol(cast(void**)&SDL_JoystickGetDeviceProduct, "SDL_JoystickGetDeviceProduct"); 631 lib.bindSymbol(cast(void**)&SDL_JoystickGetDeviceProductVersion, "SDL_JoystickGetDeviceProductVersion"); 632 lib.bindSymbol(cast(void**)&SDL_JoystickGetDeviceInstanceID, "SDL_JoystickGetDeviceInstanceID"); 633 lib.bindSymbol(cast(void**)&SDL_JoystickGetDeviceType, "SDL_JoystickGetDeviceType"); 634 lib.bindSymbol(cast(void**)&SDL_JoystickGetProduct, "SDL_JoystickGetProduct"); 635 lib.bindSymbol(cast(void**)&SDL_JoystickGetProductVersion, "SDL_JoystickGetProductVersion"); 636 lib.bindSymbol(cast(void**)&SDL_JoystickGetType, "SDL_JoystickGetType"); 637 lib.bindSymbol(cast(void**)&SDL_JoystickGetVendor, "SDL_JoystickGetVendor"); 638 lib.bindSymbol(cast(void**)&SDL_LoadFile_RW, "SDL_LoadFile_RW"); 639 lib.bindSymbol(cast(void**)&SDL_DuplicateSurface, "SDL_DuplicateSurface"); 640 lib.bindSymbol(cast(void**)&SDL_Vulkan_CreateSurface, "SDL_Vulkan_CreateSurface"); 641 lib.bindSymbol(cast(void**)&SDL_Vulkan_GetDrawableSize, "SDL_Vulkan_GetDrawableSize"); 642 lib.bindSymbol(cast(void**)&SDL_Vulkan_GetInstanceExtensions, "SDL_Vulkan_GetInstanceExtensions"); 643 lib.bindSymbol(cast(void**)&SDL_Vulkan_GetVkGetInstanceProcAddr, "SDL_Vulkan_GetVkGetInstanceProcAddr"); 644 lib.bindSymbol(cast(void**)&SDL_Vulkan_LoadLibrary, "SDL_Vulkan_LoadLibrary"); 645 lib.bindSymbol(cast(void**)&SDL_Vulkan_UnloadLibrary, "SDL_Vulkan_UnloadLibrary"); 646 647 if(errorCount() != errCount) return SDLSupport.badLibrary; 648 else loadedVersion = SDLSupport.sdl206; 649 } 650 651 static if(sdlSupport >= SDLSupport.sdl207) { 652 lib.bindSymbol(cast(void**)&SDL_NewAudioStream, "SDL_NewAudioStream"); 653 lib.bindSymbol(cast(void**)&SDL_AudioStreamPut, "SDL_AudioStreamPut"); 654 lib.bindSymbol(cast(void**)&SDL_AudioStreamGet, "SDL_AudioStreamGet"); 655 lib.bindSymbol(cast(void**)&SDL_AudioStreamAvailable, "SDL_AudioStreamAvailable"); 656 lib.bindSymbol(cast(void**)&SDL_AudioStreamFlush, "SDL_AudioStreamFlush"); 657 lib.bindSymbol(cast(void**)&SDL_AudioStreamClear, "SDL_AudioStreamClear"); 658 lib.bindSymbol(cast(void**)&SDL_FreeAudioStream, "SDL_FreeAudioStream"); 659 lib.bindSymbol(cast(void**)&SDL_LockJoysticks, "SDL_LockJoysticks"); 660 lib.bindSymbol(cast(void**)&SDL_UnlockJoysticks, "SDL_UnlockJoysticks"); 661 662 if(errorCount() != errCount) return SDLSupport.badLibrary; 663 else loadedVersion = SDLSupport.sdl207; 664 } 665 666 static if(sdlSupport >= SDLSupport.sdl208) { 667 lib.bindSymbol(cast(void**)&SDL_RenderGetMetalLayer, "SDL_RenderGetMetalLayer"); 668 lib.bindSymbol(cast(void**)&SDL_RenderGetMetalCommandEncoder, "SDL_RenderGetMetalCommandEncoder"); 669 lib.bindSymbol(cast(void**)&SDL_SetYUVConversionMode, "SDL_SetYUVConversionMode"); 670 lib.bindSymbol(cast(void**)&SDL_GetYUVConversionMode, "SDL_GetYUVConversionMode"); 671 lib.bindSymbol(cast(void**)&SDL_GetYUVConversionModeForResolution, "SDL_GetYUVConversionModeForResolution"); 672 673 version(Android) { 674 lib.bindSymbol(cast(void**)&SDL_IsAndroidTV, "SDL_IsAndroidTV"); 675 } 676 677 if(errorCount() != errCount) return SDLSupport.badLibrary; 678 else loadedVersion = SDLSupport.sdl208; 679 } 680 681 static if(sdlSupport >= SDLSupport.sdl209) { 682 lib.bindSymbol(cast(void**)&SDL_HasAVX512F, "SDL_HasAVX512F"); 683 lib.bindSymbol(cast(void**)&SDL_GameControllerMappingForDeviceIndex, "SDL_GameControllerMappingForDeviceIndex"); 684 lib.bindSymbol(cast(void**)&SDL_GameControllerRumble, "SDL_GameControllerRumble"); 685 lib.bindSymbol(cast(void**)&SDL_JoystickRumble, "SDL_JoystickRumble"); 686 lib.bindSymbol(cast(void**)&SDL_HasColorKey, "SDL_HasColorKey"); 687 lib.bindSymbol(cast(void**)&SDL_GetDisplayOrientation, "SDL_GetDisplayOrientation"); 688 lib.bindSymbol(cast(void**)&SDL_CreateThreadWithStackSize, "SDL_CreateThreadWithStackSize"); 689 lib.bindSymbol(cast(void**)&SDL_NumSensors, "SDL_NumSensors"); 690 lib.bindSymbol(cast(void**)&SDL_SensorGetDeviceName, "SDL_SensorGetDeviceName"); 691 lib.bindSymbol(cast(void**)&SDL_SensorGetDeviceType, "SDL_SensorGetDeviceType"); 692 lib.bindSymbol(cast(void**)&SDL_SensorGetDeviceNonPortableType, "SDL_SensorGetDeviceNonPortableType"); 693 lib.bindSymbol(cast(void**)&SDL_SensorGetDeviceInstanceID, "SDL_SensorGetDeviceInstanceID"); 694 lib.bindSymbol(cast(void**)&SDL_SensorOpen, "SDL_SensorOpen"); 695 lib.bindSymbol(cast(void**)&SDL_SensorFromInstanceID, "SDL_SensorFromInstanceID"); 696 lib.bindSymbol(cast(void**)&SDL_SensorGetName, "SDL_SensorGetName"); 697 lib.bindSymbol(cast(void**)&SDL_SensorGetType, "SDL_SensorGetType"); 698 lib.bindSymbol(cast(void**)&SDL_SensorGetNonPortableType, "SDL_SensorGetNonPortableType"); 699 lib.bindSymbol(cast(void**)&SDL_SensorGetData, "SDL_SensorGetData"); 700 lib.bindSymbol(cast(void**)&SDL_SensorClose, "SDL_SensorClose"); 701 lib.bindSymbol(cast(void**)&SDL_SensorUpdate, "SDL_SensorUpdate"); 702 703 version(Android) 704 { 705 lib.bindSymbol(cast(void**)&SDL_IsChromebook, "SDL_IsChromebook"); 706 lib.bindSymbol(cast(void**)&SDL_IsDeXMode, "SDL_IsDeXMode"); 707 lib.bindSymbol(cast(void**)&SDL_AndroidBackButton, "SDL_AndroidBackButton"); 708 } 709 else version(linux) { 710 lib.bindSymbol(cast(void**)&SDL_LinuxSetThreadPriority, "SDL_LinuxSetThreadPriority"); 711 } 712 713 if(errorCount() != errCount) return SDLSupport.badLibrary; 714 else loadedVersion = SDLSupport.sdl209; 715 } 716 717 static if(sdlSupport >= SDLSupport.sdl2010) { 718 lib.bindSymbol(cast(void**)&SDL_SIMDGetAlignment, "SDL_SIMDGetAlignment"); 719 lib.bindSymbol(cast(void**)&SDL_SIMDAlloc, "SDL_SIMDAlloc"); 720 lib.bindSymbol(cast(void**)&SDL_SIMDFree, "SDL_SIMDFree"); 721 lib.bindSymbol(cast(void**)&SDL_GameControllerGetPlayerIndex, "SDL_GameControllerGetPlayerIndex"); 722 lib.bindSymbol(cast(void**)&SDL_JoystickGetDevicePlayerIndex, "SDL_JoystickGetDevicePlayerIndex"); 723 lib.bindSymbol(cast(void**)&SDL_JoystickGetPlayerIndex, "SDL_JoystickGetPlayerIndex"); 724 lib.bindSymbol(cast(void**)&SDL_RenderDrawPointF, "SDL_RenderDrawPointF"); 725 lib.bindSymbol(cast(void**)&SDL_RenderDrawPointsF, "SDL_RenderDrawPointsF"); 726 lib.bindSymbol(cast(void**)&SDL_RenderDrawLineF, "SDL_RenderDrawLineF"); 727 lib.bindSymbol(cast(void**)&SDL_RenderDrawLinesF, "SDL_RenderDrawLinesF"); 728 lib.bindSymbol(cast(void**)&SDL_RenderDrawRectF, "SDL_RenderDrawRectF"); 729 lib.bindSymbol(cast(void**)&SDL_RenderDrawRectsF, "SDL_RenderDrawRectsF"); 730 lib.bindSymbol(cast(void**)&SDL_RenderFillRectF, "SDL_RenderFillRectF"); 731 lib.bindSymbol(cast(void**)&SDL_RenderFillRectsF, "SDL_RenderFillRectsF"); 732 lib.bindSymbol(cast(void**)&SDL_RenderCopyF, "SDL_RenderCopyF"); 733 lib.bindSymbol(cast(void**)&SDL_RenderCopyExF, "SDL_RenderCopyExF"); 734 lib.bindSymbol(cast(void**)&SDL_RenderFlush, "SDL_RenderFlush"); 735 lib.bindSymbol(cast(void**)&SDL_RWsize, "SDL_RWsize"); 736 lib.bindSymbol(cast(void**)&SDL_RWseek, "SDL_RWseek"); 737 lib.bindSymbol(cast(void**)&SDL_RWtell, "SDL_RWtell"); 738 lib.bindSymbol(cast(void**)&SDL_RWread, "SDL_RWread"); 739 lib.bindSymbol(cast(void**)&SDL_RWwrite, "SDL_RWwrite"); 740 lib.bindSymbol(cast(void**)&SDL_RWclose, "SDL_RWclose"); 741 lib.bindSymbol(cast(void**)&SDL_GetTouchDeviceType, "SDL_GetTouchDeviceType"); 742 743 if(errorCount() != errCount) return SDLSupport.badLibrary; 744 else loadedVersion = SDLSupport.sdl2010; 745 } 746 747 static if(sdlSupport >= SDLSupport.sdl2012) { 748 lib.bindSymbol(cast(void**)&SDL_HasARMSIMD, "SDL_HasARMSIMD"); 749 lib.bindSymbol(cast(void**)&SDL_GameControllerTypeForIndex, "SDL_GameControllerTypeForIndex"); 750 lib.bindSymbol(cast(void**)&SDL_GameControllerFromPlayerIndex, "SDL_GameControllerFromPlayerIndex"); 751 lib.bindSymbol(cast(void**)&SDL_GameControllerGetType, "SDL_GameControllerGetType"); 752 lib.bindSymbol(cast(void**)&SDL_GameControllerSetPlayerIndex, "SDL_GameControllerSetPlayerIndex"); 753 lib.bindSymbol(cast(void**)&SDL_JoystickFromPlayerIndex, "SDL_JoystickFromPlayerIndex"); 754 lib.bindSymbol(cast(void**)&SDL_JoystickGetGUID, "SDL_JoystickGetGUID"); 755 lib.bindSymbol(cast(void**)&SDL_SetTextureScaleMode, "SDL_SetTextureScaleMode"); 756 lib.bindSymbol(cast(void**)&SDL_GetTextureScaleMode, "SDL_GetTextureScaleMode"); 757 lib.bindSymbol(cast(void**)&SDL_LockTextureToSurface, "SDL_LockTextureToSurface"); 758 version(Android) { 759 lib.bindSymbol(cast(void**)&SDL_GetAndroidSDKVersion, "SDL_GetAndroidSDKVersion"); 760 } 761 762 if(errorCount() != errCount) return SDLSupport.badLibrary; 763 else loadedVersion = SDLSupport.sdl2012; 764 } 765 766 static if(sdlSupport >= SDLSupport.sdl2014) { 767 lib.bindSymbol(cast(void**)&SDL_SIMDRealloc, "SDL_SIMDRealloc"); 768 lib.bindSymbol(cast(void**)&SDL_GameControllerHasAxis, "SDL_GameControllerHasAxis"); 769 lib.bindSymbol(cast(void**)&SDL_GameControllerHasButton, "SDL_GameControllerHasButton"); 770 lib.bindSymbol(cast(void**)&SDL_GameControllerGetNumTouchpads, "SDL_GameControllerGetNumTouchpads"); 771 lib.bindSymbol(cast(void**)&SDL_GameControllerGetNumTouchpadFingers, "SDL_GameControllerGetNumTouchpadFingers"); 772 lib.bindSymbol(cast(void**)&SDL_GameControllerGetTouchpadFinger, "SDL_GameControllerGetTouchpadFinger"); 773 lib.bindSymbol(cast(void**)&SDL_GameControllerHasSensor, "SDL_GameControllerHasSensor"); 774 lib.bindSymbol(cast(void**)&SDL_GameControllerSetSensorEnabled, "SDL_GameControllerSetSensorEnabled"); 775 lib.bindSymbol(cast(void**)&SDL_GameControllerIsSensorEnabled, "SDL_GameControllerIsSensorEnabled"); 776 lib.bindSymbol(cast(void**)&SDL_GameControllerGetSensorData, "SDL_GameControllerGetSensorData"); 777 lib.bindSymbol(cast(void**)&SDL_GameControllerRumbleTriggers, "SDL_GameControllerRumbleTriggers"); 778 lib.bindSymbol(cast(void**)&SDL_GameControllerHasLED, "SDL_GameControllerHasLED"); 779 lib.bindSymbol(cast(void**)&SDL_GameControllerSetLED, "SDL_GameControllerSetLED"); 780 lib.bindSymbol(cast(void**)&SDL_JoystickAttachVirtual, "SDL_JoystickAttachVirtual"); 781 lib.bindSymbol(cast(void**)&SDL_JoystickDetachVirtual, "SDL_JoystickDetachVirtual"); 782 lib.bindSymbol(cast(void**)&SDL_JoystickIsVirtual, "SDL_JoystickIsVirtual"); 783 lib.bindSymbol(cast(void**)&SDL_JoystickSetVirtualAxis, "SDL_JoystickSetVirtualAxis"); 784 lib.bindSymbol(cast(void**)&SDL_JoystickSetVirtualButton, "SDL_JoystickSetVirtualButton"); 785 lib.bindSymbol(cast(void**)&SDL_JoystickSetVirtualHat, "SDL_JoystickSetVirtualHat"); 786 lib.bindSymbol(cast(void**)&SDL_JoystickGetSerial, "SDL_JoystickGetSerial"); 787 lib.bindSymbol(cast(void**)&SDL_JoystickRumbleTriggers, "SDL_JoystickRumbleTriggers"); 788 lib.bindSymbol(cast(void**)&SDL_JoystickHasLED, "SDL_JoystickHasLED"); 789 lib.bindSymbol(cast(void**)&SDL_JoystickSetLED, "SDL_JoystickSetLED"); 790 version(Android) { 791 lib.bindSymbol(cast(void**)&SDL_AndroidRequestPermission, "SDL_AndroidRequestPermission"); 792 } 793 794 if(errorCount() != errCount) return SDLSupport.badLibrary; 795 else loadedVersion = SDLSupport.sdl2014; 796 } 797 798 return loadedVersion; 799 }