This commit is contained in:
Eric Wing 2011-02-12 19:16:09 -08:00
commit 79313ce09b
456 changed files with 4292 additions and 5134 deletions

View File

@ -22,46 +22,57 @@ TARGET = libSDL.a
#endif
#CFLAGS=$(DEFS) -Iinclude
CFLAGS = -mthumb -mthumb-interwork \
-march=armv5te -mtune=arm946e-s \
-O2 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-DARM9 -D__NDS__ -I$(DEVKITPRO)/libnds/include -DENABLE_NDS -DNO_SIGNAL_H -DDISABLE_THREADS -DPACKAGE=\"SDL\" -DVERSION=\"1.3\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 \
-Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video
CFLAGS = -mthumb -mthumb-interwork \
-march=armv5te -mtune=arm946e-s \
-O2 -Wall -Wwrite-strings -Wpointer-arith \
-DARM9 -D__NDS__ -I$(DEVKITPRO)/libnds/include -DENABLE_NDS -DNO_SIGNAL_H -DDISABLE_THREADS -DPACKAGE=\"SDL\" -DVERSION=\"1.3\" -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 \
-Iinclude -Isrc -Isrc/audio -Isrc/cdrom -Isrc/endian -Isrc/events -Isrc/joystick -Isrc/thread/nds -Isrc/thread -Isrc/timer -Isrc/video
#src/audio/disk/SDL_diskaudio.c \
#src/audio/dummy/SDL_dummyaudio.c \
SRCS = \
src/SDL.c \
src/SDL_assert.c \
src/SDL_compat.c \
src/SDL_error.c \
src/SDL_fatal.c \
src/SDL_assert.c \
src/audio/nds/SDL_ndsaudio.c \
src/SDL_hints.c \
src/SDL_log.c \
src/atomic/SDL_atomic.c \
src/audio/SDL_audio.c \
src/audio/SDL_audiocvt.c \
src/audio/SDL_audiodev.c \
src/audio/SDL_audiotypecvt.c \
src/audio/SDL_mixer.c \
src/audio/SDL_mixer_m68k.c \
src/audio/SDL_mixer_MMX.c \
src/audio/SDL_mixer_MMX_VC.c \
src/audio/SDL_mixer_m68k.c \
src/audio/SDL_wave.c \
src/cdrom/dummy/SDL_syscdrom.c \
src/cdrom/SDL_cdrom.c \
src/audio/nds/SDL_ndsaudio.c \
src/cpuinfo/SDL_cpuinfo.c \
src/events/SDL_events.c \
src/events/SDL_keyboard.c \
src/events/SDL_mouse.c \
src/events/SDL_quit.c \
src/events/SDL_touch.c \
src/events/SDL_windowevents.c \
src/events/nds/SDL_ndsgesture.c \
src/file/SDL_rwops.c \
src/power/SDL_power.c \
src/power/nds/SDL_syspower.c \
src/haptic/SDL_haptic.c \
src/haptic/nds/SDL_syshaptic.c \
src/joystick/nds/SDL_sysjoystick.c \
src/joystick/SDL_joystick.c \
src/joystick/nds/SDL_sysjoystick.c \
src/power/SDL_power.c \
src/power/nds/SDL_syspower.c \
src/render/SDL_render.c \
src/render/SDL_yuv_sw.c \
src/render/software/SDL_render_sw.c \
src/render/software/SDL_blendpoint.c \
src/render/software/SDL_drawline.c \
src/render/software/SDL_blendline.c \
src/render/software/SDL_blendfillrect.c \
src/render/software/SDL_drawpoint.c \
src/stdlib/SDL_getenv.c \
src/stdlib/SDL_iconv.c \
src/stdlib/SDL_malloc.c \
@ -73,37 +84,29 @@ src/thread/nds/SDL_syscond.c \
src/thread/nds/SDL_sysmutex.c \
src/thread/nds/SDL_syssem.c \
src/thread/nds/SDL_systhread.c \
src/timer/nds/SDL_systimer.c \
src/timer/SDL_timer.c \
src/video/nds/SDL_ndsevents.c \
src/video/nds/SDL_ndsrender.c \
src/video/nds/SDL_ndsvideo.c \
src/video/dummy/SDL_nullevents.c \
src/video/dummy/SDL_nullrender.c \
src/video/dummy/SDL_nullvideo.c \
src/timer/nds/SDL_systimer.c \
src/video/SDL_RLEaccel.c \
src/video/SDL_blit.c \
src/video/SDL_blit_0.c \
src/video/SDL_blit_1.c \
src/video/SDL_blit_A.c \
src/video/SDL_blit_auto.c \
src/video/SDL_blit.c \
src/video/SDL_blit_copy.c \
src/video/SDL_blit_N.c \
src/video/SDL_blit_auto.c \
src/video/SDL_blit_copy.c \
src/video/SDL_blit_slow.c \
src/video/SDL_bmp.c \
src/video/SDL_drawline.c \
src/video/SDL_drawpoint.c \
src/video/SDL_fillrect.c \
src/video/SDL_gamma.c \
src/video/SDL_pixels.c \
src/video/SDL_rect.c \
src/video/SDL_renderer_gl.c \
src/video/SDL_renderer_sw.c \
src/video/SDL_RLEaccel.c \
src/video/SDL_stretch.c \
src/video/SDL_surface.c \
src/video/SDL_video.c \
src/video/SDL_yuv_mmx.c \
src/video/SDL_yuv_sw.c \
src/video/dummy/SDL_nullevents.c \
src/video/dummy/SDL_nullvideo.c \
src/video/nds/SDL_ndsevents.c \
src/video/nds/SDL_ndsrender.c \
src/video/nds/SDL_ndsvideo.c \
OBJS = $(SRCS:.c=.o)
@ -113,7 +116,7 @@ test/nds-test-progs/sprite/sprite.nds \
test/nds-test-progs/sprite2/sprite2.nds \
all: $(TARGET)
all: $(TARGET) install nds_test
$(TARGET): copy_config \
$(OBJS)
@ -126,7 +129,9 @@ install: $(TARGET)
@cp include/*.h $(DEVKITPRO)/libnds/include/SDL/
nds_test:
$(MAKE) -C test/nds-test-progs
$(MAKE) -C test/nds-test-progs/general
# $(MAKE) -C test/nds-test-progs/sprite
# $(MAKE) -C test/nds-test-progs/sprite2
copy_config:
@cp include/SDL_config.h.default include/SDL_config.h

View File

@ -59,6 +59,7 @@ HDRS = \
SDL_keyboard.h \
SDL_keysym.h \
SDL_loadso.h \
SDL_log.h \
SDL_main.h \
SDL_mouse.h \
SDL_mutex.h \

View File

@ -899,10 +899,6 @@
RelativePath="..\..\src\events\SDL_keyboard_c.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_leaks.h"
>
</File>
<File
RelativePath="..\..\src\stdlib\SDL_malloc.c"
>

View File

@ -457,6 +457,10 @@
RelativePath="..\..\include\SDL_loadso.h"
>
</File>
<File
RelativePath="..\..\include\SDL_log.h"
>
</File>
<File
RelativePath="..\..\include\SDL_main.h"
>
@ -862,10 +866,6 @@
RelativePath="..\..\src\video\SDL_fillrect.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_gamma.c"
>
</File>
<File
RelativePath="..\..\src\events\SDL_gesture.c"
>
@ -915,7 +915,7 @@
>
</File>
<File
RelativePath="..\..\src\video\SDL_leaks.h"
RelativePath="..\..\src\SDL_log.c"
>
</File>
<File
@ -1046,6 +1046,14 @@
RelativePath="..\..\src\file\SDL_rwops.c"
>
</File>
<File
RelativePath="..\..\src\render\opengl\SDL_shaders_gl.c"
>
</File>
<File
RelativePath="..\..\src\render\opengl\SDL_shaders_gl.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_shape.c"
>
@ -1218,14 +1226,6 @@
RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsgamma.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsgamma.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowskeyboard.c"
>

View File

@ -249,6 +249,7 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClInclude Include="..\..\include\SDL_keyboard.h" />
<ClInclude Include="..\..\include\SDL_keysym.h" />
<ClInclude Include="..\..\include\SDL_loadso.h" />
<ClInclude Include="..\..\include\SDL_log.h" />
<ClInclude Include="..\..\include\SDL_main.h" />
<ClInclude Include="..\..\include\SDL_mouse.h" />
<ClInclude Include="..\..\include\SDL_mutex.h" />
@ -284,6 +285,7 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClInclude Include="..\..\src\libm\math.h" />
<ClInclude Include="..\..\src\libm\math_private.h" />
<ClInclude Include="..\..\src\render\mmx.h" />
<ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
@ -313,7 +315,6 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClInclude Include="..\..\src\video\SDL_glfuncs.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
<ClInclude Include="..\..\src\video\SDL_leaks.h" />
<ClInclude Include="..\..\src\audio\SDL_mixer_m68k.h" />
<ClInclude Include="..\..\src\audio\SDL_mixer_MMX.h" />
<ClInclude Include="..\..\src\audio\SDL_mixer_MMX_VC.h" />
@ -339,7 +340,6 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsgamma.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
@ -372,6 +372,7 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClCompile Include="..\..\src\libm\s_sin.c" />
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
<ClCompile Include="..\..\src\render\SDL_render.c" />
<ClCompile Include="..\..\src\render\SDL_yuv_mmx.c" />
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
@ -390,6 +391,7 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
<ClCompile Include="..\..\src\SDL_hints.c" />
<ClCompile Include="..\..\src\SDL_log.c" />
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
<ClCompile Include="..\..\src\video\SDL_blit.c" />
<ClCompile Include="..\..\src\video\SDL_blit_0.c" />
@ -413,7 +415,6 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClCompile Include="..\..\src\events\SDL_events.c" />
<ClCompile Include="..\..\src\SDL_fatal.c" />
<ClCompile Include="..\..\src\video\SDL_fillrect.c" />
<ClCompile Include="..\..\src\video\SDL_gamma.c" />
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
@ -453,7 +454,6 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsgamma.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
@ -466,4 +466,4 @@ echo #define SDL_REVISION "hg-0:baadf00d" &gt;"$(ProjectDir)\..\..\include\SDL_r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -861,10 +861,6 @@
RelativePath="..\..\src\video\SDL_fillrect.c"
>
</File>
<File
RelativePath="..\..\src\video\SDL_gamma.c"
>
</File>
<File
RelativePath="..\..\src\events\SDL_gesture.c"
>
@ -877,6 +873,10 @@
RelativePath="..\..\src\haptic\SDL_haptic.c"
>
</File>
<File
RelativePath="..\..\src\SDL_hints.c"
>
</File>
<File
RelativePath="..\..\src\stdlib\SDL_iconv.c"
>
@ -889,6 +889,10 @@
RelativePath="..\..\src\events\SDL_keyboard.c"
>
</File>
<File
RelativePath="..\..\src\SDL_log.c"
>
</File>
<File
RelativePath="..\..\src\stdlib\SDL_malloc.c"
>
@ -938,7 +942,7 @@
>
</File>
<File
RelativePath="..\..\src\render\software\SDL_renderer_sw.c"
RelativePath="..\..\src\render\software\SDL_render_sw.c"
>
</File>
<File
@ -1045,10 +1049,6 @@
RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsgamma.c"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowskeyboard.c"
>
@ -1230,18 +1230,46 @@
RelativePath="..\..\src\haptic\SDL_haptic_c.h"
>
</File>
<File
RelativePath="..\..\include\SDL_hints.h"
>
</File>
<File
RelativePath="..\..\include\SDL_input.h"
>
</File>
<File
RelativePath="..\..\include\SDL_joystick.h"
>
</File>
<File
RelativePath="..\..\src\joystick\SDL_joystick_c.h"
>
</File>
<File
RelativePath="..\..\include\SDL_keyboard.h"
>
</File>
<File
RelativePath="..\..\src\events\SDL_keyboard_c.h"
>
</File>
<File
RelativePath="..\..\include\SDL_keysym.h"
>
</File>
<File
RelativePath="..\..\src\video\SDL_leaks.h"
>
</File>
<File
RelativePath="..\..\include\SDL_loadso.h"
>
</File>
<File
RelativePath="..\..\include\SDL_log.h"
>
</File>
<File
RelativePath="..\..\src\events\SDL_mouse_c.h"
>
@ -1270,6 +1298,10 @@
RelativePath="..\..\src\video\SDL_rect_c.h"
>
</File>
<File
RelativePath="..\..\src\render\software\SDL_render_sw_c.h"
>
</File>
<File
RelativePath="..\..\src\render\software\SDL_renderer_sw_c.h"
>
@ -1358,10 +1390,6 @@
RelativePath="..\..\src\video\windows\SDL_windowsframebuffer.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowsgamma.h"
>
</File>
<File
RelativePath="..\..\src\video\windows\SDL_windowskeyboard.h"
>

View File

@ -76,7 +76,7 @@
0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */; };
0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */; };
0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */; };
04043B8D12FEA9350076DB1F /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 04043B8C12FEA9350076DB1F /* SDL_opengles2.h */; };
04043B8D12FEA9350076DB1F /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 04043B8C12FEA9350076DB1F /* SDL_opengles2.h */; settings = {ATTRIBUTES = (Public, ); }; };
041B2CD912FA0E9E0087D585 /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CD812FA0E9E0087D585 /* SDL_render.h */; settings = {ATTRIBUTES = (Public, ); }; };
041B2CF112FA0F680087D585 /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2CEA12FA0F680087D585 /* SDL_render.c */; };
041B2CF212FA0F680087D585 /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CEB12FA0F680087D585 /* SDL_sysrender.h */; };
@ -86,7 +86,7 @@
04409BA712FA989600FB9AA8 /* SDL_yuv_mmx.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409BA312FA989600FB9AA8 /* SDL_yuv_mmx.c */; };
04409BA812FA989600FB9AA8 /* SDL_yuv_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409BA412FA989600FB9AA8 /* SDL_yuv_sw_c.h */; };
04409BA912FA989600FB9AA8 /* SDL_yuv_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409BA512FA989600FB9AA8 /* SDL_yuv_sw.c */; };
0442EC4B12FE1BFF004C9285 /* SDL_hints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC4A12FE1BFF004C9285 /* SDL_hints.h */; };
0442EC4B12FE1BFF004C9285 /* SDL_hints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC4A12FE1BFF004C9285 /* SDL_hints.h */; settings = {ATTRIBUTES = (Public, ); }; };
0442EC5012FE1C1E004C9285 /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC4E12FE1C1E004C9285 /* SDL_render_sw_c.h */; };
0442EC5112FE1C1E004C9285 /* SDL_render_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC4F12FE1C1E004C9285 /* SDL_render_sw.c */; };
0442EC5312FE1C28004C9285 /* SDL_render_gles.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5212FE1C28004C9285 /* SDL_render_gles.c */; };
@ -111,6 +111,9 @@
04BA9D6611EF474A00B60E01 /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6211EF474A00B60E01 /* SDL_touch.c */; };
04BA9D7D11EF497E00B60E01 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D7B11EF497E00B60E01 /* SDL_gesture.h */; settings = {ATTRIBUTES = (Public, ); }; };
04BA9D7E11EF497E00B60E01 /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D7C11EF497E00B60E01 /* SDL_touch.h */; settings = {ATTRIBUTES = (Public, ); }; };
04BAC0991300C0F70055DE28 /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC0981300C0F70055DE28 /* SDL_log.h */; settings = {ATTRIBUTES = (Public, ); }; };
04BAC09C1300C1290055DE28 /* SDL_assert_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */; };
04BAC09D1300C1290055DE28 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC09B1300C1290055DE28 /* SDL_log.c */; };
04EC8B521025D12900431D42 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = 04EC8B501025D12900431D42 /* SDL_config_iphoneos.h */; settings = {ATTRIBUTES = (Public, ); }; };
04F2AF541104ABC300D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF531104ABC300D6DDF7 /* SDL_assert.h */; settings = {ATTRIBUTES = (Public, ); }; };
04F2AF561104ABD200D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */; };
@ -235,8 +238,6 @@
FDA684560DF2374E00F98A1A /* SDL_blit_N.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683090DF2374E00F98A1A /* SDL_blit_N.c */; };
FDA684570DF2374E00F98A1A /* SDL_blit_slow.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */; };
FDA684580DF2374E00F98A1A /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */; };
FDA6845A0DF2374E00F98A1A /* SDL_gamma.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830D0DF2374E00F98A1A /* SDL_gamma.c */; };
FDA6845B0DF2374E00F98A1A /* SDL_leaks.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA6830E0DF2374E00F98A1A /* SDL_leaks.h */; };
FDA6845C0DF2374E00F98A1A /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */; };
FDA6845D0DF2374E00F98A1A /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */; };
FDA6845E0DF2374E00F98A1A /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683110DF2374E00F98A1A /* SDL_rect.c */; };
@ -381,6 +382,9 @@
04BA9D6211EF474A00B60E01 /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = "<group>"; };
04BA9D7B11EF497E00B60E01 /* SDL_gesture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_gesture.h; path = ../../include/SDL_gesture.h; sourceTree = SOURCE_ROOT; };
04BA9D7C11EF497E00B60E01 /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_touch.h; path = ../../include/SDL_touch.h; sourceTree = SOURCE_ROOT; };
04BAC0981300C0F70055DE28 /* SDL_log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_log.h; path = ../../include/SDL_log.h; sourceTree = SOURCE_ROOT; };
04BAC09A1300C1290055DE28 /* SDL_assert_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert_c.h; path = ../../src/SDL_assert_c.h; sourceTree = SOURCE_ROOT; };
04BAC09B1300C1290055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_log.c; path = ../../src/SDL_log.c; sourceTree = SOURCE_ROOT; };
04EC8B501025D12900431D42 /* SDL_config_iphoneos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_config_iphoneos.h; path = ../../include/SDL_config_iphoneos.h; sourceTree = SOURCE_ROOT; };
04F2AF531104ABC300D6DDF7 /* SDL_assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert.h; path = ../../include/SDL_assert.h; sourceTree = SOURCE_ROOT; };
04F2AF551104ABD200D6DDF7 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_assert.c; path = ../../src/SDL_assert.c; sourceTree = SOURCE_ROOT; };
@ -532,8 +536,6 @@
FDA683090DF2374E00F98A1A /* SDL_blit_N.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blit_N.c; sourceTree = "<group>"; };
FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blit_slow.c; sourceTree = "<group>"; };
FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_bmp.c; sourceTree = "<group>"; };
FDA6830D0DF2374E00F98A1A /* SDL_gamma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamma.c; sourceTree = "<group>"; };
FDA6830E0DF2374E00F98A1A /* SDL_leaks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_leaks.h; sourceTree = "<group>"; };
FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_pixels.c; sourceTree = "<group>"; };
FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_pixels_c.h; sourceTree = "<group>"; };
FDA683110DF2374E00F98A1A /* SDL_rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rect.c; sourceTree = "<group>"; };
@ -949,6 +951,7 @@
FD99B8DF0DD52EB400FB1D6B /* SDL_keyboard.h */,
FD99B8E00DD52EB400FB1D6B /* SDL_keysym.h */,
FD99B8E10DD52EB400FB1D6B /* SDL_loadso.h */,
04BAC0981300C0F70055DE28 /* SDL_log.h */,
FD99B8E20DD52EB400FB1D6B /* SDL_main.h */,
FD99B8E30DD52EB400FB1D6B /* SDL_mouse.h */,
FD99B8E40DD52EB400FB1D6B /* SDL_mutex.h */,
@ -997,12 +1000,14 @@
FD99BA1E0DD52EDC00FB1D6B /* timer */,
FDA682420DF2374D00F98A1A /* video */,
04F2AF551104ABD200D6DDF7 /* SDL_assert.c */,
04BAC09A1300C1290055DE28 /* SDL_assert_c.h */,
FD99B9D30DD52EDC00FB1D6B /* SDL_compat.c */,
FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */,
FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */,
FD99B9D60DD52EDC00FB1D6B /* SDL_fatal.c */,
FD99B9D70DD52EDC00FB1D6B /* SDL_fatal.h */,
0442EC5412FE1C3F004C9285 /* SDL_hints.c */,
04BAC09B1300C1290055DE28 /* SDL_log.c */,
FD99B9D80DD52EDC00FB1D6B /* SDL.c */,
);
name = "Library Source";
@ -1154,8 +1159,6 @@
FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */,
044E5FB711E606EB0076F181 /* SDL_clipboard.c */,
0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */,
FDA6830D0DF2374E00F98A1A /* SDL_gamma.c */,
FDA6830E0DF2374E00F98A1A /* SDL_leaks.h */,
FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */,
FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */,
FDA683110DF2374E00F98A1A /* SDL_rect.c */,
@ -1226,7 +1229,6 @@
FDA6844E0DF2374E00F98A1A /* SDL_blit.h in Headers */,
FDA684530DF2374E00F98A1A /* SDL_blit_auto.h in Headers */,
FDA684550DF2374E00F98A1A /* SDL_blit_copy.h in Headers */,
FDA6845B0DF2374E00F98A1A /* SDL_leaks.h in Headers */,
FDA6845D0DF2374E00F98A1A /* SDL_pixels_c.h in Headers */,
FDA684630DF2374E00F98A1A /* SDL_RLEaccel_c.h in Headers */,
FDA684670DF2374E00F98A1A /* SDL_sysvideo.h in Headers */,
@ -1279,6 +1281,8 @@
0442EC5012FE1C1E004C9285 /* SDL_render_sw_c.h in Headers */,
0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */,
04043B8D12FEA9350076DB1F /* SDL_opengles2.h in Headers */,
04BAC0991300C0F70055DE28 /* SDL_log.h in Headers */,
04BAC09C1300C1290055DE28 /* SDL_assert_c.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1495,7 +1499,6 @@
FDA684560DF2374E00F98A1A /* SDL_blit_N.c in Sources */,
FDA684570DF2374E00F98A1A /* SDL_blit_slow.c in Sources */,
FDA684580DF2374E00F98A1A /* SDL_bmp.c in Sources */,
FDA6845A0DF2374E00F98A1A /* SDL_gamma.c in Sources */,
FDA6845C0DF2374E00F98A1A /* SDL_pixels.c in Sources */,
FDA6845E0DF2374E00F98A1A /* SDL_rect.c in Sources */,
FDA684620DF2374E00F98A1A /* SDL_RLEaccel.c in Sources */,
@ -1545,6 +1548,7 @@
0442EC5512FE1C3F004C9285 /* SDL_hints.c in Sources */,
0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */,
0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */,
04BAC09D1300C1290055DE28 /* SDL_log.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -129,6 +129,10 @@
041B2CA612FA0D680087D585 /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2C9F12FA0D680087D585 /* SDL_sysrender.h */; };
041B2CAB12FA0D680087D585 /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2C9E12FA0D680087D585 /* SDL_render.c */; };
041B2CAC12FA0D680087D585 /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2C9F12FA0D680087D585 /* SDL_sysrender.h */; };
0435673E1303160F00BA5428 /* SDL_shaders_gl.c in Sources */ = {isa = PBXBuildFile; fileRef = 0435673C1303160F00BA5428 /* SDL_shaders_gl.c */; };
0435673F1303160F00BA5428 /* SDL_shaders_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = 0435673D1303160F00BA5428 /* SDL_shaders_gl.h */; };
043567401303160F00BA5428 /* SDL_shaders_gl.c in Sources */ = {isa = PBXBuildFile; fileRef = 0435673C1303160F00BA5428 /* SDL_shaders_gl.c */; };
043567411303160F00BA5428 /* SDL_shaders_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = 0435673D1303160F00BA5428 /* SDL_shaders_gl.h */; };
04409B9112FA97ED00FB9AA8 /* mmx.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409B8D12FA97ED00FB9AA8 /* mmx.h */; };
04409B9212FA97ED00FB9AA8 /* SDL_yuv_mmx.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409B8E12FA97ED00FB9AA8 /* SDL_yuv_mmx.c */; };
04409B9312FA97ED00FB9AA8 /* SDL_yuv_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409B8F12FA97ED00FB9AA8 /* SDL_yuv_sw_c.h */; };
@ -155,6 +159,10 @@
044E5F8611E6051C0076F181 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 044E5F8411E6051C0076F181 /* SDL_clipboard.h */; };
0469A10B12EE4BF100B846D6 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0469A10912EE4BF100B846D6 /* SDL_blendmode.h */; settings = {ATTRIBUTES = (Public, ); }; };
0469A10D12EE4BF100B846D6 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0469A10912EE4BF100B846D6 /* SDL_blendmode.h */; };
04BAC0B31300C1CB0055DE28 /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC0B21300C1CB0055DE28 /* SDL_log.h */; settings = {ATTRIBUTES = (Public, ); }; };
04BAC0B41300C1CB0055DE28 /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC0B21300C1CB0055DE28 /* SDL_log.h */; };
04BAC0C81300C2160055DE28 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC0C71300C2160055DE28 /* SDL_log.c */; };
04BAC0C91300C2160055DE28 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC0C71300C2160055DE28 /* SDL_log.c */; };
04BD000812E6671800899322 /* SDL_diskaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD8812E6671700899322 /* SDL_diskaudio.c */; };
04BD000912E6671800899322 /* SDL_diskaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD8912E6671700899322 /* SDL_diskaudio.h */; };
04BD001012E6671800899322 /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD9412E6671700899322 /* SDL_dummyaudio.c */; };
@ -279,8 +287,6 @@
04BD018112E6671800899322 /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5A12E6671800899322 /* SDL_bmp.c */; };
04BD018212E6671800899322 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5B12E6671800899322 /* SDL_clipboard.c */; };
04BD018712E6671800899322 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6012E6671800899322 /* SDL_fillrect.c */; };
04BD018812E6671800899322 /* SDL_gamma.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6112E6671800899322 /* SDL_gamma.c */; };
04BD018B12E6671800899322 /* SDL_leaks.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6412E6671800899322 /* SDL_leaks.h */; };
04BD018C12E6671800899322 /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6512E6671800899322 /* SDL_pixels.c */; };
04BD018D12E6671800899322 /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6612E6671800899322 /* SDL_pixels_c.h */; };
04BD018E12E6671800899322 /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6712E6671800899322 /* SDL_rect.c */; };
@ -300,8 +306,6 @@
04BD01E012E6671800899322 /* SDL_x11dyn.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFBD12E6671800899322 /* SDL_x11dyn.h */; };
04BD01E112E6671800899322 /* SDL_x11events.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFBE12E6671800899322 /* SDL_x11events.c */; };
04BD01E212E6671800899322 /* SDL_x11events.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFBF12E6671800899322 /* SDL_x11events.h */; };
04BD01E312E6671800899322 /* SDL_x11gamma.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC012E6671800899322 /* SDL_x11gamma.c */; };
04BD01E412E6671800899322 /* SDL_x11gamma.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC112E6671800899322 /* SDL_x11gamma.h */; };
04BD01E512E6671800899322 /* SDL_x11keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC212E6671800899322 /* SDL_x11keyboard.c */; };
04BD01E612E6671800899322 /* SDL_x11keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC312E6671800899322 /* SDL_x11keyboard.h */; };
04BD01E712E6671800899322 /* SDL_x11modes.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC412E6671800899322 /* SDL_x11modes.c */; };
@ -467,8 +471,6 @@
04BD039B12E6671800899322 /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5A12E6671800899322 /* SDL_bmp.c */; };
04BD039C12E6671800899322 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5B12E6671800899322 /* SDL_clipboard.c */; };
04BD03A112E6671800899322 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6012E6671800899322 /* SDL_fillrect.c */; };
04BD03A212E6671800899322 /* SDL_gamma.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6112E6671800899322 /* SDL_gamma.c */; };
04BD03A512E6671800899322 /* SDL_leaks.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6412E6671800899322 /* SDL_leaks.h */; };
04BD03A612E6671800899322 /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6512E6671800899322 /* SDL_pixels.c */; };
04BD03A712E6671800899322 /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6612E6671800899322 /* SDL_pixels_c.h */; };
04BD03A812E6671800899322 /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6712E6671800899322 /* SDL_rect.c */; };
@ -488,8 +490,6 @@
04BD03F812E6671800899322 /* SDL_x11dyn.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFBD12E6671800899322 /* SDL_x11dyn.h */; };
04BD03F912E6671800899322 /* SDL_x11events.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFBE12E6671800899322 /* SDL_x11events.c */; };
04BD03FA12E6671800899322 /* SDL_x11events.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFBF12E6671800899322 /* SDL_x11events.h */; };
04BD03FB12E6671800899322 /* SDL_x11gamma.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC012E6671800899322 /* SDL_x11gamma.c */; };
04BD03FC12E6671800899322 /* SDL_x11gamma.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC112E6671800899322 /* SDL_x11gamma.h */; };
04BD03FD12E6671800899322 /* SDL_x11keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC212E6671800899322 /* SDL_x11keyboard.c */; };
04BD03FE12E6671800899322 /* SDL_x11keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC312E6671800899322 /* SDL_x11keyboard.h */; };
04BD03FF12E6671800899322 /* SDL_x11modes.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC412E6671800899322 /* SDL_x11modes.c */; };
@ -696,6 +696,8 @@
041B2C9412FA0D2A0087D585 /* SDL_render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_render.h; path = ../../include/SDL_render.h; sourceTree = SOURCE_ROOT; };
041B2C9E12FA0D680087D585 /* SDL_render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render.c; sourceTree = "<group>"; };
041B2C9F12FA0D680087D585 /* SDL_sysrender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysrender.h; sourceTree = "<group>"; };
0435673C1303160F00BA5428 /* SDL_shaders_gl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_shaders_gl.c; sourceTree = "<group>"; };
0435673D1303160F00BA5428 /* SDL_shaders_gl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_gl.h; sourceTree = "<group>"; };
04409B8D12FA97ED00FB9AA8 /* mmx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mmx.h; sourceTree = "<group>"; };
04409B8E12FA97ED00FB9AA8 /* SDL_yuv_mmx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_yuv_mmx.c; sourceTree = "<group>"; };
04409B8F12FA97ED00FB9AA8 /* SDL_yuv_sw_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_yuv_sw_c.h; sourceTree = "<group>"; };
@ -709,6 +711,8 @@
0442EC5E12FE1C75004C9285 /* SDL_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_hints.c; path = ../../src/SDL_hints.c; sourceTree = SOURCE_ROOT; };
044E5F8411E6051C0076F181 /* SDL_clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_clipboard.h; path = ../../include/SDL_clipboard.h; sourceTree = SOURCE_ROOT; };
0469A10912EE4BF100B846D6 /* SDL_blendmode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_blendmode.h; path = ../../include/SDL_blendmode.h; sourceTree = SOURCE_ROOT; };
04BAC0B21300C1CB0055DE28 /* SDL_log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_log.h; path = ../../include/SDL_log.h; sourceTree = SOURCE_ROOT; };
04BAC0C71300C2160055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_log.c; path = ../../src/SDL_log.c; sourceTree = SOURCE_ROOT; };
04BDFD7412E6671700899322 /* SDL_atomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_atomic.c; sourceTree = "<group>"; };
04BDFD7512E6671700899322 /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = "<group>"; };
04BDFD8812E6671700899322 /* SDL_diskaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_diskaudio.c; sourceTree = "<group>"; };
@ -835,8 +839,6 @@
04BDFF5A12E6671800899322 /* SDL_bmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_bmp.c; sourceTree = "<group>"; };
04BDFF5B12E6671800899322 /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; };
04BDFF6012E6671800899322 /* SDL_fillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_fillrect.c; sourceTree = "<group>"; };
04BDFF6112E6671800899322 /* SDL_gamma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamma.c; sourceTree = "<group>"; };
04BDFF6412E6671800899322 /* SDL_leaks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_leaks.h; sourceTree = "<group>"; };
04BDFF6512E6671800899322 /* SDL_pixels.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_pixels.c; sourceTree = "<group>"; };
04BDFF6612E6671800899322 /* SDL_pixels_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_pixels_c.h; sourceTree = "<group>"; };
04BDFF6712E6671800899322 /* SDL_rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rect.c; sourceTree = "<group>"; };
@ -856,8 +858,6 @@
04BDFFBD12E6671800899322 /* SDL_x11dyn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11dyn.h; sourceTree = "<group>"; };
04BDFFBE12E6671800899322 /* SDL_x11events.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11events.c; sourceTree = "<group>"; };
04BDFFBF12E6671800899322 /* SDL_x11events.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11events.h; sourceTree = "<group>"; };
04BDFFC012E6671800899322 /* SDL_x11gamma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11gamma.c; sourceTree = "<group>"; };
04BDFFC112E6671800899322 /* SDL_x11gamma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11gamma.h; sourceTree = "<group>"; };
04BDFFC212E6671800899322 /* SDL_x11keyboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11keyboard.c; sourceTree = "<group>"; };
04BDFFC312E6671800899322 /* SDL_x11keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11keyboard.h; sourceTree = "<group>"; };
04BDFFC412E6671800899322 /* SDL_x11modes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11modes.c; sourceTree = "<group>"; };
@ -1137,6 +1137,7 @@
0C5AF5F101191D2B7F000001 /* SDL_keyboard.h */,
0C5AF5F201191D2B7F000001 /* SDL_keysym.h */,
B29A290D04E5B28700A80002 /* SDL_loadso.h */,
04BAC0B21300C1CB0055DE28 /* SDL_log.h */,
0C5AF5F301191D2B7F000001 /* SDL_main.h */,
0C5AF5F401191D2B7F000001 /* SDL_mouse.h */,
0C5AF5F501191D2B7F000001 /* SDL_mutex.h */,
@ -1199,6 +1200,8 @@
children = (
04043BBA12FEB1BE0076DB1F /* SDL_glfuncs.h */,
0442EC1712FE1BBA004C9285 /* SDL_render_gl.c */,
0435673C1303160F00BA5428 /* SDL_shaders_gl.c */,
0435673D1303160F00BA5428 /* SDL_shaders_gl.h */,
);
path = opengl;
sourceTree = "<group>";
@ -1510,8 +1513,6 @@
04BDFF5A12E6671800899322 /* SDL_bmp.c */,
04BDFF5B12E6671800899322 /* SDL_clipboard.c */,
04BDFF6012E6671800899322 /* SDL_fillrect.c */,
04BDFF6112E6671800899322 /* SDL_gamma.c */,
04BDFF6412E6671800899322 /* SDL_leaks.h */,
04BDFF6512E6671800899322 /* SDL_pixels.c */,
04BDFF6612E6671800899322 /* SDL_pixels_c.h */,
04BDFF6712E6671800899322 /* SDL_rect.c */,
@ -1579,8 +1580,6 @@
04BDFFBF12E6671800899322 /* SDL_x11events.h */,
0442EC5812FE1C60004C9285 /* SDL_x11framebuffer.c */,
0442EC5912FE1C60004C9285 /* SDL_x11framebuffer.h */,
04BDFFC012E6671800899322 /* SDL_x11gamma.c */,
04BDFFC112E6671800899322 /* SDL_x11gamma.h */,
04BDFFC212E6671800899322 /* SDL_x11keyboard.c */,
04BDFFC312E6671800899322 /* SDL_x11keyboard.h */,
04BDFFC412E6671800899322 /* SDL_x11modes.c */,
@ -1722,6 +1721,7 @@
04BDFE5A12E6671700899322 /* SDL_fatal.c */,
04BDFE5B12E6671700899322 /* SDL_fatal.h */,
0442EC5E12FE1C75004C9285 /* SDL_hints.c */,
04BAC0C71300C2160055DE28 /* SDL_log.c */,
04BDFE5C12E6671700899322 /* SDL.c */,
);
name = "Library Source";
@ -1881,7 +1881,6 @@
04BD017B12E6671800899322 /* SDL_blit_auto.h in Headers */,
04BD017D12E6671800899322 /* SDL_blit_copy.h in Headers */,
04BD018012E6671800899322 /* SDL_blit_slow.h in Headers */,
04BD018B12E6671800899322 /* SDL_leaks.h in Headers */,
04BD018D12E6671800899322 /* SDL_pixels_c.h in Headers */,
04BD019712E6671800899322 /* SDL_RLEaccel_c.h in Headers */,
04BD019912E6671800899322 /* SDL_shape_internals.h in Headers */,
@ -1890,7 +1889,6 @@
04BD01DE12E6671800899322 /* SDL_x11clipboard.h in Headers */,
04BD01E012E6671800899322 /* SDL_x11dyn.h in Headers */,
04BD01E212E6671800899322 /* SDL_x11events.h in Headers */,
04BD01E412E6671800899322 /* SDL_x11gamma.h in Headers */,
04BD01E612E6671800899322 /* SDL_x11keyboard.h in Headers */,
04BD01E812E6671800899322 /* SDL_x11modes.h in Headers */,
04BD01EA12E6671800899322 /* SDL_x11mouse.h in Headers */,
@ -1932,6 +1930,8 @@
0442EC1C12FE1BCB004C9285 /* SDL_render_sw_c.h in Headers */,
0442EC5B12FE1C60004C9285 /* SDL_x11framebuffer.h in Headers */,
04043BBB12FEB1BE0076DB1F /* SDL_glfuncs.h in Headers */,
04BAC0B31300C1CB0055DE28 /* SDL_log.h in Headers */,
0435673F1303160F00BA5428 /* SDL_shaders_gl.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2010,7 +2010,6 @@
04BD039512E6671800899322 /* SDL_blit_auto.h in Headers */,
04BD039712E6671800899322 /* SDL_blit_copy.h in Headers */,
04BD039A12E6671800899322 /* SDL_blit_slow.h in Headers */,
04BD03A512E6671800899322 /* SDL_leaks.h in Headers */,
04BD03A712E6671800899322 /* SDL_pixels_c.h in Headers */,
04BD03B112E6671800899322 /* SDL_RLEaccel_c.h in Headers */,
04BD03B312E6671800899322 /* SDL_shape_internals.h in Headers */,
@ -2019,7 +2018,6 @@
04BD03F612E6671800899322 /* SDL_x11clipboard.h in Headers */,
04BD03F812E6671800899322 /* SDL_x11dyn.h in Headers */,
04BD03FA12E6671800899322 /* SDL_x11events.h in Headers */,
04BD03FC12E6671800899322 /* SDL_x11gamma.h in Headers */,
04BD03FE12E6671800899322 /* SDL_x11keyboard.h in Headers */,
04BD040012E6671800899322 /* SDL_x11modes.h in Headers */,
04BD040212E6671800899322 /* SDL_x11mouse.h in Headers */,
@ -2061,6 +2059,8 @@
0442EC1E12FE1BCB004C9285 /* SDL_render_sw_c.h in Headers */,
0442EC5D12FE1C60004C9285 /* SDL_x11framebuffer.h in Headers */,
04043BBC12FEB1BE0076DB1F /* SDL_glfuncs.h in Headers */,
04BAC0B41300C1CB0055DE28 /* SDL_log.h in Headers */,
043567411303160F00BA5428 /* SDL_shaders_gl.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2392,7 +2392,6 @@
04BD018112E6671800899322 /* SDL_bmp.c in Sources */,
04BD018212E6671800899322 /* SDL_clipboard.c in Sources */,
04BD018712E6671800899322 /* SDL_fillrect.c in Sources */,
04BD018812E6671800899322 /* SDL_gamma.c in Sources */,
04BD018C12E6671800899322 /* SDL_pixels.c in Sources */,
04BD018E12E6671800899322 /* SDL_rect.c in Sources */,
04BD019612E6671800899322 /* SDL_RLEaccel.c in Sources */,
@ -2404,7 +2403,6 @@
04BD01DD12E6671800899322 /* SDL_x11clipboard.c in Sources */,
04BD01DF12E6671800899322 /* SDL_x11dyn.c in Sources */,
04BD01E112E6671800899322 /* SDL_x11events.c in Sources */,
04BD01E312E6671800899322 /* SDL_x11gamma.c in Sources */,
04BD01E512E6671800899322 /* SDL_x11keyboard.c in Sources */,
04BD01E712E6671800899322 /* SDL_x11modes.c in Sources */,
04BD01E912E6671800899322 /* SDL_x11mouse.c in Sources */,
@ -2431,6 +2429,8 @@
0442EC1D12FE1BCB004C9285 /* SDL_render_sw.c in Sources */,
0442EC5A12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */,
0442EC5F12FE1C75004C9285 /* SDL_hints.c in Sources */,
04BAC0C81300C2160055DE28 /* SDL_log.c in Sources */,
0435673E1303160F00BA5428 /* SDL_shaders_gl.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2511,7 +2511,6 @@
04BD039B12E6671800899322 /* SDL_bmp.c in Sources */,
04BD039C12E6671800899322 /* SDL_clipboard.c in Sources */,
04BD03A112E6671800899322 /* SDL_fillrect.c in Sources */,
04BD03A212E6671800899322 /* SDL_gamma.c in Sources */,
04BD03A612E6671800899322 /* SDL_pixels.c in Sources */,
04BD03A812E6671800899322 /* SDL_rect.c in Sources */,
04BD03B012E6671800899322 /* SDL_RLEaccel.c in Sources */,
@ -2523,7 +2522,6 @@
04BD03F512E6671800899322 /* SDL_x11clipboard.c in Sources */,
04BD03F712E6671800899322 /* SDL_x11dyn.c in Sources */,
04BD03F912E6671800899322 /* SDL_x11events.c in Sources */,
04BD03FB12E6671800899322 /* SDL_x11gamma.c in Sources */,
04BD03FD12E6671800899322 /* SDL_x11keyboard.c in Sources */,
04BD03FF12E6671800899322 /* SDL_x11modes.c in Sources */,
04BD040112E6671800899322 /* SDL_x11mouse.c in Sources */,
@ -2550,6 +2548,8 @@
0442EC1F12FE1BCB004C9285 /* SDL_render_sw.c in Sources */,
0442EC5C12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */,
0442EC6012FE1C75004C9285 /* SDL_hints.c in Sources */,
04BAC0C91300C2160055DE28 /* SDL_log.c in Sources */,
043567401303160F00BA5428 /* SDL_shaders_gl.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -101,8 +101,8 @@ public class SDLActivity extends Activity {
// Java functions called from C
public static void createGLContext() {
mSurface.initEGL();
public static boolean createGLContext(int majorVersion, int minorVersion) {
return mSurface.initEGL(majorVersion, minorVersion);
}
public static void flipBuffers() {
@ -351,11 +351,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
// EGL functions
public boolean initEGL() {
Log.v("SDL", "Starting up");
public boolean initEGL(int majorVersion, int minorVersion) {
Log.v("SDL", "Starting up OpenGL ES " + majorVersion + "." + minorVersion);
try {
EGL10 egl = (EGL10)EGLContext.getEGL();
EGLDisplay dpy = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
@ -363,20 +362,43 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
int[] version = new int[2];
egl.eglInitialize(dpy, version);
int EGL_OPENGL_ES_BIT = 1;
int EGL_OPENGL_ES2_BIT = 4;
int renderableType = 0;
if (majorVersion == 2) {
renderableType = EGL_OPENGL_ES2_BIT;
} else if (majorVersion == 1) {
renderableType = EGL_OPENGL_ES_BIT;
}
int[] configSpec = {
//EGL10.EGL_DEPTH_SIZE, 16,
EGL10.EGL_NONE
//EGL10.EGL_DEPTH_SIZE, 16,
EGL10.EGL_RENDERABLE_TYPE, renderableType,
EGL10.EGL_NONE
};
EGLConfig[] configs = new EGLConfig[1];
int[] num_config = new int[1];
egl.eglChooseConfig(dpy, configSpec, configs, 1, num_config);
if (!egl.eglChooseConfig(dpy, configSpec, configs, 1, num_config) || num_config[0] == 0) {
Log.e("SDL", "No EGL config available");
return false;
}
EGLConfig config = configs[0];
EGLContext ctx = egl.eglCreateContext(dpy, config, EGL10.EGL_NO_CONTEXT, null);
if (ctx == EGL10.EGL_NO_CONTEXT) {
Log.e("SDL", "Couldn't create context");
return false;
}
EGLSurface surface = egl.eglCreateWindowSurface(dpy, config, this, null);
if (surface == EGL10.EGL_NO_SURFACE) {
Log.e("SDL", "Couldn't create surface");
return false;
}
egl.eglMakeCurrent(dpy, surface, surface, ctx);
if (!egl.eglMakeCurrent(dpy, surface, surface, ctx)) {
Log.e("SDL", "Couldn't make context current");
return false;
}
mEGLContext = ctx;
mEGLDisplay = dpy;

View File

@ -362,6 +362,12 @@ AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
if test x$enable_video != xyes; then
AC_DEFINE(SDL_VIDEO_DISABLED)
fi
AC_ARG_ENABLE(render,
AC_HELP_STRING([--enable-render], [Enable the render subsystem [[default=yes]]]),
, enable_render=yes)
if test x$enable_render != xyes; then
AC_DEFINE(SDL_RENDER_DISABLED)
fi
AC_ARG_ENABLE(events,
AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
, enable_events=yes)
@ -422,6 +428,12 @@ AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]
if test x$enable_cpuinfo != xyes; then
AC_DEFINE(SDL_CPUINFO_DISABLED)
fi
AC_ARG_ENABLE(atomic,
AC_HELP_STRING([--enable-atomic], [Enable the atomic operations [[default=yes]]]),
, enable_atomic=yes)
if test x$enable_atomic != xyes; then
AC_DEFINE(SDL_ATOMIC_DISABLED)
fi
AC_ARG_ENABLE(assembly,
AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
, enable_assembly=yes)
@ -489,33 +501,6 @@ AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
fi
fi
AC_ARG_ENABLE(3dnow,
AC_HELP_STRING([--enable-3dnow], [use MMX assembly routines [[default=yes]]]),
, enable_3dnow=yes)
if test x$enable_3dnow = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_3dnow=no
AC_MSG_CHECKING(for GCC -m3dnow option)
amd3dnow_CFLAGS="-m3dnow"
CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
AC_TRY_COMPILE([
#include <mm3dnow.h>
#ifndef __3dNOW__
#error Assembler CPP flag not enabled
#endif
],[
],[
have_gcc_3dnow=yes
])
AC_MSG_RESULT($have_gcc_3dnow)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_3dnow = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $amd3dnow_CFLAGS"
fi
fi
AC_ARG_ENABLE(sse,
AC_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
, enable_sse=yes)
@ -587,82 +572,6 @@ AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=no]]]),
EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
fi
fi
AC_ARG_ENABLE(altivec,
AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
, enable_altivec=yes)
if test x$enable_altivec = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_altivec=no
have_altivec_h_hdr=no
altivec_CFLAGS="-maltivec"
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
AC_TRY_COMPILE([
#include <altivec.h>
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
have_altivec_h_hdr=yes
])
AC_MSG_RESULT($have_gcc_altivec)
if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
AC_TRY_COMPILE([
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
])
AC_MSG_RESULT($have_gcc_altivec)
fi
if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
altivec_CFLAGS="-faltivec"
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
AC_TRY_COMPILE([
#include <altivec.h>
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
have_altivec_h_hdr=yes
])
AC_MSG_RESULT($have_gcc_altivec)
fi
if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
AC_TRY_COMPILE([
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
])
AC_MSG_RESULT($have_gcc_altivec)
fi
CFLAGS="$save_CFLAGS"
if test x$have_gcc_altivec = xyes; then
AC_DEFINE(SDL_ALTIVEC_BLITTERS)
if test x$have_altivec_h_hdr = xyes; then
AC_DEFINE(HAVE_ALTIVEC_H)
fi
EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
fi
fi
fi
dnl See if the OSS audio interface is supported

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -81,6 +81,7 @@
#include "SDL_events.h"
#include "SDL_hints.h"
#include "SDL_loadso.h"
#include "SDL_log.h"
#include "SDL_mutex.h"
#include "SDL_power.h"
#include "SDL_render.h"

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -141,6 +141,9 @@ void _ReadWriteBarrier(void);
/* Platform specific optimized versions of the atomic functions,
* you can disable these by defining SDL_DISABLE_ATOMIC_INLINE
*/
#if SDL_ATOMIC_DISABLED
#define SDL_DISABLE_ATOMIC_INLINE
#endif
#ifndef SDL_DISABLE_ATOMIC_INLINE
#ifdef HAVE_MSC_ATOMICS

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -215,8 +215,12 @@ struct SDL_SysWMinfo;
*/
/*@{*/
#define SDL_keysym SDL_KeySym
#define SDL_scancode SDL_ScanCode
#define SDL_keysym SDL_Keysym
#define SDL_KeySym SDL_Keysym
#define SDL_scancode SDL_Scancode
#define SDL_ScanCode SDL_Scancode
#define SDLKey SDL_Keycode
#define SDLMod SDL_Keymod
/**
* \name Renamed keys
@ -324,6 +328,12 @@ extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
SDL_Rect * dstrect);
extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
const Uint16 * green,
const Uint16 * blue);
extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
Uint16 * blue);
extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2009 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2009 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -82,7 +82,6 @@
#undef HAVE_MATH_H
#undef HAVE_ICONV_H
#undef HAVE_SIGNAL_H
#undef HAVE_ALTIVEC_H
/* C library functions */
#undef HAVE_MALLOC
@ -171,6 +170,7 @@
#undef SDL_DEFAULT_ASSERT_LEVEL
/* Allow disabling of core subsystems */
#undef SDL_ATOMIC_DISABLED
#undef SDL_AUDIO_DISABLED
#undef SDL_CPUINFO_DISABLED
#undef SDL_EVENTS_DISABLED
@ -178,6 +178,7 @@
#undef SDL_JOYSTICK_DISABLED
#undef SDL_HAPTIC_DISABLED
#undef SDL_LOADSO_DISABLED
#undef SDL_RENDER_DISABLED
#undef SDL_THREADS_DISABLED
#undef SDL_TIMERS_DISABLED
#undef SDL_VIDEO_DISABLED
@ -301,6 +302,5 @@
/* Enable assembly routines */
#undef SDL_ASSEMBLY_ROUTINES
#undef SDL_ALTIVEC_BLITTERS
#endif /* _SDL_config_h */

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -168,8 +168,5 @@
/* Enable assembly routines */
#define SDL_ASSEMBLY_ROUTINES 1
#ifdef __ppc__
#define SDL_ALTIVEC_BLITTERS 1
#endif
#endif /* _SDL_config_macosx_h */

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -46,6 +46,8 @@ typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
#endif
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
#define SIZEOF_VOIDP 4
#define SDL_HAS_64BIT_TYPE 1
/* Useful headers */
@ -113,9 +115,12 @@ typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
/* Enable various video drivers */
#define SDL_VIDEO_DRIVER_NDS 1
/*#define SDL_VIDEO_DRIVER_DUMMY 1 TODO: uncomment this later*/
#define SDL_VIDEO_RENDER_NDS 1
/* Enable system power support */
#define SDL_POWER_NINTENDODS 1
/* Enable haptic support */
#define SDL_HAPTIC_NDS 1
#endif /* _SDL_config_nintendods_h */

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -69,21 +69,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
/**
* This function returns true if the CPU has MMX Ext.\ features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
/**
* This function returns true if the CPU has 3DNow!\ features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
/**
* This function returns true if the CPU has 3DNow!\ Ext.\ features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
/**
* This function returns true if the CPU has SSE features.
*/
@ -95,9 +80,20 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
/**
* This function returns true if the CPU has AltiVec features.
* This function returns true if the CPU has SSE3 features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
/**
* This function returns true if the CPU has SSE4.1 features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
/**
* This function returns true if the CPU has SSE4.2 features.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -48,7 +48,7 @@ extern DECLSPEC void SDLCALL SDL_ClearError(void);
* \name Internal error functions
*
* \internal
* Private error message function - used internally.
* Private error reporting function - used internally.
*/
/*@{*/
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -151,7 +151,7 @@ typedef struct SDL_KeyboardEvent
Uint8 repeat; /**< Non-zero if this is a key repeat */
Uint8 padding2;
Uint8 padding3;
SDL_KeySym keysym; /**< The key that was pressed or released */
SDL_Keysym keysym; /**< The key that was pressed or released */
} SDL_KeyboardEvent;
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DihintsMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -77,11 +77,26 @@ extern "C" {
* This variable is case insensitive and can be set to the following values:
* "direct3d"
* "opengl"
* "opengles2"
* "opengles"
* "software"
*
* The default varies by platform, but it's the first one in the list that
* is available on the current platform.
*/
#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
/**
* \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
*
* This variable can be set to the following values:
* "0" - Disable shaders
* "1" - Enable shaders
*
* By default shaders are used if OpenGL supports them.
*/
#define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
/**
* \brief A variable controlling whether updates to the SDL 1.2 screen surface should be synchronized with the vertical refresh, to avoid tearing.
*
@ -139,7 +154,7 @@ extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
*
* This function is called during SDL_Quit() to free stored hints.
*/
extern DECLSPEC void SDLCALL SDL_ClearHints();
extern DECLSPEC void SDLCALL SDL_ClearHints(void);
/* Ends C function definitions when using C++ */

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -45,13 +45,13 @@ extern "C" {
/**
* \brief The SDL keysym structure, used in key events.
*/
typedef struct SDL_KeySym
typedef struct SDL_Keysym
{
SDL_ScanCode scancode; /**< SDL physical key code - see ::SDL_ScanCode for details */
SDLKey sym; /**< SDL virtual key code - see ::SDLKey for details */
SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */
SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */
Uint16 mod; /**< current key modifiers */
Uint32 unicode; /**< \deprecated use SDL_TextInputEvent instead */
} SDL_KeySym;
} SDL_Keysym;
/* Function prototypes */
@ -65,7 +65,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
*
* \param numkeys if non-NULL, receives the length of the returned array.
*
* \return An array of key states. Indexes into this array are obtained by using ::SDL_ScanCode values.
* \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.
*
* \b Example:
* \code
@ -80,34 +80,34 @@ extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
/**
* \brief Get the current key modifier state for the keyboard.
*/
extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
/**
* \brief Set the current key modifier state for the keyboard.
*
* \note This does not change the keyboard state, only the key modifier flags.
*/
extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
/**
* \brief Get the key code corresponding to the given scancode according
* to the current keyboard layout.
*
* See ::SDLKey for details.
* See ::SDL_Keycode for details.
*
* \sa SDL_GetKeyName()
*/
extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_ScanCode scancode);
extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
/**
* \brief Get the scancode corresponding to the given key code according to the
* current keyboard layout.
*
* See ::SDL_ScanCode for details.
* See ::SDL_Scancode for details.
*
* \sa SDL_GetScancodeName()
*/
extern DECLSPEC SDL_ScanCode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
/**
* \brief Get a human-readable name for a scancode.
@ -117,9 +117,9 @@ extern DECLSPEC SDL_ScanCode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
* copy it. If the scancode doesn't have a name, this function returns
* an empty string ("").
*
* \sa SDL_ScanCode
* \sa SDL_Scancode
*/
extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_ScanCode
extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode
scancode);
/**
@ -130,9 +130,9 @@ extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_ScanCode
* copy it. If the key doesn't have a name, this function returns an
* empty string ("").
*
* \sa SDLKey
* \sa SDL_Key
*/
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
/**
* \brief Start accepting Unicode text input events.

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -40,7 +40,7 @@
* the unmodified character that would be generated by pressing the key, or
* an SDLK_* constant for those keys that do not generate characters.
*/
typedef Sint32 SDLKey;
typedef Sint32 SDL_Keycode;
#define SDLK_SCANCODE_MASK (1<<30)
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
@ -330,7 +330,7 @@ typedef enum
KMOD_CAPS = 0x2000,
KMOD_MODE = 0x4000,
KMOD_RESERVED = 0x8000
} SDLMod;
} SDL_Keymod;
#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT)

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

