Implemented the Dynamic API magic.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 09 Dec 2013 16:03:18 -0500
changeset 80949efaae827924
parent 8093 b43765095a6f
child 8095 15b248f1e5a0
Implemented the Dynamic API magic.
CMakeLists.txt
VisualC/SDL/SDL_VS2008.vcproj
VisualC/SDL/SDL_VS2010.vcxproj
VisualC/SDL/SDL_VS2012.vcxproj
VisualC/SDL/SDL_VS2013.vcxproj
Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
Xcode/SDL/SDL.xcodeproj/project.pbxproj
configure.in
include/SDL_thread.h
premake/projects/SDL2.lua
src/SDL_internal.h
src/audio/SDL_audio.c
src/dynapi/SDL_dynapi.c
src/dynapi/SDL_dynapi.h
src/dynapi/SDL_dynapi_overrides.h
src/dynapi/SDL_dynapi_procs.h
src/dynapi/gendynapi.pl
src/haptic/windows/SDL_syshaptic.c
src/joystick/windows/SDL_dxjoystick.c
src/thread/SDL_thread.c
src/timer/SDL_timer.c
     1.1 --- a/CMakeLists.txt	Sun Nov 24 23:56:17 2013 -0500
     1.2 +++ b/CMakeLists.txt	Mon Dec 09 16:03:18 2013 -0500
     1.3 @@ -240,6 +240,7 @@
     1.4    ${SDL2_SOURCE_DIR}/src/atomic/*.c
     1.5    ${SDL2_SOURCE_DIR}/src/audio/*.c
     1.6    ${SDL2_SOURCE_DIR}/src/cpuinfo/*.c
     1.7 +  ${SDL2_SOURCE_DIR}/src/dynapi/*.c
     1.8    ${SDL2_SOURCE_DIR}/src/events/*.c
     1.9    ${SDL2_SOURCE_DIR}/src/file/*.c
    1.10    ${SDL2_SOURCE_DIR}/src/libm/*.c
     2.1 --- a/VisualC/SDL/SDL_VS2008.vcproj	Sun Nov 24 23:56:17 2013 -0500
     2.2 +++ b/VisualC/SDL/SDL_VS2008.vcproj	Mon Dec 09 16:03:18 2013 -0500
     2.3 @@ -1225,6 +1225,22 @@
     2.4  			>
     2.5  		</File>
     2.6  		<File
     2.7 +			RelativePath="..\..\src\dynapi\SDL_dynapi.h"
     2.8 +			>
     2.9 +		</File>
    2.10 +		<File
    2.11 +			RelativePath="..\..\src\dynapi\SDL_dynapi_overrides.h"
    2.12 +			>
    2.13 +		</File>
    2.14 +		<File
    2.15 +			RelativePath="..\..\src\dynapi\SDL_dynapi_procs.h"
    2.16 +			>
    2.17 +		</File>
    2.18 +		<File
    2.19 +			RelativePath="..\..\src\dynapi\SDL_dynapi.c"
    2.20 +			>
    2.21 +		</File>
    2.22 +		<File
    2.23  			RelativePath="..\..\src\video\windows\SDL_windowsclipboard.c"
    2.24  			>
    2.25  		</File>
     3.1 --- a/VisualC/SDL/SDL_VS2010.vcxproj	Sun Nov 24 23:56:17 2013 -0500
     3.2 +++ b/VisualC/SDL/SDL_VS2010.vcxproj	Mon Dec 09 16:03:18 2013 -0500
     3.3 @@ -479,6 +479,9 @@
     3.4      <ClInclude Include="..\..\include\SDL_version.h" />
     3.5      <ClInclude Include="..\..\include\SDL_video.h" />
     3.6      <ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
     3.7 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
     3.8 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
     3.9 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
    3.10      <ClInclude Include="..\..\src\events\blank_cursor.h" />
    3.11      <ClInclude Include="..\..\src\events\default_cursor.h" />
    3.12      <ClInclude Include="..\..\src\audio\directsound\directx.h" />
    3.13 @@ -559,6 +562,7 @@
    3.14    </ItemGroup>
    3.15    <ItemGroup>
    3.16      <ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
    3.17 +    <ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
    3.18      <ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
    3.19      <ClCompile Include="..\..\src\events\SDL_gesture.c" />
    3.20      <ClCompile Include="..\..\src\events\SDL_touch.c" />
     4.1 --- a/VisualC/SDL/SDL_VS2012.vcxproj	Sun Nov 24 23:56:17 2013 -0500
     4.2 +++ b/VisualC/SDL/SDL_VS2012.vcxproj	Mon Dec 09 16:03:18 2013 -0500
     4.3 @@ -270,6 +270,9 @@
     4.4      <ClInclude Include="..\..\include\SDL_video.h" />
     4.5      <ClInclude Include="..\..\include\SDL_gamecontroller.h" />
     4.6      <ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
     4.7 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
     4.8 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
     4.9 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
    4.10      <ClInclude Include="..\..\src\events\blank_cursor.h" />
    4.11      <ClInclude Include="..\..\src\events\default_cursor.h" />
    4.12      <ClInclude Include="..\..\src\audio\directsound\directx.h" />
    4.13 @@ -350,6 +353,7 @@
    4.14    </ItemGroup>
    4.15    <ItemGroup>
    4.16      <ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
    4.17 +    <ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
    4.18      <ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
    4.19      <ClCompile Include="..\..\src\events\SDL_gesture.c" />
    4.20      <ClCompile Include="..\..\src\events\SDL_touch.c" />
     5.1 --- a/VisualC/SDL/SDL_VS2013.vcxproj	Sun Nov 24 23:56:17 2013 -0500
     5.2 +++ b/VisualC/SDL/SDL_VS2013.vcxproj	Mon Dec 09 16:03:18 2013 -0500
     5.3 @@ -273,6 +273,9 @@
     5.4      <ClInclude Include="..\..\include\SDL_video.h" />
     5.5      <ClInclude Include="..\..\include\SDL_gamecontroller.h" />
     5.6      <ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
     5.7 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
     5.8 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
     5.9 +    <ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
    5.10      <ClInclude Include="..\..\src\events\blank_cursor.h" />
    5.11      <ClInclude Include="..\..\src\events\default_cursor.h" />
    5.12      <ClInclude Include="..\..\src\audio\directsound\directx.h" />
    5.13 @@ -352,6 +355,7 @@
    5.14    </ItemGroup>
    5.15    <ItemGroup>
    5.16      <ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
    5.17 +    <ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
    5.18      <ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
    5.19      <ClCompile Include="..\..\src\events\SDL_gesture.c" />
    5.20      <ClCompile Include="..\..\src\events\SDL_touch.c" />
     6.1 --- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj	Sun Nov 24 23:56:17 2013 -0500
     6.2 +++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj	Mon Dec 09 16:03:18 2013 -0500
     6.3 @@ -67,6 +67,11 @@
     6.4  		04F7808512FB753F00FC43C0 /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */; };
     6.5  		04FFAB8B12E23B8D00BA343D /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
     6.6  		04FFAB8C12E23B8D00BA343D /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
     6.7 +		56A6702E18565E450007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; };
     6.8 +		56A6703518565E760007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */; };
     6.9 +		56A6703618565E760007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703218565E760007D20F /* SDL_dynapi_procs.h */; };
    6.10 +		56A6703718565E760007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6703318565E760007D20F /* SDL_dynapi.c */; };
    6.11 +		56A6703818565E760007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703418565E760007D20F /* SDL_dynapi.h */; };
    6.12  		56C181DF17C44D5E00406AE3 /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */; };
    6.13  		56C181E217C44D7A00406AE3 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */; };
    6.14  		56EA86FB13E9EC2B002E47EB /* SDL_coreaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.c */; };
    6.15 @@ -260,6 +265,11 @@
    6.16  		04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_nullframebuffer.c; sourceTree = "<group>"; };
    6.17  		04FFAB8912E23B8D00BA343D /* SDL_atomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_atomic.c; sourceTree = "<group>"; };
    6.18  		04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = "<group>"; };
    6.19 +		56A6702D18565E450007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_internal.h; path = ../../src/SDL_internal.h; sourceTree = "<group>"; };
    6.20 +		56A6703118565E760007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = "<group>"; };
    6.21 +		56A6703218565E760007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_procs.h; path = ../../src/dynapi/SDL_dynapi_procs.h; sourceTree = "<group>"; };
    6.22 +		56A6703318565E760007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = "<group>"; };
    6.23 +		56A6703418565E760007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = "<group>"; };
    6.24  		56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = "<group>"; };
    6.25  		56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = ../../src/filesystem/cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; };
    6.26  		56EA86F913E9EC2B002E47EB /* SDL_coreaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_coreaudio.c; path = coreaudio/SDL_coreaudio.c; sourceTree = "<group>"; };
    6.27 @@ -552,6 +562,17 @@
    6.28  			name = CustomTemplate;
    6.29  			sourceTree = "<group>";
    6.30  		};
    6.31 +		56A6702F18565E4F0007D20F /* dynapi */ = {
    6.32 +			isa = PBXGroup;
    6.33 +			children = (
    6.34 +				56A6703118565E760007D20F /* SDL_dynapi_overrides.h */,
    6.35 +				56A6703218565E760007D20F /* SDL_dynapi_procs.h */,
    6.36 +				56A6703318565E760007D20F /* SDL_dynapi.c */,
    6.37 +				56A6703418565E760007D20F /* SDL_dynapi.h */,
    6.38 +			);
    6.39 +			name = dynapi;
    6.40 +			sourceTree = "<group>";
    6.41 +		};
    6.42  		56C181E017C44D6900406AE3 /* filesystem */ = {
    6.43  			isa = PBXGroup;
    6.44  			children = (
    6.45 @@ -737,6 +758,7 @@
    6.46  				04B2ECEF1025CEB900F9BC5F /* atomic */,
    6.47  				FD99B8FB0DD52EDC00FB1D6B /* audio */,
    6.48  				FD99B98A0DD52EDC00FB1D6B /* cpuinfo */,
    6.49 +				56A6702F18565E4F0007D20F /* dynapi */,
    6.50  				FD99B98C0DD52EDC00FB1D6B /* events */,
    6.51  				FD99B99D0DD52EDC00FB1D6B /* file */,
    6.52  				56C181E017C44D6900406AE3 /* filesystem */,
    6.53 @@ -749,6 +771,7 @@
    6.54  				FD99B9E00DD52EDC00FB1D6B /* thread */,
    6.55  				FD99BA1E0DD52EDC00FB1D6B /* timer */,
    6.56  				FDA682420DF2374D00F98A1A /* video */,
    6.57 +				56A6702D18565E450007D20F /* SDL_internal.h */,
    6.58  				04F2AF551104ABD200D6DDF7 /* SDL_assert.c */,
    6.59  				04BAC09A1300C1290055DE28 /* SDL_assert_c.h */,
    6.60  				FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */,
    6.61 @@ -941,6 +964,7 @@
    6.62  				FDA684530DF2374E00F98A1A /* SDL_blit_auto.h in Headers */,
    6.63  				FDA684550DF2374E00F98A1A /* SDL_blit_copy.h in Headers */,
    6.64  				FDA6845D0DF2374E00F98A1A /* SDL_pixels_c.h in Headers */,
    6.65 +				56A6703618565E760007D20F /* SDL_dynapi_procs.h in Headers */,
    6.66  				FDA684630DF2374E00F98A1A /* SDL_RLEaccel_c.h in Headers */,
    6.67  				FDA684670DF2374E00F98A1A /* SDL_sysvideo.h in Headers */,
    6.68  				FDA685FC0DF244C800F98A1A /* SDL_nullevents_c.h in Headers */,
    6.69 @@ -953,7 +977,9 @@
    6.70  				FD689F200E26E5D900F90B21 /* SDL_uikitvideo.h in Headers */,
    6.71  				FD689F240E26E5D900F90B21 /* SDL_uikitwindow.h in Headers */,
    6.72  				FD689F260E26E5D900F90B21 /* SDL_uikitopenglview.h in Headers */,
    6.73 +				56A6703818565E760007D20F /* SDL_dynapi.h in Headers */,
    6.74  				FD689FCF0E26E9D400F90B21 /* SDL_uikitappdelegate.h in Headers */,
    6.75 +				56A6703518565E760007D20F /* SDL_dynapi_overrides.h in Headers */,
    6.76  				047677BD0EA76A31008ABAF1 /* SDL_syshaptic.h in Headers */,
    6.77  				046387420F0B5B7D0041FD65 /* SDL_blit_slow.h in Headers */,
    6.78  				006E9888119552DD001DE610 /* SDL_rwopsbundlesupport.h in Headers */,
    6.79 @@ -989,6 +1015,7 @@
    6.80  				AA7558A21595D55500BBD41B /* SDL_cpuinfo.h in Headers */,
    6.81  				AA7558A31595D55500BBD41B /* SDL_endian.h in Headers */,
    6.82  				AA7558A41595D55500BBD41B /* SDL_error.h in Headers */,
    6.83 +				56A6702E18565E450007D20F /* SDL_internal.h in Headers */,
    6.84  				AA7558A51595D55500BBD41B /* SDL_events.h in Headers */,
    6.85  				AA7558A61595D55500BBD41B /* SDL_gesture.h in Headers */,
    6.86  				AA7558A71595D55500BBD41B /* SDL_haptic.h in Headers */,
    6.87 @@ -1117,6 +1144,7 @@
    6.88  				FD6526700DE8FCDD002AD96B /* SDL_cpuinfo.c in Sources */,
    6.89  				FD6526710DE8FCDD002AD96B /* SDL_events.c in Sources */,
    6.90  				FD6526720DE8FCDD002AD96B /* SDL_keyboard.c in Sources */,
    6.91 +				56A6703718565E760007D20F /* SDL_dynapi.c in Sources */,
    6.92  				FD6526730DE8FCDD002AD96B /* SDL_mouse.c in Sources */,
    6.93  				FD6526740DE8FCDD002AD96B /* SDL_quit.c in Sources */,
    6.94  				FD6526750DE8FCDD002AD96B /* SDL_windowevents.c in Sources */,
     7.1 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Sun Nov 24 23:56:17 2013 -0500
     7.2 +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Mon Dec 09 16:03:18 2013 -0500
     7.3 @@ -393,6 +393,21 @@
     7.4  		566CDE90148F0AC200C5A9BB /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */; };
     7.5  		567E2F1C17C44BB2005F1892 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */; };
     7.6  		567E2F2117C44C35005F1892 /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 567E2F2017C44C35005F1892 /* SDL_filesystem.h */; settings = {ATTRIBUTES = (Public, ); }; };
     7.7 +		56A670091856545C0007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A670081856545C0007D20F /* SDL_internal.h */; };
     7.8 +		56A6700A1856545C0007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A670081856545C0007D20F /* SDL_internal.h */; };
     7.9 +		56A6700B1856545C0007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A670081856545C0007D20F /* SDL_internal.h */; };
    7.10 +		56A67021185654B40007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */; };
    7.11 +		56A67022185654B40007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */; };
    7.12 +		56A67023185654B40007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */; };
    7.13 +		56A67024185654B40007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6701E185654B40007D20F /* SDL_dynapi.c */; };
    7.14 +		56A67025185654B40007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6701E185654B40007D20F /* SDL_dynapi.c */; };
    7.15 +		56A67026185654B40007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6701E185654B40007D20F /* SDL_dynapi.c */; };
    7.16 +		56A67027185654B40007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701F185654B40007D20F /* SDL_dynapi.h */; };
    7.17 +		56A67028185654B40007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701F185654B40007D20F /* SDL_dynapi.h */; };
    7.18 +		56A67029185654B40007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701F185654B40007D20F /* SDL_dynapi.h */; };
    7.19 +		56A6702A185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
    7.20 +		56A6702B185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
    7.21 +		56A6702C185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
    7.22  		A77E6EB4167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; };
    7.23  		A77E6EB5167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; };
    7.24  		AA0AD09D16648D1700CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; };
    7.25 @@ -994,6 +1009,11 @@
    7.26  		566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dropevents.c; sourceTree = "<group>"; };
    7.27  		567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = ../../src/filesystem/cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; };
    7.28  		567E2F2017C44C35005F1892 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = "<group>"; };
    7.29 +		56A670081856545C0007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_internal.h; path = ../../src/SDL_internal.h; sourceTree = "<group>"; };
    7.30 +		56A6701D185654B40007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_procs.h; path = ../../src/dynapi/SDL_dynapi_procs.h; sourceTree = "<group>"; };
    7.31 +		56A6701E185654B40007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = "<group>"; };
    7.32 +		56A6701F185654B40007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = "<group>"; };
    7.33 +		56A67020185654B40007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = "<group>"; };
    7.34  		A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
    7.35  		AA0F8490178D5ECC00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = "<group>"; };
    7.36  		AA628AC8159367B7005138DD /* SDL_rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rotate.c; sourceTree = "<group>"; };
    7.37 @@ -1651,6 +1671,7 @@
    7.38  				04BDFD7312E6671700899322 /* atomic */,
    7.39  				04BDFD7612E6671700899322 /* audio */,
    7.40  				04BDFDD312E6671700899322 /* cpuinfo */,
    7.41 +				56A6701C1856549B0007D20F /* dynapi */,
    7.42  				04BDFDD512E6671700899322 /* events */,
    7.43  				567E2F1F17C44BBB005F1892 /* filesystem */,
    7.44  				04BDFDEC12E6671700899322 /* file */,
    7.45 @@ -1663,6 +1684,7 @@
    7.46  				04BDFE6412E6671800899322 /* thread */,
    7.47  				04BDFE9512E6671800899322 /* timer */,
    7.48  				04BDFEA712E6671800899322 /* video */,
    7.49 +				56A670081856545C0007D20F /* SDL_internal.h */,
    7.50  				04BDFE5512E6671700899322 /* SDL_assert_c.h */,
    7.51  				04BDFE5612E6671700899322 /* SDL_assert.c */,
    7.52  				04BDFE5812E6671700899322 /* SDL_error_c.h */,
    7.53 @@ -1682,6 +1704,17 @@
    7.54  			name = filesystem;
    7.55  			sourceTree = "<group>";
    7.56  		};
    7.57 +		56A6701C1856549B0007D20F /* dynapi */ = {
    7.58 +			isa = PBXGroup;
    7.59 +			children = (
    7.60 +				56A6701D185654B40007D20F /* SDL_dynapi_procs.h */,
    7.61 +				56A6701E185654B40007D20F /* SDL_dynapi.c */,
    7.62 +				56A6701F185654B40007D20F /* SDL_dynapi.h */,
    7.63 +				56A67020185654B40007D20F /* SDL_dynapi_overrides.h */,
    7.64 +			);
    7.65 +			name = dynapi;
    7.66 +			sourceTree = "<group>";
    7.67 +		};
    7.68  		BEC562FE0761C0E800A33029 /* Linked Frameworks */ = {
    7.69  			isa = PBXGroup;
    7.70  			children = (
    7.71 @@ -1747,6 +1780,7 @@
    7.72  				AA7558061595D4D800BBD41B /* SDL_clipboard.h in Headers */,
    7.73  				AA7558081595D4D800BBD41B /* SDL_config_macosx.h in Headers */,
    7.74  				AA75580A1595D4D800BBD41B /* SDL_config.h in Headers */,
    7.75 +				56A670091856545C0007D20F /* SDL_internal.h in Headers */,
    7.76  				AA75580C1595D4D800BBD41B /* SDL_copying.h in Headers */,
    7.77  				AA75580E1595D4D800BBD41B /* SDL_cpuinfo.h in Headers */,
    7.78  				AA7558101595D4D800BBD41B /* SDL_endian.h in Headers */,
    7.79 @@ -1805,6 +1839,7 @@
    7.80  				04BD004512E6671800899322 /* scancodes_linux.h in Headers */,
    7.81  				04BD004712E6671800899322 /* scancodes_xfree86.h in Headers */,
    7.82  				04BD004912E6671800899322 /* SDL_clipboardevents_c.h in Headers */,
    7.83 +				56A6702A185654B40007D20F /* SDL_dynapi_overrides.h in Headers */,
    7.84  				04BD004B12E6671800899322 /* SDL_events_c.h in Headers */,
    7.85  				04BD004D12E6671800899322 /* SDL_gesture_c.h in Headers */,
    7.86  				04BD004F12E6671800899322 /* SDL_keyboard_c.h in Headers */,
    7.87 @@ -1855,6 +1890,7 @@
    7.88  				04BD01EE12E6671800899322 /* SDL_x11opengles.h in Headers */,
    7.89  				04BD01F212E6671800899322 /* SDL_x11shape.h in Headers */,
    7.90  				04BD01F312E6671800899322 /* SDL_x11sym.h in Headers */,
    7.91 +				56A67021185654B40007D20F /* SDL_dynapi_procs.h in Headers */,
    7.92  				04BD01F512E6671800899322 /* SDL_x11touch.h in Headers */,
    7.93  				04BD01F712E6671800899322 /* SDL_x11video.h in Headers */,
    7.94  				04BD01F912E6671800899322 /* SDL_x11window.h in Headers */,
    7.95 @@ -1865,6 +1901,7 @@
    7.96  				04F7804A12FB74A200FC43C0 /* SDL_blendfillrect.h in Headers */,
    7.97  				04F7804C12FB74A200FC43C0 /* SDL_blendline.h in Headers */,
    7.98  				04F7804E12FB74A200FC43C0 /* SDL_blendpoint.h in Headers */,
    7.99 +				56A67027185654B40007D20F /* SDL_dynapi.h in Headers */,
   7.100  				04F7804F12FB74A200FC43C0 /* SDL_draw.h in Headers */,
   7.101  				04F7805112FB74A200FC43C0 /* SDL_drawline.h in Headers */,
   7.102  				04F7805312FB74A200FC43C0 /* SDL_drawpoint.h in Headers */,
   7.103 @@ -1917,6 +1954,7 @@
   7.104  				AA75582F1595D4D800BBD41B /* SDL_name.h in Headers */,
   7.105  				AA7558311595D4D800BBD41B /* SDL_opengl.h in Headers */,
   7.106  				AA7558331595D4D800BBD41B /* SDL_opengles.h in Headers */,
   7.107 +				56A67028185654B40007D20F /* SDL_dynapi.h in Headers */,
   7.108  				AA7558351595D4D800BBD41B /* SDL_opengles2.h in Headers */,
   7.109  				AA7558371595D4D800BBD41B /* SDL_pixels.h in Headers */,
   7.110  				AA7558391595D4D800BBD41B /* SDL_platform.h in Headers */,
   7.111 @@ -1928,6 +1966,7 @@
   7.112  				AA7558451595D4D800BBD41B /* SDL_rwops.h in Headers */,
   7.113  				AA7558471595D4D800BBD41B /* SDL_scancode.h in Headers */,
   7.114  				AA7558491595D4D800BBD41B /* SDL_shape.h in Headers */,
   7.115 +				56A6702B185654B40007D20F /* SDL_dynapi_overrides.h in Headers */,
   7.116  				AA75584B1595D4D800BBD41B /* SDL_stdinc.h in Headers */,
   7.117  				AA75584D1595D4D800BBD41B /* SDL_surface.h in Headers */,
   7.118  				AA75584F1595D4D800BBD41B /* SDL_system.h in Headers */,
   7.119 @@ -1939,6 +1978,7 @@
   7.120  				AA75585B1595D4D800BBD41B /* SDL_version.h in Headers */,
   7.121  				AA75585D1595D4D800BBD41B /* SDL_video.h in Headers */,
   7.122  				04BD022512E6671800899322 /* SDL_diskaudio.h in Headers */,
   7.123 +				56A6700A1856545C0007D20F /* SDL_internal.h in Headers */,
   7.124  				04BD022D12E6671800899322 /* SDL_dummyaudio.h in Headers */,
   7.125  				04BD023512E6671800899322 /* SDL_coreaudio.h in Headers */,
   7.126  				04BD024312E6671800899322 /* SDL_audio_c.h in Headers */,
   7.127 @@ -1953,6 +1993,7 @@
   7.128  				04BD026212E6671800899322 /* scancodes_xfree86.h in Headers */,
   7.129  				04BD026412E6671800899322 /* SDL_clipboardevents_c.h in Headers */,
   7.130  				04BD026612E6671800899322 /* SDL_events_c.h in Headers */,
   7.131 +				56A67022185654B40007D20F /* SDL_dynapi_procs.h in Headers */,
   7.132  				04BD026812E6671800899322 /* SDL_gesture_c.h in Headers */,
   7.133  				04BD026A12E6671800899322 /* SDL_keyboard_c.h in Headers */,
   7.134  				04BD026C12E6671800899322 /* SDL_mouse_c.h in Headers */,
   7.135 @@ -2063,6 +2104,7 @@
   7.136  				DB313FE117554B71006C0E22 /* SDL_name.h in Headers */,
   7.137  				DB313FE217554B71006C0E22 /* SDL_opengl.h in Headers */,
   7.138  				DB313FE317554B71006C0E22 /* SDL_opengles.h in Headers */,
   7.139 +				56A67029185654B40007D20F /* SDL_dynapi.h in Headers */,
   7.140  				DB313FE417554B71006C0E22 /* SDL_opengles2.h in Headers */,
   7.141  				DB313FE517554B71006C0E22 /* SDL_pixels.h in Headers */,
   7.142  				DB313FE617554B71006C0E22 /* SDL_platform.h in Headers */,
   7.143 @@ -2074,6 +2116,7 @@
   7.144  				DB313FEC17554B71006C0E22 /* SDL_rwops.h in Headers */,
   7.145  				DB313FED17554B71006C0E22 /* SDL_scancode.h in Headers */,
   7.146  				DB313FEE17554B71006C0E22 /* SDL_shape.h in Headers */,
   7.147 +				56A6702C185654B40007D20F /* SDL_dynapi_overrides.h in Headers */,
   7.148  				DB313FEF17554B71006C0E22 /* SDL_stdinc.h in Headers */,
   7.149  				DB313FF017554B71006C0E22 /* SDL_surface.h in Headers */,
   7.150  				DB313FF117554B71006C0E22 /* SDL_system.h in Headers */,
   7.151 @@ -2085,6 +2128,7 @@
   7.152  				DB313FF717554B71006C0E22 /* SDL_version.h in Headers */,
   7.153  				DB313FF817554B71006C0E22 /* SDL_video.h in Headers */,
   7.154  				DB313F7417554B71006C0E22 /* SDL_diskaudio.h in Headers */,
   7.155 +				56A6700B1856545C0007D20F /* SDL_internal.h in Headers */,
   7.156  				DB313F7517554B71006C0E22 /* SDL_dummyaudio.h in Headers */,
   7.157  				DB313F7617554B71006C0E22 /* SDL_coreaudio.h in Headers */,
   7.158  				DB313F7717554B71006C0E22 /* SDL_audio_c.h in Headers */,
   7.159 @@ -2099,6 +2143,7 @@
   7.160  				DB313F8017554B71006C0E22 /* scancodes_xfree86.h in Headers */,
   7.161  				DB313F8117554B71006C0E22 /* SDL_clipboardevents_c.h in Headers */,
   7.162  				DB313F8217554B71006C0E22 /* SDL_events_c.h in Headers */,
   7.163 +				56A67023185654B40007D20F /* SDL_dynapi_procs.h in Headers */,
   7.164  				DB313F8317554B71006C0E22 /* SDL_gesture_c.h in Headers */,
   7.165  				DB313F8417554B71006C0E22 /* SDL_keyboard_c.h in Headers */,
   7.166  				DB313F8517554B71006C0E22 /* SDL_mouse_c.h in Headers */,
   7.167 @@ -2442,6 +2487,7 @@
   7.168  				0442EC1D12FE1BCB004C9285 /* SDL_render_sw.c in Sources */,
   7.169  				0442EC5A12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */,
   7.170  				0442EC5F12FE1C75004C9285 /* SDL_hints.c in Sources */,
   7.171 +				56A67024185654B40007D20F /* SDL_dynapi.c in Sources */,
   7.172  				04BAC0C81300C2160055DE28 /* SDL_log.c in Sources */,
   7.173  				0435673E1303160F00BA5428 /* SDL_shaders_gl.c in Sources */,
   7.174  				566CDE90148F0AC200C5A9BB /* SDL_dropevents.c in Sources */,
   7.175 @@ -2560,6 +2606,7 @@
   7.176  				04F7805E12FB74A200FC43C0 /* SDL_drawpoint.c in Sources */,
   7.177  				0442EC1912FE1BBA004C9285 /* SDL_render_gl.c in Sources */,
   7.178  				0442EC1F12FE1BCB004C9285 /* SDL_render_sw.c in Sources */,
   7.179 +				56A67025185654B40007D20F /* SDL_dynapi.c in Sources */,
   7.180  				0442EC5C12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */,
   7.181  				0442EC6012FE1C75004C9285 /* SDL_hints.c in Sources */,
   7.182  				04BAC0C91300C2160055DE28 /* SDL_log.c in Sources */,
   7.183 @@ -2678,6 +2725,7 @@
   7.184  				DB31406017554B71006C0E22 /* SDL_drawpoint.c in Sources */,
   7.185  				DB31406117554B71006C0E22 /* SDL_render_gl.c in Sources */,
   7.186  				DB31406217554B71006C0E22 /* SDL_render_sw.c in Sources */,
   7.187 +				56A67026185654B40007D20F /* SDL_dynapi.c in Sources */,
   7.188  				DB31406317554B71006C0E22 /* SDL_x11framebuffer.c in Sources */,
   7.189  				DB31406417554B71006C0E22 /* SDL_hints.c in Sources */,
   7.190  				DB31406517554B71006C0E22 /* SDL_log.c in Sources */,
     8.1 --- a/configure.in	Sun Nov 24 23:56:17 2013 -0500
     8.2 +++ b/configure.in	Mon Dec 09 16:03:18 2013 -0500
     8.3 @@ -326,6 +326,7 @@
     8.4  SOURCES="$SOURCES $srcdir/src/atomic/*.c"
     8.5  SOURCES="$SOURCES $srcdir/src/audio/*.c"
     8.6  SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
     8.7 +SOURCES="$SOURCES $srcdir/src/dynapi/*.c"
     8.8  SOURCES="$SOURCES $srcdir/src/events/*.c"
     8.9  SOURCES="$SOURCES $srcdir/src/file/*.c"
    8.10  SOURCES="$SOURCES $srcdir/src/haptic/*.c"
     9.1 --- a/include/SDL_thread.h	Sun Nov 24 23:56:17 2013 -0500
     9.2 +++ b/include/SDL_thread.h	Mon Dec 09 16:03:18 2013 -0500
     9.3 @@ -111,7 +111,12 @@
     9.4  /**
     9.5   *  Create a thread.
     9.6   */
     9.7 +#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
     9.8 +#undef SDL_CreateThread
     9.9 +#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
    9.10 +#else
    9.11  #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
    9.12 +#endif
    9.13  
    9.14  #else
    9.15  
    10.1 --- a/premake/projects/SDL2.lua	Sun Nov 24 23:56:17 2013 -0500
    10.2 +++ b/premake/projects/SDL2.lua	Mon Dec 09 16:03:18 2013 -0500
    10.3 @@ -69,6 +69,7 @@
    10.4  		"/audio/disk/",
    10.5  		"/audio/dummy/",
    10.6  		"/cpuinfo/",
    10.7 +		"/dynapi/",
    10.8  		"/events/",
    10.9  		"/file/",
   10.10  		"/haptic/",
    11.1 --- a/src/SDL_internal.h	Sun Nov 24 23:56:17 2013 -0500
    11.2 +++ b/src/SDL_internal.h	Mon Dec 09 16:03:18 2013 -0500
    11.3 @@ -21,6 +21,16 @@
    11.4  #ifndef _SDL_internal_h
    11.5  #define _SDL_internal_h
    11.6  
    11.7 +#include "dynapi/SDL_dynapi.h"
    11.8 +
    11.9 +#if SDL_DYNAMIC_API
   11.10 +#include "dynapi/SDL_dynapi_overrides.h"
   11.11 +/* force DECLSPEC and SDLCALL off...it's all internal symbols now.
   11.12 +   These will have actual #defines during SDL_dynapi.c only */
   11.13 +#define DECLSPEC
   11.14 +#define SDLCALL
   11.15 +#endif
   11.16 +
   11.17  #include "SDL_config.h"
   11.18  
   11.19  #endif
    12.1 --- a/src/audio/SDL_audio.c	Sun Nov 24 23:56:17 2013 -0500
    12.2 +++ b/src/audio/SDL_audio.c	Mon Dec 09 16:03:18 2013 -0500
    12.3 @@ -1036,7 +1036,11 @@
    12.4  /* !!! FIXME: this is nasty. */
    12.5  #if defined(__WIN32__) && !defined(HAVE_LIBC)
    12.6  #undef SDL_CreateThread
    12.7 +#if SDL_DYNAMIC_API
    12.8 +        device->thread = SDL_CreateThread_REAL(SDL_RunAudio, name, device, NULL, NULL);
    12.9 +#else
   12.10          device->thread = SDL_CreateThread(SDL_RunAudio, name, device, NULL, NULL);
   12.11 +#endif
   12.12  #else
   12.13          device->thread = SDL_CreateThread(SDL_RunAudio, name, device);
   12.14  #endif
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/src/dynapi/SDL_dynapi.c	Mon Dec 09 16:03:18 2013 -0500
    13.3 @@ -0,0 +1,302 @@
    13.4 +/*
    13.5 +  Simple DirectMedia Layer
    13.6 +  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
    13.7 +
    13.8 +  This software is provided 'as-is', without any express or implied
    13.9 +  warranty.  In no event will the authors be held liable for any damages
   13.10 +  arising from the use of this software.
   13.11 +
   13.12 +  Permission is granted to anyone to use this software for any purpose,
   13.13 +  including commercial applications, and to alter it and redistribute it
   13.14 +  freely, subject to the following restrictions:
   13.15 +
   13.16 +  1. The origin of this software must not be misrepresented; you must not
   13.17 +     claim that you wrote the original software. If you use this software
   13.18 +     in a product, an acknowledgment in the product documentation would be
   13.19 +     appreciated but is not required.
   13.20 +  2. Altered source versions must be plainly marked as such, and must not be
   13.21 +     misrepresented as being the original software.
   13.22 +  3. This notice may not be removed or altered from any source distribution.
   13.23 +*/
   13.24 +
   13.25 +#include "SDL_config.h"
   13.26 +#include "SDL_dynapi.h"
   13.27 +
   13.28 +#if SDL_DYNAMIC_API
   13.29 +
   13.30 +#include "SDL.h"
   13.31 +
   13.32 +/* !!! FIXME: Shouldn't these be included in SDL.h? */
   13.33 +#include "SDL_shape.h"
   13.34 +#include "SDL_syswm.h"
   13.35 +
   13.36 +/* This is the version of the dynamic API. This doesn't match the SDL version
   13.37 +   and should not change until there's been a major revamp in API/ABI.
   13.38 +   So 2.0.5 adds functions over 2.0.4? This number doesn't change;
   13.39 +   the sizeof (jump_table) changes instead. But 2.1.0 changes how a function
   13.40 +   works in an incompatible way or removes a function? This number changes,
   13.41 +   since sizeof (jump_table) isn't sufficient anymore. It's likely
   13.42 +   we'll forget to bump every time we add a function, so this is the
   13.43 +   failsafe switch for major API change decisions. Respect it and use it
   13.44 +   sparingly. */
   13.45 +#define SDL_DYNAPI_VERSION 1
   13.46 +
   13.47 +static void SDL_InitDynamicAPI(void);
   13.48 +
   13.49 +
   13.50 +/* BE CAREFUL CALLING ANY SDL CODE IN HERE, IT WILL BLOW UP.
   13.51 +   Even self-contained stuff might call SDL_Error and break everything. */
   13.52 +
   13.53 +
   13.54 +/* behold, the macro salsa! */
   13.55 +
   13.56 +/* !!! FIXME: ...disabled...until we write it.  :) */
   13.57 +#define DISABLE_JUMP_MAGIC 1
   13.58 +
   13.59 +#if DISABLE_JUMP_MAGIC
   13.60 +/* Can't use the macro for varargs nonsense. This is atrocious. */
   13.61 +#define SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, logname, prio) \
   13.62 +    _static void SDL_Log##logname##name(int category, const char *fmt, ...) { \
   13.63 +        va_list ap; initcall; va_start(ap, fmt); \
   13.64 +        jump_table.SDL_LogMessageV(category, SDL_LOG_PRIORITY_##prio, fmt, ap); \
   13.65 +        va_end(ap); \
   13.66 +    }
   13.67 +
   13.68 +#define SDL_DYNAPI_VARARGS(_static, name, initcall) \
   13.69 +    _static int SDL_SetError##name(const char *fmt, ...) { \
   13.70 +        char buf[512]; /* !!! FIXME: dynamic allocation */ \
   13.71 +        va_list ap; initcall; va_start(ap, fmt); \
   13.72 +        jump_table.SDL_vsnprintf(buf, sizeof (buf), fmt, ap); \
   13.73 +        va_end(ap); \
   13.74 +        return jump_table.SDL_SetError("%s", buf); \
   13.75 +    } \
   13.76 +    _static int SDL_sscanf##name(const char *buf, const char *fmt, ...) { \
   13.77 +        int retval; va_list ap; initcall; va_start(ap, fmt); \
   13.78 +        retval = jump_table.SDL_vsscanf(buf, fmt, ap); \
   13.79 +        va_end(ap); \
   13.80 +        return retval; \
   13.81 +    } \
   13.82 +    _static int SDL_snprintf##name(char *buf, size_t buflen, const char *fmt, ...) { \
   13.83 +        int retval; va_list ap; initcall; va_start(ap, fmt); \
   13.84 +        retval = jump_table.SDL_vsnprintf(buf, buflen, fmt, ap); \
   13.85 +        va_end(ap); \
   13.86 +        return retval; \
   13.87 +    } \
   13.88 +    _static void SDL_Log##name(const char *fmt, ...) { \
   13.89 +        va_list ap; initcall; va_start(ap, fmt); \
   13.90 +        jump_table.SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); \
   13.91 +        va_end(ap); \
   13.92 +    } \
   13.93 +    _static void SDL_LogMessage##name(int category, SDL_LogPriority priority, const char *fmt, ...) { \
   13.94 +        va_list ap; initcall; va_start(ap, fmt); \
   13.95 +        jump_table.SDL_LogMessageV(category, priority, fmt, ap); \
   13.96 +        va_end(ap); \
   13.97 +    } \
   13.98 +    SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Verbose, VERBOSE) \
   13.99 +    SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Debug, DEBUG) \
  13.100 +    SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Info, INFO) \
  13.101 +    SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Warn, WARN) \
  13.102 +    SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Error, ERROR) \
  13.103 +    SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Critical, CRITICAL)
  13.104 +#endif
  13.105 +
  13.106 +
  13.107 +/* Typedefs for function pointers for jump table, and predeclare funcs */
  13.108 +/* The DEFAULT funcs will init jump table and then call real function. */
  13.109 +/* The REAL funcs are the actual functions, name-mangled to not clash. */
  13.110 +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \
  13.111 +    typedef rc (*SDL_DYNAPIFN_##fn) params; \
  13.112 +    static rc fn##_DEFAULT params; \
  13.113 +    extern rc fn##_REAL params;
  13.114 +#include "SDL_dynapi_procs.h"
  13.115 +#undef SDL_DYNAPI_PROC
  13.116 +
  13.117 +/* The jump table! */
  13.118 +typedef struct {
  13.119 +    #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) SDL_DYNAPIFN_##fn fn;
  13.120 +    #include "SDL_dynapi_procs.h"
  13.121 +    #undef SDL_DYNAPI_PROC
  13.122 +} SDL_DYNAPI_jump_table;
  13.123 +
  13.124 +/* Predeclare the default functions for initializing the jump table. */
  13.125 +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) static rc fn##_DEFAULT params;
  13.126 +#include "SDL_dynapi_procs.h"
  13.127 +#undef SDL_DYNAPI_PROC
  13.128 +
  13.129 +/* The actual jump table. */
  13.130 +static SDL_DYNAPI_jump_table jump_table = {
  13.131 +    #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) fn##_DEFAULT,
  13.132 +    #include "SDL_dynapi_procs.h"
  13.133 +    #undef SDL_DYNAPI_PROC
  13.134 +};
  13.135 +
  13.136 +/* Default functions init the function table then call right thing. */
  13.137 +#if DISABLE_JUMP_MAGIC
  13.138 +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \
  13.139 +    static rc fn##_DEFAULT params { \
  13.140 +        SDL_InitDynamicAPI(); \
  13.141 +        ret jump_table.fn args; \
  13.142 +    }
  13.143 +#define SDL_DYNAPI_PROC_NO_VARARGS 1
  13.144 +#include "SDL_dynapi_procs.h"
  13.145 +#undef SDL_DYNAPI_PROC
  13.146 +#undef SDL_DYNAPI_PROC_NO_VARARGS
  13.147 +SDL_DYNAPI_VARARGS(static, _DEFAULT, SDL_InitDynamicAPI())
  13.148 +#else
  13.149 +/* !!! FIXME: need the jump magic. */
  13.150 +#error Write me.
  13.151 +#endif
  13.152 +
  13.153 +/* Public API functions to jump into the jump table. */
  13.154 +#if DISABLE_JUMP_MAGIC
  13.155 +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \
  13.156 +    rc fn params { ret jump_table.fn args; }
  13.157 +#define SDL_DYNAPI_PROC_NO_VARARGS 1
  13.158 +#include "SDL_dynapi_procs.h"
  13.159 +#undef SDL_DYNAPI_PROC
  13.160 +#undef SDL_DYNAPI_PROC_NO_VARARGS
  13.161 +SDL_DYNAPI_VARARGS(,,)
  13.162 +#else
  13.163 +/* !!! FIXME: need the jump magic. */
  13.164 +#error Write me.
  13.165 +#endif
  13.166 +
  13.167 +
  13.168 +
  13.169 +/* Here's the exported entry point that fills in the jump table. */
  13.170 +/*  Use specific types when an "int" might suffice to keep this sane. */
  13.171 +typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize);
  13.172 +extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32);
  13.173 +
  13.174 +Sint32
  13.175 +SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
  13.176 +{
  13.177 +    SDL_DYNAPI_jump_table *output_jump_table = (SDL_DYNAPI_jump_table *) table;
  13.178 +
  13.179 +    if (apiver != SDL_DYNAPI_VERSION) {
  13.180 +        /* !!! FIXME: can maybe handle older versions? */
  13.181 +        return -1;  /* not compatible. */
  13.182 +    } else if (tablesize > sizeof (jump_table)) {
  13.183 +        return -1;  /* newer version of SDL with functions we can't provide. */
  13.184 +    }
  13.185 +
  13.186 +    /* Init our jump table first. */
  13.187 +    #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) jump_table.fn = fn##_REAL;
  13.188 +    #include "SDL_dynapi_procs.h"
  13.189 +    #undef SDL_DYNAPI_PROC
  13.190 +
  13.191 +    /* Then the external table... */
  13.192 +    if (output_jump_table != &jump_table) {
  13.193 +        jump_table.SDL_memcpy(output_jump_table, &jump_table, tablesize);
  13.194 +    }
  13.195 +
  13.196 +    /* Safe to call SDL functions now; jump table is initialized! */
  13.197 +
  13.198 +    return 0;  /* success! */
  13.199 +}
  13.200 +
  13.201 +
  13.202 +/* Obviously we can't use SDL_LoadObject() to load SDL.  :)  */
  13.203 +/* Also obviously, we never close the loaded library. */
  13.204 +#if defined(_WINDOWS)
  13.205 +#ifndef WIN32_LEAN_AND_MEAN
  13.206 +#define WIN32_LEAN_AND_MEAN 1
  13.207 +#endif
  13.208 +#include <windows.h>
  13.209 +static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
  13.210 +{
  13.211 +    HANDLE lib = LoadLibraryA(fname);
  13.212 +    return lib ? GetProcAddress(lib, sym) : NULL;
  13.213 +}
  13.214 +
  13.215 +#elif defined(__HAIKU__)
  13.216 +#include <os/kernel/image.h>
  13.217 +static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
  13.218 +{
  13.219 +    image_id lib = load_add_on(fname);
  13.220 +    void *retval = NULL;
  13.221 +    if ((lib < 0) || (get_image_symbol(lib, sym, B_SYMBOL_TYPE_TEXT, &retval) != B_NO_ERROR)) {
  13.222 +        retval = NULL;
  13.223 +    }
  13.224 +    return retval;
  13.225 +}
  13.226 +#elif defined(unix) || defined(__APPLE__)
  13.227 +#include <dlfcn.h>
  13.228 +static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
  13.229 +{
  13.230 +    void *lib = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
  13.231 +    return lib ? dlsym(lib, sym) : NULL;
  13.232 +}
  13.233 +#else
  13.234 +#error Please define your platform.
  13.235 +#endif
  13.236 +
  13.237 +
  13.238 +static void
  13.239 +SDL_InitDynamicAPILocked(void)
  13.240 +{
  13.241 +    const char *libname = SDL_getenv_REAL("SDL_DYNAMIC_API");
  13.242 +    SDL_DYNAPI_ENTRYFN entry = SDL_DYNAPI_entry;  /* funcs from here by default. */
  13.243 +
  13.244 +    if (libname) {
  13.245 +        entry = (SDL_DYNAPI_ENTRYFN) get_sdlapi_entry(libname, "SDL_DYNAPI_entry");
  13.246 +        if (!entry) {
  13.247 +            /* !!! FIXME: fail to startup here instead? */
  13.248 +            /* !!! FIXME: definitely warn user. */
  13.249 +            /* Just fill in the function pointers from this library. */
  13.250 +            entry = SDL_DYNAPI_entry;
  13.251 +        }
  13.252 +    }
  13.253 +
  13.254 +    if (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0) {
  13.255 +        /* !!! FIXME: fail to startup here instead? */
  13.256 +        /* !!! FIXME: definitely warn user. */
  13.257 +        /* Just fill in the function pointers from this library. */
  13.258 +        if (entry != SDL_DYNAPI_entry) {
  13.259 +            if (!SDL_DYNAPI_entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) {
  13.260 +                /* !!! FIXME: now we're screwed. Should definitely abort now. */
  13.261 +            }
  13.262 +        }
  13.263 +    }
  13.264 +
  13.265 +    /* we intentionally never close the newly-loaded lib, of course. */
  13.266 +}
  13.267 +
  13.268 +static void
  13.269 +SDL_InitDynamicAPI(void)
  13.270 +{
  13.271 +    /* So the theory is that every function in the jump table defaults to
  13.272 +     *  calling this function, and then replaces itself with a version that
  13.273 +     *  doesn't call this function anymore. But it's possible that, in an
  13.274 +     *  extreme corner case, you can have a second thread hit this function
  13.275 +     *  while the jump table is being initialized by the first.
  13.276 +     * In this case, a spinlock is really painful compared to what spinlocks
  13.277 +     *  _should_ be used for, but this would only happen once, and should be
  13.278 +     *  insanely rare, as you would have to spin a thread outside of SDL (as
  13.279 +     *  SDL_CreateThread() would also call this function before building the
  13.280 +     *  new thread).
  13.281 +     */
  13.282 +    static volatile SDL_bool already_initialized = SDL_FALSE;
  13.283 +
  13.284 +    /* SDL_AtomicLock calls SDL mutex functions to emulate if
  13.285 +       SDL_ATOMIC_DISABLED, which we can't do here, so in such a
  13.286 +       configuration, you're on your own. */
  13.287 +    #if !SDL_ATOMIC_DISABLED
  13.288 +    static SDL_SpinLock lock = 0;
  13.289 +    SDL_AtomicLock_REAL(&lock);
  13.290 +    #endif
  13.291 +
  13.292 +    if (!already_initialized) {
  13.293 +        SDL_InitDynamicAPILocked();
  13.294 +        already_initialized = SDL_TRUE;
  13.295 +    }
  13.296 +
  13.297 +    #if !SDL_ATOMIC_DISABLED
  13.298 +    SDL_AtomicUnlock_REAL(&lock);
  13.299 +    #endif
  13.300 +}
  13.301 +
  13.302 +#endif  /* SDL_DYNAMIC_API */
  13.303 +
  13.304 +/* vi: set ts=4 sw=4 expandtab: */
  13.305 +
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/src/dynapi/SDL_dynapi.h	Mon Dec 09 16:03:18 2013 -0500
    14.3 @@ -0,0 +1,50 @@
    14.4 +/*
    14.5 +  Simple DirectMedia Layer
    14.6 +  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
    14.7 +
    14.8 +  This software is provided 'as-is', without any express or implied
    14.9 +  warranty.  In no event will the authors be held liable for any damages
   14.10 +  arising from the use of this software.
   14.11 +
   14.12 +  Permission is granted to anyone to use this software for any purpose,
   14.13 +  including commercial applications, and to alter it and redistribute it
   14.14 +  freely, subject to the following restrictions:
   14.15 +
   14.16 +  1. The origin of this software must not be misrepresented; you must not
   14.17 +     claim that you wrote the original software. If you use this software
   14.18 +     in a product, an acknowledgment in the product documentation would be
   14.19 +     appreciated but is not required.
   14.20 +  2. Altered source versions must be plainly marked as such, and must not be
   14.21 +     misrepresented as being the original software.
   14.22 +  3. This notice may not be removed or altered from any source distribution.
   14.23 +*/
   14.24 +
   14.25 +#ifndef _SDL_dynapi_h
   14.26 +#define _SDL_dynapi_h
   14.27 +
   14.28 +/* IMPORTANT:
   14.29 +   This is the master switch to disabling the dynamic API. We made it so you
   14.30 +   have to hand-edit an internal source file in SDL to turn it off; you
   14.31 +   can do it if you want it badly enough, but hopefully you won't want to.
   14.32 +   You should understand the ramifications of turning this off: it makes it
   14.33 +   hard to update your SDL in the field, and impossible if you've statically
   14.34 +   linked SDL into your app. Understand that platforms change, and if we can't
   14.35 +   drop in an updated SDL, your application can definitely break some time
   14.36 +   in the future, even if it's fine today.
   14.37 +   To be sure, as new system-level video and audio APIs are introduced, an
   14.38 +   updated SDL can transparently take advantage of them, but your program will
   14.39 +   not without this feature. Think hard before turning it off.
   14.40 +*/
   14.41 +#ifdef SDL_DYNAMIC_API  /* Tried to force it on the command line? */
   14.42 +#error Nope, you have to edit this file to force this off.
   14.43 +#endif
   14.44 +
   14.45 +#if defined(__APPLE__) && TARGET_OS_IPHONE  /* probably not useful on iOS. */
   14.46 +#define SDL_DYNAMIC_API 0
   14.47 +#else   /* everyone else. */
   14.48 +#define SDL_DYNAMIC_API 1
   14.49 +#endif
   14.50 +
   14.51 +#endif
   14.52 +
   14.53 +/* vi: set ts=4 sw=4 expandtab: */
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/src/dynapi/SDL_dynapi_overrides.h	Mon Dec 09 16:03:18 2013 -0500
    15.3 @@ -0,0 +1,571 @@
    15.4 +/*
    15.5 +  Simple DirectMedia Layer
    15.6 +  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
    15.7 +
    15.8 +  This software is provided 'as-is', without any express or implied
    15.9 +  warranty.  In no event will the authors be held liable for any damages
   15.10 +  arising from the use of this software.
   15.11 +
   15.12 +  Permission is granted to anyone to use this software for any purpose,
   15.13 +  including commercial applications, and to alter it and redistribute it
   15.14 +  freely, subject to the following restrictions:
   15.15 +
   15.16 +  1. The origin of this software must not be misrepresented; you must not
   15.17 +     claim that you wrote the original software. If you use this software
   15.18 +     in a product, an acknowledgment in the product documentation would be
   15.19 +     appreciated but is not required.
   15.20 +  2. Altered source versions must be plainly marked as such, and must not be
   15.21 +     misrepresented as being the original software.
   15.22 +  3. This notice may not be removed or altered from any source distribution.
   15.23 +*/
   15.24 +
   15.25 +/* vi: set ts=4 sw=4 expandtab: */
   15.26 +
   15.27 +/* DO NOT EDIT THIS FILE BY HAND. It is autogenerated by gendynapi.pl. */
   15.28 +
   15.29 +#if !SDL_DYNAMIC_API
   15.30 +#error You should not be here.
   15.31 +#endif
   15.32 +
   15.33 +/* so annoying. */
   15.34 +#if defined(__thumb__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__))
   15.35 +#define SDL_MemoryBarrierRelease SDL_MemoryBarrierRelease_REAL
   15.36 +#define SDL_MemoryBarrierAcquire SDL_MemoryBarrierAcquire_REAL
   15.37 +#endif
   15.38 +
   15.39 +#define SDL_SetError SDL_SetError_REAL
   15.40 +#define SDL_Log SDL_Log_REAL
   15.41 +#define SDL_LogVerbose SDL_LogVerbose_REAL
   15.42 +#define SDL_LogDebug SDL_LogDebug_REAL
   15.43 +#define SDL_LogInfo SDL_LogInfo_REAL
   15.44 +#define SDL_LogWarn SDL_LogWarn_REAL
   15.45 +#define SDL_LogError SDL_LogError_REAL
   15.46 +#define SDL_LogCritical SDL_LogCritical_REAL
   15.47 +#define SDL_LogMessage SDL_LogMessage_REAL
   15.48 +#define SDL_sscanf SDL_sscanf_REAL
   15.49 +#define SDL_snprintf SDL_snprintf_REAL
   15.50 +#define SDL_CreateThread SDL_CreateThread_REAL
   15.51 +#define SDL_RWFromFP SDL_RWFromFP_REAL
   15.52 +#define SDL_RegisterApp SDL_RegisterApp_REAL
   15.53 +#define SDL_UnregisterApp SDL_UnregisterApp_REAL
   15.54 +#define SDL_Direct3D9GetAdapterIndex SDL_Direct3D9GetAdapterIndex_REAL
   15.55 +#define SDL_RenderGetD3D9Device SDL_RenderGetD3D9Device_REAL
   15.56 +#define SDL_iPhoneSetAnimationCallback SDL_iPhoneSetAnimationCallback_REAL
   15.57 +#define SDL_iPhoneSetEventPump SDL_iPhoneSetEventPump_REAL
   15.58 +#define SDL_AndroidGetJNIEnv SDL_AndroidGetJNIEnv_REAL
   15.59 +#define SDL_AndroidGetActivity SDL_AndroidGetActivity_REAL
   15.60 +#define SDL_AndroidGetInternalStoragePath SDL_AndroidGetInternalStoragePath_REAL
   15.61 +#define SDL_AndroidGetExternalStorageState SDL_AndroidGetExternalStorageState_REAL
   15.62 +#define SDL_AndroidGetExternalStoragePath SDL_AndroidGetExternalStoragePath_REAL
   15.63 +#define SDL_Init SDL_Init_REAL
   15.64 +#define SDL_InitSubSystem SDL_InitSubSystem_REAL
   15.65 +#define SDL_QuitSubSystem SDL_QuitSubSystem_REAL
   15.66 +#define SDL_WasInit SDL_WasInit_REAL
   15.67 +#define SDL_Quit SDL_Quit_REAL
   15.68 +#define SDL_ReportAssertion SDL_ReportAssertion_REAL
   15.69 +#define SDL_SetAssertionHandler SDL_SetAssertionHandler_REAL
   15.70 +#define SDL_GetAssertionReport SDL_GetAssertionReport_REAL
   15.71 +#define SDL_ResetAssertionReport SDL_ResetAssertionReport_REAL
   15.72 +#define SDL_AtomicTryLock SDL_AtomicTryLock_REAL
   15.73 +#define SDL_AtomicLock SDL_AtomicLock_REAL
   15.74 +#define SDL_AtomicUnlock SDL_AtomicUnlock_REAL
   15.75 +#define SDL_AtomicCAS SDL_AtomicCAS_REAL
   15.76 +#define SDL_AtomicSet SDL_AtomicSet_REAL
   15.77 +#define SDL_AtomicGet SDL_AtomicGet_REAL
   15.78 +#define SDL_AtomicAdd SDL_AtomicAdd_REAL
   15.79 +#define SDL_AtomicCASPtr SDL_AtomicCASPtr_REAL
   15.80 +#define SDL_AtomicSetPtr SDL_AtomicSetPtr_REAL
   15.81 +#define SDL_AtomicGetPtr SDL_AtomicGetPtr_REAL
   15.82 +#define SDL_GetNumAudioDrivers SDL_GetNumAudioDrivers_REAL
   15.83 +#define SDL_GetAudioDriver SDL_GetAudioDriver_REAL
   15.84 +#define SDL_AudioInit SDL_AudioInit_REAL
   15.85 +#define SDL_AudioQuit SDL_AudioQuit_REAL
   15.86 +#define SDL_GetCurrentAudioDriver SDL_GetCurrentAudioDriver_REAL
   15.87 +#define SDL_OpenAudio SDL_OpenAudio_REAL
   15.88 +#define SDL_GetNumAudioDevices SDL_GetNumAudioDevices_REAL
   15.89 +#define SDL_GetAudioDeviceName SDL_GetAudioDeviceName_REAL
   15.90 +#define SDL_OpenAudioDevice SDL_OpenAudioDevice_REAL
   15.91 +#define SDL_GetAudioStatus SDL_GetAudioStatus_REAL
   15.92 +#define SDL_GetAudioDeviceStatus SDL_GetAudioDeviceStatus_REAL
   15.93 +#define SDL_PauseAudio SDL_PauseAudio_REAL
   15.94 +#define SDL_PauseAudioDevice SDL_PauseAudioDevice_REAL
   15.95 +#define SDL_LoadWAV_RW SDL_LoadWAV_RW_REAL
   15.96 +#define SDL_FreeWAV SDL_FreeWAV_REAL
   15.97 +#define SDL_BuildAudioCVT SDL_BuildAudioCVT_REAL
   15.98 +#define SDL_ConvertAudio SDL_ConvertAudio_REAL
   15.99 +#define SDL_MixAudio SDL_MixAudio_REAL
  15.100 +#define SDL_MixAudioFormat SDL_MixAudioFormat_REAL
  15.101 +#define SDL_LockAudio SDL_LockAudio_REAL
  15.102 +#define SDL_LockAudioDevice SDL_LockAudioDevice_REAL
  15.103 +#define SDL_UnlockAudio SDL_UnlockAudio_REAL
  15.104 +#define SDL_UnlockAudioDevice SDL_UnlockAudioDevice_REAL
  15.105 +#define SDL_CloseAudio SDL_CloseAudio_REAL
  15.106 +#define SDL_CloseAudioDevice SDL_CloseAudioDevice_REAL
  15.107 +#define SDL_SetClipboardText SDL_SetClipboardText_REAL
  15.108 +#define SDL_GetClipboardText SDL_GetClipboardText_REAL
  15.109 +#define SDL_HasClipboardText SDL_HasClipboardText_REAL
  15.110 +#define SDL_GetCPUCount SDL_GetCPUCount_REAL
  15.111 +#define SDL_GetCPUCacheLineSize SDL_GetCPUCacheLineSize_REAL
  15.112 +#define SDL_HasRDTSC SDL_HasRDTSC_REAL
  15.113 +#define SDL_HasAltiVec SDL_HasAltiVec_REAL
  15.114 +#define SDL_HasMMX SDL_HasMMX_REAL
  15.115 +#define SDL_Has3DNow SDL_Has3DNow_REAL
  15.116 +#define SDL_HasSSE SDL_HasSSE_REAL
  15.117 +#define SDL_HasSSE2 SDL_HasSSE2_REAL
  15.118 +#define SDL_HasSSE3 SDL_HasSSE3_REAL
  15.119 +#define SDL_HasSSE41 SDL_HasSSE41_REAL
  15.120 +#define SDL_HasSSE42 SDL_HasSSE42_REAL
  15.121 +#define SDL_GetSystemRAM SDL_GetSystemRAM_REAL
  15.122 +#define SDL_GetError SDL_GetError_REAL
  15.123 +#define SDL_ClearError SDL_ClearError_REAL
  15.124 +#define SDL_Error SDL_Error_REAL
  15.125 +#define SDL_PumpEvents SDL_PumpEvents_REAL
  15.126 +#define SDL_PeepEvents SDL_PeepEvents_REAL
  15.127 +#define SDL_HasEvent SDL_HasEvent_REAL
  15.128 +#define SDL_HasEvents SDL_HasEvents_REAL
  15.129 +#define SDL_FlushEvent SDL_FlushEvent_REAL
  15.130 +#define SDL_FlushEvents SDL_FlushEvents_REAL
  15.131 +#define SDL_PollEvent SDL_PollEvent_REAL
  15.132 +#define SDL_WaitEvent SDL_WaitEvent_REAL
  15.133 +#define SDL_WaitEventTimeout SDL_WaitEventTimeout_REAL
  15.134 +#define SDL_PushEvent SDL_PushEvent_REAL
  15.135 +#define SDL_SetEventFilter SDL_SetEventFilter_REAL
  15.136 +#define SDL_GetEventFilter SDL_GetEventFilter_REAL
  15.137 +#define SDL_AddEventWatch SDL_AddEventWatch_REAL
  15.138 +#define SDL_DelEventWatch SDL_DelEventWatch_REAL
  15.139 +#define SDL_FilterEvents SDL_FilterEvents_REAL
  15.140 +#define SDL_EventState SDL_EventState_REAL
  15.141 +#define SDL_RegisterEvents SDL_RegisterEvents_REAL
  15.142 +#define SDL_GetBasePath SDL_GetBasePath_REAL
  15.143 +#define SDL_GetPrefPath SDL_GetPrefPath_REAL
  15.144 +#define SDL_GameControllerAddMapping SDL_GameControllerAddMapping_REAL
  15.145 +#define SDL_GameControllerMappingForGUID SDL_GameControllerMappingForGUID_REAL
  15.146 +#define SDL_GameControllerMapping SDL_GameControllerMapping_REAL
  15.147 +#define SDL_IsGameController SDL_IsGameController_REAL
  15.148 +#define SDL_GameControllerNameForIndex SDL_GameControllerNameForIndex_REAL
  15.149 +#define SDL_GameControllerOpen SDL_GameControllerOpen_REAL
  15.150 +#define SDL_GameControllerName SDL_GameControllerName_REAL
  15.151 +#define SDL_GameControllerGetAttached SDL_GameControllerGetAttached_REAL
  15.152 +#define SDL_GameControllerGetJoystick SDL_GameControllerGetJoystick_REAL
  15.153 +#define SDL_GameControllerEventState SDL_GameControllerEventState_REAL
  15.154 +#define SDL_GameControllerUpdate SDL_GameControllerUpdate_REAL
  15.155 +#define SDL_GameControllerGetAxisFromString SDL_GameControllerGetAxisFromString_REAL
  15.156 +#define SDL_GameControllerGetStringForAxis SDL_GameControllerGetStringForAxis_REAL
  15.157 +#define SDL_GameControllerGetBindForAxis SDL_GameControllerGetBindForAxis_REAL
  15.158 +#define SDL_GameControllerGetAxis SDL_GameControllerGetAxis_REAL
  15.159 +#define SDL_GameControllerGetButtonFromString SDL_GameControllerGetButtonFromString_REAL
  15.160 +#define SDL_GameControllerGetStringForButton SDL_GameControllerGetStringForButton_REAL
  15.161 +#define SDL_GameControllerGetBindForButton SDL_GameControllerGetBindForButton_REAL
  15.162 +#define SDL_GameControllerGetButton SDL_GameControllerGetButton_REAL
  15.163 +#define SDL_GameControllerClose SDL_GameControllerClose_REAL
  15.164 +#define SDL_RecordGesture SDL_RecordGesture_REAL
  15.165 +#define SDL_SaveAllDollarTemplates SDL_SaveAllDollarTemplates_REAL
  15.166 +#define SDL_SaveDollarTemplate SDL_SaveDollarTemplate_REAL
  15.167 +#define SDL_LoadDollarTemplates SDL_LoadDollarTemplates_REAL
  15.168 +#define SDL_NumHaptics SDL_NumHaptics_REAL
  15.169 +#define SDL_HapticName SDL_HapticName_REAL
  15.170 +#define SDL_HapticOpen SDL_HapticOpen_REAL
  15.171 +#define SDL_HapticOpened SDL_HapticOpened_REAL
  15.172 +#define SDL_HapticIndex SDL_HapticIndex_REAL
  15.173 +#define SDL_MouseIsHaptic SDL_MouseIsHaptic_REAL
  15.174 +#define SDL_HapticOpenFromMouse SDL_HapticOpenFromMouse_REAL
  15.175 +#define SDL_JoystickIsHaptic SDL_JoystickIsHaptic_REAL
  15.176 +#define SDL_HapticOpenFromJoystick SDL_HapticOpenFromJoystick_REAL
  15.177 +#define SDL_HapticClose SDL_HapticClose_REAL
  15.178 +#define SDL_HapticNumEffects SDL_HapticNumEffects_REAL
  15.179 +#define SDL_HapticNumEffectsPlaying SDL_HapticNumEffectsPlaying_REAL
  15.180 +#define SDL_HapticQuery SDL_HapticQuery_REAL
  15.181 +#define SDL_HapticNumAxes SDL_HapticNumAxes_REAL
  15.182 +#define SDL_HapticEffectSupported SDL_HapticEffectSupported_REAL
  15.183 +#define SDL_HapticNewEffect SDL_HapticNewEffect_REAL
  15.184 +#define SDL_HapticUpdateEffect SDL_HapticUpdateEffect_REAL
  15.185 +#define SDL_HapticRunEffect SDL_HapticRunEffect_REAL
  15.186 +#define SDL_HapticStopEffect SDL_HapticStopEffect_REAL
  15.187 +#define SDL_HapticDestroyEffect SDL_HapticDestroyEffect_REAL
  15.188 +#define SDL_HapticGetEffectStatus SDL_HapticGetEffectStatus_REAL
  15.189 +#define SDL_HapticSetGain SDL_HapticSetGain_REAL
  15.190 +#define SDL_HapticSetAutocenter SDL_HapticSetAutocenter_REAL
  15.191 +#define SDL_HapticPause SDL_HapticPause_REAL
  15.192 +#define SDL_HapticUnpause SDL_HapticUnpause_REAL
  15.193 +#define SDL_HapticStopAll SDL_HapticStopAll_REAL
  15.194 +#define SDL_HapticRumbleSupported SDL_HapticRumbleSupported_REAL
  15.195 +#define SDL_HapticRumbleInit SDL_HapticRumbleInit_REAL
  15.196 +#define SDL_HapticRumblePlay SDL_HapticRumblePlay_REAL
  15.197 +#define SDL_HapticRumbleStop SDL_HapticRumbleStop_REAL
  15.198 +#define SDL_SetHintWithPriority SDL_SetHintWithPriority_REAL
  15.199 +#define SDL_SetHint SDL_SetHint_REAL
  15.200 +#define SDL_GetHint SDL_GetHint_REAL
  15.201 +#define SDL_AddHintCallback SDL_AddHintCallback_REAL
  15.202 +#define SDL_DelHintCallback SDL_DelHintCallback_REAL
  15.203 +#define SDL_ClearHints SDL_ClearHints_REAL
  15.204 +#define SDL_NumJoysticks SDL_NumJoysticks_REAL
  15.205 +#define SDL_JoystickNameForIndex SDL_JoystickNameForIndex_REAL
  15.206 +#define SDL_JoystickOpen SDL_JoystickOpen_REAL
  15.207 +#define SDL_JoystickName SDL_JoystickName_REAL
  15.208 +#define SDL_JoystickGetDeviceGUID SDL_JoystickGetDeviceGUID_REAL
  15.209 +#define SDL_JoystickGetGUID SDL_JoystickGetGUID_REAL
  15.210 +#define SDL_JoystickGetGUIDString SDL_JoystickGetGUIDString_REAL
  15.211 +#define SDL_JoystickGetGUIDFromString SDL_JoystickGetGUIDFromString_REAL
  15.212 +#define SDL_JoystickGetAttached SDL_JoystickGetAttached_REAL
  15.213 +#define SDL_JoystickInstanceID SDL_JoystickInstanceID_REAL
  15.214 +#define SDL_JoystickNumAxes SDL_JoystickNumAxes_REAL
  15.215 +#define SDL_JoystickNumBalls SDL_JoystickNumBalls_REAL
  15.216 +#define SDL_JoystickNumHats SDL_JoystickNumHats_REAL
  15.217 +#define SDL_JoystickNumButtons SDL_JoystickNumButtons_REAL
  15.218 +#define SDL_JoystickUpdate SDL_JoystickUpdate_REAL
  15.219 +#define SDL_JoystickEventState SDL_JoystickEventState_REAL
  15.220 +#define SDL_JoystickGetAxis SDL_JoystickGetAxis_REAL
  15.221 +#define SDL_JoystickGetHat SDL_JoystickGetHat_REAL
  15.222 +#define SDL_JoystickGetBall SDL_JoystickGetBall_REAL
  15.223 +#define SDL_JoystickGetButton SDL_JoystickGetButton_REAL
  15.224 +#define SDL_JoystickClose SDL_JoystickClose_REAL
  15.225 +#define SDL_GetKeyboardFocus SDL_GetKeyboardFocus_REAL
  15.226 +#define SDL_GetKeyboardState SDL_GetKeyboardState_REAL
  15.227 +#define SDL_GetModState SDL_GetModState_REAL
  15.228 +#define SDL_SetModState SDL_SetModState_REAL
  15.229 +#define SDL_GetKeyFromScancode SDL_GetKeyFromScancode_REAL
  15.230 +#define SDL_GetScancodeFromKey SDL_GetScancodeFromKey_REAL
  15.231 +#define SDL_GetScancodeName SDL_GetScancodeName_REAL
  15.232 +#define SDL_GetScancodeFromName SDL_GetScancodeFromName_REAL
  15.233 +#define SDL_GetKeyName SDL_GetKeyName_REAL
  15.234 +#define SDL_GetKeyFromName SDL_GetKeyFromName_REAL
  15.235 +#define SDL_StartTextInput SDL_StartTextInput_REAL
  15.236 +#define SDL_IsTextInputActive SDL_IsTextInputActive_REAL
  15.237 +#define SDL_StopTextInput SDL_StopTextInput_REAL
  15.238 +#define SDL_SetTextInputRect SDL_SetTextInputRect_REAL
  15.239 +#define SDL_HasScreenKeyboardSupport SDL_HasScreenKeyboardSupport_REAL
  15.240 +#define SDL_IsScreenKeyboardShown SDL_IsScreenKeyboardShown_REAL
  15.241 +#define SDL_LoadObject SDL_LoadObject_REAL
  15.242 +#define SDL_LoadFunction SDL_LoadFunction_REAL
  15.243 +#define SDL_UnloadObject SDL_UnloadObject_REAL
  15.244 +#define SDL_LogSetAllPriority SDL_LogSetAllPriority_REAL
  15.245 +#define SDL_LogSetPriority SDL_LogSetPriority_REAL
  15.246 +#define SDL_LogGetPriority SDL_LogGetPriority_REAL
  15.247 +#define SDL_LogResetPriorities SDL_LogResetPriorities_REAL
  15.248 +#define SDL_LogMessageV SDL_LogMessageV_REAL
  15.249 +#define SDL_LogGetOutputFunction SDL_LogGetOutputFunction_REAL
  15.250 +#define SDL_LogSetOutputFunction SDL_LogSetOutputFunction_REAL
  15.251 +#define SDL_SetMainReady SDL_SetMainReady_REAL
  15.252 +#define SDL_ShowMessageBox SDL_ShowMessageBox_REAL
  15.253 +#define SDL_ShowSimpleMessageBox SDL_ShowSimpleMessageBox_REAL
  15.254 +#define SDL_GetMouseFocus SDL_GetMouseFocus_REAL
  15.255 +#define SDL_GetMouseState SDL_GetMouseState_REAL
  15.256 +#define SDL_GetRelativeMouseState SDL_GetRelativeMouseState_REAL
  15.257 +#define SDL_WarpMouseInWindow SDL_WarpMouseInWindow_REAL
  15.258 +#define SDL_SetRelativeMouseMode SDL_SetRelativeMouseMode_REAL
  15.259 +#define SDL_GetRelativeMouseMode SDL_GetRelativeMouseMode_REAL
  15.260 +#define SDL_CreateCursor SDL_CreateCursor_REAL
  15.261 +#define SDL_CreateColorCursor SDL_CreateColorCursor_REAL
  15.262 +#define SDL_CreateSystemCursor SDL_CreateSystemCursor_REAL
  15.263 +#define SDL_SetCursor SDL_SetCursor_REAL
  15.264 +#define SDL_GetCursor SDL_GetCursor_REAL
  15.265 +#define SDL_GetDefaultCursor SDL_GetDefaultCursor_REAL
  15.266 +#define SDL_FreeCursor SDL_FreeCursor_REAL
  15.267 +#define SDL_ShowCursor SDL_ShowCursor_REAL
  15.268 +#define SDL_CreateMutex SDL_CreateMutex_REAL
  15.269 +#define SDL_LockMutex SDL_LockMutex_REAL
  15.270 +#define SDL_TryLockMutex SDL_TryLockMutex_REAL
  15.271 +#define SDL_UnlockMutex SDL_UnlockMutex_REAL
  15.272 +#define SDL_DestroyMutex SDL_DestroyMutex_REAL
  15.273 +#define SDL_CreateSemaphore SDL_CreateSemaphore_REAL
  15.274 +#define SDL_DestroySemaphore SDL_DestroySemaphore_REAL
  15.275 +#define SDL_SemWait SDL_SemWait_REAL
  15.276 +#define SDL_SemTryWait SDL_SemTryWait_REAL
  15.277 +#define SDL_SemWaitTimeout SDL_SemWaitTimeout_REAL
  15.278 +#define SDL_SemPost SDL_SemPost_REAL
  15.279 +#define SDL_SemValue SDL_SemValue_REAL
  15.280 +#define SDL_CreateCond SDL_CreateCond_REAL
  15.281 +#define SDL_DestroyCond SDL_DestroyCond_REAL
  15.282 +#define SDL_CondSignal SDL_CondSignal_REAL
  15.283 +#define SDL_CondBroadcast SDL_CondBroadcast_REAL
  15.284 +#define SDL_CondWait SDL_CondWait_REAL
  15.285 +#define SDL_CondWaitTimeout SDL_CondWaitTimeout_REAL
  15.286 +#define SDL_GetPixelFormatName SDL_GetPixelFormatName_REAL
  15.287 +#define SDL_PixelFormatEnumToMasks SDL_PixelFormatEnumToMasks_REAL
  15.288 +#define SDL_MasksToPixelFormatEnum SDL_MasksToPixelFormatEnum_REAL
  15.289 +#define SDL_AllocFormat SDL_AllocFormat_REAL
  15.290 +#define SDL_FreeFormat SDL_FreeFormat_REAL
  15.291 +#define SDL_AllocPalette SDL_AllocPalette_REAL
  15.292 +#define SDL_SetPixelFormatPalette SDL_SetPixelFormatPalette_REAL
  15.293 +#define SDL_SetPaletteColors SDL_SetPaletteColors_REAL
  15.294 +#define SDL_FreePalette SDL_FreePalette_REAL
  15.295 +#define SDL_MapRGB SDL_MapRGB_REAL
  15.296 +#define SDL_MapRGBA SDL_MapRGBA_REAL
  15.297 +#define SDL_GetRGB SDL_GetRGB_REAL
  15.298 +#define SDL_GetRGBA SDL_GetRGBA_REAL
  15.299 +#define SDL_CalculateGammaRamp SDL_CalculateGammaRamp_REAL
  15.300 +#define SDL_GetPlatform SDL_GetPlatform_REAL
  15.301 +#define SDL_GetPowerInfo SDL_GetPowerInfo_REAL
  15.302 +#define SDL_HasIntersection SDL_HasIntersection_REAL
  15.303 +#define SDL_IntersectRect SDL_IntersectRect_REAL
  15.304 +#define SDL_UnionRect SDL_UnionRect_REAL
  15.305 +#define SDL_EnclosePoints SDL_EnclosePoints_REAL
  15.306 +#define SDL_IntersectRectAndLine SDL_IntersectRectAndLine_REAL
  15.307 +#define SDL_GetNumRenderDrivers SDL_GetNumRenderDrivers_REAL
  15.308 +#define SDL_GetRenderDriverInfo SDL_GetRenderDriverInfo_REAL
  15.309 +#define SDL_CreateWindowAndRenderer SDL_CreateWindowAndRenderer_REAL
  15.310 +#define SDL_CreateRenderer SDL_CreateRenderer_REAL
  15.311 +#define SDL_CreateSoftwareRenderer SDL_CreateSoftwareRenderer_REAL
  15.312 +#define SDL_GetRenderer SDL_GetRenderer_REAL
  15.313 +#define SDL_GetRendererInfo SDL_GetRendererInfo_REAL
  15.314 +#define SDL_GetRendererOutputSize SDL_GetRendererOutputSize_REAL
  15.315 +#define SDL_CreateTexture SDL_CreateTexture_REAL
  15.316 +#define SDL_CreateTextureFromSurface SDL_CreateTextureFromSurface_REAL
  15.317 +#define SDL_QueryTexture SDL_QueryTexture_REAL
  15.318 +#define SDL_SetTextureColorMod SDL_SetTextureColorMod_REAL
  15.319 +#define SDL_GetTextureColorMod SDL_GetTextureColorMod_REAL
  15.320 +#define SDL_SetTextureAlphaMod SDL_SetTextureAlphaMod_REAL
  15.321 +#define SDL_GetTextureAlphaMod SDL_GetTextureAlphaMod_REAL
  15.322 +#define SDL_SetTextureBlendMode SDL_SetTextureBlendMode_REAL
  15.323 +#define SDL_GetTextureBlendMode SDL_GetTextureBlendMode_REAL
  15.324 +#define SDL_UpdateTexture SDL_UpdateTexture_REAL
  15.325 +#define SDL_UpdateYUVTexture SDL_UpdateYUVTexture_REAL
  15.326 +#define SDL_LockTexture SDL_LockTexture_REAL
  15.327 +#define SDL_UnlockTexture SDL_UnlockTexture_REAL
  15.328 +#define SDL_RenderTargetSupported SDL_RenderTargetSupported_REAL
  15.329 +#define SDL_SetRenderTarget SDL_SetRenderTarget_REAL
  15.330 +#define SDL_GetRenderTarget SDL_GetRenderTarget_REAL
  15.331 +#define SDL_RenderSetLogicalSize SDL_RenderSetLogicalSize_REAL
  15.332 +#define SDL_RenderGetLogicalSize SDL_RenderGetLogicalSize_REAL
  15.333 +#define SDL_RenderSetViewport SDL_RenderSetViewport_REAL
  15.334 +#define SDL_RenderGetViewport SDL_RenderGetViewport_REAL
  15.335 +#define SDL_RenderSetClipRect SDL_RenderSetClipRect_REAL
  15.336 +#define SDL_RenderGetClipRect SDL_RenderGetClipRect_REAL
  15.337 +#define SDL_RenderSetScale SDL_RenderSetScale_REAL
  15.338 +#define SDL_RenderGetScale SDL_RenderGetScale_REAL
  15.339 +#define SDL_SetRenderDrawColor SDL_SetRenderDrawColor_REAL
  15.340 +#define SDL_GetRenderDrawColor SDL_GetRenderDrawColor_REAL
  15.341 +#define SDL_SetRenderDrawBlendMode SDL_SetRenderDrawBlendMode_REAL
  15.342 +#define SDL_GetRenderDrawBlendMode SDL_GetRenderDrawBlendMode_REAL
  15.343 +#define SDL_RenderClear SDL_RenderClear_REAL
  15.344 +#define SDL_RenderDrawPoint SDL_RenderDrawPoint_REAL
  15.345 +#define SDL_RenderDrawPoints SDL_RenderDrawPoints_REAL
  15.346 +#define SDL_RenderDrawLine SDL_RenderDrawLine_REAL
  15.347 +#define SDL_RenderDrawLines SDL_RenderDrawLines_REAL
  15.348 +#define SDL_RenderDrawRect SDL_RenderDrawRect_REAL
  15.349 +#define SDL_RenderDrawRects SDL_RenderDrawRects_REAL
  15.350 +#define SDL_RenderFillRect SDL_RenderFillRect_REAL
  15.351 +#define SDL_RenderFillRects SDL_RenderFillRects_REAL
  15.352 +#define SDL_RenderCopy SDL_RenderCopy_REAL
  15.353 +#define SDL_RenderCopyEx SDL_RenderCopyEx_REAL
  15.354 +#define SDL_RenderReadPixels SDL_RenderReadPixels_REAL
  15.355 +#define SDL_RenderPresent SDL_RenderPresent_REAL
  15.356 +#define SDL_DestroyTexture SDL_DestroyTexture_REAL
  15.357 +#define SDL_DestroyRenderer SDL_DestroyRenderer_REAL
  15.358 +#define SDL_GL_BindTexture SDL_GL_BindTexture_REAL
  15.359 +#define SDL_GL_UnbindTexture SDL_GL_UnbindTexture_REAL
  15.360 +#define SDL_RWFromFile SDL_RWFromFile_REAL
  15.361 +#define SDL_RWFromMem SDL_RWFromMem_REAL
  15.362 +#define SDL_RWFromConstMem SDL_RWFromConstMem_REAL
  15.363 +#define SDL_AllocRW SDL_AllocRW_REAL
  15.364 +#define SDL_FreeRW SDL_FreeRW_REAL
  15.365 +#define SDL_ReadU8 SDL_ReadU8_REAL
  15.366 +#define SDL_ReadLE16 SDL_ReadLE16_REAL
  15.367 +#define SDL_ReadBE16 SDL_ReadBE16_REAL
  15.368 +#define SDL_ReadLE32 SDL_ReadLE32_REAL
  15.369 +#define SDL_ReadBE32 SDL_ReadBE32_REAL
  15.370 +#define SDL_ReadLE64 SDL_ReadLE64_REAL
  15.371 +#define SDL_ReadBE64 SDL_ReadBE64_REAL
  15.372 +#define SDL_WriteU8 SDL_WriteU8_REAL
  15.373 +#define SDL_WriteLE16 SDL_WriteLE16_REAL
  15.374 +#define SDL_WriteBE16 SDL_WriteBE16_REAL
  15.375 +#define SDL_WriteLE32 SDL_WriteLE32_REAL
  15.376 +#define SDL_WriteBE32 SDL_WriteBE32_REAL
  15.377 +#define SDL_WriteLE64 SDL_WriteLE64_REAL
  15.378 +#define SDL_WriteBE64 SDL_WriteBE64_REAL
  15.379 +#define SDL_CreateShapedWindow SDL_CreateShapedWindow_REAL
  15.380 +#define SDL_IsShapedWindow SDL_IsShapedWindow_REAL
  15.381 +#define SDL_SetWindowShape SDL_SetWindowShape_REAL
  15.382 +#define SDL_GetShapedWindowMode SDL_GetShapedWindowMode_REAL
  15.383 +#define SDL_malloc SDL_malloc_REAL
  15.384 +#define SDL_calloc SDL_calloc_REAL
  15.385 +#define SDL_realloc SDL_realloc_REAL
  15.386 +#define SDL_free SDL_free_REAL
  15.387 +#define SDL_getenv SDL_getenv_REAL
  15.388 +#define SDL_setenv SDL_setenv_REAL
  15.389 +#define SDL_qsort SDL_qsort_REAL
  15.390 +#define SDL_abs SDL_abs_REAL
  15.391 +#define SDL_isdigit SDL_isdigit_REAL
  15.392 +#define SDL_isspace SDL_isspace_REAL
  15.393 +#define SDL_toupper SDL_toupper_REAL
  15.394 +#define SDL_tolower SDL_tolower_REAL
  15.395 +#define SDL_memset SDL_memset_REAL
  15.396 +#define SDL_memcpy SDL_memcpy_REAL
  15.397 +#define SDL_memmove SDL_memmove_REAL
  15.398 +#define SDL_memcmp SDL_memcmp_REAL
  15.399 +#define SDL_wcslen SDL_wcslen_REAL
  15.400 +#define SDL_wcslcpy SDL_wcslcpy_REAL
  15.401 +#define SDL_wcslcat SDL_wcslcat_REAL
  15.402 +#define SDL_strlen SDL_strlen_REAL
  15.403 +#define SDL_strlcpy SDL_strlcpy_REAL
  15.404 +#define SDL_utf8strlcpy SDL_utf8strlcpy_REAL
  15.405 +#define SDL_strlcat SDL_strlcat_REAL
  15.406 +#define SDL_strdup SDL_strdup_REAL
  15.407 +#define SDL_strrev SDL_strrev_REAL
  15.408 +#define SDL_strupr SDL_strupr_REAL
  15.409 +#define SDL_strlwr SDL_strlwr_REAL
  15.410 +#define SDL_strchr SDL_strchr_REAL
  15.411 +#define SDL_strrchr SDL_strrchr_REAL
  15.412 +#define SDL_strstr SDL_strstr_REAL
  15.413 +#define SDL_itoa SDL_itoa_REAL
  15.414 +#define SDL_uitoa SDL_uitoa_REAL
  15.415 +#define SDL_ltoa SDL_ltoa_REAL
  15.416 +#define SDL_ultoa SDL_ultoa_REAL
  15.417 +#define SDL_lltoa SDL_lltoa_REAL
  15.418 +#define SDL_ulltoa SDL_ulltoa_REAL
  15.419 +#define SDL_atoi SDL_atoi_REAL
  15.420 +#define SDL_atof SDL_atof_REAL
  15.421 +#define SDL_strtol SDL_strtol_REAL
  15.422 +#define SDL_strtoul SDL_strtoul_REAL
  15.423 +#define SDL_strtoll SDL_strtoll_REAL
  15.424 +#define SDL_strtoull SDL_strtoull_REAL
  15.425 +#define SDL_strtod SDL_strtod_REAL
  15.426 +#define SDL_strcmp SDL_strcmp_REAL
  15.427 +#define SDL_strncmp SDL_strncmp_REAL
  15.428 +#define SDL_strcasecmp SDL_strcasecmp_REAL
  15.429 +#define SDL_strncasecmp SDL_strncasecmp_REAL
  15.430 +#define SDL_vsnprintf SDL_vsnprintf_REAL
  15.431 +#define SDL_acos SDL_acos_REAL
  15.432 +#define SDL_asin SDL_asin_REAL
  15.433 +#define SDL_atan SDL_atan_REAL
  15.434 +#define SDL_atan2 SDL_atan2_REAL
  15.435 +#define SDL_ceil SDL_ceil_REAL
  15.436 +#define SDL_copysign SDL_copysign_REAL
  15.437 +#define SDL_cos SDL_cos_REAL
  15.438 +#define SDL_cosf SDL_cosf_REAL
  15.439 +#define SDL_fabs SDL_fabs_REAL
  15.440 +#define SDL_floor SDL_floor_REAL
  15.441 +#define SDL_log SDL_log_REAL
  15.442 +#define SDL_pow SDL_pow_REAL
  15.443 +#define SDL_scalbn SDL_scalbn_REAL
  15.444 +#define SDL_sin SDL_sin_REAL
  15.445 +#define SDL_sinf SDL_sinf_REAL
  15.446 +#define SDL_sqrt SDL_sqrt_REAL
  15.447 +#define SDL_iconv_open SDL_iconv_open_REAL
  15.448 +#define SDL_iconv_close SDL_iconv_close_REAL
  15.449 +#define SDL_iconv SDL_iconv_REAL
  15.450 +#define SDL_iconv_string SDL_iconv_string_REAL
  15.451 +#define SDL_CreateRGBSurface SDL_CreateRGBSurface_REAL
  15.452 +#define SDL_CreateRGBSurfaceFrom SDL_CreateRGBSurfaceFrom_REAL
  15.453 +#define SDL_FreeSurface SDL_FreeSurface_REAL
  15.454 +#define SDL_SetSurfacePalette SDL_SetSurfacePalette_REAL
  15.455 +#define SDL_LockSurface SDL_LockSurface_REAL
  15.456 +#define SDL_UnlockSurface SDL_UnlockSurface_REAL
  15.457 +#define SDL_LoadBMP_RW SDL_LoadBMP_RW_REAL
  15.458 +#define SDL_SaveBMP_RW SDL_SaveBMP_RW_REAL
  15.459 +#define SDL_SetSurfaceRLE SDL_SetSurfaceRLE_REAL
  15.460 +#define SDL_SetColorKey SDL_SetColorKey_REAL
  15.461 +#define SDL_GetColorKey SDL_GetColorKey_REAL
  15.462 +#define SDL_SetSurfaceColorMod SDL_SetSurfaceColorMod_REAL
  15.463 +#define SDL_GetSurfaceColorMod SDL_GetSurfaceColorMod_REAL
  15.464 +#define SDL_SetSurfaceAlphaMod SDL_SetSurfaceAlphaMod_REAL
  15.465 +#define SDL_GetSurfaceAlphaMod SDL_GetSurfaceAlphaMod_REAL
  15.466 +#define SDL_SetSurfaceBlendMode SDL_SetSurfaceBlendMode_REAL
  15.467 +#define SDL_GetSurfaceBlendMode SDL_GetSurfaceBlendMode_REAL
  15.468 +#define SDL_SetClipRect SDL_SetClipRect_REAL
  15.469 +#define SDL_GetClipRect SDL_GetClipRect_REAL
  15.470 +#define SDL_ConvertSurface SDL_ConvertSurface_REAL
  15.471 +#define SDL_ConvertSurfaceFormat SDL_ConvertSurfaceFormat_REAL
  15.472 +#define SDL_ConvertPixels SDL_ConvertPixels_REAL
  15.473 +#define SDL_FillRect SDL_FillRect_REAL
  15.474 +#define SDL_FillRects SDL_FillRects_REAL
  15.475 +#define SDL_UpperBlit SDL_UpperBlit_REAL
  15.476 +#define SDL_LowerBlit SDL_LowerBlit_REAL
  15.477 +#define SDL_SoftStretch SDL_SoftStretch_REAL
  15.478 +#define SDL_UpperBlitScaled SDL_UpperBlitScaled_REAL
  15.479 +#define SDL_LowerBlitScaled SDL_LowerBlitScaled_REAL
  15.480 +#define SDL_GetWindowWMInfo SDL_GetWindowWMInfo_REAL
  15.481 +#define SDL_GetThreadName SDL_GetThreadName_REAL
  15.482 +#define SDL_ThreadID SDL_ThreadID_REAL
  15.483 +#define SDL_GetThreadID SDL_GetThreadID_REAL
  15.484 +#define SDL_SetThreadPriority SDL_SetThreadPriority_REAL
  15.485 +#define SDL_WaitThread SDL_WaitThread_REAL
  15.486 +#define SDL_DetachThread SDL_DetachThread_REAL
  15.487 +#define SDL_TLSCreate SDL_TLSCreate_REAL
  15.488 +#define SDL_TLSGet SDL_TLSGet_REAL
  15.489 +#define SDL_TLSSet SDL_TLSSet_REAL
  15.490 +#define SDL_GetTicks SDL_GetTicks_REAL
  15.491 +#define SDL_GetPerformanceCounter SDL_GetPerformanceCounter_REAL
  15.492 +#define SDL_GetPerformanceFrequency SDL_GetPerformanceFrequency_REAL
  15.493 +#define SDL_Delay SDL_Delay_REAL
  15.494 +#define SDL_AddTimer SDL_AddTimer_REAL
  15.495 +#define SDL_RemoveTimer SDL_RemoveTimer_REAL
  15.496 +#define SDL_GetNumTouchDevices SDL_GetNumTouchDevices_REAL
  15.497 +#define SDL_GetTouchDevice SDL_GetTouchDevice_REAL
  15.498 +#define SDL_GetNumTouchFingers SDL_GetNumTouchFingers_REAL
  15.499 +#define SDL_GetTouchFinger SDL_GetTouchFinger_REAL
  15.500 +#define SDL_GetVersion SDL_GetVersion_REAL
  15.501 +#define SDL_GetRevision SDL_GetRevision_REAL
  15.502 +#define SDL_GetRevisionNumber SDL_GetRevisionNumber_REAL
  15.503 +#define SDL_GetNumVideoDrivers SDL_GetNumVideoDrivers_REAL
  15.504 +#define SDL_GetVideoDriver SDL_GetVideoDriver_REAL
  15.505 +#define SDL_VideoInit SDL_VideoInit_REAL
  15.506 +#define SDL_VideoQuit SDL_VideoQuit_REAL
  15.507 +#define SDL_GetCurrentVideoDriver SDL_GetCurrentVideoDriver_REAL
  15.508 +#define SDL_GetNumVideoDisplays SDL_GetNumVideoDisplays_REAL
  15.509 +#define SDL_GetDisplayName SDL_GetDisplayName_REAL
  15.510 +#define SDL_GetDisplayBounds SDL_GetDisplayBounds_REAL
  15.511 +#define SDL_GetNumDisplayModes SDL_GetNumDisplayModes_REAL
  15.512 +#define SDL_GetDisplayMode SDL_GetDisplayMode_REAL
  15.513 +#define SDL_GetDesktopDisplayMode SDL_GetDesktopDisplayMode_REAL
  15.514 +#define SDL_GetCurrentDisplayMode SDL_GetCurrentDisplayMode_REAL
  15.515 +#define SDL_GetClosestDisplayMode SDL_GetClosestDisplayMode_REAL
  15.516 +#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_REAL
  15.517 +#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_REAL
  15.518 +#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_REAL
  15.519 +#define SDL_GetWindowPixelFormat SDL_GetWindowPixelFormat_REAL
  15.520 +#define SDL_CreateWindow SDL_CreateWindow_REAL
  15.521 +#define SDL_CreateWindowFrom SDL_CreateWindowFrom_REAL
  15.522 +#define SDL_GetWindowID SDL_GetWindowID_REAL
  15.523 +#define SDL_GetWindowFromID SDL_GetWindowFromID_REAL
  15.524 +#define SDL_GetWindowFlags SDL_GetWindowFlags_REAL
  15.525 +#define SDL_SetWindowTitle SDL_SetWindowTitle_REAL
  15.526 +#define SDL_GetWindowTitle SDL_GetWindowTitle_REAL
  15.527 +#define SDL_SetWindowIcon SDL_SetWindowIcon_REAL
  15.528 +#define SDL_SetWindowData SDL_SetWindowData_REAL
  15.529 +#define SDL_GetWindowData SDL_GetWindowData_REAL
  15.530 +#define SDL_SetWindowPosition SDL_SetWindowPosition_REAL
  15.531 +#define SDL_GetWindowPosition SDL_GetWindowPosition_REAL
  15.532 +#define SDL_SetWindowSize SDL_SetWindowSize_REAL
  15.533 +#define SDL_GetWindowSize SDL_GetWindowSize_REAL
  15.534 +#define SDL_SetWindowMinimumSize SDL_SetWindowMinimumSize_REAL
  15.535 +#define SDL_GetWindowMinimumSize SDL_GetWindowMinimumSize_REAL
  15.536 +#define SDL_SetWindowMaximumSize SDL_SetWindowMaximumSize_REAL
  15.537 +#define SDL_GetWindowMaximumSize SDL_GetWindowMaximumSize_REAL
  15.538 +#define SDL_SetWindowBordered SDL_SetWindowBordered_REAL
  15.539 +#define SDL_ShowWindow SDL_ShowWindow_REAL
  15.540 +#define SDL_HideWindow SDL_HideWindow_REAL
  15.541 +#define SDL_RaiseWindow SDL_RaiseWindow_REAL
  15.542 +#define SDL_MaximizeWindow SDL_MaximizeWindow_REAL
  15.543 +#define SDL_MinimizeWindow SDL_MinimizeWindow_REAL
  15.544 +#define SDL_RestoreWindow SDL_RestoreWindow_REAL
  15.545 +#define SDL_SetWindowFullscreen SDL_SetWindowFullscreen_REAL
  15.546 +#define SDL_GetWindowSurface SDL_GetWindowSurface_REAL
  15.547 +#define SDL_UpdateWindowSurface SDL_UpdateWindowSurface_REAL
  15.548 +#define SDL_UpdateWindowSurfaceRects SDL_UpdateWindowSurfaceRects_REAL
  15.549 +#define SDL_SetWindowGrab SDL_SetWindowGrab_REAL
  15.550 +#define SDL_GetWindowGrab SDL_GetWindowGrab_REAL
  15.551 +#define SDL_SetWindowBrightness SDL_SetWindowBrightness_REAL
  15.552 +#define SDL_GetWindowBrightness SDL_GetWindowBrightness_REAL
  15.553 +#define SDL_SetWindowGammaRamp SDL_SetWindowGammaRamp_REAL
  15.554 +#define SDL_GetWindowGammaRamp SDL_GetWindowGammaRamp_REAL
  15.555 +#define SDL_DestroyWindow SDL_DestroyWindow_REAL
  15.556 +#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_REAL
  15.557 +#define SDL_EnableScreenSaver SDL_EnableScreenSaver_REAL
  15.558 +#define SDL_DisableScreenSaver SDL_DisableScreenSaver_REAL
  15.559 +#define SDL_GL_LoadLibrary SDL_GL_LoadLibrary_REAL
  15.560 +#define SDL_GL_GetProcAddress SDL_GL_GetProcAddress_REAL
  15.561 +#define SDL_GL_UnloadLibrary SDL_GL_UnloadLibrary_REAL
  15.562 +#define SDL_GL_ExtensionSupported SDL_GL_ExtensionSupported_REAL
  15.563 +#define SDL_GL_SetAttribute SDL_GL_SetAttribute_REAL
  15.564 +#define SDL_GL_GetAttribute SDL_GL_GetAttribute_REAL
  15.565 +#define SDL_GL_CreateContext SDL_GL_CreateContext_REAL
  15.566 +#define SDL_GL_MakeCurrent SDL_GL_MakeCurrent_REAL
  15.567 +#define SDL_GL_GetCurrentWindow SDL_GL_GetCurrentWindow_REAL
  15.568 +#define SDL_GL_GetCurrentContext SDL_GL_GetCurrentContext_REAL
  15.569 +#define SDL_GL_GetDrawableSize SDL_GL_GetDrawableSize_REAL
  15.570 +#define SDL_GL_SetSwapInterval SDL_GL_SetSwapInterval_REAL
  15.571 +#define SDL_GL_GetSwapInterval SDL_GL_GetSwapInterval_REAL
  15.572 +#define SDL_GL_SwapWindow SDL_GL_SwapWindow_REAL
  15.573 +#define SDL_GL_DeleteContext SDL_GL_DeleteContext_REAL
  15.574 +#define SDL_vsscanf SDL_vsscanf_REAL
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/src/dynapi/SDL_dynapi_procs.h	Mon Dec 09 16:03:18 2013 -0500
    16.3 @@ -0,0 +1,599 @@
    16.4 +/*
    16.5 +  Simple DirectMedia Layer
    16.6 +  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
    16.7 +
    16.8 +  This software is provided 'as-is', without any express or implied
    16.9 +  warranty.  In no event will the authors be held liable for any damages
   16.10 +  arising from the use of this software.
   16.11 +
   16.12 +  Permission is granted to anyone to use this software for any purpose,
   16.13 +  including commercial applications, and to alter it and redistribute it
   16.14 +  freely, subject to the following restrictions:
   16.15 +
   16.16 +  1. The origin of this software must not be misrepresented; you must not
   16.17 +     claim that you wrote the original software. If you use this software
   16.18 +     in a product, an acknowledgment in the product documentation would be
   16.19 +     appreciated but is not required.
   16.20 +  2. Altered source versions must be plainly marked as such, and must not be
   16.21 +     misrepresented as being the original software.
   16.22 +  3. This notice may not be removed or altered from any source distribution.
   16.23 +*/
   16.24 +
   16.25 +/* vi: set ts=4 sw=4 expandtab: */
   16.26 +
   16.27 +/*
   16.28 +   DO NOT EDIT THIS FILE BY HAND. It is autogenerated by gendynapi.pl.
   16.29 +   NEVER REARRANGE THIS FILE, THE ORDER IS ABI LAW.
   16.30 +   Changing this file means bumping SDL_DYNAPI_VERSION. You can safely add
   16.31 +   new items to the end of the file, though.
   16.32 +   Also, this file gets included multiple times, don't add #pragma once, etc.
   16.33 +*/
   16.34 +
   16.35 +/* direct jump magic can use these, the rest needs special code. */
   16.36 +#if !SDL_DYNAPI_PROC_NO_VARARGS
   16.37 +SDL_DYNAPI_PROC(int,SDL_SetError,(const char *a, ...),(a),return)
   16.38 +SDL_DYNAPI_PROC(void,SDL_Log,(const char *a, ...),(a),)
   16.39 +SDL_DYNAPI_PROC(void,SDL_LogVerbose,(int a, const char *b, ...),(a,b),)
   16.40 +SDL_DYNAPI_PROC(void,SDL_LogDebug,(int a, const char *b, ...),(a,b),)
   16.41 +SDL_DYNAPI_PROC(void,SDL_LogInfo,(int a, const char *b, ...),(a,b),)
   16.42 +SDL_DYNAPI_PROC(void,SDL_LogWarn,(int a, const char *b, ...),(a,b),)
   16.43 +SDL_DYNAPI_PROC(void,SDL_LogError,(int a, const char *b, ...),(a,b),)
   16.44 +SDL_DYNAPI_PROC(void,SDL_LogCritical,(int a, const char *b, ...),(a,b),)
   16.45 +SDL_DYNAPI_PROC(void,SDL_LogMessage,(int a, SDL_LogPriority b, const char *c, ...),(a,b,c),)
   16.46 +SDL_DYNAPI_PROC(int,SDL_sscanf,(const char *a, const char *b, ...),(a,b),return)
   16.47 +SDL_DYNAPI_PROC(int,SDL_snprintf,(char *a, size_t b, const char *c, ...),(a,b,c),return)
   16.48 +#endif
   16.49 +
   16.50 +#ifdef SDL_CreateThread
   16.51 +#undef SDL_CreateThread
   16.52 +#endif
   16.53 +
   16.54 +#if defined(__WIN32__) && !defined(HAVE_LIBC)
   16.55 +SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c, pfnSDL_CurrentBeginThread d, pfnSDL_CurrentEndThread e),(a,b,c,d,e),return)
   16.56 +#else
   16.57 +SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c),(a,b,c),return)
   16.58 +#endif
   16.59 +
   16.60 +#ifdef HAVE_STDIO_H
   16.61 +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFP,(FILE *a, SDL_bool b),(a,b),return)
   16.62 +#else
   16.63 +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFP,(void *a, SDL_bool b),(a,b),return)
   16.64 +#endif
   16.65 +
   16.66 +#ifdef __thumb__  /* so annoying. */
   16.67 +SDL_DYNAPI_PROC(void,SDL_MemoryBarrierRelease,(void),(),)
   16.68 +SDL_DYNAPI_PROC(void,SDL_MemoryBarrierAcquire,(void),(),)
   16.69 +#endif
   16.70 +
   16.71 +#ifdef __WIN32__
   16.72 +SDL_DYNAPI_PROC(int,SDL_RegisterApp,(char *a, Uint32 b, void *c),(a,b,c),return)
   16.73 +SDL_DYNAPI_PROC(void,SDL_UnregisterApp,(void),(),)
   16.74 +SDL_DYNAPI_PROC(int,SDL_Direct3D9GetAdapterIndex,(int a),(a),return)
   16.75 +SDL_DYNAPI_PROC(IDirect3DDevice9*,SDL_RenderGetD3D9Device,(SDL_Renderer *a),(a),return)
   16.76 +#endif
   16.77 +
   16.78 +#if defined(__IPHONEOS__) && __IPHONEOS__
   16.79 +SDL_DYNAPI_PROC(int,SDL_iPhoneSetAnimationCallback,(SDL_Window *a, int b, void c, void *d),(a,b,c,d),return)
   16.80 +SDL_DYNAPI_PROC(void,SDL_iPhoneSetEventPump,(SDL_bool a),(a),)
   16.81 +#endif
   16.82 +
   16.83 +#if defined(__ANDROID__) && __ANDROID__
   16.84 +SDL_DYNAPI_PROC(void*,SDL_AndroidGetJNIEnv,(void),(),return)
   16.85 +SDL_DYNAPI_PROC(void*,SDL_AndroidGetActivity,(void),(),return)
   16.86 +SDL_DYNAPI_PROC(const char*,SDL_AndroidGetInternalStoragePath,(void),(),return)
   16.87 +SDL_DYNAPI_PROC(int,SDL_AndroidGetExternalStorageState,(void),(),return)
   16.88 +SDL_DYNAPI_PROC(const char*,SDL_AndroidGetExternalStoragePath,(void),(),return)
   16.89 +#endif
   16.90 +
   16.91 +SDL_DYNAPI_PROC(int,SDL_Init,(Uint32 a),(a),return)
   16.92 +SDL_DYNAPI_PROC(int,SDL_InitSubSystem,(Uint32 a),(a),return)
   16.93 +SDL_DYNAPI_PROC(void,SDL_QuitSubSystem,(Uint32 a),(a),)
   16.94 +SDL_DYNAPI_PROC(Uint32,SDL_WasInit,(Uint32 a),(a),return)
   16.95 +SDL_DYNAPI_PROC(void,SDL_Quit,(void),(),)
   16.96 +SDL_DYNAPI_PROC(SDL_assert_state,SDL_ReportAssertion,(SDL_assert_data *a, const char *b, const char *c, int d),(a,b,c,d),return)
   16.97 +SDL_DYNAPI_PROC(void,SDL_SetAssertionHandler,(SDL_AssertionHandler a, void *b),(a,b),)
   16.98 +SDL_DYNAPI_PROC(const SDL_assert_data*,SDL_GetAssertionReport,(void),(),return)
   16.99 +SDL_DYNAPI_PROC(void,SDL_ResetAssertionReport,(void),(),)
  16.100 +SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicTryLock,(SDL_SpinLock *a),(a),return)
  16.101 +SDL_DYNAPI_PROC(void,SDL_AtomicLock,(SDL_SpinLock *a),(a),)
  16.102 +SDL_DYNAPI_PROC(void,SDL_AtomicUnlock,(SDL_SpinLock *a),(a),)
  16.103 +SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicCAS,(SDL_atomic_t *a, int b, int c),(a,b,c),return)
  16.104 +SDL_DYNAPI_PROC(int,SDL_AtomicSet,(SDL_atomic_t *a, int b),(a,b),return)
  16.105 +SDL_DYNAPI_PROC(int,SDL_AtomicGet,(SDL_atomic_t *a),(a),return)
  16.106 +SDL_DYNAPI_PROC(int,SDL_AtomicAdd,(SDL_atomic_t *a, int b),(a,b),return)
  16.107 +SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicCASPtr,(void **a, void *b, void *c),(a,b,c),return)
  16.108 +SDL_DYNAPI_PROC(void*,SDL_AtomicSetPtr,(void **a, void *b),(a,b),return)
  16.109 +SDL_DYNAPI_PROC(void*,SDL_AtomicGetPtr,(void **a),(a),return)
  16.110 +SDL_DYNAPI_PROC(int,SDL_GetNumAudioDrivers,(void),(),return)
  16.111 +SDL_DYNAPI_PROC(const char*,SDL_GetAudioDriver,(int a),(a),return)
  16.112 +SDL_DYNAPI_PROC(int,SDL_AudioInit,(const char *a),(a),return)
  16.113 +SDL_DYNAPI_PROC(void,SDL_AudioQuit,(void),(),)
  16.114 +SDL_DYNAPI_PROC(const char*,SDL_GetCurrentAudioDriver,(void),(),return)
  16.115 +SDL_DYNAPI_PROC(int,SDL_OpenAudio,(SDL_AudioSpec *a, SDL_AudioSpec *b),(a,b),return)
  16.116 +SDL_DYNAPI_PROC(int,SDL_GetNumAudioDevices,(int a),(a),return)
  16.117 +SDL_DYNAPI_PROC(const char*,SDL_GetAudioDeviceName,(int a, int b),(a,b),return)
  16.118 +SDL_DYNAPI_PROC(SDL_AudioDeviceID,SDL_OpenAudioDevice,(const char *a, int b, const SDL_AudioSpec *c, SDL_AudioSpec *d, int e),(a,b,c,d,e),return)
  16.119 +SDL_DYNAPI_PROC(SDL_AudioStatus,SDL_GetAudioStatus,(void),(),return)
  16.120 +SDL_DYNAPI_PROC(SDL_AudioStatus,SDL_GetAudioDeviceStatus,(SDL_AudioDeviceID a),(a),return)
  16.121 +SDL_DYNAPI_PROC(void,SDL_PauseAudio,(int a),(a),)
  16.122 +SDL_DYNAPI_PROC(void,SDL_PauseAudioDevice,(SDL_AudioDeviceID a, int b),(a,b),)
  16.123 +SDL_DYNAPI_PROC(SDL_AudioSpec*,SDL_LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
  16.124 +SDL_DYNAPI_PROC(void,SDL_FreeWAV,(Uint8 *a),(a),)
  16.125 +SDL_DYNAPI_PROC(int,SDL_BuildAudioCVT,(SDL_AudioCVT *a, SDL_AudioFormat b, Uint8 c, int d, SDL_AudioFormat e, Uint8 f, int g),(a,b,c,d,e,f,g),return)
  16.126 +SDL_DYNAPI_PROC(int,SDL_ConvertAudio,(SDL_AudioCVT *a),(a),return)
  16.127 +SDL_DYNAPI_PROC(void,SDL_MixAudio,(Uint8 *a, const Uint8 *b, Uint32 c, int d),(a,b,c,d),)
  16.128 +SDL_DYNAPI_PROC(void,SDL_MixAudioFormat,(Uint8 *a, const Uint8 *b, SDL_AudioFormat c, Uint32 d, int e),(a,b,c,d,e),)
  16.129 +SDL_DYNAPI_PROC(void,SDL_LockAudio,(void),(),)
  16.130 +SDL_DYNAPI_PROC(void,SDL_LockAudioDevice,(SDL_AudioDeviceID a),(a),)
  16.131 +SDL_DYNAPI_PROC(void,SDL_UnlockAudio,(void),(),)
  16.132 +SDL_DYNAPI_PROC(void,SDL_UnlockAudioDevice,(SDL_AudioDeviceID a),(a),)
  16.133 +SDL_DYNAPI_PROC(void,SDL_CloseAudio,(void),(),)
  16.134 +SDL_DYNAPI_PROC(void,SDL_CloseAudioDevice,(SDL_AudioDeviceID a),(a),)
  16.135 +SDL_DYNAPI_PROC(int,SDL_SetClipboardText,(const char *a),(a),return)
  16.136 +SDL_DYNAPI_PROC(char*,SDL_GetClipboardText,(void),(),return)
  16.137 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasClipboardText,(void),(),return)
  16.138 +SDL_DYNAPI_PROC(int,SDL_GetCPUCount,(void),(),return)
  16.139 +SDL_DYNAPI_PROC(int,SDL_GetCPUCacheLineSize,(void),(),return)
  16.140 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasRDTSC,(void),(),return)
  16.141 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasAltiVec,(void),(),return)
  16.142 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasMMX,(void),(),return)
  16.143 +SDL_DYNAPI_PROC(SDL_bool,SDL_Has3DNow,(void),(),return)
  16.144 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE,(void),(),return)
  16.145 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE2,(void),(),return)
  16.146 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE3,(void),(),return)
  16.147 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE41,(void),(),return)
  16.148 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE42,(void),(),return)
  16.149 +SDL_DYNAPI_PROC(int,SDL_GetSystemRAM,(void),(),return)
  16.150 +SDL_DYNAPI_PROC(const char*,SDL_GetError,(void),(),return)
  16.151 +SDL_DYNAPI_PROC(void,SDL_ClearError,(void),(),)
  16.152 +SDL_DYNAPI_PROC(int,SDL_Error,(SDL_errorcode a),(a),return)
  16.153 +SDL_DYNAPI_PROC(void,SDL_PumpEvents,(void),(),)
  16.154 +SDL_DYNAPI_PROC(int,SDL_PeepEvents,(SDL_Event *a, int b, SDL_eventaction c, Uint32 d, Uint32 e),(a,b,c,d,e),return)
  16.155 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasEvent,(Uint32 a),(a),return)
  16.156 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasEvents,(Uint32 a, Uint32 b),(a,b),return)
  16.157 +SDL_DYNAPI_PROC(void,SDL_FlushEvent,(Uint32 a),(a),)
  16.158 +SDL_DYNAPI_PROC(void,SDL_FlushEvents,(Uint32 a, Uint32 b),(a,b),)
  16.159 +SDL_DYNAPI_PROC(int,SDL_PollEvent,(SDL_Event *a),(a),return)
  16.160 +SDL_DYNAPI_PROC(int,SDL_WaitEvent,(SDL_Event *a),(a),return)
  16.161 +SDL_DYNAPI_PROC(int,SDL_WaitEventTimeout,(SDL_Event *a, int b),(a,b),return)
  16.162 +SDL_DYNAPI_PROC(int,SDL_PushEvent,(SDL_Event *a),(a),return)
  16.163 +SDL_DYNAPI_PROC(void,SDL_SetEventFilter,(SDL_EventFilter a, void *b),(a,b),)
  16.164 +SDL_DYNAPI_PROC(SDL_bool,SDL_GetEventFilter,(SDL_EventFilter *a, void **b),(a,b),return)
  16.165 +SDL_DYNAPI_PROC(void,SDL_AddEventWatch,(SDL_EventFilter a, void *b),(a,b),)
  16.166 +SDL_DYNAPI_PROC(void,SDL_DelEventWatch,(SDL_EventFilter a, void *b),(a,b),)
  16.167 +SDL_DYNAPI_PROC(void,SDL_FilterEvents,(SDL_EventFilter a, void *b),(a,b),)
  16.168 +SDL_DYNAPI_PROC(Uint8,SDL_EventState,(Uint32 a, int b),(a,b),return)
  16.169 +SDL_DYNAPI_PROC(Uint32,SDL_RegisterEvents,(int a),(a),return)
  16.170 +SDL_DYNAPI_PROC(char*,SDL_GetBasePath,(void),(),return)
  16.171 +SDL_DYNAPI_PROC(char*,SDL_GetPrefPath,(const char *a, const char *b),(a,b),return)
  16.172 +SDL_DYNAPI_PROC(int,SDL_GameControllerAddMapping,(const char *a),(a),return)
  16.173 +SDL_DYNAPI_PROC(char*,SDL_GameControllerMappingForGUID,(SDL_JoystickGUID a),(a),return)
  16.174 +SDL_DYNAPI_PROC(char*,SDL_GameControllerMapping,(SDL_GameController *a),(a),return)
  16.175 +SDL_DYNAPI_PROC(SDL_bool,SDL_IsGameController,(int a),(a),return)
  16.176 +SDL_DYNAPI_PROC(const char*,SDL_GameControllerNameForIndex,(int a),(a),return)
  16.177 +SDL_DYNAPI_PROC(SDL_GameController*,SDL_GameControllerOpen,(int a),(a),return)
  16.178 +SDL_DYNAPI_PROC(const char*,SDL_GameControllerName,(SDL_GameController *a),(a),return)
  16.179 +SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerGetAttached,(SDL_GameController *a),(a),return)
  16.180 +SDL_DYNAPI_PROC(SDL_Joystick*,SDL_GameControllerGetJoystick,(SDL_GameController *a),(a),return)
  16.181 +SDL_DYNAPI_PROC(int,SDL_GameControllerEventState,(int a),(a),return)
  16.182 +SDL_DYNAPI_PROC(void,SDL_GameControllerUpdate,(void),(),)
  16.183 +SDL_DYNAPI_PROC(SDL_GameControllerAxis,SDL_GameControllerGetAxisFromString,(const char *a),(a),return)
  16.184 +SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetStringForAxis,(SDL_GameControllerAxis a),(a),return)
  16.185 +SDL_DYNAPI_PROC(SDL_GameControllerButtonBind,SDL_GameControllerGetBindForAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return)
  16.186 +SDL_DYNAPI_PROC(Sint16,SDL_GameControllerGetAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return)
  16.187 +SDL_DYNAPI_PROC(SDL_GameControllerButton,SDL_GameControllerGetButtonFromString,(const char *a),(a),return)
  16.188 +SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetStringForButton,(SDL_GameControllerButton a),(a),return)
  16.189 +SDL_DYNAPI_PROC(SDL_GameControllerButtonBind,SDL_GameControllerGetBindForButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
  16.190 +SDL_DYNAPI_PROC(Uint8,SDL_GameControllerGetButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
  16.191 +SDL_DYNAPI_PROC(void,SDL_GameControllerClose,(SDL_GameController *a),(a),)
  16.192 +SDL_DYNAPI_PROC(int,SDL_RecordGesture,(SDL_TouchID a),(a),return)
  16.193 +SDL_DYNAPI_PROC(int,SDL_SaveAllDollarTemplates,(SDL_RWops *a),(a),return)
  16.194 +SDL_DYNAPI_PROC(int,SDL_SaveDollarTemplate,(SDL_GestureID a, SDL_RWops *b),(a,b),return)
  16.195 +SDL_DYNAPI_PROC(int,SDL_LoadDollarTemplates,(SDL_TouchID a, SDL_RWops *b),(a,b),return)
  16.196 +SDL_DYNAPI_PROC(int,SDL_NumHaptics,(void),(),return)
  16.197 +SDL_DYNAPI_PROC(const char*,SDL_HapticName,(int a),(a),return)
  16.198 +SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpen,(int a),(a),return)
  16.199 +SDL_DYNAPI_PROC(int,SDL_HapticOpened,(int a),(a),return)
  16.200 +SDL_DYNAPI_PROC(int,SDL_HapticIndex,(SDL_Haptic *a),(a),return)
  16.201 +SDL_DYNAPI_PROC(int,SDL_MouseIsHaptic,(void),(),return)
  16.202 +SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpenFromMouse,(void),(),return)
  16.203 +SDL_DYNAPI_PROC(int,SDL_JoystickIsHaptic,(SDL_Joystick *a),(a),return)
  16.204 +SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpenFromJoystick,(SDL_Joystick *a),(a),return)
  16.205 +SDL_DYNAPI_PROC(void,SDL_HapticClose,(SDL_Haptic *a),(a),)
  16.206 +SDL_DYNAPI_PROC(int,SDL_HapticNumEffects,(SDL_Haptic *a),(a),return)
  16.207 +SDL_DYNAPI_PROC(int,SDL_HapticNumEffectsPlaying,(SDL_Haptic *a),(a),return)
  16.208 +SDL_DYNAPI_PROC(unsigned int,SDL_HapticQuery,(SDL_Haptic *a),(a),return)
  16.209 +SDL_DYNAPI_PROC(int,SDL_HapticNumAxes,(SDL_Haptic *a),(a),return)
  16.210 +SDL_DYNAPI_PROC(int,SDL_HapticEffectSupported,(SDL_Haptic *a, SDL_HapticEffect *b),(a,b),return)
  16.211 +SDL_DYNAPI_PROC(int,SDL_HapticNewEffect,(SDL_Haptic *a, SDL_HapticEffect *b),(a,b),return)
  16.212 +SDL_DYNAPI_PROC(int,SDL_HapticUpdateEffect,(SDL_Haptic *a, int b, SDL_HapticEffect *c),(a,b,c),return)
  16.213 +SDL_DYNAPI_PROC(int,SDL_HapticRunEffect,(SDL_Haptic *a, int b, Uint32 c),(a,b,c),return)
  16.214 +SDL_DYNAPI_PROC(int,SDL_HapticStopEffect,(SDL_Haptic *a, int b),(a,b),return)
  16.215 +SDL_DYNAPI_PROC(void,SDL_HapticDestroyEffect,(SDL_Haptic *a, int b),(a,b),)
  16.216 +SDL_DYNAPI_PROC(int,SDL_HapticGetEffectStatus,(SDL_Haptic *a, int b),(a,b),return)
  16.217 +SDL_DYNAPI_PROC(int,SDL_HapticSetGain,(SDL_Haptic *a, int b),(a,b),return)
  16.218 +SDL_DYNAPI_PROC(int,SDL_HapticSetAutocenter,(SDL_Haptic *a, int b),(a,b),return)
  16.219 +SDL_DYNAPI_PROC(int,SDL_HapticPause,(SDL_Haptic *a),(a),return)
  16.220 +SDL_DYNAPI_PROC(int,SDL_HapticUnpause,(SDL_Haptic *a),(a),return)
  16.221 +SDL_DYNAPI_PROC(int,SDL_HapticStopAll,(SDL_Haptic *a),(a),return)
  16.222 +SDL_DYNAPI_PROC(int,SDL_HapticRumbleSupported,(SDL_Haptic *a),(a),return)
  16.223 +SDL_DYNAPI_PROC(int,SDL_HapticRumbleInit,(SDL_Haptic *a),(a),return)
  16.224 +SDL_DYNAPI_PROC(int,SDL_HapticRumblePlay,(SDL_Haptic *a, float b, Uint32 c),(a,b,c),return)
  16.225 +SDL_DYNAPI_PROC(int,SDL_HapticRumbleStop,(SDL_Haptic *a),(a),return)
  16.226 +SDL_DYNAPI_PROC(SDL_bool,SDL_SetHintWithPriority,(const char *a, const char *b, SDL_HintPriority c),(a,b,c),return)
  16.227 +SDL_DYNAPI_PROC(SDL_bool,SDL_SetHint,(const char *a, const char *b),(a,b),return)
  16.228 +SDL_DYNAPI_PROC(const char*,SDL_GetHint,(const char *a),(a),return)
  16.229 +SDL_DYNAPI_PROC(void,SDL_AddHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
  16.230 +SDL_DYNAPI_PROC(void,SDL_DelHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
  16.231 +SDL_DYNAPI_PROC(void,SDL_ClearHints,(void),(),)
  16.232 +SDL_DYNAPI_PROC(int,SDL_NumJoysticks,(void),(),return)
  16.233 +SDL_DYNAPI_PROC(const char*,SDL_JoystickNameForIndex,(int a),(a),return)
  16.234 +SDL_DYNAPI_PROC(SDL_Joystick*,SDL_JoystickOpen,(int a),(a),return)
  16.235 +SDL_DYNAPI_PROC(const char*,SDL_JoystickName,(SDL_Joystick *a),(a),return)
  16.236 +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetDeviceGUID,(int a),(a),return)
  16.237 +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetGUID,(SDL_Joystick *a),(a),return)
  16.238 +SDL_DYNAPI_PROC(void,SDL_JoystickGetGUIDString,(SDL_JoystickGUID a, char *b, int c),(a,b,c),)
  16.239 +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetGUIDFromString,(const char *a),(a),return)
  16.240 +SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickGetAttached,(SDL_Joystick *a),(a),return)
  16.241 +SDL_DYNAPI_PROC(SDL_JoystickID,SDL_JoystickInstanceID,(SDL_Joystick *a),(a),return)
  16.242 +SDL_DYNAPI_PROC(int,SDL_JoystickNumAxes,(SDL_Joystick *a),(a),return)
  16.243 +SDL_DYNAPI_PROC(int,SDL_JoystickNumBalls,(SDL_Joystick *a),(a),return)
  16.244 +SDL_DYNAPI_PROC(int,SDL_JoystickNumHats,(SDL_Joystick *a),(a),return)
  16.245 +SDL_DYNAPI_PROC(int,SDL_JoystickNumButtons,(SDL_Joystick *a),(a),return)
  16.246 +SDL_DYNAPI_PROC(void,SDL_JoystickUpdate,(void),(),)
  16.247 +SDL_DYNAPI_PROC(int,SDL_JoystickEventState,(int a),(a),return)
  16.248 +SDL_DYNAPI_PROC(Sint16,SDL_JoystickGetAxis,(SDL_Joystick *a, int b),(a,b),return)
  16.249 +SDL_DYNAPI_PROC(Uint8,SDL_JoystickGetHat,(SDL_Joystick *a, int b),(a,b),return)
  16.250 +SDL_DYNAPI_PROC(int,SDL_JoystickGetBall,(SDL_Joystick *a, int b, int *c, int *d),(a,b,c,d),return)
  16.251 +SDL_DYNAPI_PROC(Uint8,SDL_JoystickGetButton,(SDL_Joystick *a, int b),(a,b),return)
  16.252 +SDL_DYNAPI_PROC(void,SDL_JoystickClose,(SDL_Joystick *a),(a),)
  16.253 +SDL_DYNAPI_PROC(SDL_Window*,SDL_GetKeyboardFocus,(void),(),return)
  16.254 +SDL_DYNAPI_PROC(const Uint8*,SDL_GetKeyboardState,(int *a),(a),return)
  16.255 +SDL_DYNAPI_PROC(SDL_Keymod,SDL_GetModState,(void),(),return)
  16.256 +SDL_DYNAPI_PROC(void,SDL_SetModState,(SDL_Keymod a),(a),)
  16.257 +SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromScancode,(SDL_Scancode a),(a),return)
  16.258 +SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromKey,(SDL_Keycode a),(a),return)
  16.259 +SDL_DYNAPI_PROC(const char*,SDL_GetScancodeName,(SDL_Scancode a),(a),return)
  16.260 +SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromName,(const char *a),(a),return)
  16.261 +SDL_DYNAPI_PROC(const char*,SDL_GetKeyName,(SDL_Keycode a),(a),return)
  16.262 +SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromName,(const char *a),(a),return)
  16.263 +SDL_DYNAPI_PROC(void,SDL_StartTextInput,(void),(),)
  16.264 +SDL_DYNAPI_PROC(SDL_bool,SDL_IsTextInputActive,(void),(),return)
  16.265 +SDL_DYNAPI_PROC(void,SDL_StopTextInput,(void),(),)
  16.266 +SDL_DYNAPI_PROC(void,SDL_SetTextInputRect,(SDL_Rect *a),(a),)
  16.267 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasScreenKeyboardSupport,(void),(),return)
  16.268 +SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenKeyboardShown,(SDL_Window *a),(a),return)
  16.269 +SDL_DYNAPI_PROC(void*,SDL_LoadObject,(const char *a),(a),return)
  16.270 +SDL_DYNAPI_PROC(void*,SDL_LoadFunction,(void *a, const char *b),(a,b),return)
  16.271 +SDL_DYNAPI_PROC(void,SDL_UnloadObject,(void *a),(a),)
  16.272 +SDL_DYNAPI_PROC(void,SDL_LogSetAllPriority,(SDL_LogPriority a),(a),)
  16.273 +SDL_DYNAPI_PROC(void,SDL_LogSetPriority,(int a, SDL_LogPriority b),(a,b),)
  16.274 +SDL_DYNAPI_PROC(SDL_LogPriority,SDL_LogGetPriority,(int a),(a),return)
  16.275 +SDL_DYNAPI_PROC(void,SDL_LogResetPriorities,(void),(),)
  16.276 +SDL_DYNAPI_PROC(void,SDL_LogMessageV,(int a, SDL_LogPriority b, const char *c, va_list d),(a,b,c,d),)
  16.277 +SDL_DYNAPI_PROC(void,SDL_LogGetOutputFunction,(SDL_LogOutputFunction *a, void **b),(a,b),)
  16.278 +SDL_DYNAPI_PROC(void,SDL_LogSetOutputFunction,(SDL_LogOutputFunction a, void *b),(a,b),)
  16.279 +SDL_DYNAPI_PROC(void,SDL_SetMainReady,(void),(),)
  16.280 +SDL_DYNAPI_PROC(int,SDL_ShowMessageBox,(const SDL_MessageBoxData *a, int *b),(a,b),return)
  16.281 +SDL_DYNAPI_PROC(int,SDL_ShowSimpleMessageBox,(Uint32 a, const char *b, const char *c, SDL_Window *d),(a,b,c,d),return)
  16.282 +SDL_DYNAPI_PROC(SDL_Window*,SDL_GetMouseFocus,(void),(),return)
  16.283 +SDL_DYNAPI_PROC(Uint32,SDL_GetMouseState,(int *a, int *b),(a,b),return)
  16.284 +SDL_DYNAPI_PROC(Uint32,SDL_GetRelativeMouseState,(int *a, int *b),(a,b),return)
  16.285 +SDL_DYNAPI_PROC(void,SDL_WarpMouseInWindow,(SDL_Window *a, int b, int c),(a,b,c),)
  16.286 +SDL_DYNAPI_PROC(int,SDL_SetRelativeMouseMode,(SDL_bool a),(a),return)
  16.287 +SDL_DYNAPI_PROC(SDL_bool,SDL_GetRelativeMouseMode,(void),(),return)
  16.288 +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateCursor,(const Uint8 *a, const Uint8 *b, int c, int d, int e, int f),(a,b,c,d,e,f),return)
  16.289 +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateColorCursor,(SDL_Surface *a, int b, int c),(a,b,c),return)
  16.290 +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateSystemCursor,(SDL_SystemCursor a),(a),return)
  16.291 +SDL_DYNAPI_PROC(void,SDL_SetCursor,(SDL_Cursor *a),(a),)
  16.292 +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetCursor,(void),(),return)
  16.293 +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetDefaultCursor,(void),(),return)
  16.294 +SDL_DYNAPI_PROC(void,SDL_FreeCursor,(SDL_Cursor *a),(a),)
  16.295 +SDL_DYNAPI_PROC(int,SDL_ShowCursor,(int a),(a),return)
  16.296 +SDL_DYNAPI_PROC(SDL_mutex*,SDL_CreateMutex,(void),(),return)
  16.297 +SDL_DYNAPI_PROC(int,SDL_LockMutex,(SDL_mutex *a),(a),return)
  16.298 +SDL_DYNAPI_PROC(int,SDL_TryLockMutex,(SDL_mutex *a),(a),return)
  16.299 +SDL_DYNAPI_PROC(int,SDL_UnlockMutex,(SDL_mutex *a),(a),return)
  16.300 +SDL_DYNAPI_PROC(void,SDL_DestroyMutex,(SDL_mutex *a),(a),)
  16.301 +SDL_DYNAPI_PROC(SDL_sem*,SDL_CreateSemaphore,(Uint32 a),(a),return)
  16.302 +SDL_DYNAPI_PROC(void,SDL_DestroySemaphore,(SDL_sem *a),(a),)
  16.303 +SDL_DYNAPI_PROC(int,SDL_SemWait,(SDL_sem *a),(a),return)
  16.304 +SDL_DYNAPI_PROC(int,SDL_SemTryWait,(SDL_sem *a),(a),return)
  16.305 +SDL_DYNAPI_PROC(int,SDL_SemWaitTimeout,(SDL_sem *a, Uint32 b),(a,b),return)
  16.306 +SDL_DYNAPI_PROC(int,SDL_SemPost,(SDL_sem *a),(a),return)
  16.307 +SDL_DYNAPI_PROC(Uint32,SDL_SemValue,(SDL_sem *a),(a),return)
  16.308 +SDL_DYNAPI_PROC(SDL_cond*,SDL_CreateCond,(void),(),return)
  16.309 +SDL_DYNAPI_PROC(void,SDL_DestroyCond,(SDL_cond *a),(a),)
  16.310 +SDL_DYNAPI_PROC(int,SDL_CondSignal,(SDL_cond *a),(a),return)
  16.311 +SDL_DYNAPI_PROC(int,SDL_CondBroadcast,(SDL_cond *a),(a),return)
  16.312 +SDL_DYNAPI_PROC(int,SDL_CondWait,(SDL_cond *a, SDL_mutex *b),(a,b),return)
  16.313 +SDL_DYNAPI_PROC(int,SDL_CondWaitTimeout,(SDL_cond *a, SDL_mutex *b, Uint32 c),(a,b,c),return)
  16.314 +SDL_DYNAPI_PROC(const char*,SDL_GetPixelFormatName,(Uint32 a),(a),return)
  16.315 +SDL_DYNAPI_PROC(SDL_bool,SDL_PixelFormatEnumToMasks,(Uint32 a, int *b, Uint32 *c, Uint32 *d, Uint32 *e, Uint32 *f),(a,b,c,d,e,f),return)
  16.316 +SDL_DYNAPI_PROC(Uint32,SDL_MasksToPixelFormatEnum,(int a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),return)
  16.317 +SDL_DYNAPI_PROC(SDL_PixelFormat*,SDL_AllocFormat,(Uint32 a),(a),return)
  16.318 +SDL_DYNAPI_PROC(void,SDL_FreeFormat,(SDL_PixelFormat *a),(a),)
  16.319 +SDL_DYNAPI_PROC(SDL_Palette*,SDL_AllocPalette,(int a),(a),return)
  16.320 +SDL_DYNAPI_PROC(int,SDL_SetPixelFormatPalette,(SDL_PixelFormat *a, SDL_Palette *b),(a,b),return)
  16.321 +SDL_DYNAPI_PROC(int,SDL_SetPaletteColors,(SDL_Palette *a, const SDL_Color *b, int c, int d),(a,b,c,d),return)
  16.322 +SDL_DYNAPI_PROC(void,SDL_FreePalette,(SDL_Palette *a),(a),)
  16.323 +SDL_DYNAPI_PROC(Uint32,SDL_MapRGB,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
  16.324 +SDL_DYNAPI_PROC(Uint32,SDL_MapRGBA,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return)
  16.325 +SDL_DYNAPI_PROC(void,SDL_GetRGB,(Uint32 a, const SDL_PixelFormat *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),)
  16.326 +SDL_DYNAPI_PROC(void,SDL_GetRGBA,(Uint32 a, const SDL_PixelFormat *b, Uint8 *c, Uint8 *d, Uint8 *e, Uint8 *f),(a,b,c,d,e,f),)
  16.327 +SDL_DYNAPI_PROC(void,SDL_CalculateGammaRamp,(float a, Uint16 *b),(a,b),)
  16.328 +SDL_DYNAPI_PROC(const char*,SDL_GetPlatform,(void),(),return)
  16.329 +SDL_DYNAPI_PROC(SDL_PowerState,SDL_GetPowerInfo,(int *a, int *b),(a,b),return)
  16.330 +SDL_DYNAPI_PROC(SDL_bool,SDL_HasIntersection,(const SDL_Rect *a, const SDL_Rect *b),(a,b),return)
  16.331 +SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectRect,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),return)
  16.332 +SDL_DYNAPI_PROC(void,SDL_UnionRect,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),)
  16.333 +SDL_DYNAPI_PROC(SDL_bool,SDL_EnclosePoints,(const SDL_Point *a, int b, const SDL_Rect *c, SDL_Rect *d),(a,b,c,d),return)
  16.334 +SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectRectAndLine,(const SDL_Rect *a, int *b, int *c, int *d, int *e),(a,b,c,d,e),return)
  16.335 +SDL_DYNAPI_PROC(int,SDL_GetNumRenderDrivers,(void),(),return)
  16.336 +SDL_DYNAPI_PROC(int,SDL_GetRenderDriverInfo,(int a, SDL_RendererInfo *b),(a,b),return)
  16.337 +SDL_DYNAPI_PROC(int,SDL_CreateWindowAndRenderer,(int a, int b, Uint32 c, SDL_Window **d, SDL_Renderer **e),(a,b,c,d,e),return)
  16.338 +SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateRenderer,(SDL_Window *a, int b, Uint32 c),(a,b,c),return)
  16.339 +SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateSoftwareRenderer,(SDL_Surface *a),(a),return)
  16.340 +SDL_DYNAPI_PROC(SDL_Renderer*,SDL_GetRenderer,(SDL_Window *a),(a),return)
  16.341 +SDL_DYNAPI_PROC(int,SDL_GetRendererInfo,(SDL_Renderer *a, SDL_RendererInfo *b),(a,b),return)
  16.342 +SDL_DYNAPI_PROC(int,SDL_GetRendererOutputSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),return)
  16.343 +SDL_DYNAPI_PROC(SDL_Texture*,SDL_CreateTexture,(SDL_Renderer *a, Uint32 b, int c, int d, int e),(a,b,c,d,e),return)
  16.344 +SDL_DYNAPI_PROC(SDL_Texture*,SDL_CreateTextureFromSurface,(SDL_Renderer *a, SDL_Surface *b),(a,b),return)
  16.345 +SDL_DYNAPI_PROC(int,SDL_QueryTexture,(SDL_Texture *a, Uint32 *b, int *c, int *d, int *e),(a,b,c,d,e),return)
  16.346 +SDL_DYNAPI_PROC(int,SDL_SetTextureColorMod,(SDL_Texture *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
  16.347 +SDL_DYNAPI_PROC(int,SDL_GetTextureColorMod,(SDL_Texture *a, Uint8 *b, Uint8 *c, Uint8 *d),(a,b,c,d),return)
  16.348 +SDL_DYNAPI_PROC(int,SDL_SetTextureAlphaMod,(SDL_Texture *a, Uint8 b),(a,b),return)
  16.349 +SDL_DYNAPI_PROC(int,SDL_GetTextureAlphaMod,(SDL_Texture *a, Uint8 *b),(a,b),return)
  16.350 +SDL_DYNAPI_PROC(int,SDL_SetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode b),(a,b),return)
  16.351 +SDL_DYNAPI_PROC(int,SDL_GetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode *b),(a,b),return)
  16.352 +SDL_DYNAPI_PROC(int,SDL_UpdateTexture,(SDL_Texture *a, const SDL_Rect *b, const void *c, int d),(a,b,c,d),return)
  16.353 +SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
  16.354 +SDL_DYNAPI_PROC(int,SDL_LockTexture,(SDL_Texture *a, const SDL_Rect *b, void **c, int *d),(a,b,c,d),return)
  16.355 +SDL_DYNAPI_PROC(void,SDL_UnlockTexture,(SDL_Texture *a),(a),)
  16.356 +SDL_DYNAPI_PROC(SDL_bool,SDL_RenderTargetSupported,(SDL_Renderer *a),(a),return)
  16.357 +SDL_DYNAPI_PROC(int,SDL_SetRenderTarget,(SDL_Renderer *a, SDL_Texture *b),(a,b),return)
  16.358 +SDL_DYNAPI_PROC(SDL_Texture*,SDL_GetRenderTarget,(SDL_Renderer *a),(a),return)
  16.359 +SDL_DYNAPI_PROC(int,SDL_RenderSetLogicalSize,(SDL_Renderer *a, int b, int c),(a,b,c),return)
  16.360 +SDL_DYNAPI_PROC(void,SDL_RenderGetLogicalSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),)
  16.361 +SDL_DYNAPI_PROC(int,SDL_RenderSetViewport,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
  16.362 +SDL_DYNAPI_PROC(void,SDL_RenderGetViewport,(SDL_Renderer *a, SDL_Rect *b),(a,b),)
  16.363 +SDL_DYNAPI_PROC(int,SDL_RenderSetClipRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
  16.364 +SDL_DYNAPI_PROC(void,SDL_RenderGetClipRect,(SDL_Renderer *a, SDL_Rect *b),(a,b),)
  16.365 +SDL_DYNAPI_PROC(int,SDL_RenderSetScale,(SDL_Renderer *a, float b, float c),(a,b,c),return)
  16.366 +SDL_DYNAPI_PROC(void,SDL_RenderGetScale,(SDL_Renderer *a, float *b, float *c),(a,b,c),)
  16.367 +SDL_DYNAPI_PROC(int,SDL_SetRenderDrawColor,(SDL_Renderer *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return)
  16.368 +SDL_DYNAPI_PROC(int,SDL_GetRenderDrawColor,(SDL_Renderer *a, Uint8 *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),return)
  16.369 +SDL_DYNAPI_PROC(int,SDL_SetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode b),(a,b),return)
  16.370 +SDL_DYNAPI_PROC(int,SDL_GetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode *b),(a,b),return)
  16.371 +SDL_DYNAPI_PROC(int,SDL_RenderClear,(SDL_Renderer *a),(a),return)
  16.372 +SDL_DYNAPI_PROC(int,SDL_RenderDrawPoint,(SDL_Renderer *a, int b, int c),(a,b,c),return)
  16.373 +SDL_DYNAPI_PROC(int,SDL_RenderDrawPoints,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return)
  16.374 +SDL_DYNAPI_PROC(int,SDL_RenderDrawLine,(SDL_Renderer *a, int b, int c, int d, int e),(a,b,c,d,e),return)
  16.375 +SDL_DYNAPI_PROC(int,SDL_RenderDrawLines,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return)
  16.376 +SDL_DYNAPI_PROC(int,SDL_RenderDrawRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
  16.377 +SDL_DYNAPI_PROC(int,SDL_RenderDrawRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return)
  16.378 +SDL_DYNAPI_PROC(int,SDL_RenderFillRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
  16.379 +SDL_DYNAPI_PROC(int,SDL_RenderFillRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return)
  16.380 +SDL_DYNAPI_PROC(int,SDL_RenderCopy,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d),(a,b,c,d),return)
  16.381 +SDL_DYNAPI_PROC(int,SDL_RenderCopyEx,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d, const double e, const SDL_Point *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return)
  16.382 +SDL_DYNAPI_PROC(int,SDL_RenderReadPixels,(SDL_Renderer *a, const SDL_Rect *b, Uint32 c, void *d, int e),(a,b,c,d,e),return)
  16.383 +SDL_DYNAPI_PROC(void,SDL_RenderPresent,(SDL_Renderer *a),(a),)
  16.384 +SDL_DYNAPI_PROC(void,SDL_DestroyTexture,(SDL_Texture *a),(a),)
  16.385 +SDL_DYNAPI_PROC(void,SDL_DestroyRenderer,(SDL_Renderer *a),(a),)
  16.386 +SDL_DYNAPI_PROC(int,SDL_GL_BindTexture,(SDL_Texture *a, float *b, float *c),(a,b,c),return)
  16.387 +SDL_DYNAPI_PROC(int,SDL_GL_UnbindTexture,(SDL_Texture *a),(a),return)
  16.388 +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFile,(const char *a, const char *b),(a,b),return)
  16.389 +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromMem,(void *a, int b),(a,b),return)
  16.390 +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromConstMem,(const void *a, int b),(a,b),return)
  16.391 +SDL_DYNAPI_PROC(SDL_RWops*,SDL_AllocRW,(void),(),return)
  16.392 +SDL_DYNAPI_PROC(void,SDL_FreeRW,(SDL_RWops *a),(a),)
  16.393 +SDL_DYNAPI_PROC(Uint8,SDL_ReadU8,(SDL_RWops *a),(a),return)
  16.394 +SDL_DYNAPI_PROC(Uint16,SDL_ReadLE16,(SDL_RWops *a),(a),return)
  16.395 +SDL_DYNAPI_PROC(Uint16,SDL_ReadBE16,(SDL_RWops *a),(a),return)
  16.396 +SDL_DYNAPI_PROC(Uint32,SDL_ReadLE32,(SDL_RWops *a),(a),return)
  16.397 +SDL_DYNAPI_PROC(Uint32,SDL_ReadBE32,(SDL_RWops *a),(a),return)
  16.398 +SDL_DYNAPI_PROC(Uint64,SDL_ReadLE64,(SDL_RWops *a),(a),return)
  16.399 +SDL_DYNAPI_PROC(Uint64,SDL_ReadBE64,(SDL_RWops *a),(a),return)
  16.400 +SDL_DYNAPI_PROC(size_t,SDL_WriteU8,(SDL_RWops *a, Uint8 b),(a,b),return)
  16.401 +SDL_DYNAPI_PROC(size_t,SDL_WriteLE16,(SDL_RWops *a, Uint16 b),(a,b),return)
  16.402 +SDL_DYNAPI_PROC(size_t,SDL_WriteBE16,(SDL_RWops *a, Uint16 b),(a,b),return)
  16.403 +SDL_DYNAPI_PROC(size_t,SDL_WriteLE32,(SDL_RWops *a, Uint32 b),(a,b),return)
  16.404 +SDL_DYNAPI_PROC(size_t,SDL_WriteBE32,(SDL_RWops *a, Uint32 b),(a,b),return)
  16.405 +SDL_DYNAPI_PROC(size_t,SDL_WriteLE64,(SDL_RWops *a, Uint64 b),(a,b),return)
  16.406 +SDL_DYNAPI_PROC(size_t,SDL_WriteBE64,(SDL_RWops *a, Uint64 b),(a,b),return)
  16.407 +SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateShapedWindow,(const char *a, unsigned int b, unsigned int c, unsigned int d, unsigned int e, Uint32 f),(a,b,c,d,e,f),return)
  16.408 +SDL_DYNAPI_PROC(SDL_bool,SDL_IsShapedWindow,(const SDL_Window *a),(a),return)
  16.409 +SDL_DYNAPI_PROC(int,SDL_SetWindowShape,(SDL_Window *a, SDL_Surface *b, SDL_WindowShapeMode *c),(a,b,c),return)
  16.410 +SDL_DYNAPI_PROC(int,SDL_GetShapedWindowMode,(SDL_Window *a, SDL_WindowShapeMode *b),(a,b),return)
  16.411 +SDL_DYNAPI_PROC(void*,SDL_malloc,(size_t a),(a),return)
  16.412 +SDL_DYNAPI_PROC(void*,SDL_calloc,(size_t a, size_t b),(a,b),return)
  16.413 +SDL_DYNAPI_PROC(void*,SDL_realloc,(void *a, size_t b),(a,b),return)
  16.414 +SDL_DYNAPI_PROC(void,SDL_free,(void *a),(a),)
  16.415 +SDL_DYNAPI_PROC(char*,SDL_getenv,(const char *a),(a),return)
  16.416 +SDL_DYNAPI_PROC(int,SDL_setenv,(const char *a, const char *b, int c),(a,b,c),return)
  16.417 +SDL_DYNAPI_PROC(void,SDL_qsort,(void *a, size_t b, size_t c, int (*d)(const void *, const void *)),(a,b,c,d),)
  16.418 +SDL_DYNAPI_PROC(int,SDL_abs,(int a),(a),return)
  16.419 +SDL_DYNAPI_PROC(int,SDL_isdigit,(int a),(a),return)
  16.420 +SDL_DYNAPI_PROC(int,SDL_isspace,(int a),(a),return)
  16.421 +SDL_DYNAPI_PROC(int,SDL_toupper,(int a),(a),return)
  16.422 +SDL_DYNAPI_PROC(int,SDL_tolower,(int a),(a),return)
  16.423 +SDL_DYNAPI_PROC(void*,SDL_memset,(void *a, int b, size_t c),(a,b,c),return)
  16.424 +SDL_DYNAPI_PROC(void*,SDL_memcpy,(void *a, const void *b, size_t c),(a,b,c),return)
  16.425 +SDL_DYNAPI_PROC(void*,SDL_memmove,(void *a, const void *b, size_t c),(a,b,c),return)
  16.426 +SDL_DYNAPI_PROC(int,SDL_memcmp,(const void *a, const void *b, size_t c),(a,b,c),return)
  16.427 +SDL_DYNAPI_PROC(size_t,SDL_wcslen,(const wchar_t *a),(a),return)
  16.428 +SDL_DYNAPI_PROC(size_t,SDL_wcslcpy,(wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
  16.429 +SDL_DYNAPI_PROC(size_t,SDL_wcslcat,(wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
  16.430 +SDL_DYNAPI_PROC(size_t,SDL_strlen,(const char *a),(a),return)
  16.431 +SDL_DYNAPI_PROC(size_t,SDL_strlcpy,(char *a, const char *b, size_t c),(a,b,c),return)
  16.432 +SDL_DYNAPI_PROC(size_t,SDL_utf8strlcpy,(char *a, const char *b, size_t c),(a,b,c),return)
  16.433 +SDL_DYNAPI_PROC(size_t,SDL_strlcat,(char *a, const char *b, size_t c),(a,b,c),return)
  16.434 +SDL_DYNAPI_PROC(char*,SDL_strdup,(const char *a),(a),return)
  16.435 +SDL_DYNAPI_PROC(char*,SDL_strrev,(char *a),(a),return)
  16.436 +SDL_DYNAPI_PROC(char*,SDL_strupr,(char *a),(a),return)
  16.437 +SDL_DYNAPI_PROC(char*,SDL_strlwr,(char *a),(a),return)
  16.438 +SDL_DYNAPI_PROC(char*,SDL_strchr,(const char *a, int b),(a,b),return)
  16.439 +SDL_DYNAPI_PROC(char*,SDL_strrchr,(const char *a, int b),(a,b),return)
  16.440 +SDL_DYNAPI_PROC(char*,SDL_strstr,(const char *a, const char *b),(a,b),return)
  16.441 +SDL_DYNAPI_PROC(char*,SDL_itoa,(int a, char *b, int c),(a,b,c),return)
  16.442 +SDL_DYNAPI_PROC(char*,SDL_uitoa,(unsigned int a, char *b, int c),(a,b,c),return)
  16.443 +SDL_DYNAPI_PROC(char*,SDL_ltoa,(long a, char *b, int c),(a,b,c),return)
  16.444 +SDL_DYNAPI_PROC(char*,SDL_ultoa,(unsigned long a, char *b, int c),(a,b,c),return)
  16.445 +SDL_DYNAPI_PROC(char*,SDL_lltoa,(Sint64 a, char *b, int c),(a,b,c),return)
  16.446 +SDL_DYNAPI_PROC(char*,SDL_ulltoa,(Uint64 a, char *b, int c),(a,b,c),return)
  16.447 +SDL_DYNAPI_PROC(int,SDL_atoi,(const char *a),(a),return)
  16.448 +SDL_DYNAPI_PROC(double,SDL_atof,(const char *a),(a),return)
  16.449 +SDL_DYNAPI_PROC(long,SDL_strtol,(const char *a, char **b, int c),(a,b,c),return)
  16.450 +SDL_DYNAPI_PROC(unsigned long,SDL_strtoul,(const char *a, char **b, int c),(a,b,c),return)
  16.451 +SDL_DYNAPI_PROC(Sint64,SDL_strtoll,(const char *a, char **b, int c),(a,b,c),return)
  16.452 +SDL_DYNAPI_PROC(Uint64,SDL_strtoull,(const char *a, char **b, int c),(a,b,c),return)
  16.453 +SDL_DYNAPI_PROC(double,SDL_strtod,(const char *a, char **b),(a,b),return)
  16.454 +SDL_DYNAPI_PROC(int,SDL_strcmp,(const char *a, const char *b),(a,b),return)
  16.455 +SDL_DYNAPI_PROC(int,SDL_strncmp,(const char *a, const char *b, size_t c),(a,b,c),return)
  16.456 +SDL_DYNAPI_PROC(int,SDL_strcasecmp,(const char *a, const char *b),(a,b),return)
  16.457 +SDL_DYNAPI_PROC(int,SDL_strncasecmp,(const char *a, const char *b, size_t c),(a,b,c),return)
  16.458 +SDL_DYNAPI_PROC(int,SDL_vsnprintf,(char *a, size_t b, const char *c, va_list d),(a,b,c,d),return)
  16.459 +SDL_DYNAPI_PROC(double,SDL_acos,(double a),(a),return)
  16.460 +SDL_DYNAPI_PROC(double,SDL_asin,(double a),(a),return)
  16.461 +SDL_DYNAPI_PROC(double,SDL_atan,(double a),(a),return)
  16.462 +SDL_DYNAPI_PROC(double,SDL_atan2,(double a, double b),(a,b),return)
  16.463 +SDL_DYNAPI_PROC(double,SDL_ceil,(double a),(a),return)
  16.464 +SDL_DYNAPI_PROC(double,SDL_copysign,(double a, double b),(a,b),return)
  16.465 +SDL_DYNAPI_PROC(double,SDL_cos,(double a),(a),return)
  16.466 +SDL_DYNAPI_PROC(float,SDL_cosf,(float a),(a),return)
  16.467 +SDL_DYNAPI_PROC(double,SDL_fabs,(double a),(a),return)
  16.468 +SDL_DYNAPI_PROC(double,SDL_floor,(double a),(a),return)
  16.469 +SDL_DYNAPI_PROC(double,SDL_log,(double a),(a),return)
  16.470 +SDL_DYNAPI_PROC(double,SDL_pow,(double a, double b),(a,b),return)
  16.471 +SDL_DYNAPI_PROC(double,SDL_scalbn,(double a, int b),(a,b),return)
  16.472 +SDL_DYNAPI_PROC(double,SDL_sin,(double a),(a),return)
  16.473 +SDL_DYNAPI_PROC(float,SDL_sinf,(float a),(a),return)
  16.474 +SDL_DYNAPI_PROC(double,SDL_sqrt,(double a),(a),return)
  16.475 +SDL_DYNAPI_PROC(SDL_iconv_t,SDL_iconv_open,(const char *a, const char *b),(a,b),return)
  16.476 +SDL_DYNAPI_PROC(int,SDL_iconv_close,(SDL_iconv_t a),(a),return)
  16.477 +SDL_DYNAPI_PROC(size_t,SDL_iconv,(SDL_iconv_t a, const char **b, size_t *c, char **d, size_t *e),(a,b,c,d,e),return)
  16.478 +SDL_DYNAPI_PROC(char*,SDL_iconv_string,(const char *a, const char *b, const char *c, size_t d),(a,b,c,d),return)
  16.479 +SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateRGBSurface,(Uint32 a, int b, int c, int d, Uint32 e, Uint32 f, Uint32 g, Uint32 h),(a,b,c,d,e,f,g,h),return)
  16.480 +SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateRGBSurfaceFrom,(void *a, int b, int c, int d, int e, Uint32 f, Uint32 g, Uint32 h, Uint32 i),(a,b,c,d,e,f,g,h,i),return)
  16.481 +SDL_DYNAPI_PROC(void,SDL_FreeSurface,(SDL_Surface *a),(a),)
  16.482 +SDL_DYNAPI_PROC(int,SDL_SetSurfacePalette,(SDL_Surface *a, SDL_Palette *b),(a,b),return)
  16.483 +SDL_DYNAPI_PROC(int,SDL_LockSurface,(SDL_Surface *a),(a),return)
  16.484 +SDL_DYNAPI_PROC(void,SDL_UnlockSurface,(SDL_Surface *a),(a),)
  16.485 +SDL_DYNAPI_PROC(SDL_Surface*,SDL_LoadBMP_RW,(SDL_RWops *a, int b),(a,b),return)
  16.486 +SDL_DYNAPI_PROC(int,SDL_SaveBMP_RW,(SDL_Surface *a, SDL_RWops *b, int c),(a,b,c),return)
  16.487 +SDL_DYNAPI_PROC(int,SDL_SetSurfaceRLE,(SDL_Surface *a, int b),(a,b),return)
  16.488 +SDL_DYNAPI_PROC(int,SDL_SetColorKey,(SDL_Surface *a, int b, Uint32 c),(a,b,c),return)
  16.489 +SDL_DYNAPI_PROC(int,SDL_GetColorKey,(SDL_Surface *a, Uint32 *b),(a,b),return)
  16.490 +SDL_DYNAPI_PROC(int,SDL_SetSurfaceColorMod,(SDL_Surface *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
  16.491 +SDL_DYNAPI_PROC(int,SDL_GetSurfaceColorMod,(SDL_Surface *a, Uint8 *b, Uint8 *c, Uint8 *d),(a,b,c,d),return)
  16.492 +SDL_DYNAPI_PROC(int,SDL_SetSurfaceAlphaMod,(SDL_Surface *a, Uint8 b),(a,b),return)
  16.493 +SDL_DYNAPI_PROC(int,SDL_GetSurfaceAlphaMod,(SDL_Surface *a, Uint8 *b),(a,b),return)
  16.494 +SDL_DYNAPI_PROC(int,SDL_SetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode b),(a,b),return)
  16.495 +SDL_DYNAPI_PROC(int,SDL_GetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode *b),(a,b),return)
  16.496 +SDL_DYNAPI_PROC(SDL_bool,SDL_SetClipRect,(SDL_Surface *a, const SDL_Rect *b),(a,b),return)
  16.497 +SDL_DYNAPI_PROC(void,SDL_GetClipRect,(SDL_Surface *a, SDL_Rect *b),(a,b),)
  16.498 +SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurface,(SDL_Surface *a, const SDL_PixelFormat *b, Uint32 c),(a,b,c),return)
  16.499 +SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurfaceFormat,(SDL_Surface *a, Uint32 b, Uint32 c),(a,b,c),return)
  16.500 +SDL_DYNAPI_PROC(int,SDL_ConvertPixels,(int a, int b, Uint32 c, const void *d, int e, Uint32 f, void *g, int h),(a,b,c,d,e,f,g,h),return)
  16.501 +SDL_DYNAPI_PROC(int,SDL_FillRect,(SDL_Surface *a, const SDL_Rect *b, Uint32 c),(a,b,c),return)
  16.502 +SDL_DYNAPI_PROC(int,SDL_FillRects,(SDL_Surface *a, const SDL_Rect *b, int c, Uint32 d),(a,b,c,d),return)
  16.503 +SDL_DYNAPI_PROC(int,SDL_UpperBlit,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
  16.504 +SDL_DYNAPI_PROC(int,SDL_LowerBlit,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
  16.505 +SDL_DYNAPI_PROC(int,SDL_SoftStretch,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d),(a,b,c,d),return)
  16.506 +SDL_DYNAPI_PROC(int,SDL_UpperBlitScaled,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
  16.507 +SDL_DYNAPI_PROC(int,SDL_LowerBlitScaled,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
  16.508 +SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowWMInfo,(SDL_Window *a, SDL_SysWMinfo *b),(a,b),return)
  16.509 +SDL_DYNAPI_PROC(const char*,SDL_GetThreadName,(SDL_Thread *a),(a),return)
  16.510 +SDL_DYNAPI_PROC(SDL_threadID,SDL_ThreadID,(void),(),return)
  16.511 +SDL_DYNAPI_PROC(SDL_threadID,SDL_GetThreadID,(SDL_Thread *a),(a),return)
  16.512 +SDL_DYNAPI_PROC(int,SDL_SetThreadPriority,(SDL_ThreadPriority a),(a),return)
  16.513 +SDL_DYNAPI_PROC(void,SDL_WaitThread,(SDL_Thread *a, int *b),(a,b),)
  16.514 +SDL_DYNAPI_PROC(void,SDL_DetachThread,(SDL_Thread *a),(a),)
  16.515 +SDL_DYNAPI_PROC(SDL_TLSID,SDL_TLSCreate,(void),(),return)
  16.516 +SDL_DYNAPI_PROC(void*,SDL_TLSGet,(SDL_TLSID a),(a),return)
  16.517 +SDL_DYNAPI_PROC(int,SDL_TLSSet,(SDL_TLSID a, const void *b, void (*c)(void*)),(a,b,c),return)
  16.518 +SDL_DYNAPI_PROC(Uint32,SDL_GetTicks,(void),(),return)
  16.519 +SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceCounter,(void),(),return)
  16.520 +SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceFrequency,(void),(),return)
  16.521 +SDL_DYNAPI_PROC(void,SDL_Delay,(Uint32 a),(a),)
  16.522 +SDL_DYNAPI_PROC(SDL_TimerID,SDL_AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return)
  16.523 +SDL_DYNAPI_PROC(SDL_bool,SDL_RemoveTimer,(SDL_TimerID a),(a),return)
  16.524 +SDL_DYNAPI_PROC(int,SDL_GetNumTouchDevices,(void),(),return)
  16.525 +SDL_DYNAPI_PROC(SDL_TouchID,SDL_GetTouchDevice,(int a),(a),return)
  16.526 +SDL_DYNAPI_PROC(int,SDL_GetNumTouchFingers,(SDL_TouchID a),(a),return)
  16.527 +SDL_DYNAPI_PROC(SDL_Finger*,SDL_GetTouchFinger,(SDL_TouchID a, int b),(a,b),return)
  16.528 +SDL_DYNAPI_PROC(void,SDL_GetVersion,(SDL_version *a),(a),)
  16.529 +SDL_DYNAPI_PROC(const char*,SDL_GetRevision,(void),(),return)
  16.530 +SDL_DYNAPI_PROC(int,SDL_GetRevisionNumber,(void),(),return)
  16.531 +SDL_DYNAPI_PROC(int,SDL_GetNumVideoDrivers,(void),(),return)
  16.532 +SDL_DYNAPI_PROC(const char*,SDL_GetVideoDriver,(int a),(a),return)
  16.533 +SDL_DYNAPI_PROC(int,SDL_VideoInit,(const char *a),(a),return)
  16.534 +SDL_DYNAPI_PROC(void,SDL_VideoQuit,(void),(),)
  16.535 +SDL_DYNAPI_PROC(const char*,SDL_GetCurrentVideoDriver,(void),(),return)
  16.536 +SDL_DYNAPI_PROC(int,SDL_GetNumVideoDisplays,(void),(),return)
  16.537 +SDL_DYNAPI_PROC(const char*,SDL_GetDisplayName,(int a),(a),return)
  16.538 +SDL_DYNAPI_PROC(int,SDL_GetDisplayBounds,(int a, SDL_Rect *b),(a,b),return)
  16.539 +SDL_DYNAPI_PROC(int,SDL_GetNumDisplayModes,(int a),(a),return)
  16.540 +SDL_DYNAPI_PROC(int,SDL_GetDisplayMode,(int a, int b, SDL_DisplayMode *c),(a,b,c),return)
  16.541 +SDL_DYNAPI_PROC(int,SDL_GetDesktopDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return)
  16.542 +SDL_DYNAPI_PROC(int,SDL_GetCurrentDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return)
  16.543 +SDL_DYNAPI_PROC(SDL_DisplayMode*,SDL_GetClosestDisplayMode,(int a, const SDL_DisplayMode *b, SDL_DisplayMode *c),(a,b,c),return)
  16.544 +SDL_DYNAPI_PROC(int,SDL_GetWindowDisplayIndex,(SDL_Window *a),(a),return)
  16.545 +SDL_DYNAPI_PROC(int,SDL_SetWindowDisplayMode,(SDL_Window *a, const SDL_DisplayMode *b),(a,b),return)
  16.546 +SDL_DYNAPI_PROC(int,SDL_GetWindowDisplayMode,(SDL_Window *a, SDL_DisplayMode *b),(a,b),return)
  16.547 +SDL_DYNAPI_PROC(Uint32,SDL_GetWindowPixelFormat,(SDL_Window *a),(a),return)
  16.548 +SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateWindow,(const char *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return)
  16.549 +SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateWindowFrom,(const void *a),(a),return)
  16.550 +SDL_DYNAPI_PROC(Uint32,SDL_GetWindowID,(SDL_Window *a),(a),return)
  16.551 +SDL_DYNAPI_PROC(SDL_Window*,SDL_GetWindowFromID,(Uint32 a),(a),return)
  16.552 +SDL_DYNAPI_PROC(Uint32,SDL_GetWindowFlags,(SDL_Window *a),(a),return)
  16.553 +SDL_DYNAPI_PROC(void,SDL_SetWindowTitle,(SDL_Window *a, const char *b),(a,b),)
  16.554 +SDL_DYNAPI_PROC(const char*,SDL_GetWindowTitle,(SDL_Window *a),(a),return)
  16.555 +SDL_DYNAPI_PROC(void,SDL_SetWindowIcon,(SDL_Window *a, SDL_Surface *b),(a,b),)
  16.556 +SDL_DYNAPI_PROC(void*,SDL_SetWindowData,(SDL_Window *a, const char *b, void *c),(a,b,c),return)
  16.557 +SDL_DYNAPI_PROC(void*,SDL_GetWindowData,(SDL_Window *a, const char *b),(a,b),return)
  16.558 +SDL_DYNAPI_PROC(void,SDL_SetWindowPosition,(SDL_Window *a, int b, int c),(a,b,c),)
  16.559 +SDL_DYNAPI_PROC(void,SDL_GetWindowPosition,(SDL_Window *a, int *b, int *c),(a,b,c),)
  16.560 +SDL_DYNAPI_PROC(void,SDL_SetWindowSize,(SDL_Window *a, int b, int c),(a,b,c),)
  16.561 +SDL_DYNAPI_PROC(void,SDL_GetWindowSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
  16.562 +SDL_DYNAPI_PROC(void,SDL_SetWindowMinimumSize,(SDL_Window *a, int b, int c),(a,b,c),)
  16.563 +SDL_DYNAPI_PROC(void,SDL_GetWindowMinimumSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
  16.564 +SDL_DYNAPI_PROC(void,SDL_SetWindowMaximumSize,(SDL_Window *a, int b, int c),(a,b,c),)
  16.565 +SDL_DYNAPI_PROC(void,SDL_GetWindowMaximumSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
  16.566 +SDL_DYNAPI_PROC(void,SDL_SetWindowBordered,(SDL_Window *a, SDL_bool b),(a,b),)
  16.567 +SDL_DYNAPI_PROC(void,SDL_ShowWindow,(SDL_Window *a),(a),)
  16.568 +SDL_DYNAPI_PROC(void,SDL_HideWindow,(SDL_Window *a),(a),)
  16.569 +SDL_DYNAPI_PROC(void,SDL_RaiseWindow,(SDL_Window *a),(a),)
  16.570 +SDL_DYNAPI_PROC(void,SDL_MaximizeWindow,(SDL_Window *a),(a),)
  16.571 +SDL_DYNAPI_PROC(void,SDL_MinimizeWindow,(SDL_Window *a),(a),)
  16.572 +SDL_DYNAPI_PROC(void,SDL_RestoreWindow,(SDL_Window *a),(a),)
  16.573 +SDL_DYNAPI_PROC(int,SDL_SetWindowFullscreen,(SDL_Window *a, Uint32 b),(a,b),return)
  16.574 +SDL_DYNAPI_PROC(SDL_Surface*,SDL_GetWindowSurface,(SDL_Window *a),(a),return)
  16.575 +SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurface,(SDL_Window *a),(a),return)
  16.576 +SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return)
  16.577 +SDL_DYNAPI_PROC(void,SDL_SetWindowGrab,(SDL_Window *a, SDL_bool b),(a,b),)
  16.578 +SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowGrab,(SDL_Window *a),(a),return)
  16.579 +SDL_DYNAPI_PROC(int,SDL_SetWindowBrightness,(SDL_Window *a, float b),(a,b),return)
  16.580 +SDL_DYNAPI_PROC(float,SDL_GetWindowBrightness,(SDL_Window *a),(a),return)
  16.581 +SDL_DYNAPI_PROC(int,SDL_SetWindowGammaRamp,(SDL_Window *a, const Uint16 *b, const Uint16 *c, const Uint16 *d),(a,b,c,d),return)
  16.582 +SDL_DYNAPI_PROC(int,SDL_GetWindowGammaRamp,(SDL_Window *a, Uint16 *b, Uint16 *c, Uint16 *d),(a,b,c,d),return)
  16.583 +SDL_DYNAPI_PROC(void,SDL_DestroyWindow,(SDL_Window *a),(a),)
  16.584 +SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenSaverEnabled,(void),(),return)
  16.585 +SDL_DYNAPI_PROC(void,SDL_EnableScreenSaver,(void),(),)
  16.586 +SDL_DYNAPI_PROC(void,SDL_DisableScreenSaver,(void),(),)
  16.587 +SDL_DYNAPI_PROC(int,SDL_GL_LoadLibrary,(const char *a),(a),return)
  16.588 +SDL_DYNAPI_PROC(void*,SDL_GL_GetProcAddress,(const char *a),(a),return)
  16.589 +SDL_DYNAPI_PROC(void,SDL_GL_UnloadLibrary,(void),(),)
  16.590 +SDL_DYNAPI_PROC(SDL_bool,SDL_GL_ExtensionSupported,(const char *a),(a),return)
  16.591 +SDL_DYNAPI_PROC(int,SDL_GL_SetAttribute,(SDL_GLattr a, int b),(a,b),return)
  16.592 +SDL_DYNAPI_PROC(int,SDL_GL_GetAttribute,(SDL_GLattr a, int *b),(a,b),return)
  16.593 +SDL_DYNAPI_PROC(SDL_GLContext,SDL_GL_CreateContext,(SDL_Window *a),(a),return)
  16.594 +SDL_DYNAPI_PROC(int,SDL_GL_MakeCurrent,(SDL_Window *a, SDL_GLContext b),(a,b),return)
  16.595 +SDL_DYNAPI_PROC(SDL_Window*,SDL_GL_GetCurrentWindow,(void),(),return)
  16.596 +SDL_DYNAPI_PROC(SDL_GLContext,SDL_GL_GetCurrentContext,(void),(),return)
  16.597 +SDL_DYNAPI_PROC(void,SDL_GL_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
  16.598 +SDL_DYNAPI_PROC(int,SDL_GL_SetSwapInterval,(int a),(a),return)
  16.599 +SDL_DYNAPI_PROC(int,SDL_GL_GetSwapInterval,(void),(),return)
  16.600 +SDL_DYNAPI_PROC(void,SDL_GL_SwapWindow,(SDL_Window *a),(a),)
  16.601 +SDL_DYNAPI_PROC(void,SDL_GL_DeleteContext,(SDL_GLContext a),(a),)
  16.602 +SDL_DYNAPI_PROC(int,SDL_vsscanf,(const char *a, const char *b, va_list c),(a,b,c),return)
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/src/dynapi/gendynapi.pl	Mon Dec 09 16:03:18 2013 -0500
    17.3 @@ -0,0 +1,141 @@
    17.4 +#!/usr/bin/perl -w
    17.5 +
    17.6 +#  Simple DirectMedia Layer
    17.7 +#  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
    17.8 +#
    17.9 +#  This software is provided 'as-is', without any express or implied
   17.10 +#  warranty.  In no event will the authors be held liable for any damages
   17.11 +#  arising from the use of this software.
   17.12 +#
   17.13 +#  Permission is granted to anyone to use this software for any purpose,
   17.14 +#  including commercial applications, and to alter it and redistribute it
   17.15 +#  freely, subject to the following restrictions:
   17.16 +#
   17.17 +#  1. The origin of this software must not be misrepresented; you must not
   17.18 +#     claim that you wrote the original software. If you use this software
   17.19 +#     in a product, an acknowledgment in the product documentation would be
   17.20 +#     appreciated but is not required.
   17.21 +#  2. Altered source versions must be plainly marked as such, and must not be
   17.22 +#     misrepresented as being the original software.
   17.23 +#  3. This notice may not be removed or altered from any source distribution.
   17.24 +
   17.25 +# WHAT IS THIS?
   17.26 +#  When you add a public API to SDL, please run this script, make sure the
   17.27 +#  output looks sane (hg diff, it adds to existing files), and commit it.
   17.28 +#  It keeps the dynamic API jump table operating correctly.
   17.29 +
   17.30 +# If you wanted this to be readable, you shouldn't have used perl.
   17.31 +
   17.32 +use warnings;
   17.33 +use strict;
   17.34 +use File::Basename;
   17.35 +
   17.36 +chdir(dirname(__FILE__) . '/../..');
   17.37 +my $sdl_dynapi_procs_h = "src/dynapi/SDL_dynapi_procs.h";
   17.38 +my $sdl_dynapi_overrides_h = "src/dynapi/SDL_dynapi_overrides.h";
   17.39 +
   17.40 +my %existing = ();
   17.41 +if (-f $sdl_dynapi_procs_h) {
   17.42 +    open(SDL_DYNAPI_PROCS_H, '<', $sdl_dynapi_procs_h) or die("Can't open $sdl_dynapi_procs_h: $!\n");
   17.43 +    while (<SDL_DYNAPI_PROCS_H>) {
   17.44 +        if (/\ASDL_DYNAPI_PROC\(.*?,(.*?),/) {
   17.45 +            $existing{$1} = 1;
   17.46 +        }
   17.47 +    }
   17.48 +    close(SDL_DYNAPI_PROCS_H)
   17.49 +}
   17.50 +
   17.51 +open(SDL_DYNAPI_PROCS_H, '>>', $sdl_dynapi_procs_h) or die("Can't open $sdl_dynapi_procs_h: $!\n");
   17.52 +open(SDL_DYNAPI_OVERRIDES_H, '>>', $sdl_dynapi_overrides_h) or die("Can't open $sdl_dynapi_overrides_h: $!\n");
   17.53 +
   17.54 +opendir(HEADERS, 'include') or die("Can't open include dir: $!\n");
   17.55 +while (readdir(HEADERS)) {
   17.56 +    next if not /\.h\Z/;
   17.57 +    my $header = "include/$_";
   17.58 +    open(HEADER, '<', $header) or die("Can't open $header: $!\n");
   17.59 +    while (<HEADER>) {
   17.60 +        chomp;
   17.61 +        next if not /\A\s*extern\s+DECLSPEC/;
   17.62 +        my $decl = "$_ ";
   17.63 +        if (not $decl =~ /\)\s*;/) {
   17.64 +            while (<HEADER>) {
   17.65 +                chomp;
   17.66 +                s/\A\s+//;
   17.67 +                s/\s+\Z//;
   17.68 +                $decl .= "$_ ";
   17.69 +                last if /\)\s*;/;
   17.70 +            }
   17.71 +        }
   17.72 +
   17.73 +        $decl =~ s/\s+\Z//;
   17.74 +        #print("DECL: [$decl]\n");
   17.75 +
   17.76 +        if ($decl =~ /\A\s*extern\s+DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
   17.77 +            my $rc = "$1$2$3$4";
   17.78 +            my $fn = $5;
   17.79 +
   17.80 +            next if $existing{$fn};   # already slotted into the jump table.
   17.81 +
   17.82 +            my @params = split(',', $6);
   17.83 +
   17.84 +            #print("rc == '$rc', fn == '$fn', params == '$params'\n");
   17.85 +
   17.86 +            my $retstr = ($rc eq 'void') ? '' : 'return';
   17.87 +            my $paramstr = '(';
   17.88 +            my $argstr = '(';
   17.89 +            my $i = 0;
   17.90 +            foreach (@params) {
   17.91 +                my $str = $_;
   17.92 +                $str =~ s/\A\s+//;
   17.93 +                $str =~ s/\s+\Z//;
   17.94 +                #print("1PARAM: $str\n");
   17.95 +                if ($str eq 'void') {
   17.96 +                    $paramstr .= 'void';
   17.97 +                } elsif ($str eq '...') {
   17.98 +                    if ($i > 0) {
   17.99 +                        $paramstr .= ', ';
  17.100 +                    }
  17.101 +                    $paramstr .= $str;
  17.102 +                } elsif ($str =~ /\A\s*((const\s+|)(unsigned\s+|)([a-zA-Z0-9_]*)\s*([\*\s]*))\s*(.*?)\Z/) {
  17.103 +                    #print("PARSED: [$1], [$2], [$3], [$4], [$5]\n");
  17.104 +                    my $type = $1;
  17.105 +                    my $var = $6;
  17.106 +                    $type =~ s/\A\s+//;
  17.107 +                    $type =~ s/\s+\Z//;
  17.108 +                    $var =~ s/\A\s+//;
  17.109 +                    $var =~ s/\s+\Z//;
  17.110 +                    $type =~ s/\s*\*\Z/*/g;
  17.111 +                    $type =~ s/\s*(\*+)\Z/ $1/;
  17.112 +                    #print("SPLIT: ($type, $var)\n");
  17.113 +                    my $name = chr(ord('a') + $i);
  17.114 +                    if ($i > 0) {
  17.115 +                        $paramstr .= ', ';
  17.116 +                        $argstr .= ',';
  17.117 +                    }
  17.118 +                    my $spc = ($type =~ /\*\Z/) ? '' : ' ';
  17.119 +                    $paramstr .= "$type$spc$name";
  17.120 +                    $argstr .= "$name";
  17.121 +                }
  17.122 +                $i++;
  17.123 +            }
  17.124 +
  17.125 +            $paramstr = '(void' if ($i == 0);  # Just to make this consistent.
  17.126 +
  17.127 +            $paramstr .= ')';
  17.128 +            $argstr .= ')';
  17.129 +
  17.130 +            print("NEW: $decl\n");
  17.131 +            print SDL_DYNAPI_PROCS_H "SDL_DYNAPI_PROC($rc,$fn,$paramstr,$argstr,$retstr)\n";
  17.132 +            print SDL_DYNAPI_OVERRIDES_H "#define $fn ${fn}_REAL\n";
  17.133 +        } else {
  17.134 +            print("Failed to parse decl [$decl]!\n");
  17.135 +        }
  17.136 +    }
  17.137 +    close(HEADER);
  17.138 +}
  17.139 +closedir(HEADERS);
  17.140 +
  17.141 +close(SDL_DYNAPI_PROCS_H);
  17.142 +close(SDL_DYNAPI_OVERRIDES_H);
  17.143 +
  17.144 +# vi: set ts=4 sw=4 expandtab:
    18.1 --- a/src/haptic/windows/SDL_syshaptic.c	Sun Nov 24 23:56:17 2013 -0500
    18.2 +++ b/src/haptic/windows/SDL_syshaptic.c	Mon Dec 09 16:03:18 2013 -0500
    18.3 @@ -428,7 +428,11 @@
    18.4  
    18.5  #if defined(__WIN32__) && !defined(HAVE_LIBC)  /* !!! FIXME: this is nasty. */
    18.6      #undef SDL_CreateThread
    18.7 +    #if SDL_DYNAMIC_API
    18.8 +    haptic->hwdata->thread = SDL_CreateThread_REAL(SDL_RunXInputHaptic, threadName, haptic->hwdata, NULL, NULL);
    18.9 +    #else
   18.10      haptic->hwdata->thread = SDL_CreateThread(SDL_RunXInputHaptic, threadName, haptic->hwdata, NULL, NULL);
   18.11 +    #endif
   18.12  #else
   18.13      haptic->hwdata->thread = SDL_CreateThread(SDL_RunXInputHaptic, threadName, haptic->hwdata);
   18.14  #endif
    19.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Sun Nov 24 23:56:17 2013 -0500
    19.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Mon Dec 09 16:03:18 2013 -0500
    19.3 @@ -630,7 +630,11 @@
    19.4          /* spin up the thread to detect hotplug of devices */
    19.5  #if defined(__WIN32__) && !defined(HAVE_LIBC)
    19.6  #undef SDL_CreateThread
    19.7 +#if SDL_DYNAMIC_API
    19.8 +        s_threadJoystick= SDL_CreateThread_REAL( SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL );
    19.9 +#else
   19.10          s_threadJoystick= SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL );
   19.11 +#endif
   19.12  #else
   19.13          s_threadJoystick = SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL );
   19.14  #endif
    20.1 --- a/src/thread/SDL_thread.c	Sun Nov 24 23:56:17 2013 -0500
    20.2 +++ b/src/thread/SDL_thread.c	Mon Dec 09 16:03:18 2013 -0500
    20.3 @@ -296,8 +296,14 @@
    20.4      }
    20.5  }
    20.6  
    20.7 +#ifdef SDL_CreateThread
    20.8 +#undef SDL_CreateThread
    20.9 +#endif
   20.10 +#if SDL_DYNAMIC_API
   20.11 +#define SDL_CreateThread SDL_CreateThread_REAL
   20.12 +#endif
   20.13 +
   20.14  #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
   20.15 -#undef SDL_CreateThread
   20.16  DECLSPEC SDL_Thread *SDLCALL
   20.17  SDL_CreateThread(int (SDLCALL * fn) (void *),
   20.18                   const char *name, void *data,
    21.1 --- a/src/timer/SDL_timer.c	Sun Nov 24 23:56:17 2013 -0500
    21.2 +++ b/src/timer/SDL_timer.c	Mon Dec 09 16:03:18 2013 -0500
    21.3 @@ -224,7 +224,11 @@
    21.4          /* !!! FIXME: this is nasty. */
    21.5  #if defined(__WIN32__) && !defined(HAVE_LIBC)
    21.6  #undef SDL_CreateThread
    21.7 +#if SDL_DYNAMIC_API
    21.8 +        data->thread = SDL_CreateThread_REAL(SDL_TimerThread, name, data, NULL, NULL);
    21.9 +#else
   21.10          data->thread = SDL_CreateThread(SDL_TimerThread, name, data, NULL, NULL);
   21.11 +#endif
   21.12  #else
   21.13          data->thread = SDL_CreateThread(SDL_TimerThread, name, data);
   21.14  #endif