207
include/SDL_log.h Normal file
View File

@ -0,0 +1,207 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
/**
* \file SDL_log.h
*
* Simple log messages with categories and priorities.
*
* By default logs are quiet, but if you're debugging SDL you might want:
*
* SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
*
* Here's where the messages go on different platforms:
* Windows: debug output stream
* Android: log output
* Others: standard error output (stderr)
*/
#ifndef _SDL_log_h
#define _SDL_log_h
#include "SDL_stdinc.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
/**
* \brief The maximum size of a log message
*
* Messages longer than the maximum size will be truncated
*/
#define SDL_MAX_LOG_MESSAGE 4096
/**
* \brief The predefined log categories
*
* By default the application category is enabled at the INFO level,
* and all other categories are enabled at the CRITICAL level.
*/
enum
{
SDL_LOG_CATEGORY_APPLICATION,
SDL_LOG_CATEGORY_ERROR,
SDL_LOG_CATEGORY_SYSTEM,
SDL_LOG_CATEGORY_AUDIO,
SDL_LOG_CATEGORY_VIDEO,
SDL_LOG_CATEGORY_RENDER,
SDL_LOG_CATEGORY_INPUT,
/* Reserved for future SDL library use */
SDL_LOG_CATEGORY_RESERVED1,
SDL_LOG_CATEGORY_RESERVED2,
SDL_LOG_CATEGORY_RESERVED3,
SDL_LOG_CATEGORY_RESERVED4,
SDL_LOG_CATEGORY_RESERVED5,
SDL_LOG_CATEGORY_RESERVED6,
SDL_LOG_CATEGORY_RESERVED7,
SDL_LOG_CATEGORY_RESERVED8,
SDL_LOG_CATEGORY_RESERVED9,
SDL_LOG_CATEGORY_RESERVED10,
/* Beyond this point is reserved for application use, e.g.
enum {
MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
MYAPP_CATEGORY_AWESOME2,
MYAPP_CATEGORY_AWESOME3,
...
};
*/
SDL_LOG_CATEGORY_CUSTOM,
};
/**
* \brief The predefined log priorities
*/
typedef enum
{
SDL_LOG_PRIORITY_VERBOSE = 1,
SDL_LOG_PRIORITY_DEBUG,
SDL_LOG_PRIORITY_INFO,
SDL_LOG_PRIORITY_WARN,
SDL_LOG_PRIORITY_ERROR,
SDL_LOG_PRIORITY_CRITICAL,
SDL_NUM_LOG_PRIORITIES
} SDL_LogPriority;
/**
* \brief Set the priority of all log categories
*/
extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
/**
* \brief Set the priority of a particular log category
*/
extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
SDL_LogPriority priority);
/**
* \brief Set the priority of a particular log category
*/
extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
/**
* \brief Reset all priorities to default.
*
* \note This is called in SDL_Quit().
*/
extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
/**
* \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
*/
extern DECLSPEC void SDLCALL SDL_Log(const char *fmt, ...);
/**
* \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
*/
extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, const char *fmt, ...);
/**
* \brief Log a message with SDL_LOG_PRIORITY_INFO
*/
extern DECLSPEC void SDLCALL SDL_LogInfo(int category, const char *fmt, ...);
/**
* \brief Log a message with SDL_LOG_PRIORITY_WARN
*/
extern DECLSPEC void SDLCALL SDL_LogWarn(int category, const char *fmt, ...);
/**
* \brief Log a message with SDL_LOG_PRIORITY_ERROR
*/
extern DECLSPEC void SDLCALL SDL_LogError(int category, const char *fmt, ...);
/**
* \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
*/
extern DECLSPEC void SDLCALL SDL_LogCritical(int category, const char *fmt, ...);
/**
* \brief Log a message with the specified category and priority.
*/
extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
SDL_LogPriority priority,
const char *fmt, ...);
/**
* \brief Log a message with the specified category and priority.
*/
extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
SDL_LogPriority priority,
const char *fmt, va_list ap);
/**
* \brief The prototype for the log output function
*/
typedef void (*SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
/**
* \brief Get the current log output function.
*/
extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
/**
* \brief This function allows you to replace the default log output
* function with one of your own.
*/
extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif
#include "close_code.h"
#endif /* _SDL_log_h */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -124,9 +124,7 @@ enum
#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
#define SDL_BYTESPERPIXEL(X) \
(SDL_ISPIXELFORMAT_FOURCC(X) ? \
((((X) == SDL_PIXELFORMAT_YV12) || \
((X) == SDL_PIXELFORMAT_IYUV) || \
((X) == SDL_PIXELFORMAT_YUY2) || \
((((X) == SDL_PIXELFORMAT_YUY2) || \
((X) == SDL_PIXELFORMAT_UYVY) || \
((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -192,6 +192,7 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
* of range.
*
* \sa SDL_QueryTexture()
* \sa SDL_UpdateTexture()
* \sa SDL_DestroyTexture()
*/
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format,
@ -362,6 +363,18 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
*/
extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
/**
* \brief Set the clipping rectangle for rendering on the current target
*
* \param rect The rectangle to clip rendering to, or NULL to disable clipping.
*
* The contents of the window are not defined after calling
* SDL_RenderPresent(), so you should clear the clip rectangle and draw
* over the entire window each frame.
*/
extern DECLSPEC void SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
const SDL_Rect * rect);
/**
* \brief Set the color used for drawing operations (Fill and Line).
*

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -35,7 +35,7 @@
* \brief The SDL keyboard scancode representation.
*
* Values of this type are used to represent keyboard keys, among other places
* in the \link SDL_KeySym::scancode key.keysym.scancode \endlink field of the
* in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
* SDL_Event structure.
*
* The values in this enumeration are based on the USB usage page standard:
@ -392,7 +392,7 @@ typedef enum
SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
for array bounds */
} SDL_ScanCode;
} SDL_Scancode;
#endif /* _SDL_scancode_h */

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -434,22 +434,6 @@ extern DECLSPEC int SDLCALL SDL_FillRects
source colour key.
\endverbatim
*
* If either of the surfaces were in video memory, and the blit returns -2,
* the video memory was lost, so it should be reloaded with artwork and
* re-blitted:
* @code
* while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
* while ( SDL_LockSurface(image) < 0 )
* Sleep(10);
* -- Write image pixels to image->pixels --
* SDL_UnlockSurface(image);
* }
* @endcode
*
* This happens under DirectX 5.0 when the system switches away from your
* fullscreen application. The lock will also fail until you have access
* to the video memory again.
*
* You should call SDL_BlitSurface() unless you know exactly how SDL
* blitting works internally and how to use the other blit functions.
*/

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -113,12 +113,20 @@ typedef enum
/**
* \brief Used to indicate that you don't care what the window position is.
*/
#define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF
#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
(((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
/**
* \brief Used to indicate that the window position should be centered.
*/
#define SDL_WINDOWPOS_CENTERED 0x7FFFFFE
#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X) \
(((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
/**
* \brief Event subtype for window events
@ -236,7 +244,6 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
* \brief Returns the number of available video displays.
*
* \sa SDL_GetDisplayBounds()
* \sa SDL_SelectVideoDisplay()
*/
extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
@ -248,34 +255,14 @@ extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
*
* \sa SDL_GetNumVideoDisplays()
*/
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int index, SDL_Rect * rect);
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
/**
* \brief Set the index of the currently selected display.
*
* \return 0 on success, or -1 if the index is out of range.
*
* \sa SDL_GetNumVideoDisplays()
* \sa SDL_GetCurrentVideoDisplay()
*/
extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index);
/**
* \brief Get the index of the currently selected display.
*
* \return The index of the currently selected display.
*
* \sa SDL_GetNumVideoDisplays()
* \sa SDL_SelectVideoDisplay()
*/
extern DECLSPEC int SDLCALL SDL_GetCurrentVideoDisplay(void);
/**
* \brief Returns the number of available display modes for the current display.
* \brief Returns the number of available display modes.
*
* \sa SDL_GetDisplayMode()
*/
extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
/**
* \brief Fill in information about a specific display mode.
@ -288,19 +275,18 @@ extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
*
* \sa SDL_GetNumDisplayModes()
*/
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int index,
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
SDL_DisplayMode * mode);
/**
* \brief Fill in information about the desktop display mode for the current
* display.
* \brief Fill in information about the desktop display mode.
*/
extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(SDL_DisplayMode * mode);
extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
/**
* \brief Fill in information about the current display mode.
*/
extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode);
extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
/**
@ -323,16 +309,21 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode);
* \sa SDL_GetNumDisplayModes()
* \sa SDL_GetDisplayMode()
*/
extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const
SDL_DisplayMode
* mode,
SDL_DisplayMode
* closest);
extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
/**
* \brief Set the display mode used when a fullscreen window is visible
* on the currently selected display. By default the window's
* dimensions and the desktop format and refresh rate are used.
* \brief Get the display index associated with a window.
*
* \return the display index of the display containing the center of the
* window, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_GetWindowDisplay(SDL_Window * window);
/**
* \brief Set the display mode used when a fullscreen window is visible.
*
* By default the window's dimensions and the desktop format and refresh rate
* are used.
*
* \param mode The mode to use, or NULL for the default mode.
*
@ -347,7 +338,7 @@ extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
/**
* \brief Fill in information about the display mode used when a fullscreen
* window is visible on the currently selected display.
* window is visible.
*
* \sa SDL_SetWindowDisplayMode()
* \sa SDL_SetWindowFullscreen()
@ -360,55 +351,6 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
*/
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
/**
* \brief Set the gamma correction for each of the color channels on the
* currently selected display.
*
* \return 0 on success, or -1 if setting the gamma isn't supported.
*
* \sa SDL_SetGammaRamp()
*/
extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
/**
* \brief Set the gamma ramp for the currently selected display.
*
* \param red The translation table for the red channel, or NULL.
* \param green The translation table for the green channel, or NULL.
* \param blue The translation table for the blue channel, or NULL.
*
* \return 0 on success, or -1 if gamma ramps are unsupported.
*
* Set the gamma translation table for the red, green, and blue channels
* of the video hardware. Each table is an array of 256 16-bit quantities,
* representing a mapping between the input and output for that channel.
* The input is the index into the array, and the output is the 16-bit
* gamma value at that index, scaled to the output color precision.
*
* \sa SDL_GetGammaRamp()
*/
extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
const Uint16 * green,
const Uint16 * blue);
/**
* \brief Get the gamma ramp for the currently selected display.
*
* \param red A pointer to a 256 element array of 16-bit quantities to hold
* the translation table for the red channel, or NULL.
* \param green A pointer to a 256 element array of 16-bit quantities to hold
* the translation table for the green channel, or NULL.
* \param blue A pointer to a 256 element array of 16-bit quantities to hold
* the translation table for the blue channel, or NULL.
*
* \return 0 on success, or -1 if gamma ramps are unsupported.
*
* \sa SDL_SetGammaRamp()
*/
extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
Uint16 * blue);
/**
* \brief Create a window with the specified position, dimensions, and flags.
*
@ -605,7 +547,7 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
* \sa SDL_GetWindowDisplayMode()
*/
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
int fullscreen);
SDL_bool fullscreen);
/**
* \brief Get an SDL surface associated with the window.
@ -660,16 +602,6 @@ extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
*/
extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_Window * window);
/**
* \brief Get driver specific information about a window.
*
* \note Include SDL_syswm.h for the declaration of SDL_SysWMinfo.
*/
struct SDL_SysWMinfo;
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
struct SDL_SysWMinfo
*info);
/**
* \brief Destroy a window.
*/

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -29,10 +29,6 @@
#include "haptic/SDL_haptic_c.h"
#include "joystick/SDL_joystick_c.h"
#if !SDL_VIDEO_DISABLED
#include "video/SDL_leaks.h"
#endif
/* Initialization/Cleanup routines */
#if !SDL_TIMERS_DISABLED
extern void SDL_StartTicks(void);
@ -49,9 +45,6 @@ extern int SDL_HelperWindowDestroy(void);
static Uint32 SDL_initialized = 0;
static Uint32 ticks_started = 0;
#ifdef CHECK_LEAKS
int surfaces_allocated = 0;
#endif
int
SDL_InitSubSystem(Uint32 flags)
@ -215,45 +208,17 @@ void
SDL_Quit(void)
{
/* Quit all subsystems */
#ifdef DEBUG_BUILD
printf("[SDL_Quit] : Enter! Calling QuitSubSystem()\n");
fflush(stdout);
#endif
#if defined(__WIN32__)
SDL_HelperWindowDestroy();
#endif
SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
#ifdef CHECK_LEAKS
#ifdef DEBUG_BUILD
printf("[SDL_Quit] : CHECK_LEAKS\n");
fflush(stdout);
#endif
/* !!! FIXME: make this an assertion. */
/* Print the number of surfaces not freed */
if (surfaces_allocated != 0) {
fprintf(stderr, "SDL Warning: %d SDL surfaces extant\n",
surfaces_allocated);
}
#endif
#ifdef DEBUG_BUILD
printf("[SDL_Quit] : SDL_UninstallParachute()\n");
fflush(stdout);
#endif
/* Uninstall any parachute signal handlers */
SDL_UninstallParachute();
SDL_ClearHints();
SDL_AssertionsQuit();
#ifdef DEBUG_BUILD
printf("[SDL_Quit] : Returning!\n");
fflush(stdout);
#endif
SDL_LogResetPriorities();
}
/* Get the library version number */
@ -301,6 +266,8 @@ SDL_GetPlatform()
return "Mac OS X";
#elif __NETBSD__
return "NetBSD";
#elif __NDS__
return "Nintendo DS";
#elif __OPENBSD__
return "OpenBSD";
#elif __OS2__

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -71,15 +71,17 @@ SDL_VideoDriverName(char *namebuf, int maxlen)
return NULL;
}
static void
SelectVideoDisplay()
static int
GetVideoDisplay()
{
const char *variable = SDL_getenv("SDL_VIDEO_FULLSCREEN_DISPLAY");
if ( !variable ) {
variable = SDL_getenv("SDL_VIDEO_FULLSCREEN_HEAD");
}
if ( variable ) {
SDL_SelectVideoDisplay(SDL_atoi(variable));
return SDL_atoi(variable);
} else {
return 0;
}
}
@ -89,10 +91,8 @@ SDL_GetVideoInfo(void)
static SDL_VideoInfo info;
SDL_DisplayMode mode;
SelectVideoDisplay();
/* Memory leak, compatibility code, who cares? */
if (!info.vfmt && SDL_GetDesktopDisplayMode(&mode) == 0) {
if (!info.vfmt && SDL_GetDesktopDisplayMode(GetVideoDisplay(), &mode) == 0) {
int bpp;
Uint32 Rmask, Gmask, Bmask, Amask;
@ -114,17 +114,15 @@ SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags)
return 0;
}
SelectVideoDisplay();
if (!(flags & SDL_FULLSCREEN)) {
SDL_DisplayMode mode;
SDL_GetDesktopDisplayMode(&mode);
SDL_GetDesktopDisplayMode(GetVideoDisplay(), &mode);
return SDL_BITSPERPIXEL(mode.format);
}
for (i = 0; i < SDL_GetNumDisplayModes(); ++i) {
for (i = 0; i < SDL_GetNumDisplayModes(GetVideoDisplay()); ++i) {
SDL_DisplayMode mode;
SDL_GetDisplayMode(i, &mode);
SDL_GetDisplayMode(GetVideoDisplay(), i, &mode);
if (!mode.w || !mode.h || (width == mode.w && height == mode.h)) {
if (!mode.format) {
return bpp;
@ -147,8 +145,6 @@ SDL_ListModes(const SDL_PixelFormat * format, Uint32 flags)
return NULL;
}
SelectVideoDisplay();
if (!(flags & SDL_FULLSCREEN)) {
return (SDL_Rect **) (-1);
}
@ -160,11 +156,11 @@ SDL_ListModes(const SDL_PixelFormat * format, Uint32 flags)
/* Memory leak, but this is a compatibility function, who cares? */
nmodes = 0;
modes = NULL;
for (i = 0; i < SDL_GetNumDisplayModes(); ++i) {
for (i = 0; i < SDL_GetNumDisplayModes(GetVideoDisplay()); ++i) {
SDL_DisplayMode mode;
int bpp;
SDL_GetDisplayMode(i, &mode);
SDL_GetDisplayMode(GetVideoDisplay(), i, &mode);
if (!mode.w || !mode.h) {
return (SDL_Rect **) (-1);
}
@ -342,7 +338,7 @@ GetEnvironmentWindowPosition(int w, int h, int *x, int *y)
}
if (center) {
SDL_DisplayMode mode;
SDL_GetDesktopDisplayMode(&mode);
SDL_GetDesktopDisplayMode(GetVideoDisplay(), &mode);
*x = (mode.w - w) / 2;
*y = (mode.h - h) / 2;
}
@ -453,9 +449,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
}
}
SelectVideoDisplay();
SDL_GetDesktopDisplayMode(&desktop_mode);
SDL_GetDesktopDisplayMode(GetVideoDisplay(), &desktop_mode);
if (width == 0) {
width = desktop_mode.w;
@ -525,7 +519,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
if (window_flags & SDL_WINDOW_FULLSCREEN) {
surface_flags |= SDL_FULLSCREEN;
}
if (window_flags & SDL_WINDOW_OPENGL) {
if ((window_flags & SDL_WINDOW_OPENGL) && (flags & SDL_OPENGL)) {
surface_flags |= SDL_OPENGL;
}
if (window_flags & SDL_WINDOW_RESIZABLE) {
@ -1526,6 +1520,26 @@ SDL_GL_SwapBuffers(void)
SDL_GL_SwapWindow(SDL_VideoWindow);
}
int
SDL_SetGamma(float red, float green, float blue)
{
SDL_Unsupported();
return -1;
}
int
SDL_SetGammaRamp(const Uint16 * red, const Uint16 * green, const Uint16 * blue)
{
SDL_Unsupported();
return -1;
}
int
SDL_GetGammaRamp(Uint16 * red, Uint16 * green, Uint16 * blue)
{
SDL_Unsupported();
return -1;
}
int
SDL_EnableKeyRepeat(int delay, int interval)

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -23,14 +23,10 @@
/* Simple error handling in SDL */
#ifdef __ANDROID__
#include <android/log.h>
#endif
#include "SDL_log.h"
#include "SDL_error.h"
#include "SDL_error_c.h"
/*#define DEBUG_ERROR*/
/* Routine to get the thread-specific error variable */
#if SDL_THREADS_DISABLED
@ -113,12 +109,7 @@ SDL_SetError(const char *fmt, ...)
va_end(ap);
/* If we are in debug mode, print out an error message */
#ifdef DEBUG_ERROR
fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError());
#ifdef __ANDROID__
__android_log_print(ANDROID_LOG_INFO, "SDL", "ERROR: %s", SDL_GetError());
#endif
#endif /* DEBUG_ERROR */
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "%s", SDL_GetError());
}
/* This function has a bit more overhead than most error functions

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -105,7 +105,7 @@ SDL_GetHint(const char *name)
return env;
}
void SDL_ClearHints()
void SDL_ClearHints(void)
{
SDL_Hint *hint;

320
src/SDL_log.c Executable file
View File

@ -0,0 +1,320 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/* Simple log messages in SDL */
#include "SDL_log.h"
#if HAVE_STDIO_H
#include <stdio.h>
#endif
#if defined(__WIN32__)
#include "core/windows/SDL_windows.h"
#elif defined(__ANDROID__)
#include <android/log.h>
#endif
#define DEFAULT_PRIORITY SDL_LOG_PRIORITY_CRITICAL
#define DEFAULT_APPLICATION_PRIORITY SDL_LOG_PRIORITY_INFO
typedef struct SDL_LogLevel
{
int category;
SDL_LogPriority priority;
struct SDL_LogLevel *next;
} SDL_LogLevel;
/* The default log output function */
static void SDL_LogOutput(void *userdata,
int category, SDL_LogPriority priority,
const char *message);
static SDL_LogLevel *SDL_loglevels;
static SDL_LogPriority SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
static SDL_LogPriority SDL_default_priority = DEFAULT_PRIORITY;
static SDL_LogOutputFunction SDL_log_function = SDL_LogOutput;
static void *SDL_log_userdata = NULL;
static const char *SDL_priority_prefixes[SDL_NUM_LOG_PRIORITIES] = {
NULL,
"VERBOSE",
"DEBUG",
"INFO",
"WARN",
"ERROR",
"CRITICAL"
};
#ifdef __ANDROID__
static const char *SDL_category_prefixes[SDL_LOG_CATEGORY_RESERVED1] = {
"APP",
"ERROR",
"SYSTEM",
"AUDIO",
"VIDEO",
"RENDER",
"INPUT"
};
static int SDL_android_priority[SDL_NUM_LOG_PRIORITIES] = {
ANDROID_LOG_VERBOSE,
ANDROID_LOG_DEBUG,
ANDROID_LOG_INFO,
ANDROID_LOG_WARN,
ANDROID_LOG_ERROR,
ANDROID_LOG_FATAL
};
#endif /* __ANDROID__ */
void
SDL_LogSetAllPriority(SDL_LogPriority priority)
{
SDL_LogLevel *entry;
for (entry = SDL_loglevels; entry; entry = entry->next) {
entry->priority = priority;
}
SDL_application_priority = SDL_default_priority = priority;
}
void
SDL_LogSetPriority(int category, SDL_LogPriority priority)
{
SDL_LogLevel *entry;
for (entry = SDL_loglevels; entry; entry = entry->next) {
if (entry->category == category) {
entry->priority = priority;
return;
}
}
/* Create a new entry */
entry = (SDL_LogLevel *)SDL_malloc(sizeof(*entry));
if (entry) {
entry->category = category;
entry->priority = priority;
entry->next = SDL_loglevels;
SDL_loglevels = entry;
}
}
SDL_LogPriority
SDL_LogGetPriority(int category)
{
SDL_LogLevel *entry;
for (entry = SDL_loglevels; entry; entry = entry->next) {
if (entry->category == category) {
return entry->priority;
}
}
if (category == SDL_LOG_CATEGORY_APPLICATION) {
return SDL_application_priority;
} else {
return SDL_default_priority;
}
}
void
SDL_LogResetPriorities(void)
{
SDL_LogLevel *entry;
while (SDL_loglevels) {
entry = SDL_loglevels;
SDL_loglevels = entry->next;
SDL_free(entry);
}
SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
SDL_default_priority = DEFAULT_PRIORITY;
}
void
SDL_Log(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap);
va_end(ap);
}
void
SDL_LogVerbose(int category, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
SDL_LogMessageV(category, SDL_LOG_PRIORITY_VERBOSE, fmt, ap);
va_end(ap);
}
void
SDL_LogInfo(int category, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
SDL_LogMessageV(category, SDL_LOG_PRIORITY_INFO, fmt, ap);
va_end(ap);
}
void
SDL_LogWarn(int category, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
SDL_LogMessageV(category, SDL_LOG_PRIORITY_WARN, fmt, ap);
va_end(ap);
}
void
SDL_LogError(int category, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
SDL_LogMessageV(category, SDL_LOG_PRIORITY_ERROR, fmt, ap);
va_end(ap);
}
void
SDL_LogCritical(int category, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
SDL_LogMessageV(category, SDL_LOG_PRIORITY_CRITICAL, fmt, ap);
va_end(ap);
}
void
SDL_LogMessage(int category, SDL_LogPriority priority, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
SDL_LogMessageV(category, priority, fmt, ap);
va_end(ap);
}
#ifdef __ANDROID__
static const char *
GetCategoryPrefix(int category)
{
if (category < SDL_LOG_CATEGORY_RESERVED1) {
return SDL_category_prefixes[category];
}
if (category < SDL_LOG_CATEGORY_CUSTOM) {
return "RESERVED";
}
return "CUSTOM";
}
#endif /* __ANDROID__ */
void
SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list ap)
{
char *message;
/* Nothing to do if we don't have an output function */
if (!SDL_log_function) {
return;
}
/* Make sure we don't exceed array bounds */
if (priority < 0 || priority >= SDL_NUM_LOG_PRIORITIES) {
return;
}
/* See if we want to do anything with this message */
if (priority < SDL_LogGetPriority(category)) {
return;
}
message = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
if (!message) {
return;
}
SDL_vsnprintf(message, SDL_MAX_LOG_MESSAGE, fmt, ap);
SDL_log_function(SDL_log_userdata, category, priority, message);
SDL_stack_free(message);
}
static void
SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
const char *message)
{
#if defined(__WIN32__)
/* Way too many allocations here, urgh */
{
char *output;
size_t length;
LPTSTR tstr;
length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1;
output = SDL_stack_alloc(char, length);
SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message);
tstr = WIN_UTF8ToString(output);
OutputDebugString(tstr);
SDL_free(tstr);
SDL_stack_free(output);
}
#elif defined(__ANDROID__)
{
char tag[32];
SDL_snprintf(tag, SDL_arraysize(tag), "SDL/%s", GetCategoryPrefix(category));
__android_log_write(SDL_android_priority[priority], tag, message);
}
#endif
#if HAVE_STDIO_H
fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message);
#endif
}
void
SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata)
{
if (callback) {
*callback = SDL_log_function;
}
if (userdata) {
*userdata = SDL_log_userdata;
}
}
void
SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata)
{
SDL_log_function = callback;
SDL_log_userdata = userdata;
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -22,6 +22,7 @@
#include "SDL_stdinc.h"
#include "SDL_atomic.h"
#include "SDL_mutex.h"
#include "SDL_timer.h"
/* Don't do the check for Visual Studio 2005, it's safe here */
@ -33,7 +34,25 @@
SDL_bool
SDL_AtomicTryLock(SDL_SpinLock *lock)
{
#if defined(_MSC_VER)
#if SDL_ATOMIC_DISABLED
/* Terrible terrible damage */
static SDL_mutex *_spinlock_mutex;
if (!_spinlock_mutex) {
/* Race condition on first lock... */
_spinlock_mutex = SDL_CreateMutex();
}
SDL_mutexP(_spinlock_mutex);
if (*lock == 0) {
*lock = 1;
SDL_mutexV(_spinlock_mutex);
return SDL_TRUE;
} else {
SDL_mutexV(_spinlock_mutex);
return SDL_FALSE;
}
#elif defined(_MSC_VER)
SDL_COMPILE_TIME_ASSERT(locksize, sizeof(*lock) == sizeof(long));
return (InterlockedExchange((long*)lock, 1) == 0);

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,7 +1,7 @@
/* DO NOT EDIT! This file is generated by sdlgenaudiocvt.pl */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is SDL_free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is SDL_free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2010 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View File

@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2009 Sam Lantinga
Copyright (C) 1997-2011 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

Some files were not shown because too many files have changed in this diff Show More