From b92439b60c03f26e379506d381d0ab06a829297a Mon Sep 17 00:00:00 2001 From: fysx Date: Wed, 8 Jan 2014 23:57:35 +0100 Subject: [PATCH] Bumped SDL2 to the latest development version. --- AndroidManifest.xml | 6 +- README.md | 2 +- jni/SDL2-2.0.1/Android.mk | 1 + jni/SDL2-2.0.1/CMakeLists.txt | 62 +- jni/SDL2-2.0.1/README-android.txt | 20 +- jni/SDL2-2.0.1/README-gesture.txt | 4 +- jni/SDL2-2.0.1/README-raspberrypi.txt | 6 + jni/SDL2-2.0.1/README.txt | 4 + jni/SDL2-2.0.1/SDL2.spec | 112 - jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2008.vcproj | 1338 -------- jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2010.vcxproj | 679 ---- jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2012.vcxproj | 470 --- jni/SDL2-2.0.1/VisualC/SDL_VS2008.sln | 237 -- jni/SDL2-2.0.1/VisualC/SDL_VS2010.sln | 417 --- jni/SDL2-2.0.1/VisualC/SDL_VS2010EE.sln | 219 -- jni/SDL2-2.0.1/VisualC/SDL_VS2012.sln | 278 -- jni/SDL2-2.0.1/VisualC/SDL_VS2012EE.sln | 258 -- .../VisualC/SDLmain/SDLmain_VS2008.vcproj | 424 --- .../VisualC/SDLmain/SDLmain_VS2010.vcxproj | 163 - .../VisualC/SDLmain/SDLmain_VS2012.vcxproj | 168 - .../VisualC/SDLtest/SDLtest_VS2008.vcproj | 480 --- .../VisualC/SDLtest/SDLtest_VS2010.vcxproj | 191 -- .../VisualC/SDLtest/SDLtest_VS2012.vcxproj | 196 -- jni/SDL2-2.0.1/VisualC/clean.sh | 5 - .../tests/checkkeys/checkkeys_VS2008.vcproj | 205 -- .../tests/checkkeys/checkkeys_VS2010.vcxproj | 231 -- .../tests/checkkeys/checkkeys_VS2012.vcxproj | 231 -- .../tests/loopwave/loopwave_VS2008.vcproj | 205 -- .../tests/loopwave/loopwave_VS2010.vcxproj | 235 -- .../tests/loopwave/loopwave_VS2012.vcxproj | 235 -- .../tests/testatomic/testatomic_VS2008.vcproj | 205 -- .../testatomic/testatomic_VS2010.vcxproj | 231 -- .../testatomic/testatomic_VS2012.vcxproj | 235 -- .../testautomation_VS2008.vcproj | 277 -- .../testautomation_vs2010.vcxproj | 215 -- .../testautomation_vs2012.vcxproj | 213 -- .../tests/testdraw2/testdraw2_VS2008.vcproj | 205 -- .../tests/testdraw2/testdraw2_VS2010.vcxproj | 234 -- .../tests/testdraw2/testdraw2_VS2012.vcxproj | 232 -- .../tests/testfile/testfile_VS2008.vcproj | 205 -- .../tests/testfile/testfile_VS2010.vcxproj | 231 -- .../tests/testfile/testfile_VS2012.vcxproj | 231 -- .../testgamecontroller_VS2010.vcxproj | 227 -- .../testgamecontroller_VS2012.vcxproj | 231 -- .../testgesture/testgesture_VS2008.vcproj | 205 -- .../testgesture/testgesture_VS2010.vcxproj | 227 -- .../testgesture/testgesture_VS2012.vcxproj | 231 -- .../tests/testgl2/testgl2_VS2008.vcproj | 207 -- .../tests/testgl2/testgl2_VS2010.vcxproj | 238 -- .../tests/testgl2/testgl2_VS2012.vcxproj | 236 -- .../testjoystick/testjoystick_VS2008.vcproj | 205 -- .../testjoystick/testjoystick_VS2010.vcxproj | 227 -- .../testjoystick/testjoystick_VS2012.vcxproj | 231 -- .../testoverlay2/testoverlay2_VS2008.vcproj | 205 -- .../testoverlay2/testoverlay2_VS2010.vcxproj | 231 -- .../testoverlay2/testoverlay2_VS2012.vcxproj | 235 -- .../testplatform/testplatform_VS2008.vcproj | 209 -- .../testplatform/testplatform_VS2010.vcxproj | 250 -- .../testplatform/testplatform_VS2012.vcxproj | 249 -- .../tests/testpower/testpower_VS2008.vcproj | 205 -- .../tests/testpower/testpower_VS2010.vcxproj | 234 -- .../tests/testpower/testpower_VS2012.vcxproj | 231 -- .../testrendertarget_VS2008.vcproj | 205 -- .../testrendertarget_VS2010.vcxproj | 242 -- .../testrendertarget_VS2012.vcxproj | 245 -- .../tests/testscale/testscale_VS2008.vcproj | 205 -- .../tests/testscale/testscale_VS2010.vcxproj | 242 -- .../tests/testscale/testscale_VS2012.vcxproj | 246 -- .../tests/testshape/testshape_VS2008.vcproj | 205 -- .../tests/testshape/testshape_VS2010.vcxproj | 231 -- .../tests/testshape/testshape_VS2012.vcxproj | 231 -- .../testsprite2/testsprite2_VS2008.vcproj | 205 -- .../testsprite2/testsprite2_VS2010.vcxproj | 238 -- .../testsprite2/testsprite2_VS2012.vcxproj | 236 -- jni/SDL2-2.0.1/WhatsNew.txt | 24 + .../SDL/SDL.xcodeproj/project.pbxproj | 28 + .../Xcode/SDL/SDL.xcodeproj/project.pbxproj | 48 + .../android-project/AndroidManifest.xml | 9 +- .../android-project/default.properties | 2 +- .../android-project/jni/Application.mk | 2 + .../android-project/jni/src/Android.mk | 2 +- .../android-project/project.properties | 2 +- .../src/org/libsdl/app/SDLActivity.java | 322 +- jni/SDL2-2.0.1/build-scripts/androidbuild.sh | 29 +- .../build-scripts/raspberrypi-buildbot.sh | 2 +- jni/SDL2-2.0.1/cmake/sdlchecks.cmake | 132 +- jni/SDL2-2.0.1/configure | 325 +- jni/SDL2-2.0.1/configure.in | 214 +- jni/SDL2-2.0.1/debian/rules | 4 +- jni/SDL2-2.0.1/include/SDL_atomic.h | 111 +- jni/SDL2-2.0.1/include/SDL_config.h | 4 +- jni/SDL2-2.0.1/include/SDL_config.h.cmake | 22 +- jni/SDL2-2.0.1/include/SDL_config.h.in | 20 +- jni/SDL2-2.0.1/include/SDL_config_android.h | 6 +- jni/SDL2-2.0.1/include/SDL_config_iphoneos.h | 5 +- jni/SDL2-2.0.1/include/SDL_config_macosx.h | 5 +- jni/SDL2-2.0.1/include/SDL_config_pandora.h | 3 +- jni/SDL2-2.0.1/include/SDL_config_psp.h | 5 +- jni/SDL2-2.0.1/include/SDL_config_windows.h | 14 +- jni/SDL2-2.0.1/include/SDL_config_wiz.h | 3 +- jni/SDL2-2.0.1/include/SDL_egl.h | 1389 +++++++++ jni/SDL2-2.0.1/include/SDL_events.h | 2 +- jni/SDL2-2.0.1/include/SDL_gamecontroller.h | 18 + jni/SDL2-2.0.1/include/SDL_gesture.h | 4 +- jni/SDL2-2.0.1/include/SDL_hints.h | 56 +- jni/SDL2-2.0.1/include/SDL_joystick.h | 2 +- jni/SDL2-2.0.1/include/SDL_main.h | 2 +- jni/SDL2-2.0.1/include/SDL_opengles2.h | 2758 ++++++++++++++++- jni/SDL2-2.0.1/include/SDL_platform.h | 7 - jni/SDL2-2.0.1/include/SDL_render.h | 4 +- jni/SDL2-2.0.1/include/SDL_revision.h | 4 +- jni/SDL2-2.0.1/include/SDL_stdinc.h | 5 +- jni/SDL2-2.0.1/include/SDL_syswm.h | 9 + jni/SDL2-2.0.1/include/SDL_test_common.h | 1 + jni/SDL2-2.0.1/include/SDL_thread.h | 49 +- jni/SDL2-2.0.1/src/SDL.c | 12 +- jni/SDL2-2.0.1/src/SDL_assert.c | 2 +- jni/SDL2-2.0.1/src/SDL_error.c | 2 +- jni/SDL2-2.0.1/src/SDL_error_c.h | 2 +- jni/SDL2-2.0.1/src/SDL_hints.c | 2 +- jni/SDL2-2.0.1/src/SDL_internal.h | 38 + jni/SDL2-2.0.1/src/SDL_log.c | 2 +- jni/SDL2-2.0.1/src/atomic/SDL_atomic.c | 129 +- jni/SDL2-2.0.1/src/atomic/SDL_spinlock.c | 2 +- jni/SDL2-2.0.1/src/audio/SDL_audio.c | 18 +- jni/SDL2-2.0.1/src/audio/SDL_audio_c.h | 2 +- jni/SDL2-2.0.1/src/audio/SDL_audiocvt.c | 2 +- jni/SDL2-2.0.1/src/audio/SDL_audiodev.c | 2 +- jni/SDL2-2.0.1/src/audio/SDL_audiodev_c.h | 2 +- jni/SDL2-2.0.1/src/audio/SDL_audiomem.h | 2 +- jni/SDL2-2.0.1/src/audio/SDL_audiotypecvt.c | 2 +- jni/SDL2-2.0.1/src/audio/SDL_mixer.c | 2 +- jni/SDL2-2.0.1/src/audio/SDL_sysaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/SDL_wave.c | 2 +- jni/SDL2-2.0.1/src/audio/SDL_wave.h | 2 +- .../src/audio/alsa/SDL_alsa_audio.c | 2 +- .../src/audio/alsa/SDL_alsa_audio.h | 2 +- .../src/audio/android/SDL_androidaudio.c | 2 +- .../src/audio/android/SDL_androidaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.c | 2 +- jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.c | 2 +- jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.h | 2 +- .../src/audio/coreaudio/SDL_coreaudio.c | 2 +- .../src/audio/coreaudio/SDL_coreaudio.h | 2 +- .../src/audio/directsound/SDL_directsound.c | 2 +- .../src/audio/directsound/SDL_directsound.h | 2 +- jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.c | 2 +- jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.c | 2 +- jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.h | 2 +- .../src/audio/dummy/SDL_dummyaudio.c | 2 +- .../src/audio/dummy/SDL_dummyaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.c | 2 +- jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.h | 2 +- .../src/audio/fusionsound/SDL_fsaudio.c | 2 +- .../src/audio/fusionsound/SDL_fsaudio.h | 2 +- .../SDL_haikuaudio.cc} | 69 +- .../SDL_beaudio.h => haiku/SDL_haikuaudio.h} | 2 +- jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.c | 2 +- jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.c | 2 +- jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.h | 2 +- .../src/audio/pulseaudio/SDL_pulseaudio.c | 2 +- .../src/audio/pulseaudio/SDL_pulseaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.c | 2 +- jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.h | 2 +- jni/SDL2-2.0.1/src/audio/sdlgenaudiocvt.pl | 2 +- .../src/audio/sndio/SDL_sndioaudio.c | 2 +- .../src/audio/sndio/SDL_sndioaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.c | 2 +- jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.h | 2 +- jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.c | 2 +- jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.h | 2 +- .../src/audio/xaudio2/SDL_xaudio2.c | 8 +- jni/SDL2-2.0.1/src/core/android/SDL_android.c | 114 +- jni/SDL2-2.0.1/src/core/android/SDL_android.h | 6 +- .../{input/evdev => core/linux}/SDL_evdev.c | 2 +- .../{input/evdev => core/linux}/SDL_evdev.h | 2 +- jni/SDL2-2.0.1/src/core/linux/SDL_udev.h | 2 +- jni/SDL2-2.0.1/src/core/windows/SDL_windows.c | 12 +- jni/SDL2-2.0.1/src/cpuinfo/SDL_cpuinfo.c | 2 +- jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.c | 302 ++ jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.h | 50 + .../src/dynapi/SDL_dynapi_overrides.h | 572 ++++ jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_procs.h | 601 ++++ jni/SDL2-2.0.1/src/dynapi/gendynapi.pl | 141 + .../src/events/SDL_clipboardevents.c | 2 +- .../src/events/SDL_clipboardevents_c.h | 2 +- jni/SDL2-2.0.1/src/events/SDL_dropevents.c | 2 +- jni/SDL2-2.0.1/src/events/SDL_dropevents_c.h | 2 +- jni/SDL2-2.0.1/src/events/SDL_events.c | 2 +- jni/SDL2-2.0.1/src/events/SDL_events_c.h | 2 +- jni/SDL2-2.0.1/src/events/SDL_gesture.c | 23 +- jni/SDL2-2.0.1/src/events/SDL_gesture_c.h | 2 +- jni/SDL2-2.0.1/src/events/SDL_keyboard.c | 2 +- jni/SDL2-2.0.1/src/events/SDL_keyboard_c.h | 2 +- jni/SDL2-2.0.1/src/events/SDL_mouse.c | 128 +- jni/SDL2-2.0.1/src/events/SDL_mouse_c.h | 19 +- jni/SDL2-2.0.1/src/events/SDL_quit.c | 2 +- jni/SDL2-2.0.1/src/events/SDL_sysevents.h | 6 +- jni/SDL2-2.0.1/src/events/SDL_touch.c | 2 +- jni/SDL2-2.0.1/src/events/SDL_touch_c.h | 2 +- jni/SDL2-2.0.1/src/events/SDL_windowevents.c | 2 +- .../src/events/SDL_windowevents_c.h | 2 +- jni/SDL2-2.0.1/src/file/SDL_rwops.c | 2 +- .../src/filesystem/cocoa/SDL_sysfilesystem.m | 4 +- .../src/filesystem/dummy/SDL_sysfilesystem.c | 2 +- .../{beos => haiku}/SDL_sysfilesystem.cc | 8 +- .../src/filesystem/unix/SDL_sysfilesystem.c | 2 +- .../filesystem/windows/SDL_sysfilesystem.c | 2 +- jni/SDL2-2.0.1/src/haptic/SDL_haptic.c | 2 +- jni/SDL2-2.0.1/src/haptic/SDL_syshaptic.h | 2 +- .../src/haptic/darwin/SDL_syshaptic.c | 2 +- .../src/haptic/dummy/SDL_syshaptic.c | 2 +- .../src/haptic/linux/SDL_syshaptic.c | 2 +- .../src/haptic/windows/SDL_syshaptic.c | 6 +- .../src/joystick/SDL_gamecontroller.c | 102 +- .../src/joystick/SDL_gamecontrollerdb.h | 6 +- jni/SDL2-2.0.1/src/joystick/SDL_joystick.c | 4 +- jni/SDL2-2.0.1/src/joystick/SDL_joystick_c.h | 2 +- jni/SDL2-2.0.1/src/joystick/SDL_sysjoystick.h | 2 +- .../src/joystick/android/SDL_sysjoystick.c | 449 ++- .../src/joystick/android/SDL_sysjoystick_c.h | 51 + .../src/joystick/bsd/SDL_sysjoystick.c | 2 +- .../src/joystick/darwin/SDL_sysjoystick.c | 7 +- .../src/joystick/darwin/SDL_sysjoystick_c.h | 2 +- .../src/joystick/dummy/SDL_sysjoystick.c | 2 +- .../SDL_haikujoystick.cc} | 11 +- .../src/joystick/iphoneos/SDL_sysjoystick.m | 2 +- .../src/joystick/linux/SDL_sysjoystick.c | 36 +- .../src/joystick/sort_controllers.py | 2 + .../src/joystick/windows/SDL_dxjoystick.c | 6 +- .../src/joystick/windows/SDL_dxjoystick_c.h | 2 +- .../src/joystick/windows/SDL_mmjoystick.c | 2 +- jni/SDL2-2.0.1/src/libm/math_libm.h | 2 +- jni/SDL2-2.0.1/src/libm/s_atan.c | 1 + .../src/loadso/dlopen/SDL_sysloadso.c | 2 +- .../src/loadso/dummy/SDL_sysloadso.c | 2 +- .../loadso/{beos => haiku}/SDL_sysloadso.c | 8 +- .../src/loadso/windows/SDL_sysloadso.c | 2 +- .../src/main/android/SDL_android_main.c | 26 +- .../src/main/dummy/SDL_dummy_main.c | 2 +- .../src/main/{beos => haiku}/SDL_BApp.h | 8 +- .../src/main/{beos => haiku}/SDL_BeApp.cc | 10 +- .../src/main/{beos => haiku}/SDL_BeApp.h | 2 +- jni/SDL2-2.0.1/src/power/SDL_power.c | 8 +- .../src/power/android/SDL_syspower.c | 2 +- .../src/power/{beos => haiku}/SDL_syspower.c | 9 +- jni/SDL2-2.0.1/src/power/linux/SDL_syspower.c | 2 +- .../src/power/macosx/SDL_syspower.c | 2 +- jni/SDL2-2.0.1/src/power/psp/SDL_syspower.c | 2 +- jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.h | 2 +- jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.m | 2 +- .../src/power/windows/SDL_syspower.c | 2 +- jni/SDL2-2.0.1/src/render/SDL_render.c | 5 +- jni/SDL2-2.0.1/src/render/SDL_sysrender.h | 2 +- jni/SDL2-2.0.1/src/render/SDL_yuv_mmx.c | 2 +- jni/SDL2-2.0.1/src/render/SDL_yuv_sw.c | 2 +- jni/SDL2-2.0.1/src/render/SDL_yuv_sw_c.h | 2 +- .../src/render/direct3d/SDL_render_d3d.c | 2 +- .../src/render/opengl/SDL_glfuncs.h | 18 +- .../src/render/opengl/SDL_render_gl.c | 90 +- .../src/render/opengl/SDL_shaders_gl.c | 2 +- .../src/render/opengl/SDL_shaders_gl.h | 2 +- .../src/render/opengles/SDL_render_gles.c | 2 +- .../src/render/opengles2/SDL_gles2funcs.h | 2 + .../src/render/opengles2/SDL_render_gles2.c | 6 +- .../src/render/opengles2/SDL_shaders_gles2.c | 2 +- .../src/render/opengles2/SDL_shaders_gles2.h | 2 +- .../src/render/psp/SDL_render_psp.c | 2 +- .../src/render/software/SDL_blendfillrect.c | 2 +- .../src/render/software/SDL_blendfillrect.h | 2 +- .../src/render/software/SDL_blendline.c | 2 +- .../src/render/software/SDL_blendline.h | 2 +- .../src/render/software/SDL_blendpoint.c | 2 +- .../src/render/software/SDL_blendpoint.h | 2 +- jni/SDL2-2.0.1/src/render/software/SDL_draw.h | 2 +- .../src/render/software/SDL_drawline.c | 2 +- .../src/render/software/SDL_drawline.h | 2 +- .../src/render/software/SDL_drawpoint.c | 2 +- .../src/render/software/SDL_drawpoint.h | 2 +- .../src/render/software/SDL_render_sw.c | 2 +- .../src/render/software/SDL_rotate.c | 2 +- jni/SDL2-2.0.1/src/stdlib/SDL_getenv.c | 5 +- jni/SDL2-2.0.1/src/stdlib/SDL_iconv.c | 2 +- jni/SDL2-2.0.1/src/stdlib/SDL_malloc.c | 2 +- jni/SDL2-2.0.1/src/stdlib/SDL_qsort.c | 2 +- jni/SDL2-2.0.1/src/stdlib/SDL_stdlib.c | 45 +- jni/SDL2-2.0.1/src/stdlib/SDL_string.c | 67 +- jni/SDL2-2.0.1/src/test/SDL_test_common.c | 229 +- jni/SDL2-2.0.1/src/thread/SDL_systhread.h | 5 +- jni/SDL2-2.0.1/src/thread/SDL_thread.c | 55 +- jni/SDL2-2.0.1/src/thread/SDL_thread_c.h | 15 +- jni/SDL2-2.0.1/src/thread/beos/SDL_syssem.c | 151 - .../src/thread/beos/SDL_systhread.c | 126 - jni/SDL2-2.0.1/src/thread/beos/SDL_systls.c | 70 - .../src/thread/generic/SDL_syscond.c | 2 +- .../src/thread/generic/SDL_sysmutex.c | 2 +- .../src/thread/generic/SDL_sysmutex_c.h | 2 +- .../src/thread/generic/SDL_syssem.c | 2 +- .../src/thread/generic/SDL_systhread.c | 8 +- .../src/thread/generic/SDL_systhread_c.h | 2 +- .../src/thread/generic/SDL_systls.c | 2 +- jni/SDL2-2.0.1/src/thread/psp/SDL_syscond.c | 2 +- jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex.c | 2 +- .../src/thread/psp/SDL_sysmutex_c.h | 2 +- jni/SDL2-2.0.1/src/thread/psp/SDL_systhread.c | 6 + .../src/thread/pthread/SDL_syscond.c | 2 +- .../src/thread/pthread/SDL_sysmutex.c | 2 +- .../src/thread/pthread/SDL_sysmutex_c.h | 2 +- .../src/thread/pthread/SDL_syssem.c | 2 +- .../src/thread/pthread/SDL_systhread.c | 19 +- .../src/thread/pthread/SDL_systhread_c.h | 2 +- .../src/thread/pthread/SDL_systls.c | 2 +- .../src/thread/windows/SDL_sysmutex.c | 2 +- .../src/thread/windows/SDL_syssem.c | 2 +- .../src/thread/windows/SDL_systhread.c | 8 +- .../src/thread/windows/SDL_systhread_c.h | 2 +- .../src/thread/windows/SDL_systls.c | 2 +- jni/SDL2-2.0.1/src/timer/SDL_timer.c | 6 +- jni/SDL2-2.0.1/src/timer/SDL_timer_c.h | 2 +- jni/SDL2-2.0.1/src/timer/dummy/SDL_systimer.c | 2 +- .../src/timer/{beos => haiku}/SDL_systimer.c | 8 +- jni/SDL2-2.0.1/src/timer/unix/SDL_systimer.c | 2 +- .../src/timer/windows/SDL_systimer.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_RLEaccel.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_RLEaccel_c.h | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit.h | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_0.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_1.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_A.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_N.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_auto.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_auto.h | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_copy.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_slow.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_blit_slow.h | 2 +- jni/SDL2-2.0.1/src/video/SDL_bmp.c | 8 +- jni/SDL2-2.0.1/src/video/SDL_clipboard.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_egl.c | 228 +- .../src/video/{SDL_egl.h => SDL_egl_c.h} | 46 +- jni/SDL2-2.0.1/src/video/SDL_fillrect.c | 119 +- jni/SDL2-2.0.1/src/video/SDL_pixels.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_pixels_c.h | 2 +- jni/SDL2-2.0.1/src/video/SDL_rect.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_rect_c.h | 2 +- jni/SDL2-2.0.1/src/video/SDL_shape.c | 2 +- .../src/video/SDL_shape_internals.h | 2 +- jni/SDL2-2.0.1/src/video/SDL_stretch.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_surface.c | 2 +- jni/SDL2-2.0.1/src/video/SDL_sysvideo.h | 9 +- jni/SDL2-2.0.1/src/video/SDL_video.c | 114 +- .../src/video/android/SDL_androidclipboard.c | 2 +- .../src/video/android/SDL_androidclipboard.h | 2 +- .../src/video/android/SDL_androidevents.c | 8 +- .../src/video/android/SDL_androidevents.h | 2 +- .../src/video/android/SDL_androidgl.c | 4 +- .../src/video/android/SDL_androidkeyboard.c | 3 +- .../src/video/android/SDL_androidkeyboard.h | 2 +- .../src/video/android/SDL_androidtouch.c | 48 +- .../src/video/android/SDL_androidtouch.h | 2 +- .../src/video/android/SDL_androidvideo.c | 4 +- .../src/video/android/SDL_androidvideo.h | 2 +- .../src/video/android/SDL_androidwindow.c | 6 +- .../src/video/android/SDL_androidwindow.h | 4 +- .../src/video/cocoa/SDL_cocoaclipboard.h | 2 +- .../src/video/cocoa/SDL_cocoaclipboard.m | 2 +- .../src/video/cocoa/SDL_cocoaevents.h | 2 +- .../src/video/cocoa/SDL_cocoaevents.m | 22 +- .../src/video/cocoa/SDL_cocoakeyboard.h | 2 +- .../src/video/cocoa/SDL_cocoakeyboard.m | 51 +- .../src/video/cocoa/SDL_cocoamessagebox.h | 2 +- .../src/video/cocoa/SDL_cocoamessagebox.m | 2 +- .../src/video/cocoa/SDL_cocoamodes.h | 2 +- .../src/video/cocoa/SDL_cocoamodes.m | 2 +- .../src/video/cocoa/SDL_cocoamouse.h | 2 +- .../src/video/cocoa/SDL_cocoamouse.m | 2 +- .../src/video/cocoa/SDL_cocoamousetap.h | 2 +- .../src/video/cocoa/SDL_cocoamousetap.m | 10 +- .../src/video/cocoa/SDL_cocoaopengl.h | 2 +- .../src/video/cocoa/SDL_cocoaopengl.m | 36 +- .../src/video/cocoa/SDL_cocoashape.h | 2 +- .../src/video/cocoa/SDL_cocoashape.m | 4 +- .../src/video/cocoa/SDL_cocoavideo.h | 2 +- .../src/video/cocoa/SDL_cocoavideo.m | 2 +- .../src/video/cocoa/SDL_cocoawindow.h | 21 +- .../src/video/cocoa/SDL_cocoawindow.m | 311 +- .../src/video/directfb/SDL_DirectFB_WM.c | 2 +- .../src/video/directfb/SDL_DirectFB_dyn.c | 2 +- .../src/video/directfb/SDL_DirectFB_events.c | 2 +- .../src/video/directfb/SDL_DirectFB_modes.c | 2 +- .../src/video/directfb/SDL_DirectFB_mouse.c | 2 +- .../src/video/directfb/SDL_DirectFB_opengl.c | 2 +- .../src/video/directfb/SDL_DirectFB_render.c | 2 +- .../src/video/directfb/SDL_DirectFB_shape.c | 2 +- .../src/video/directfb/SDL_DirectFB_video.c | 4 +- .../src/video/directfb/SDL_DirectFB_video.h | 2 +- .../src/video/directfb/SDL_DirectFB_window.c | 2 +- .../src/video/dummy/SDL_nullevents.c | 2 +- .../src/video/dummy/SDL_nullevents_c.h | 2 +- .../src/video/dummy/SDL_nullframebuffer.c | 2 +- .../src/video/dummy/SDL_nullframebuffer_c.h | 2 +- .../src/video/dummy/SDL_nullvideo.c | 2 +- .../src/video/dummy/SDL_nullvideo.h | 2 +- .../src/video/{bwindow => haiku}/SDL_BWin.h | 8 +- .../{bwindow => haiku}/SDL_bclipboard.cc | 6 +- .../video/{bwindow => haiku}/SDL_bclipboard.h | 2 +- .../video/{bwindow => haiku}/SDL_bevents.cc | 6 +- .../video/{bwindow => haiku}/SDL_bevents.h | 0 .../{bwindow => haiku}/SDL_bframebuffer.cc | 8 +- .../{bwindow => haiku}/SDL_bframebuffer.h | 0 .../video/{bwindow => haiku}/SDL_bkeyboard.cc | 6 +- .../video/{bwindow => haiku}/SDL_bkeyboard.h | 0 .../video/{bwindow => haiku}/SDL_bmodes.cc | 8 +- .../src/video/{bwindow => haiku}/SDL_bmodes.h | 0 .../video/{bwindow => haiku}/SDL_bopengl.cc | 8 +- .../video/{bwindow => haiku}/SDL_bopengl.h | 0 .../video/{bwindow => haiku}/SDL_bvideo.cc | 10 +- .../src/video/{bwindow => haiku}/SDL_bvideo.h | 2 +- .../video/{bwindow => haiku}/SDL_bwindow.cc | 12 +- .../video/{bwindow => haiku}/SDL_bwindow.h | 0 .../src/video/pandora/SDL_pandora.c | 2 +- .../src/video/pandora/SDL_pandora.h | 2 +- .../src/video/pandora/SDL_pandora_events.c | 2 +- .../src/video/pandora/SDL_pandora_events.h | 2 +- jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.c | 2 +- jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.h | 2 +- .../src/video/raspberry/SDL_rpievents.c | 4 +- .../src/video/raspberry/SDL_rpimouse.c | 2 +- .../src/video/raspberry/SDL_rpiopengles.c | 2 +- .../src/video/raspberry/SDL_rpiopengles.h | 4 +- .../src/video/raspberry/SDL_rpivideo.c | 24 +- .../src/video/raspberry/SDL_rpivideo.h | 2 +- jni/SDL2-2.0.1/src/video/sdlgenblit.pl | 2 +- .../src/video/uikit/SDL_uikitappdelegate.m | 2 +- .../src/video/uikit/SDL_uikitevents.m | 2 +- .../src/video/uikit/SDL_uikitmessagebox.h | 2 +- .../src/video/uikit/SDL_uikitmessagebox.m | 2 +- .../src/video/uikit/SDL_uikitmodes.h | 2 +- .../src/video/uikit/SDL_uikitmodes.m | 2 +- .../src/video/uikit/SDL_uikitopengles.m | 2 +- .../src/video/uikit/SDL_uikitopenglview.m | 2 +- .../src/video/uikit/SDL_uikitvideo.m | 3 +- .../src/video/uikit/SDL_uikitview.h | 5 + .../src/video/uikit/SDL_uikitview.m | 106 +- .../src/video/uikit/SDL_uikitviewcontroller.m | 2 +- .../src/video/uikit/SDL_uikitwindow.m | 2 +- .../src/video/wayland/SDL_waylandevents.c | 381 +++ .../src/video/wayland/SDL_waylandevents_c.h | 37 + .../src/video/wayland/SDL_waylandmouse.c | 407 +++ .../wayland/SDL_waylandmouse.h} | 15 +- .../src/video/wayland/SDL_waylandopengles.c | 90 + .../src/video/wayland/SDL_waylandopengles.h | 46 + .../src/video/wayland/SDL_waylandtouch.c | 253 ++ .../src/video/wayland/SDL_waylandtouch.h | 351 +++ .../src/video/wayland/SDL_waylandvideo.c | 406 +++ .../src/video/wayland/SDL_waylandvideo.h | 83 + .../src/video/wayland/SDL_waylandwindow.c | 239 ++ .../src/video/wayland/SDL_waylandwindow.h | 61 + .../src/video/windows/SDL_windowsclipboard.c | 2 +- .../src/video/windows/SDL_windowsclipboard.h | 2 +- .../src/video/windows/SDL_windowsevents.c | 222 +- .../src/video/windows/SDL_windowsevents.h | 2 +- .../video/windows/SDL_windowsframebuffer.c | 2 +- .../video/windows/SDL_windowsframebuffer.h | 2 +- .../src/video/windows/SDL_windowskeyboard.c | 2 +- .../src/video/windows/SDL_windowskeyboard.h | 2 +- .../src/video/windows/SDL_windowsmessagebox.c | 2 +- .../src/video/windows/SDL_windowsmessagebox.h | 2 +- .../src/video/windows/SDL_windowsmodes.c | 24 +- .../src/video/windows/SDL_windowsmodes.h | 4 +- .../src/video/windows/SDL_windowsmouse.c | 13 +- .../src/video/windows/SDL_windowsmouse.h | 2 +- .../src/video/windows/SDL_windowsopengl.c | 73 +- .../src/video/windows/SDL_windowsopengl.h | 4 +- .../src/video/windows/SDL_windowsopengles.c | 141 + .../src/video/windows/SDL_windowsopengles.h | 51 + .../src/video/windows/SDL_windowsshape.c | 2 +- .../src/video/windows/SDL_windowsshape.h | 2 +- .../src/video/windows/SDL_windowsvideo.c | 2 +- .../src/video/windows/SDL_windowsvideo.h | 3 +- .../src/video/windows/SDL_windowswindow.c | 105 +- .../src/video/windows/SDL_windowswindow.h | 12 +- .../src/video/x11/SDL_x11clipboard.c | 2 +- .../src/video/x11/SDL_x11clipboard.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.c | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11events.c | 53 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11events.h | 2 +- .../src/video/x11/SDL_x11framebuffer.c | 2 +- .../src/video/x11/SDL_x11framebuffer.h | 2 +- .../src/video/x11/SDL_x11keyboard.c | 2 +- .../src/video/x11/SDL_x11keyboard.h | 2 +- .../src/video/x11/SDL_x11messagebox.c | 4 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.c | 5 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.c | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.c | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.h | 2 +- .../src/video/x11/SDL_x11opengles.c | 3 +- .../src/video/x11/SDL_x11opengles.h | 4 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.c | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.c | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11video.c | 22 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11video.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11window.c | 6 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11window.h | 2 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.c | 38 +- jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.h | 2 +- jni/SDL2-2.0.1/src/video/x11/imKStoUCS.c | 2 +- jni/SDL2-2.0.1/test/Makefile.in | 17 +- jni/SDL2-2.0.1/test/README | 3 + jni/SDL2-2.0.1/test/axis.bmp | Bin 0 -> 3746 bytes jni/SDL2-2.0.1/test/button.bmp | Bin 0 -> 3746 bytes jni/SDL2-2.0.1/test/configure | 41 +- jni/SDL2-2.0.1/test/configure.in | 27 +- jni/SDL2-2.0.1/test/controllermap.bmp | Bin 0 -> 163450 bytes jni/SDL2-2.0.1/test/controllermap.c | 443 +++ jni/SDL2-2.0.1/test/testdrawchessboard.c | 218 +- jni/SDL2-2.0.1/test/testgamecontroller.c | 62 +- jni/SDL2-2.0.1/test/testgesture.c | 14 +- jni/SDL2-2.0.1/test/testgl2.c | 238 +- jni/SDL2-2.0.1/test/testgles.c | 2 + jni/SDL2-2.0.1/test/testgles2.c | 693 +++++ jni/SDL2-2.0.1/test/testjoystick.c | 15 +- jni/SDL2-2.0.1/test/testshader.c | 2 +- jni/SDL2-2.0.1/test/testshape.c | 35 +- jni/SDL2-2.0.1/test/testsprite2.c | 2 - jni/SDL2-2.0.1/test/testviewport.c | 184 ++ jni/love/src/love.cpp | 4 - project.properties | 2 +- src/org/libsdl/app/SDLActivity.java | 356 ++- 537 files changed, 14598 insertions(+), 19378 deletions(-) delete mode 100644 jni/SDL2-2.0.1/SDL2.spec delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL_VS2008.sln delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL_VS2010.sln delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL_VS2010EE.sln delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL_VS2012.sln delete mode 100644 jni/SDL2-2.0.1/VisualC/SDL_VS2012EE.sln delete mode 100644 jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2012.vcxproj delete mode 100755 jni/SDL2-2.0.1/VisualC/clean.sh delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2012.vcxproj delete mode 100755 jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2012.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2008.vcproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2010.vcxproj delete mode 100644 jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj create mode 100644 jni/SDL2-2.0.1/include/SDL_egl.h create mode 100644 jni/SDL2-2.0.1/src/SDL_internal.h rename jni/SDL2-2.0.1/src/audio/{baudio/SDL_beaudio.cc => haiku/SDL_haikuaudio.cc} (81%) rename jni/SDL2-2.0.1/src/audio/{baudio/SDL_beaudio.h => haiku/SDL_haikuaudio.h} (97%) rename jni/SDL2-2.0.1/src/{input/evdev => core/linux}/SDL_evdev.c (99%) rename jni/SDL2-2.0.1/src/{input/evdev => core/linux}/SDL_evdev.h (98%) create mode 100644 jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.c create mode 100644 jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.h create mode 100644 jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_overrides.h create mode 100644 jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_procs.h create mode 100755 jni/SDL2-2.0.1/src/dynapi/gendynapi.pl rename jni/SDL2-2.0.1/src/filesystem/{beos => haiku}/SDL_sysfilesystem.cc (93%) create mode 100644 jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick_c.h rename jni/SDL2-2.0.1/src/joystick/{beos/SDL_bejoystick.cc => haiku/SDL_haikujoystick.cc} (98%) rename jni/SDL2-2.0.1/src/loadso/{beos => haiku}/SDL_sysloadso.c (94%) rename jni/SDL2-2.0.1/src/main/{beos => haiku}/SDL_BApp.h (98%) rename jni/SDL2-2.0.1/src/main/{beos => haiku}/SDL_BeApp.cc (94%) rename jni/SDL2-2.0.1/src/main/{beos => haiku}/SDL_BeApp.h (97%) rename jni/SDL2-2.0.1/src/power/{beos => haiku}/SDL_syspower.c (94%) delete mode 100644 jni/SDL2-2.0.1/src/thread/beos/SDL_syssem.c delete mode 100644 jni/SDL2-2.0.1/src/thread/beos/SDL_systhread.c delete mode 100644 jni/SDL2-2.0.1/src/thread/beos/SDL_systls.c rename jni/SDL2-2.0.1/src/timer/{beos => haiku}/SDL_systimer.c (93%) rename jni/SDL2-2.0.1/src/video/{SDL_egl.h => SDL_egl_c.h} (74%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_BWin.h (99%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bclipboard.cc (96%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bclipboard.h (97%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bevents.cc (92%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bevents.h (100%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bframebuffer.cc (97%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bframebuffer.h (100%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bkeyboard.cc (98%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bkeyboard.h (100%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bmodes.cc (98%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bmodes.h (100%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bopengl.cc (97%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bopengl.h (100%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bvideo.cc (96%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bvideo.h (96%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bwindow.cc (96%) rename jni/SDL2-2.0.1/src/video/{bwindow => haiku}/SDL_bwindow.h (100%) create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents.c create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents_c.h create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandmouse.c rename jni/SDL2-2.0.1/src/{thread/beos/SDL_systhread_c.h => video/wayland/SDL_waylandmouse.h} (76%) create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.c create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.h create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.c create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.h create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.c create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.h create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.c create mode 100644 jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.h create mode 100644 jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.c create mode 100644 jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.h create mode 100644 jni/SDL2-2.0.1/test/axis.bmp create mode 100644 jni/SDL2-2.0.1/test/button.bmp create mode 100644 jni/SDL2-2.0.1/test/controllermap.bmp create mode 100644 jni/SDL2-2.0.1/test/controllermap.c create mode 100644 jni/SDL2-2.0.1/test/testgles2.c create mode 100644 jni/SDL2-2.0.1/test/testviewport.c diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fd4fb533..bd4f9b14 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ @@ -21,7 +21,7 @@ - + diff --git a/README.md b/README.md index f215b8f5..2cbb10a6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Copyright (c) 2013 Martin Felis Instructions: ------------- -Install the Android SDK and Android NDK and run +Install the Android NDK and the Android SDK with SDK API 12 and run ndk-build diff --git a/jni/SDL2-2.0.1/Android.mk b/jni/SDL2-2.0.1/Android.mk index c8e67da7..4f940820 100755 --- a/jni/SDL2-2.0.1/Android.mk +++ b/jni/SDL2-2.0.1/Android.mk @@ -24,6 +24,7 @@ LOCAL_SRC_FILES := \ $(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \ $(wildcard $(LOCAL_PATH)/src/core/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \ + $(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \ $(wildcard $(LOCAL_PATH)/src/events/*.c) \ $(wildcard $(LOCAL_PATH)/src/file/*.c) \ $(wildcard $(LOCAL_PATH)/src/haptic/*.c) \ diff --git a/jni/SDL2-2.0.1/CMakeLists.txt b/jni/SDL2-2.0.1/CMakeLists.txt index 1a1607fa..3871d96c 100644 --- a/jni/SDL2-2.0.1/CMakeLists.txt +++ b/jni/SDL2-2.0.1/CMakeLists.txt @@ -95,8 +95,10 @@ elseif(APPLE) set(MACOSX TRUE) endif() # TODO: iOS? -elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*|BeOS.*") - set(BEOS TRUE) +elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*") + message_error("BeOS support has been removed as of SDL 2.0.2.") +elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*") + set(HAIKU TRUE) endif() # Don't mistake osx for unix @@ -216,6 +218,7 @@ set_option(RPATH "Use an rpath when linking SDL" ${UNIX_SYS}) set_option(CLOCK_GETTIME "Use clock_gettime() instead of gettimeofday()" OFF) set_option(INPUT_TSLIB "Use the Touchscreen library for input" ${UNIX_SYS}) set_option(VIDEO_X11 "Use X11 video driver" ${UNIX_SYS}) +set_option(VIDEO_WAYLAND "Use Wayland video driver" ${UNIX_SYS}) dep_option(X11_SHARED "Dynamically load X11 support" ON "VIDEO_X11" OFF) set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm) foreach(_SUB ${SDL_X11_OPTIONS}) @@ -237,6 +240,7 @@ file(GLOB SOURCE_FILES ${SDL2_SOURCE_DIR}/src/atomic/*.c ${SDL2_SOURCE_DIR}/src/audio/*.c ${SDL2_SOURCE_DIR}/src/cpuinfo/*.c + ${SDL2_SOURCE_DIR}/src/dynapi/*.c ${SDL2_SOURCE_DIR}/src/events/*.c ${SDL2_SOURCE_DIR}/src/file/*.c ${SDL2_SOURCE_DIR}/src/libm/*.c @@ -264,7 +268,7 @@ endif(ASSERTIONS STREQUAL "auto") set(HAVE_ASSERTIONS ${ASSERTIONS}) # Compiler option evaluation -if(USE_GCC) +if(USE_GCC OR USE_CLANG) if(DEPENDENCY_TRACKING) check_c_source_compiles(" #if !defined(__GNUC__) || __GNUC__ < 3 @@ -308,11 +312,11 @@ if(USE_GCC) check_c_compiler_flag(-Wall HAVE_GCC_WALL) if(HAVE_GCC_WALL) - if(CMAKE_SYSTEM_NAME MATCHES "Haiku|BeOS") + if(HAIKU) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar") - endif(CMAKE_SYSTEM_NAME MATCHES "Haiku|BeOS") + endif(HAIKU) endif(HAVE_GCC_WALL) -endif(USE_GCC) +endif(USE_GCC OR USE_CLANG) if(ASSEMBLY) if(USE_GCC OR USE_CLANG) @@ -471,8 +475,8 @@ if(LIBC) malloc calloc realloc free qsort abs memset memcpy memmove memcmp strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp - _stricmp _strnicmp sscanf atan atan2 ceil copysign cos cosf fabs - floor log pow scalbn sin sinf sqrt) + _stricmp _strnicmp sscanf atan atan2 acos asin ceil copysign cos + cosf fabs floor log pow scalbn sin sinf sqrt) string(TOUPPER ${_FN} _UPPER) set(HAVE_${_UPPER} 1) endforeach() @@ -506,7 +510,7 @@ if(LIBC) strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp - sscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp + vsscanf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname ) string(TOUPPER ${_FN} _UPPER) @@ -639,6 +643,7 @@ if(UNIX AND NOT APPLE) CheckDirectFB() CheckOpenGLX11() CheckOpenGLESX11() + CheckWayland() endif(SDL_VIDEO) if(LINUX) @@ -648,6 +653,21 @@ if(UNIX AND NOT APPLE) #error EVIOCGNAME() ioctl not available #endif int main(int argc, char** argv) {}" HAVE_INPUT_EVENTS) + + check_c_source_compiles(" + #include + #include + + int main(int argc, char **argv) + { + struct kbentry kbe; + kbe.kb_table = KG_CTRL; + ioctl(0, KDGKBENT, &kbe); + }" HAVE_INPUT_KD) + + file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) + if(HAVE_INPUT_EVENTS) set(SDL_INPUT_LINUXEV 1) endif(HAVE_INPUT_EVENTS) @@ -659,6 +679,10 @@ if(UNIX AND NOT APPLE) set(HAVE_SDL_HAPTIC TRUE) endif(SDL_HAPTIC AND HAVE_INPUT_EVENTS) + if(HAVE_INPUT_KD) + set(SDL_INPUT_LINUXKD 1) + endif(HAVE_INPUT_KD) + check_include_file("libudev.h" HAVE_LIBUDEV_H) # !!! FIXME: this needs pkg-config to find the include path, I think. @@ -746,8 +770,8 @@ elseif(WINDOWS) #include int main(int argc, char **argv) { }" HAVE_WIN32_CC) - file(GLOB WIN_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${WIN_SOURCES}) + file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) # Check for DirectX if(DIRECTX) @@ -823,7 +847,7 @@ elseif(WINDOWS) if(SDL_FILESYSTEM) set(SDL_FILESYSTEM_WINDOWS 1) - file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesytem/windows/*.c) + file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) set(HAVE_SDL_FILESYSTEM TRUE) endif(SDL_FILESYSTEM) @@ -987,15 +1011,15 @@ elseif(APPLE) endif(SDL_VIDEO) CheckPTHREAD() -elseif(BEOS) +elseif(HAIKU) if(SDL_VIDEO) - set(SDL_VIDEO_DRIVER_BWINDOW 1) - file(GLOB BWINDOW_SOURCES ${SDL2_SOURCE_DIR}/src/video/bwindow/*.c) - set(SOURCE_FILES ${SOURCE_FILES} ${BWINDOW_SOURCES}) + set(SDL_VIDEO_DRIVER_HAIKU 1) + file(GLOB HAIKUVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/haiku/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${HAIKUVIDEO_SOURCES}) set(HAVE_SDL_VIDEO TRUE) - set(SDL_FILESYSTEM_BEOS 1) - file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/beos/*.cc) + set(SDL_FILESYSTEM_HAIKU 1) + file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc) set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) set(HAVE_SDL_FILESYSTEM TRUE) @@ -1008,6 +1032,8 @@ elseif(BEOS) set(HAVE_VIDEO_OPENGL TRUE) endif(VIDEO_OPENGL) endif(SDL_VIDEO) + + CheckPTHREAD() endif() # Dummies diff --git a/jni/SDL2-2.0.1/README-android.txt b/jni/SDL2-2.0.1/README-android.txt index a161c840..3275a111 100644 --- a/jni/SDL2-2.0.1/README-android.txt +++ b/jni/SDL2-2.0.1/README-android.txt @@ -4,13 +4,14 @@ Simple DirectMedia Layer for Android Requirements: -Android SDK (version 10 or later) +Android SDK (version 12 or later) http://developer.android.com/sdk/index.html Android NDK r7 or later -http://developer.android.com/sdk/ndk/index.html +http://developer.android.com/tools/sdk/ndk/index.html Minimum API level supported by SDL: 10 (Android 2.3.3) +Joystick support is available for API level >=12 devices. ================================================================================ How the port works @@ -28,7 +29,7 @@ android-project/src/org/libsdl/app/SDLActivity.java The Java code loads your game code, the SDL shared library, and dispatches to native functions implemented in the SDL library: -src/SDL_android.c +src/core/android/SDL_android.c Your project must include some glue code that starts your main() routine: src/main/android/SDL_android_main.c @@ -259,7 +260,7 @@ The best place to start is with docs/OVERVIEW.TXT ================================================================================ First make sure that you've installed Eclipse and the Android extensions as described here: - http://developer.android.com/sdk/eclipse-adt.html + http://developer.android.com/tools/sdk/eclipse-adt.html Once you've copied the SDL android project and customized it, you can create an Eclipse project from it: * File -> New -> Other @@ -396,8 +397,11 @@ When you're done instrumenting with valgrind, you can disable the wrapper: Why is API level 10 the minimum required? ================================================================================ -API level 10 is required because SDL requires some functionality for running not -available on older devices and some for building which is not in older NDK/SDKs. +API level 10 is the minimum required level at runtime (that is, on the device) +because SDL requires some functionality for running not +available on older devices. Since the incorporation of joystick support into SDL, +the minimum SDK required to *build* SDL is version 12. Devices running API levels +10-11 are still supported, only with the joystick functionality disabled. Support for native OpenGL ES and ES2 applications was introduced in the NDK for API level 4 and 8. EGL was made a stable API in the NDK for API level 9, which @@ -429,4 +433,6 @@ Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html Known issues ================================================================================ -- TODO. I'm sure there's a bunch more stuff I haven't thought of +- The number of buttons reported for each joystick is hardcoded to be 36, which +is the current maximum number of buttons Android can report. + diff --git a/jni/SDL2-2.0.1/README-gesture.txt b/jni/SDL2-2.0.1/README-gesture.txt index 4d0a8d68..c2cad7be 100644 --- a/jni/SDL2-2.0.1/README-gesture.txt +++ b/jni/SDL2-2.0.1/README-gesture.txt @@ -34,9 +34,9 @@ Most programs will want to define an appropriate error threshold and check to be Saving: ------- -To save a template, call SDL_SaveDollarTemplate(gestureId, src) where gestureId is the id of the gesture you want to save, and src is an SDL_RWops pointer to the file where the gesture will be stored. +To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored. -To save all currently loaded templates, call SDL_SaveAllDollarTemplates(src) where source is an SDL_RWops pointer to the file where the gesture will be stored. +To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored. Both functions return the number of gestures successfully saved. diff --git a/jni/SDL2-2.0.1/README-raspberrypi.txt b/jni/SDL2-2.0.1/README-raspberrypi.txt index 0724a8c9..af1ccea6 100644 --- a/jni/SDL2-2.0.1/README-raspberrypi.txt +++ b/jni/SDL2-2.0.1/README-raspberrypi.txt @@ -62,6 +62,12 @@ edit $SYSROOT/etc/ld.so.preload and comment out all lines in it. sudo umount $SYSROOT/proc sudo umount $SYSROOT/sys sudo umount /mnt + +There's one more fix required, as the libdl.so symlink uses an absolute path +which doesn't quite work in our setup. + + sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so + sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so The final step is compiling SDL itself. diff --git a/jni/SDL2-2.0.1/README.txt b/jni/SDL2-2.0.1/README.txt index 681f4a33..735637b9 100644 --- a/jni/SDL2-2.0.1/README.txt +++ b/jni/SDL2-2.0.1/README.txt @@ -33,6 +33,10 @@ If you need help with the library, or just want to discuss SDL related issues, you can join the developers mailing list: http://www.libsdl.org/mailing-list.php +If you want to report bugs or contribute patches, please submit them to +bugzilla: + http://bugzilla.libsdl.org/ + Enjoy! Sam Lantinga (slouken@libsdl.org) diff --git a/jni/SDL2-2.0.1/SDL2.spec b/jni/SDL2-2.0.1/SDL2.spec deleted file mode 100644 index 5aaa5844..00000000 --- a/jni/SDL2-2.0.1/SDL2.spec +++ /dev/null @@ -1,112 +0,0 @@ -Summary: Simple DirectMedia Layer -Name: SDL2 -Version: 2.0.1 -Release: 1 -Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz -URL: http://www.libsdl.org/ -License: zlib -Group: System Environment/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot -Prefix: %{_prefix} -%ifos linux -Provides: libSDL2-2.0.so.0 -%endif - -%define __defattr %defattr(-,root,root) -%define __soext so - -%description -This is the Simple DirectMedia Layer, a generic API that provides low -level access to audio, keyboard, mouse, and display framebuffer across -multiple platforms. - -%package devel -Summary: Libraries, includes and more to develop SDL applications. -Group: Development/Libraries -Requires: %{name} = %{version} - -%description devel -This is the Simple DirectMedia Layer, a generic API that provides low -level access to audio, keyboard, mouse, and display framebuffer across -multiple platforms. - -This is the libraries, include files and other resources you can use -to develop SDL applications. - - -%prep -%setup -q - -%build -%ifos linux -CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-directfb -%else -%configure -%endif -make - -%install -rm -rf $RPM_BUILD_ROOT -%ifos linux -make install prefix=$RPM_BUILD_ROOT%{prefix} \ - bindir=$RPM_BUILD_ROOT%{_bindir} \ - libdir=$RPM_BUILD_ROOT%{_libdir} \ - includedir=$RPM_BUILD_ROOT%{_includedir} \ - datadir=$RPM_BUILD_ROOT%{_datadir} \ - mandir=$RPM_BUILD_ROOT%{_mandir} -%else -%makeinstall -%endif - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%{__defattr} -%doc README-SDL.txt COPYING.txt CREDITS.txt BUGS.txt -%{_libdir}/lib*.%{__soext}.* - -%files devel -%{__defattr} -%doc README README-SDL.txt COPYING CREDITS BUGS WhatsNew -%{_bindir}/*-config -%{_libdir}/lib*.a -%{_libdir}/lib*.la -%{_libdir}/lib*.%{__soext} -%{_includedir}/*/*.h -%{_libdir}/pkgconfig/* -%{_datadir}/aclocal/* - -%changelog -* Sun Jan 22 2012 Sam Lantinga -- Updated for SDL 2.0 - -* Tue May 16 2006 Sam Lantinga -- Removed support for Darwin, due to build problems on ps2linux - -* Mon Jan 03 2004 Anders Bjorklund -- Added support for Darwin, updated spec file - -* Wed Jan 19 2000 Sam Lantinga -- Re-integrated spec file into SDL distribution -- 'name' and 'version' come from configure -- Some of the documentation is devel specific -- Removed SMP support from %build - it doesn't work with libtool anyway - -* Tue Jan 18 2000 Hakan Tandogan -- Hacked Mandrake sdl spec to build 1.1 - -* Sun Dec 19 1999 John Buswell -- Build Release - -* Sat Dec 18 1999 John Buswell -- Add symlink for libSDL-1.0.so.0 required by sdlbomber -- Added docs - -* Thu Dec 09 1999 Lenny Cartier -- v 1.0.0 - -* Mon Nov 1 1999 Chmouel Boudjnah -- First spec file for Mandrake distribution. - -# end of file diff --git a/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2008.vcproj deleted file mode 100644 index 1e7db21a..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2008.vcproj +++ /dev/null @@ -1,1338 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2010.vcxproj deleted file mode 100644 index d9ca5aff..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2010.vcxproj +++ /dev/null @@ -1,679 +0,0 @@ - - - - - Debug_static - Win32 - - - Debug_static - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release_static - Win32 - - - Release_static - x64 - - - Release - Win32 - - - Release - x64 - - - - SDL2 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - SDL - - - - DynamicLibrary - false - - - StaticLibrary - false - - - DynamicLibrary - false - - - StaticLibrary - false - - - DynamicLibrary - false - - - StaticLibrary - false - - - DynamicLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(ProjectName)_static - $(ProjectName)_static - $(ProjectName)_static - $(ProjectName)_static - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - _DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - false - - - Level3 - true - EditAndContinue - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - true - Windows - false - $(DXSDK_DIR)\lib\x86 - - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - HAVE_LIBC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - false - - - Level3 - true - OldStyle - Default - false - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - true - Windows - false - $(DXSDK_DIR)\lib\x86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - _DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - false - - - Level3 - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - true - Windows - false - $(DXSDK_DIR)\lib\x64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - HAVE_LIBC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreaded - false - - - Level3 - OldStyle - false - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - true - Windows - false - $(DXSDK_DIR)\lib\x64 - - - /MACHINE:X64 %(AdditionalOptions) - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - false - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - - - Level3 - true - Default - false - ProgramDatabase - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - Windows - $(DXSDK_DIR)\lib\x86 - true - true - true - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - false - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - HAVE_LIBC;_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - - - Level3 - true - Default - false - OldStyle - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - Windows - $(DXSDK_DIR)\lib\x86 - true - true - true - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - - - OnlyExplicitInline - false - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - - - Level3 - false - ProgramDatabase - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - Windows - $(DXSDK_DIR)\lib\x64 - true - true - true - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - - - OnlyExplicitInline - false - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - HAVE_LIBC;_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - - - Level3 - false - OldStyle - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies) - true - Windows - $(DXSDK_DIR)\lib\x64 - true - true - true - - - /MACHINE:X64 %(AdditionalOptions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2012.vcxproj deleted file mode 100644 index 141bc648..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL/SDL_VS2012.vcxproj +++ /dev/null @@ -1,470 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SDL2 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - SDL - - - - DynamicLibrary - false - v110 - - - DynamicLibrary - false - v110 - - - DynamicLibrary - false - v110 - - - DynamicLibrary - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - _DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - false - - - Level3 - true - EditAndContinue - Default - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies) - true - true - Windows - false - $(DXSDK_DIR)\lib\x86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - - - Disabled - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - _DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - false - - - Level3 - EditAndContinue - false - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies) - true - true - Windows - false - $(DXSDK_DIR)\lib\x64 - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - false - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - - - Level3 - true - Default - false - ProgramDatabase - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies) - true - Windows - $(DXSDK_DIR)\lib\x86 - true - true - true - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - - - OnlyExplicitInline - false - ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include"; - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - - - Level3 - false - ProgramDatabase - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies) - true - Windows - $(DXSDK_DIR)\lib\x64 - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/SDL_VS2008.sln b/jni/SDL2-2.0.1/VisualC/SDL_VS2008.sln deleted file mode 100644 index 3c6a3805..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL_VS2008.sln +++ /dev/null @@ -1,237 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2008.vcproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2008.vcproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CE748C1F-3C21-4825-AA6A-F895A023F7E7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys_VS2008.vcproj", "{26828762-C95D-4637-9CB1-7F0979523813}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "tests\loopwave\loopwave_VS2008.vcproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw2\testdraw2_VS2008.vcproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile_VS2008.vcproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2_VS2008.vcproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "tests\testplatform\testplatform_VS2008.vcproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpower\testpower_VS2008.vcproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2_VS2008.vcproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape_VS2008.vcproj", "{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2008.vcproj", "{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2008.vcproj", "{66B32F7E-5716-48D0-B5B9-D832FD052DD5}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2008.vcproj", "{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2008.vcproj", "{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2008.vcproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_VS2008.vcproj", "{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|Win32 - {31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|Win32.ActiveCfg = Debug|Win32 - {31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|Win32.Build.0 = Debug|Win32 - {31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|x64.ActiveCfg = Debug|Win32 - {31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|Win32.ActiveCfg = Release|Win32 - {31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|Win32.Build.0 = Release|Win32 - {31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|x64.ActiveCfg = Release|Win32 - {79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Debug|Win32.ActiveCfg = Debug|Win32 - {79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Debug|Win32.Build.0 = Debug|Win32 - {79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Debug|x64.ActiveCfg = Debug|Win32 - {79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release|Win32.ActiveCfg = Release|Win32 - {79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release|Win32.Build.0 = Release|Win32 - {79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release|x64.ActiveCfg = Release|Win32 - {66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Debug|Win32.ActiveCfg = Debug|Win32 - {66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Debug|Win32.Build.0 = Debug|Win32 - {66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Debug|x64.ActiveCfg = Debug|Win32 - {66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|Win32.ActiveCfg = Release|Win32 - {66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|Win32.Build.0 = Release|Win32 - {66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|x64.ActiveCfg = Release|Win32 - {5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Debug|Win32.ActiveCfg = Debug|Win32 - {5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Debug|Win32.Build.0 = Debug|Win32 - {5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Debug|x64.ActiveCfg = Debug|Win32 - {5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release|Win32.ActiveCfg = Release|Win32 - {5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release|Win32.Build.0 = Release|Win32 - {5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release|x64.ActiveCfg = Release|Win32 - {2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Debug|Win32.ActiveCfg = Debug|Win32 - {2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Debug|Win32.Build.0 = Debug|Win32 - {2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Debug|x64.ActiveCfg = Debug|Win32 - {2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release|Win32.ActiveCfg = Release|Win32 - {2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release|Win32.Build.0 = Release|Win32 - {2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release|x64.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64 - {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|Win32.Build.0 = Debug|Win32 - {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|x64.ActiveCfg = Debug|Win32 - {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.ActiveCfg = Release|Win32 - {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.Build.0 = Release|Win32 - {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|x64.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {26828762-C95D-4637-9CB1-7F0979523813} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {CAE4F1D0-314F-4B10-805B-0EFD670133A0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {26932B24-EFC6-4E3A-B277-ED653DA37968} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {40FB7794-D3C3-4CFE-BCF4-A80C96635682} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {66B32F7E-5716-48D0-B5B9-D832FD052DD5} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {5D0930C0-7C91-4ECE-9014-7B7DDE9502E6} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {2D17C1EB-1157-460E-9A99-A82BFC1F9D1E} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - EndGlobalSection -EndGlobal diff --git a/jni/SDL2-2.0.1/VisualC/SDL_VS2010.sln b/jni/SDL2-2.0.1/VisualC/SDL_VS2010.sln deleted file mode 100644 index 3a493acd..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL_VS2010.sln +++ /dev/null @@ -1,417 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2010.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2010.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CE748C1F-3C21-4825-AA6A-F895A023F7E7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "tests\loopwave\loopwave_VS2010.vcxproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "tests\testplatform\testplatform_VS2010.vcxproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile_VS2010.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2_VS2010.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys_VS2010.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2_VS2010.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape_VS2010.vcxproj", "{EDEA9D00-AF64-45DE-8F60-5957048F2F0F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw2\testdraw2_VS2010.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpower\testpower_VS2010.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2010.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2010.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2010.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2010.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2010.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testoverlay2", "tests\testoverlay2\testoverlay2_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08AAD}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_static|Win32 = Debug_static|Win32 - Debug_static|x64 = Debug_static|x64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release_static|Win32 = Release_static|Win32 - Release_static|x64 = Release_static|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug_static|Win32.Build.0 = Debug_static|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug_static|x64.ActiveCfg = Debug_static|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug_static|x64.Build.0 = Debug_static|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_static|Win32.ActiveCfg = Release_static|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_static|Win32.Build.0 = Release_static|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_static|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_static|x64.Build.0 = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug_static|Win32.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug_static|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug_static|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_static|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_static|Win32.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_static|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_static|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug_static|Win32.Build.0 = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug_static|x64.ActiveCfg = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug_static|x64.Build.0 = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.Build.0 = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release_static|Win32.ActiveCfg = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release_static|Win32.Build.0 = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release_static|x64.ActiveCfg = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release_static|x64.Build.0 = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.Build.0 = Release|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug_static|Win32.Build.0 = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug_static|x64.ActiveCfg = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug_static|x64.Build.0 = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.Build.0 = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release_static|Win32.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release_static|Win32.Build.0 = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release_static|x64.ActiveCfg = Release|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release_static|x64.Build.0 = Release|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.Build.0 = Release|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug_static|Win32.Build.0 = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug_static|x64.ActiveCfg = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug_static|x64.Build.0 = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.Build.0 = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release_static|Win32.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release_static|Win32.Build.0 = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release_static|x64.ActiveCfg = Release|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release_static|x64.Build.0 = Release|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.Build.0 = Release|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug_static|Win32.Build.0 = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug_static|x64.ActiveCfg = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug_static|x64.Build.0 = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.Build.0 = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release_static|Win32.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release_static|Win32.Build.0 = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release_static|x64.ActiveCfg = Release|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release_static|x64.Build.0 = Release|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.Build.0 = Release|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug_static|Win32.Build.0 = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug_static|x64.ActiveCfg = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug_static|x64.Build.0 = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.Build.0 = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release_static|Win32.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release_static|Win32.Build.0 = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release_static|x64.ActiveCfg = Release|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release_static|x64.Build.0 = Release|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.Build.0 = Release|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug_static|Win32.Build.0 = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug_static|x64.ActiveCfg = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug_static|x64.Build.0 = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.Build.0 = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release_static|Win32.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release_static|Win32.Build.0 = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release_static|x64.ActiveCfg = Release|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release_static|x64.Build.0 = Release|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.Build.0 = Release|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug_static|Win32.Build.0 = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug_static|x64.ActiveCfg = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug_static|x64.Build.0 = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.ActiveCfg = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.Build.0 = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.ActiveCfg = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.Build.0 = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release_static|Win32.ActiveCfg = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release_static|Win32.Build.0 = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release_static|x64.ActiveCfg = Release|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release_static|x64.Build.0 = Release|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.ActiveCfg = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.Build.0 = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.ActiveCfg = Release|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.Build.0 = Release|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug_static|Win32.Build.0 = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug_static|x64.ActiveCfg = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug_static|x64.Build.0 = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.Build.0 = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release_static|Win32.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release_static|Win32.Build.0 = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release_static|x64.ActiveCfg = Release|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release_static|x64.Build.0 = Release|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.Build.0 = Release|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug_static|Win32.Build.0 = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug_static|x64.ActiveCfg = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug_static|x64.Build.0 = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.Build.0 = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release_static|Win32.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release_static|Win32.Build.0 = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release_static|x64.ActiveCfg = Release|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release_static|x64.Build.0 = Release|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug_static|Win32.Build.0 = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug_static|x64.ActiveCfg = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug_static|x64.Build.0 = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_static|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_static|Win32.Build.0 = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_static|x64.ActiveCfg = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_static|x64.Build.0 = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug_static|Win32.Build.0 = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug_static|x64.ActiveCfg = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug_static|x64.Build.0 = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.ActiveCfg = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.Build.0 = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.ActiveCfg = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.Build.0 = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release_static|Win32.ActiveCfg = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release_static|Win32.Build.0 = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release_static|x64.ActiveCfg = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release_static|x64.Build.0 = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.ActiveCfg = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug_static|Win32.Build.0 = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug_static|x64.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release_static|Win32.ActiveCfg = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release_static|Win32.Build.0 = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release_static|x64.ActiveCfg = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug_static|Win32.Build.0 = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug_static|x64.ActiveCfg = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug_static|x64.Build.0 = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release_static|Win32.ActiveCfg = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release_static|Win32.Build.0 = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release_static|x64.ActiveCfg = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release_static|x64.Build.0 = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug_static|Win32.Build.0 = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug_static|x64.ActiveCfg = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug_static|x64.Build.0 = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release_static|Win32.ActiveCfg = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release_static|Win32.Build.0 = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release_static|x64.ActiveCfg = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release_static|x64.Build.0 = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug_static|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug_static|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug_static|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release_static|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release_static|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release_static|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release_static|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug_static|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug_static|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug_static|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release_static|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release_static|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release_static|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release_static|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug_static|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug_static|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug_static|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release_static|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release_static|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release_static|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release_static|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug_static|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug_static|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug_static|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug_static|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release_static|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release_static|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release_static|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release_static|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {26932B24-EFC6-4E3A-B277-ED653DA37968} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {CAE4F1D0-314F-4B10-805B-0EFD670133A0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {26828762-C95D-4637-9CB1-7F0979523813} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {40FB7794-D3C3-4CFE-BCF4-A80C96635682} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {2271060E-98B4-4596-8172-A041E4B2EC7A} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {E7A6C41C-E059-4C9C-8CCC-73586A540B62} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {55812185-D13C-4022-9C81-32E0F4A08336} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {55812185-D13C-4022-9C81-32E0F4A08996} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {55812185-D13C-4022-9C81-32E0F4A08BCC} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {55812185-D13C-4022-9C81-32E0F4A08AAD} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - EndGlobalSection -EndGlobal diff --git a/jni/SDL2-2.0.1/VisualC/SDL_VS2010EE.sln b/jni/SDL2-2.0.1/VisualC/SDL_VS2010EE.sln deleted file mode 100644 index d5213da4..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL_VS2010EE.sln +++ /dev/null @@ -1,219 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2010.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2010.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "tests\loopwave\loopwave_VS2010.vcxproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "tests\testplatform\testplatform_VS2010.vcxproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile_VS2010.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2_VS2010.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys_VS2010.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2_VS2010.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape_VS2010.vcxproj", "{EDEA9D00-AF64-45DE-8F60-5957048F2F0F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw2\testdraw2_VS2010.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpower\testpower_VS2010.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2010.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2010.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2010.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2010.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2010.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.Build.0 = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.Build.0 = Release|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.Build.0 = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.Build.0 = Release|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.Build.0 = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.Build.0 = Release|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.Build.0 = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.Build.0 = Release|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.Build.0 = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.Build.0 = Release|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.Build.0 = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.Build.0 = Release|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.ActiveCfg = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.Build.0 = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.ActiveCfg = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.Build.0 = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.ActiveCfg = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.Build.0 = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.ActiveCfg = Release|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.Build.0 = Release|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.Build.0 = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.Build.0 = Release|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.Build.0 = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.ActiveCfg = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.Build.0 = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.ActiveCfg = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.Build.0 = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.ActiveCfg = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/jni/SDL2-2.0.1/VisualC/SDL_VS2012.sln b/jni/SDL2-2.0.1/VisualC/SDL_VS2012.sln deleted file mode 100644 index 3ac7b68f..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL_VS2012.sln +++ /dev/null @@ -1,278 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2012.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2012.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CE748C1F-3C21-4825-AA6A-F895A023F7E7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "tests\loopwave\loopwave_VS2012.vcxproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "tests\testplatform\testplatform_VS2012.vcxproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile_VS2012.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2_VS2012.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys_VS2012.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2_VS2012.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape_VS2012.vcxproj", "{EDEA9D00-AF64-45DE-8F60-5957048F2F0F}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw2\testdraw2_VS2012.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpower\testpower_VS2012.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2012.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2012.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2012.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2012.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2012.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.Build.0 = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.Build.0 = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.Build.0 = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.Build.0 = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.Build.0 = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.Build.0 = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.ActiveCfg = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.Build.0 = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.ActiveCfg = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.Build.0 = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.ActiveCfg = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.Build.0 = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.Build.0 = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.ActiveCfg = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.Build.0 = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.ActiveCfg = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.Build.0 = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.ActiveCfg = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.Build.0 = Debug|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.Build.0 = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {26932B24-EFC6-4E3A-B277-ED653DA37968} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {CAE4F1D0-314F-4B10-805B-0EFD670133A0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {26828762-C95D-4637-9CB1-7F0979523813} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {40FB7794-D3C3-4CFE-BCF4-A80C96635682} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {2271060E-98B4-4596-8172-A041E4B2EC7A} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {E7A6C41C-E059-4C9C-8CCC-73586A540B62} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {55812185-D13C-4022-9C81-32E0F4A08336} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {55812185-D13C-4022-9C81-32E0F4A08996} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - {55812185-D13C-4022-9C81-32E0F4A08BCC} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} - EndGlobalSection -EndGlobal diff --git a/jni/SDL2-2.0.1/VisualC/SDL_VS2012EE.sln b/jni/SDL2-2.0.1/VisualC/SDL_VS2012EE.sln deleted file mode 100644 index 456f6998..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDL_VS2012EE.sln +++ /dev/null @@ -1,258 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2012.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2012.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "tests\loopwave\loopwave_VS2012.vcxproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "tests\testplatform\testplatform_VS2012.vcxproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile_VS2012.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2_VS2012.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys_VS2012.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2_VS2012.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape_VS2012.vcxproj", "{EDEA9D00-AF64-45DE-8F60-5957048F2F0F}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw2\testdraw2_VS2012.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpower\testpower_VS2012.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2012.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2012.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2012.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2012.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2012.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}" - ProjectSection(ProjectDependencies) = postProject - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.Build.0 = Debug|x64 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32 - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.Build.0 = Debug|x64 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32 - {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.Build.0 = Debug|x64 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32 - {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.Build.0 = Debug|x64 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.Build.0 = Debug|x64 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 - {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.Build.0 = Debug|x64 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.ActiveCfg = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.Build.0 = Debug|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.ActiveCfg = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.Build.0 = Debug|x64 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.ActiveCfg = Release|Win32 - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.Build.0 = Debug|x64 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.Build.0 = Debug|x64 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32 - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.ActiveCfg = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.Build.0 = Debug|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.ActiveCfg = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.Build.0 = Debug|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.ActiveCfg = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64 - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.Build.0 = Debug|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|x64 - {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.Build.0 = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64 - {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64 - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64 - {55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2008.vcproj deleted file mode 100644 index 9e43c5c3..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2008.vcproj +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2010.vcxproj deleted file mode 100644 index 122491de..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2010.vcxproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SDL2main - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - false - OldStyle - - - true - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - OldStyle - - - true - - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - false - - - true - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - .\Debug/SDLmain.pch - Level3 - true - OldStyle - Default - - - true - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2012.vcxproj deleted file mode 100644 index d44ea95c..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDLmain/SDLmain_VS2012.vcxproj +++ /dev/null @@ -1,168 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SDL2main - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - OldStyle - false - - - true - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - OldStyle - false - - - true - - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - false - - - true - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - false - - - true - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2008.vcproj deleted file mode 100644 index 4cd7e000..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2008.vcproj +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2010.vcxproj deleted file mode 100644 index 2fbbd25f..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2010.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SDL2test - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - false - OldStyle - - - true - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - OldStyle - - - true - - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - false - - - true - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - .\Debug/SDLtest.pch - Level3 - true - OldStyle - Default - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2012.vcxproj deleted file mode 100644 index a0d78c6b..00000000 --- a/jni/SDL2-2.0.1/VisualC/SDLtest/SDLtest_VS2012.vcxproj +++ /dev/null @@ -1,196 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SDL2test - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - OldStyle - false - - - true - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - OldStyle - false - - - true - - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - false - - - true - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - false - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/clean.sh b/jni/SDL2-2.0.1/VisualC/clean.sh deleted file mode 100755 index f90a11e9..00000000 --- a/jni/SDL2-2.0.1/VisualC/clean.sh +++ /dev/null @@ -1,5 +0,0 @@ -find . -type d -name 'Debug' -exec rm -rv {} \; -find . -type d -name 'Release' -exec rm -rv {} \; -find . -type f -name '*.user' -exec rm -v {} \; -find . -type f -name '*.ncb' -exec rm -v {} \; -find . -type f -name '*.suo' -exec rm -v {} \; diff --git a/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2008.vcproj deleted file mode 100644 index 412eda38..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2010.vcxproj deleted file mode 100644 index 9c2abe47..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2010.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - checkkeys - checkkeys - {26828762-C95D-4637-9CB1-7F0979523813} - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj deleted file mode 100644 index 10ac85e9..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - checkkeys - checkkeys - {26828762-C95D-4637-9CB1-7F0979523813} - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2008.vcproj deleted file mode 100644 index f64cc0fb..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2010.vcxproj deleted file mode 100644 index 1fd51898..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2010.vcxproj +++ /dev/null @@ -1,235 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - loopwave - loopwave - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2012.vcxproj deleted file mode 100644 index ea983c5d..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/loopwave/loopwave_VS2012.vcxproj +++ /dev/null @@ -1,235 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - loopwave - loopwave - {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\sample.wav" "$(TargetDir)\sample.wav" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2008.vcproj deleted file mode 100644 index 8d69c921..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2010.vcxproj deleted file mode 100644 index 3b7c7e10..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2010.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testatomic - {2271060E-98B4-4596-8172-A041E4B2EC7A} - testatomic - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2012.vcxproj deleted file mode 100644 index 8e908f01..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testatomic/testatomic_VS2012.vcxproj +++ /dev/null @@ -1,235 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testatomic - {2271060E-98B4-4596-8172-A041E4B2EC7A} - testatomic - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_VS2008.vcproj deleted file mode 100755 index 5b5ffa66..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_VS2008.vcproj +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2010.vcxproj deleted file mode 100644 index 3c4fe9d9..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2010.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testautomation - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0} - testautomation - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - true - - - Application - Unicode - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - true - Windows - MachineX86 - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Windows - true - true - MachineX86 - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - true - Windows - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2012.vcxproj deleted file mode 100644 index a026096b..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testautomation/testautomation_vs2012.vcxproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testautomation - {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0} - testautomation - Win32Proj - - - - Application - Unicode - true - v110 - - - Application - Unicode - true - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - true - Windows - MachineX86 - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Windows - true - true - MachineX86 - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Windows - true - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2008.vcproj deleted file mode 100644 index 03a44498..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2010.vcxproj deleted file mode 100644 index 5588b76e..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2010.vcxproj +++ /dev/null @@ -1,234 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testdraw2 - testdraw2 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj deleted file mode 100644 index e95358fe..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj +++ /dev/null @@ -1,232 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testdraw2 - testdraw2 - {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2008.vcproj deleted file mode 100644 index c421a2a3..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2010.vcxproj deleted file mode 100644 index 6a74a12e..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2010.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testfile - testfile - {CAE4F1D0-314F-4B10-805B-0EFD670133A0} - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2012.vcxproj deleted file mode 100644 index dc9f8282..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testfile/testfile_VS2012.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testfile - testfile - {CAE4F1D0-314F-4B10-805B-0EFD670133A0} - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj deleted file mode 100644 index e2d7b6b0..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj +++ /dev/null @@ -1,227 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testgamecontroller - testgamecontroller - {55812185-D13C-4022-9C81-32E0F4A08336} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj deleted file mode 100644 index c832c593..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testgamecontroller - testgamecontroller - {55812185-D13C-4022-9C81-32E0F4A08336} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2008.vcproj deleted file mode 100644 index cc199069..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2010.vcxproj deleted file mode 100644 index 63adbf08..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2010.vcxproj +++ /dev/null @@ -1,227 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testgesture - testgesture - {55812185-D13C-4022-9C81-32E0F4A08996} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2012.vcxproj deleted file mode 100644 index ef718201..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgesture/testgesture_VS2012.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testgesture - testgesture - {55812185-D13C-4022-9C81-32E0F4A08996} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2008.vcproj deleted file mode 100644 index 65c6a6e1..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2008.vcproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2010.vcxproj deleted file mode 100644 index 8a3bd513..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2010.vcxproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testgl2 - testgl2 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884} - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2012.vcxproj deleted file mode 100644 index d02101fe..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testgl2/testgl2_VS2012.vcxproj +++ /dev/null @@ -1,236 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testgl2 - testgl2 - {8B5CFB38-CCBA-40A8-AD7A-89C57B070884} - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - opengl32.lib;%(AdditionalDependencies) - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2008.vcproj deleted file mode 100644 index c6b91bf4..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj deleted file mode 100644 index 41c98e42..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj +++ /dev/null @@ -1,227 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testjoystick - testjoystick - {55812185-D13C-4022-9C81-32E0F4A08BCC} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj deleted file mode 100644 index 9730432d..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testjoystick - testjoystick - {55812185-D13C-4022-9C81-32E0F4A08BCC} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2008.vcproj deleted file mode 100644 index cb5023f8..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj deleted file mode 100644 index 86a73edb..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testoverlay2 - testoverlay2 - {55812185-D13C-4022-9C81-32E0F4A08AAD} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL and data files - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj deleted file mode 100644 index d51d495e..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj +++ /dev/null @@ -1,235 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testoverlay2 - testoverlay2 - {55812185-D13C-4022-9C81-32E0F4A08AAD} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2008.vcproj deleted file mode 100644 index b1fa2dcc..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2008.vcproj +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2010.vcxproj deleted file mode 100644 index d0c01925..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2010.vcxproj +++ /dev/null @@ -1,250 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testplatform - testplatform - {26932B24-EFC6-4E3A-B277-ED653DA37968} - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDebugDLL - Level3 - true - EditAndContinue - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/testplatform.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/testplatform.pch - $(IntDir) - $(IntDir) - $(IntDir)vc$(PlatformToolsetVersion).pdb - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2012.vcxproj deleted file mode 100644 index 8885fdf7..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testplatform/testplatform_VS2012.vcxproj +++ /dev/null @@ -1,249 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testplatform - testplatform - {26932B24-EFC6-4E3A-B277-ED653DA37968} - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDebugDLL - Level3 - true - EditAndContinue - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/testplatform.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - $(IntDir) - $(IntDir) - $(IntDir)vc$(PlatformToolsetVersion).pdb - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - MaxSpeed - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - true - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2008.vcproj deleted file mode 100644 index 6171d0f5..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2010.vcxproj deleted file mode 100644 index 6c252a14..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2010.vcxproj +++ /dev/null @@ -1,234 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testpower - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} - testpower - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - .\Debug/testpower.pch - .\Debug/testpower.pch - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2012.vcxproj deleted file mode 100644 index 60c8981c..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testpower/testpower_VS2012.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testpower - {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} - testpower - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2008.vcproj deleted file mode 100644 index d298dd0a..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj deleted file mode 100644 index 133366f5..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj +++ /dev/null @@ -1,242 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testrendertarget - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8} - testrendertarget - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj deleted file mode 100644 index b85c066c..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj +++ /dev/null @@ -1,245 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testrendertarget - {43A06713-A52D-4008-AD7E-A69DF3FCFFA8} - testrendertarget - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2008.vcproj deleted file mode 100644 index e0cac7cf..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2010.vcxproj deleted file mode 100644 index 6753c1cd..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2010.vcxproj +++ /dev/null @@ -1,242 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testscale - {E7A6C41C-E059-4C9C-8CCC-73586A540B62} - testscale - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2012.vcxproj deleted file mode 100644 index 1419804b..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testscale/testscale_VS2012.vcxproj +++ /dev/null @@ -1,246 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testscale - {E7A6C41C-E059-4C9C-8CCC-73586A540B62} - testscale - - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" -copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp" - - - Copy SDL and data files - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2008.vcproj deleted file mode 100644 index fff1458d..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2010.vcxproj deleted file mode 100644 index f7e96f9c..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2010.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testshape - testshape - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2012.vcxproj deleted file mode 100644 index b7c4e5e1..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testshape/testshape_VS2012.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testshape - testshape - {EDEA9D00-AF64-45DE-8F60-5957048F2F0F} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" - - - Copy SDL - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2008.vcproj b/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2008.vcproj deleted file mode 100644 index 5e37549f..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2008.vcproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2010.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2010.vcxproj deleted file mode 100644 index e3cac8ac..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2010.vcxproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testsprite2 - testsprite2 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682} - - - - Application - false - - - Application - false - MultiByte - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - {da956fd3-e143-46f2-9fe5-c77bebc56b1a} - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj b/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj deleted file mode 100644 index c2ac6e0e..00000000 --- a/jni/SDL2-2.0.1/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj +++ /dev/null @@ -1,236 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - testsprite2 - testsprite2 - {40FB7794-D3C3-4CFE-BCF4-A80C96635682} - - - - Application - false - v110 - - - Application - false - MultiByte - v110 - - - Application - false - v110 - - - Application - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - - - OnlyExplicitInline - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" -copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp" - - - Copy SDL and data files - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/SDL2-2.0.1/WhatsNew.txt b/jni/SDL2-2.0.1/WhatsNew.txt index 5ac78c51..db2ad8fb 100644 --- a/jni/SDL2-2.0.1/WhatsNew.txt +++ b/jni/SDL2-2.0.1/WhatsNew.txt @@ -1,6 +1,30 @@ This is a list of major changes in SDL's version history. +--------------------------------------------------------------------------- +2.0.2: +--------------------------------------------------------------------------- +General: +* Added an API to load a database of Game Controller mappings from a file: + SDL_GameControllerAddMappingsFromFile +* EGL can now create/manage OpenGL and OpenGL ES 1.x/2.x contexts, and share + them using SDL_GL_SHARE_WITH_CURRENT_CONTEXT +* Added testgles2. testgl2 does not need to link with libGL anymore. + +Windows: +* Support for OpenGL ES 2.x contexts using either WGL or EGL (natively via + the driver or emulated through ANGLE) + +Android: +* Joystick support (minimum SDK version required to build SDL is now 12, + the required runtime version remains at 10, but on such devices joystick + support won't be available). +* Hotplugging support for joysticks + +Linux: +* Fixed fullscreen and focused behavior when receiving NotifyGrab events +* Wayland support + --------------------------------------------------------------------------- 2.0.1: --------------------------------------------------------------------------- diff --git a/jni/SDL2-2.0.1/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/jni/SDL2-2.0.1/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj index 78d1c0b8..8541fa34 100755 --- a/jni/SDL2-2.0.1/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj +++ b/jni/SDL2-2.0.1/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj @@ -67,6 +67,11 @@ 04F7808512FB753F00FC43C0 /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */; }; 04FFAB8B12E23B8D00BA343D /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; }; 04FFAB8C12E23B8D00BA343D /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; }; + 56A6702E18565E450007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; }; + 56A6703518565E760007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */; }; + 56A6703618565E760007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703218565E760007D20F /* SDL_dynapi_procs.h */; }; + 56A6703718565E760007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6703318565E760007D20F /* SDL_dynapi.c */; }; + 56A6703818565E760007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703418565E760007D20F /* SDL_dynapi.h */; }; 56C181DF17C44D5E00406AE3 /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */; }; 56C181E217C44D7A00406AE3 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */; }; 56EA86FB13E9EC2B002E47EB /* SDL_coreaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.c */; }; @@ -260,6 +265,11 @@ 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_nullframebuffer.c; sourceTree = ""; }; 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_atomic.c; sourceTree = ""; }; 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = ""; }; + 56A6702D18565E450007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_internal.h; path = ../../src/SDL_internal.h; sourceTree = ""; }; + 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = ""; }; + 56A6703218565E760007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_procs.h; path = ../../src/dynapi/SDL_dynapi_procs.h; sourceTree = ""; }; + 56A6703318565E760007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = ""; }; + 56A6703418565E760007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = ""; }; 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = ""; }; 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = ../../src/filesystem/cocoa/SDL_sysfilesystem.m; sourceTree = ""; }; 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_coreaudio.c; path = coreaudio/SDL_coreaudio.c; sourceTree = ""; }; @@ -552,6 +562,17 @@ name = CustomTemplate; sourceTree = ""; }; + 56A6702F18565E4F0007D20F /* dynapi */ = { + isa = PBXGroup; + children = ( + 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */, + 56A6703218565E760007D20F /* SDL_dynapi_procs.h */, + 56A6703318565E760007D20F /* SDL_dynapi.c */, + 56A6703418565E760007D20F /* SDL_dynapi.h */, + ); + name = dynapi; + sourceTree = ""; + }; 56C181E017C44D6900406AE3 /* filesystem */ = { isa = PBXGroup; children = ( @@ -737,6 +758,7 @@ 04B2ECEF1025CEB900F9BC5F /* atomic */, FD99B8FB0DD52EDC00FB1D6B /* audio */, FD99B98A0DD52EDC00FB1D6B /* cpuinfo */, + 56A6702F18565E4F0007D20F /* dynapi */, FD99B98C0DD52EDC00FB1D6B /* events */, FD99B99D0DD52EDC00FB1D6B /* file */, 56C181E017C44D6900406AE3 /* filesystem */, @@ -749,6 +771,7 @@ FD99B9E00DD52EDC00FB1D6B /* thread */, FD99BA1E0DD52EDC00FB1D6B /* timer */, FDA682420DF2374D00F98A1A /* video */, + 56A6702D18565E450007D20F /* SDL_internal.h */, 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */, 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */, FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */, @@ -941,6 +964,7 @@ FDA684530DF2374E00F98A1A /* SDL_blit_auto.h in Headers */, FDA684550DF2374E00F98A1A /* SDL_blit_copy.h in Headers */, FDA6845D0DF2374E00F98A1A /* SDL_pixels_c.h in Headers */, + 56A6703618565E760007D20F /* SDL_dynapi_procs.h in Headers */, FDA684630DF2374E00F98A1A /* SDL_RLEaccel_c.h in Headers */, FDA684670DF2374E00F98A1A /* SDL_sysvideo.h in Headers */, FDA685FC0DF244C800F98A1A /* SDL_nullevents_c.h in Headers */, @@ -953,7 +977,9 @@ FD689F200E26E5D900F90B21 /* SDL_uikitvideo.h in Headers */, FD689F240E26E5D900F90B21 /* SDL_uikitwindow.h in Headers */, FD689F260E26E5D900F90B21 /* SDL_uikitopenglview.h in Headers */, + 56A6703818565E760007D20F /* SDL_dynapi.h in Headers */, FD689FCF0E26E9D400F90B21 /* SDL_uikitappdelegate.h in Headers */, + 56A6703518565E760007D20F /* SDL_dynapi_overrides.h in Headers */, 047677BD0EA76A31008ABAF1 /* SDL_syshaptic.h in Headers */, 046387420F0B5B7D0041FD65 /* SDL_blit_slow.h in Headers */, 006E9888119552DD001DE610 /* SDL_rwopsbundlesupport.h in Headers */, @@ -989,6 +1015,7 @@ AA7558A21595D55500BBD41B /* SDL_cpuinfo.h in Headers */, AA7558A31595D55500BBD41B /* SDL_endian.h in Headers */, AA7558A41595D55500BBD41B /* SDL_error.h in Headers */, + 56A6702E18565E450007D20F /* SDL_internal.h in Headers */, AA7558A51595D55500BBD41B /* SDL_events.h in Headers */, AA7558A61595D55500BBD41B /* SDL_gesture.h in Headers */, AA7558A71595D55500BBD41B /* SDL_haptic.h in Headers */, @@ -1117,6 +1144,7 @@ FD6526700DE8FCDD002AD96B /* SDL_cpuinfo.c in Sources */, FD6526710DE8FCDD002AD96B /* SDL_events.c in Sources */, FD6526720DE8FCDD002AD96B /* SDL_keyboard.c in Sources */, + 56A6703718565E760007D20F /* SDL_dynapi.c in Sources */, FD6526730DE8FCDD002AD96B /* SDL_mouse.c in Sources */, FD6526740DE8FCDD002AD96B /* SDL_quit.c in Sources */, FD6526750DE8FCDD002AD96B /* SDL_windowevents.c in Sources */, diff --git a/jni/SDL2-2.0.1/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/jni/SDL2-2.0.1/Xcode/SDL/SDL.xcodeproj/project.pbxproj index 9002cc65..fa8e4934 100755 --- a/jni/SDL2-2.0.1/Xcode/SDL/SDL.xcodeproj/project.pbxproj +++ b/jni/SDL2-2.0.1/Xcode/SDL/SDL.xcodeproj/project.pbxproj @@ -393,6 +393,21 @@ 566CDE90148F0AC200C5A9BB /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */; }; 567E2F1C17C44BB2005F1892 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */; }; 567E2F2117C44C35005F1892 /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 567E2F2017C44C35005F1892 /* SDL_filesystem.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56A670091856545C0007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A670081856545C0007D20F /* SDL_internal.h */; }; + 56A6700A1856545C0007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A670081856545C0007D20F /* SDL_internal.h */; }; + 56A6700B1856545C0007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A670081856545C0007D20F /* SDL_internal.h */; }; + 56A67021185654B40007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */; }; + 56A67022185654B40007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */; }; + 56A67023185654B40007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */; }; + 56A67024185654B40007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6701E185654B40007D20F /* SDL_dynapi.c */; }; + 56A67025185654B40007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6701E185654B40007D20F /* SDL_dynapi.c */; }; + 56A67026185654B40007D20F /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6701E185654B40007D20F /* SDL_dynapi.c */; }; + 56A67027185654B40007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701F185654B40007D20F /* SDL_dynapi.h */; }; + 56A67028185654B40007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701F185654B40007D20F /* SDL_dynapi.h */; }; + 56A67029185654B40007D20F /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6701F185654B40007D20F /* SDL_dynapi.h */; }; + 56A6702A185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; }; + 56A6702B185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; }; + 56A6702C185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; }; A77E6EB4167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; }; A77E6EB5167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; }; AA0AD09D16648D1700CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; }; @@ -994,6 +1009,11 @@ 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dropevents.c; sourceTree = ""; }; 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = ../../src/filesystem/cocoa/SDL_sysfilesystem.m; sourceTree = ""; }; 567E2F2017C44C35005F1892 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = ""; }; + 56A670081856545C0007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_internal.h; path = ../../src/SDL_internal.h; sourceTree = ""; }; + 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_procs.h; path = ../../src/dynapi/SDL_dynapi_procs.h; sourceTree = ""; }; + 56A6701E185654B40007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = ""; }; + 56A6701F185654B40007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = ""; }; + 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = ""; }; A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = ""; }; AA0F8490178D5ECC00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = ""; }; AA628AC8159367B7005138DD /* SDL_rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rotate.c; sourceTree = ""; }; @@ -1651,6 +1671,7 @@ 04BDFD7312E6671700899322 /* atomic */, 04BDFD7612E6671700899322 /* audio */, 04BDFDD312E6671700899322 /* cpuinfo */, + 56A6701C1856549B0007D20F /* dynapi */, 04BDFDD512E6671700899322 /* events */, 567E2F1F17C44BBB005F1892 /* filesystem */, 04BDFDEC12E6671700899322 /* file */, @@ -1663,6 +1684,7 @@ 04BDFE6412E6671800899322 /* thread */, 04BDFE9512E6671800899322 /* timer */, 04BDFEA712E6671800899322 /* video */, + 56A670081856545C0007D20F /* SDL_internal.h */, 04BDFE5512E6671700899322 /* SDL_assert_c.h */, 04BDFE5612E6671700899322 /* SDL_assert.c */, 04BDFE5812E6671700899322 /* SDL_error_c.h */, @@ -1682,6 +1704,17 @@ name = filesystem; sourceTree = ""; }; + 56A6701C1856549B0007D20F /* dynapi */ = { + isa = PBXGroup; + children = ( + 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */, + 56A6701E185654B40007D20F /* SDL_dynapi.c */, + 56A6701F185654B40007D20F /* SDL_dynapi.h */, + 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */, + ); + name = dynapi; + sourceTree = ""; + }; BEC562FE0761C0E800A33029 /* Linked Frameworks */ = { isa = PBXGroup; children = ( @@ -1747,6 +1780,7 @@ AA7558061595D4D800BBD41B /* SDL_clipboard.h in Headers */, AA7558081595D4D800BBD41B /* SDL_config_macosx.h in Headers */, AA75580A1595D4D800BBD41B /* SDL_config.h in Headers */, + 56A670091856545C0007D20F /* SDL_internal.h in Headers */, AA75580C1595D4D800BBD41B /* SDL_copying.h in Headers */, AA75580E1595D4D800BBD41B /* SDL_cpuinfo.h in Headers */, AA7558101595D4D800BBD41B /* SDL_endian.h in Headers */, @@ -1805,6 +1839,7 @@ 04BD004512E6671800899322 /* scancodes_linux.h in Headers */, 04BD004712E6671800899322 /* scancodes_xfree86.h in Headers */, 04BD004912E6671800899322 /* SDL_clipboardevents_c.h in Headers */, + 56A6702A185654B40007D20F /* SDL_dynapi_overrides.h in Headers */, 04BD004B12E6671800899322 /* SDL_events_c.h in Headers */, 04BD004D12E6671800899322 /* SDL_gesture_c.h in Headers */, 04BD004F12E6671800899322 /* SDL_keyboard_c.h in Headers */, @@ -1855,6 +1890,7 @@ 04BD01EE12E6671800899322 /* SDL_x11opengles.h in Headers */, 04BD01F212E6671800899322 /* SDL_x11shape.h in Headers */, 04BD01F312E6671800899322 /* SDL_x11sym.h in Headers */, + 56A67021185654B40007D20F /* SDL_dynapi_procs.h in Headers */, 04BD01F512E6671800899322 /* SDL_x11touch.h in Headers */, 04BD01F712E6671800899322 /* SDL_x11video.h in Headers */, 04BD01F912E6671800899322 /* SDL_x11window.h in Headers */, @@ -1865,6 +1901,7 @@ 04F7804A12FB74A200FC43C0 /* SDL_blendfillrect.h in Headers */, 04F7804C12FB74A200FC43C0 /* SDL_blendline.h in Headers */, 04F7804E12FB74A200FC43C0 /* SDL_blendpoint.h in Headers */, + 56A67027185654B40007D20F /* SDL_dynapi.h in Headers */, 04F7804F12FB74A200FC43C0 /* SDL_draw.h in Headers */, 04F7805112FB74A200FC43C0 /* SDL_drawline.h in Headers */, 04F7805312FB74A200FC43C0 /* SDL_drawpoint.h in Headers */, @@ -1917,6 +1954,7 @@ AA75582F1595D4D800BBD41B /* SDL_name.h in Headers */, AA7558311595D4D800BBD41B /* SDL_opengl.h in Headers */, AA7558331595D4D800BBD41B /* SDL_opengles.h in Headers */, + 56A67028185654B40007D20F /* SDL_dynapi.h in Headers */, AA7558351595D4D800BBD41B /* SDL_opengles2.h in Headers */, AA7558371595D4D800BBD41B /* SDL_pixels.h in Headers */, AA7558391595D4D800BBD41B /* SDL_platform.h in Headers */, @@ -1928,6 +1966,7 @@ AA7558451595D4D800BBD41B /* SDL_rwops.h in Headers */, AA7558471595D4D800BBD41B /* SDL_scancode.h in Headers */, AA7558491595D4D800BBD41B /* SDL_shape.h in Headers */, + 56A6702B185654B40007D20F /* SDL_dynapi_overrides.h in Headers */, AA75584B1595D4D800BBD41B /* SDL_stdinc.h in Headers */, AA75584D1595D4D800BBD41B /* SDL_surface.h in Headers */, AA75584F1595D4D800BBD41B /* SDL_system.h in Headers */, @@ -1939,6 +1978,7 @@ AA75585B1595D4D800BBD41B /* SDL_version.h in Headers */, AA75585D1595D4D800BBD41B /* SDL_video.h in Headers */, 04BD022512E6671800899322 /* SDL_diskaudio.h in Headers */, + 56A6700A1856545C0007D20F /* SDL_internal.h in Headers */, 04BD022D12E6671800899322 /* SDL_dummyaudio.h in Headers */, 04BD023512E6671800899322 /* SDL_coreaudio.h in Headers */, 04BD024312E6671800899322 /* SDL_audio_c.h in Headers */, @@ -1953,6 +1993,7 @@ 04BD026212E6671800899322 /* scancodes_xfree86.h in Headers */, 04BD026412E6671800899322 /* SDL_clipboardevents_c.h in Headers */, 04BD026612E6671800899322 /* SDL_events_c.h in Headers */, + 56A67022185654B40007D20F /* SDL_dynapi_procs.h in Headers */, 04BD026812E6671800899322 /* SDL_gesture_c.h in Headers */, 04BD026A12E6671800899322 /* SDL_keyboard_c.h in Headers */, 04BD026C12E6671800899322 /* SDL_mouse_c.h in Headers */, @@ -2063,6 +2104,7 @@ DB313FE117554B71006C0E22 /* SDL_name.h in Headers */, DB313FE217554B71006C0E22 /* SDL_opengl.h in Headers */, DB313FE317554B71006C0E22 /* SDL_opengles.h in Headers */, + 56A67029185654B40007D20F /* SDL_dynapi.h in Headers */, DB313FE417554B71006C0E22 /* SDL_opengles2.h in Headers */, DB313FE517554B71006C0E22 /* SDL_pixels.h in Headers */, DB313FE617554B71006C0E22 /* SDL_platform.h in Headers */, @@ -2074,6 +2116,7 @@ DB313FEC17554B71006C0E22 /* SDL_rwops.h in Headers */, DB313FED17554B71006C0E22 /* SDL_scancode.h in Headers */, DB313FEE17554B71006C0E22 /* SDL_shape.h in Headers */, + 56A6702C185654B40007D20F /* SDL_dynapi_overrides.h in Headers */, DB313FEF17554B71006C0E22 /* SDL_stdinc.h in Headers */, DB313FF017554B71006C0E22 /* SDL_surface.h in Headers */, DB313FF117554B71006C0E22 /* SDL_system.h in Headers */, @@ -2085,6 +2128,7 @@ DB313FF717554B71006C0E22 /* SDL_version.h in Headers */, DB313FF817554B71006C0E22 /* SDL_video.h in Headers */, DB313F7417554B71006C0E22 /* SDL_diskaudio.h in Headers */, + 56A6700B1856545C0007D20F /* SDL_internal.h in Headers */, DB313F7517554B71006C0E22 /* SDL_dummyaudio.h in Headers */, DB313F7617554B71006C0E22 /* SDL_coreaudio.h in Headers */, DB313F7717554B71006C0E22 /* SDL_audio_c.h in Headers */, @@ -2099,6 +2143,7 @@ DB313F8017554B71006C0E22 /* scancodes_xfree86.h in Headers */, DB313F8117554B71006C0E22 /* SDL_clipboardevents_c.h in Headers */, DB313F8217554B71006C0E22 /* SDL_events_c.h in Headers */, + 56A67023185654B40007D20F /* SDL_dynapi_procs.h in Headers */, DB313F8317554B71006C0E22 /* SDL_gesture_c.h in Headers */, DB313F8417554B71006C0E22 /* SDL_keyboard_c.h in Headers */, DB313F8517554B71006C0E22 /* SDL_mouse_c.h in Headers */, @@ -2442,6 +2487,7 @@ 0442EC1D12FE1BCB004C9285 /* SDL_render_sw.c in Sources */, 0442EC5A12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */, 0442EC5F12FE1C75004C9285 /* SDL_hints.c in Sources */, + 56A67024185654B40007D20F /* SDL_dynapi.c in Sources */, 04BAC0C81300C2160055DE28 /* SDL_log.c in Sources */, 0435673E1303160F00BA5428 /* SDL_shaders_gl.c in Sources */, 566CDE90148F0AC200C5A9BB /* SDL_dropevents.c in Sources */, @@ -2560,6 +2606,7 @@ 04F7805E12FB74A200FC43C0 /* SDL_drawpoint.c in Sources */, 0442EC1912FE1BBA004C9285 /* SDL_render_gl.c in Sources */, 0442EC1F12FE1BCB004C9285 /* SDL_render_sw.c in Sources */, + 56A67025185654B40007D20F /* SDL_dynapi.c in Sources */, 0442EC5C12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */, 0442EC6012FE1C75004C9285 /* SDL_hints.c in Sources */, 04BAC0C91300C2160055DE28 /* SDL_log.c in Sources */, @@ -2678,6 +2725,7 @@ DB31406017554B71006C0E22 /* SDL_drawpoint.c in Sources */, DB31406117554B71006C0E22 /* SDL_render_gl.c in Sources */, DB31406217554B71006C0E22 /* SDL_render_sw.c in Sources */, + 56A67026185654B40007D20F /* SDL_dynapi.c in Sources */, DB31406317554B71006C0E22 /* SDL_x11framebuffer.c in Sources */, DB31406417554B71006C0E22 /* SDL_hints.c in Sources */, DB31406517554B71006C0E22 /* SDL_log.c in Sources */, diff --git a/jni/SDL2-2.0.1/android-project/AndroidManifest.xml b/jni/SDL2-2.0.1/android-project/AndroidManifest.xml index 27db4184..dc8450a6 100644 --- a/jni/SDL2-2.0.1/android-project/AndroidManifest.xml +++ b/jni/SDL2-2.0.1/android-project/AndroidManifest.xml @@ -20,9 +20,12 @@ + android:theme="@android:style/Theme.NoTitleBar.Fullscreen" + android:hardwareAccelerated="true" > + android:label="@string/app_name" + android:configChanges="keyboardHidden|orientation" + > @@ -31,7 +34,7 @@ - + diff --git a/jni/SDL2-2.0.1/android-project/default.properties b/jni/SDL2-2.0.1/android-project/default.properties index 9d135cb8..0cdab956 100644 --- a/jni/SDL2-2.0.1/android-project/default.properties +++ b/jni/SDL2-2.0.1/android-project/default.properties @@ -8,4 +8,4 @@ # project structure. # Project target. -target=android-7 +target=android-12 diff --git a/jni/SDL2-2.0.1/android-project/jni/Application.mk b/jni/SDL2-2.0.1/android-project/jni/Application.mk index 05cf0c31..e5b50793 100644 --- a/jni/SDL2-2.0.1/android-project/jni/Application.mk +++ b/jni/SDL2-2.0.1/android-project/jni/Application.mk @@ -2,3 +2,5 @@ # Uncomment this if you're using STL in your project # See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information # APP_STL := stlport_static + +APP_ABI := armeabi armeabi-v7a x86 diff --git a/jni/SDL2-2.0.1/android-project/jni/src/Android.mk b/jni/SDL2-2.0.1/android-project/jni/src/Android.mk index 70ca7dc3..943a8cdb 100644 --- a/jni/SDL2-2.0.1/android-project/jni/src/Android.mk +++ b/jni/SDL2-2.0.1/android-project/jni/src/Android.mk @@ -14,6 +14,6 @@ LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \ LOCAL_SHARED_LIBRARIES := SDL2 -LOCAL_LDLIBS := -lGLESv1_CM -llog +LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog include $(BUILD_SHARED_LIBRARY) diff --git a/jni/SDL2-2.0.1/android-project/project.properties b/jni/SDL2-2.0.1/android-project/project.properties index b7c2081d..0f507e53 100644 --- a/jni/SDL2-2.0.1/android-project/project.properties +++ b/jni/SDL2-2.0.1/android-project/project.properties @@ -11,4 +11,4 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-10 +target=android-12 diff --git a/jni/SDL2-2.0.1/android-project/src/org/libsdl/app/SDLActivity.java b/jni/SDL2-2.0.1/android-project/src/org/libsdl/app/SDLActivity.java index 49b014ce..1fe66132 100644 --- a/jni/SDL2-2.0.1/android-project/src/org/libsdl/app/SDLActivity.java +++ b/jni/SDL2-2.0.1/android-project/src/org/libsdl/app/SDLActivity.java @@ -1,5 +1,6 @@ package org.libsdl.app; +import java.util.ArrayList; import java.util.Arrays; import android.app.*; @@ -25,16 +26,18 @@ public class SDLActivity extends Activity { // Keep track of the paused state public static boolean mIsPaused = false, mIsSurfaceReady = false, mHasFocus = true; + public static boolean mExitCalledFromJava; // Main components protected static SDLActivity mSingleton; protected static SDLSurface mSurface; protected static View mTextEdit; protected static ViewGroup mLayout; + protected static SDLJoystickHandler mJoystickHandler; // This is what SDL runs in. It invokes SDL_main(), eventually protected static Thread mSDLThread; - + // Audio protected static Thread mAudioThread; protected static AudioTrack mAudioTrack; @@ -60,6 +63,16 @@ public class SDLActivity extends Activity { // Set up the surface mSurface = new SDLSurface(getApplication()); + + // Make sure this variable is initialized here! + mExitCalledFromJava = false; + + if(Build.VERSION.SDK_INT >= 12) { + mJoystickHandler = new SDLJoystickHandler_API12(); + } + else { + mJoystickHandler = new SDLJoystickHandler(); + } mLayout = new AbsoluteLayout(this); mLayout.addView(mSurface); @@ -106,16 +119,17 @@ public class SDLActivity extends Activity { super.onDestroy(); Log.v("SDL", "onDestroy()"); // Send a quit message to the application + SDLActivity.mExitCalledFromJava = true; SDLActivity.nativeQuit(); // Now wait for the SDL thread to quit - if (mSDLThread != null) { + if (SDLActivity.mSDLThread != null) { try { - mSDLThread.join(); + SDLActivity.mSDLThread.join(); } catch(Exception e) { Log.v("SDL", "Problem stopping thread: " + e); } - mSDLThread = null; + SDLActivity.mSDLThread = null; //Log.v("SDL", "Finished waiting for SDL thread"); } @@ -159,6 +173,12 @@ public class SDLActivity extends Activity { mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true); } } + + /* The native thread has finished */ + public static void handleNativeExit() { + SDLActivity.mSDLThread = null; + mSingleton.finish(); + } // Messages from the SDLMain thread @@ -236,6 +256,10 @@ public class SDLActivity extends Activity { public static native void nativePause(); public static native void nativeResume(); public static native void onNativeResize(int x, int y, int format); + public static native int onNativePadDown(int device_id, int keycode); + public static native int onNativePadUp(int device_id, int keycode); + public static native void onNativeJoy(int device_id, int axis, + float value); public static native void onNativeKeyDown(int keycode); public static native void onNativeKeyUp(int keycode); public static native void onNativeKeyboardFocusLost(); @@ -246,6 +270,10 @@ public class SDLActivity extends Activity { public static native void onNativeSurfaceChanged(); public static native void onNativeSurfaceDestroyed(); public static native void nativeFlipBuffers(); + public static native int nativeAddJoystick(int device_id, String name, + int is_accelerometer, int nbuttons, + int naxes, int nhats, int nballs); + public static native int nativeRemoveJoystick(int device_id); public static void flipBuffers() { SDLActivity.nativeFlipBuffers(); @@ -264,6 +292,34 @@ public class SDLActivity extends Activity { return mSingleton; } + /** + * @return result of getSystemService(name) but executed on UI thread. + */ + public Object getSystemServiceFromUiThread(final String name) { + final Object lock = new Object(); + final Object[] results = new Object[2]; // array for writable variables + synchronized (lock) { + runOnUiThread(new Runnable() { + @Override + public void run() { + synchronized (lock) { + results[0] = getSystemService(name); + results[1] = Boolean.TRUE; + lock.notify(); + } + } + }); + if (results[1] == null) { + try { + lock.wait(); + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + } + } + return results[0]; + } + static class ShowTextInputTask implements Runnable { /* * This is used to regulate the pan&scan method to have some offset from @@ -406,6 +462,18 @@ public class SDLActivity extends Activity { } return Arrays.copyOf(filtered, used); } + + // Joystick glue code, just a series of stubs that redirect to the SDLJoystickHandler instance + public static boolean handleJoystickMotionEvent(MotionEvent event) { + return mJoystickHandler.handleMotionEvent(event); + } + + public static void pollInputDevices() { + if (SDLActivity.mSDLThread != null) { + mJoystickHandler.pollInputDevices(); + } + } + } /** @@ -451,6 +519,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); + + if(Build.VERSION.SDK_INT >= 12) { + setOnGenericMotionListener(new SDLGenericMotionListener_API12()); + } // Some arbitrary defaults to avoid a potential division by zero mWidth = 1.0f; @@ -546,6 +618,23 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, SDLActivity.mSDLThread = new Thread(new SDLMain(), "SDLThread"); enableSensor(Sensor.TYPE_ACCELEROMETER, true); SDLActivity.mSDLThread.start(); + + // Set up a listener thread to catch when the native thread ends + new Thread(new Runnable(){ + @Override + public void run(){ + try { + SDLActivity.mSDLThread.join(); + } + catch(Exception e){} + finally{ + // Native thread has finished + if (! SDLActivity.mExitCalledFromJava) { + SDLActivity.handleNativeExit(); + } + } + } + }).start(); } } @@ -557,16 +646,34 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // Key events @Override public boolean onKey(View v, int keyCode, KeyEvent event) { + // Dispatch the different events depending on where they come from + // Some SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD + // So, we try to process them as DPAD or GAMEPAD events first, if that fails we try them as KEYBOARD - if (event.getAction() == KeyEvent.ACTION_DOWN) { - //Log.v("SDL", "key down: " + keyCode); - SDLActivity.onNativeKeyDown(keyCode); - return true; + if ( (event.getSource() & 0x00000401) != 0 || /* API 12: SOURCE_GAMEPAD */ + (event.getSource() & InputDevice.SOURCE_DPAD) != 0 ) { + if (event.getAction() == KeyEvent.ACTION_DOWN) { + if (SDLActivity.onNativePadDown(event.getDeviceId(), keyCode) == 0) { + return true; + } + } else if (event.getAction() == KeyEvent.ACTION_UP) { + if (SDLActivity.onNativePadUp(event.getDeviceId(), keyCode) == 0) { + return true; + } + } } - else if (event.getAction() == KeyEvent.ACTION_UP) { - //Log.v("SDL", "key up: " + keyCode); - SDLActivity.onNativeKeyUp(keyCode); - return true; + + if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) { + if (event.getAction() == KeyEvent.ACTION_DOWN) { + //Log.v("SDL", "key down: " + keyCode); + SDLActivity.onNativeKeyDown(keyCode); + return true; + } + else if (event.getAction() == KeyEvent.ACTION_UP) { + //Log.v("SDL", "key up: " + keyCode); + SDLActivity.onNativeKeyUp(keyCode); + return true; + } } return false; @@ -575,31 +682,48 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // Touch events @Override public boolean onTouch(View v, MotionEvent event) { - final int touchDevId = event.getDeviceId(); - final int pointerCount = event.getPointerCount(); - // touchId, pointerId, action, x, y, pressure - int actionPointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT; /* API 8: event.getActionIndex(); */ - int pointerFingerId = event.getPointerId(actionPointerIndex); - int action = (event.getAction() & MotionEvent.ACTION_MASK); /* API 8: event.getActionMasked(); */ - - float x = event.getX(actionPointerIndex) / mWidth; - float y = event.getY(actionPointerIndex) / mHeight; - float p = event.getPressure(actionPointerIndex); - - if (action == MotionEvent.ACTION_MOVE && pointerCount > 1) { - // TODO send motion to every pointer if its position has - // changed since prev event. - for (int i = 0; i < pointerCount; i++) { + /* Ref: http://developer.android.com/training/gestures/multi.html */ + final int touchDevId = event.getDeviceId(); + final int pointerCount = event.getPointerCount(); + int action = event.getActionMasked(); + int pointerFingerId; + int i = -1; + float x,y,p; + + switch(action) { + case MotionEvent.ACTION_MOVE: + for (i = 0; i < pointerCount; i++) { pointerFingerId = event.getPointerId(i); x = event.getX(i) / mWidth; y = event.getY(i) / mHeight; p = event.getPressure(i); SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p); } - } else { + break; + + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_DOWN: + // Primary pointer up/down, the index is always zero + i = 0; + case MotionEvent.ACTION_POINTER_UP: + case MotionEvent.ACTION_POINTER_DOWN: + // Non primary pointer up/down + if (i == -1) { + i = event.getActionIndex(); + } + + pointerFingerId = event.getPointerId(i); + x = event.getX(i) / mWidth; + y = event.getY(i) / mHeight; + p = event.getPressure(i); SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p); - } - return true; + break; + + default: + break; + } + + return true; } // Sensor events @@ -646,8 +770,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, y / SensorManager.GRAVITY_EARTH, event.values[2] / SensorManager.GRAVITY_EARTH - 1); } - } - + } } /* This is a fake invisible editor view that receives the input and defines the @@ -767,5 +890,140 @@ class SDLInputConnection extends BaseInputConnection { public native void nativeSetComposingText(String text, int newCursorPosition); + @Override + public boolean deleteSurroundingText(int beforeLength, int afterLength) { + // Workaround to capture backspace key. Ref: http://stackoverflow.com/questions/14560344/android-backspace-in-webview-baseinputconnection + if (beforeLength == 1 && afterLength == 0) { + // backspace + return super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL)) + && super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL)); + } + + return super.deleteSurroundingText(beforeLength, afterLength); + } } +/* A null joystick handler for API level < 12 devices (the accelerometer is handled separately) */ +class SDLJoystickHandler { + + public boolean handleMotionEvent(MotionEvent event) { + return false; + } + + public void pollInputDevices() { + } +} + +/* Actual joystick functionality available for API >= 12 devices */ +class SDLJoystickHandler_API12 extends SDLJoystickHandler { + + class SDLJoystick { + public int device_id; + public String name; + public ArrayList axes; + } + + private ArrayList mJoysticks; + + public SDLJoystickHandler_API12() { + + mJoysticks = new ArrayList(); + } + + @Override + public void pollInputDevices() { + int[] deviceIds = InputDevice.getDeviceIds(); + // It helps processing the device ids in reverse order + // For example, in the case of the XBox 360 wireless dongle, + // so the first controller seen by SDL matches what the receiver + // considers to be the first controller + + for(int i=deviceIds.length-1; i>-1; i--) { + SDLJoystick joystick = getJoystick(deviceIds[i]); + if (joystick == null) { + joystick = new SDLJoystick(); + InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]); + if( (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) { + joystick.device_id = deviceIds[i]; + joystick.name = joystickDevice.getName(); + joystick.axes = new ArrayList(); + + for (InputDevice.MotionRange range : joystickDevice.getMotionRanges()) { + if ( (range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) { + joystick.axes.add(range); + } + } + + mJoysticks.add(joystick); + SDLActivity.nativeAddJoystick(joystick.device_id, joystick.name, 0, -1, joystick.axes.size(), 0, 0); + } + } + } + + /* Check removed devices */ + ArrayList removedDevices = new ArrayList(); + for(int i=0; i < mJoysticks.size(); i++) { + int device_id = mJoysticks.get(i).device_id; + int j; + for (j=0; j < deviceIds.length; j++) { + if (device_id == deviceIds[j]) break; + } + if (j == deviceIds.length) { + removedDevices.add(device_id); + } + } + + for(int i=0; i < removedDevices.size(); i++) { + int device_id = removedDevices.get(i); + SDLActivity.nativeRemoveJoystick(device_id); + for (int j=0; j < mJoysticks.size(); j++) { + if (mJoysticks.get(j).device_id == device_id) { + mJoysticks.remove(j); + break; + } + } + } + } + + protected SDLJoystick getJoystick(int device_id) { + for(int i=0; i < mJoysticks.size(); i++) { + if (mJoysticks.get(i).device_id == device_id) { + return mJoysticks.get(i); + } + } + return null; + } + + @Override + public boolean handleMotionEvent(MotionEvent event) { + if ( (event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) { + int actionPointerIndex = event.getActionIndex(); + int action = event.getActionMasked(); + switch(action) { + case MotionEvent.ACTION_MOVE: + SDLJoystick joystick = getJoystick(event.getDeviceId()); + if ( joystick != null ) { + for (int i = 0; i < joystick.axes.size(); i++) { + InputDevice.MotionRange range = joystick.axes.get(i); + /* Normalize the value to -1...1 */ + float value = ( event.getAxisValue( range.getAxis(), actionPointerIndex) - range.getMin() ) / range.getRange() * 2.0f - 1.0f; + SDLActivity.onNativeJoy(joystick.device_id, i, value ); + } + } + break; + default: + break; + } + } + return true; + } +} + +class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener { + // Generic Motion (mouse hover, joystick...) events go here + // We only have joysticks yet + @Override + public boolean onGenericMotion(View v, MotionEvent event) { + return SDLActivity.handleJoystickMotionEvent(event); + } +} diff --git a/jni/SDL2-2.0.1/build-scripts/androidbuild.sh b/jni/SDL2-2.0.1/build-scripts/androidbuild.sh index b4a83234..ea6e6b1b 100755 --- a/jni/SDL2-2.0.1/build-scripts/androidbuild.sh +++ b/jni/SDL2-2.0.1/build-scripts/androidbuild.sh @@ -24,6 +24,8 @@ fi if [ -z "$1" ] || [ -z "$SOURCES" ]; then echo "Usage: androidbuild.sh com.yourcompany.yourapp < sources.list" echo "Usage: androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c" + echo "To copy SDL source instead of symlinking: COPYSOURCE=1 androidbuild.sh ... " + echo "You can pass additional arguments to ndk-build with the NDKARGS variable: NDKARGS=\"-s\" androidbuild.sh ..." exit 1 fi @@ -50,6 +52,19 @@ if [ -z "$ANT" ];then exit 1 fi +NCPUS="1" +case "$OSTYPE" in + darwin*) + NCPU=`sysctl -n hw.ncpu` + ;; + linux*) + if [ -n `which nproc` ]; then + NCPUS=`nproc` + fi + ;; + *);; +esac + APP="$1" APPARR=(${APP//./ }) BUILDPATH="$SDLPATH/build/$APP" @@ -63,9 +78,15 @@ cp -r $SDLPATH/android-project/* $BUILDPATH # Copy SDL sources mkdir -p $BUILDPATH/jni/SDL -cp -r $SDLPATH/src $BUILDPATH/jni/SDL -cp -r $SDLPATH/include $BUILDPATH/jni/SDL -cp $SDLPATH/Android.mk $BUILDPATH/jni/SDL +if [ -z "$COPYSOURCE" ]; then + ln -s $SDLPATH/src $BUILDPATH/jni/SDL + ln -s $SDLPATH/include $BUILDPATH/jni/SDL +else + cp -r $SDLPATH/src $BUILDPATH/jni/SDL + cp -r $SDLPATH/include $BUILDPATH/jni/SDL +fi + +cp -r $SDLPATH/Android.mk $BUILDPATH/jni/SDL sed -i "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/jni/src/Android.mk sed -i "s|org\.libsdl\.app|$APP|g" $BUILDPATH/AndroidManifest.xml @@ -95,7 +116,7 @@ echo "public class $ACTIVITY extends SDLActivity {}" >> "$ACTIVITY.java" # Update project and build cd $BUILDPATH android update project --path $BUILDPATH -$NDKBUILD +$NDKBUILD -j $NCPUS $NDKARGS $ANT debug cd $CURDIR diff --git a/jni/SDL2-2.0.1/build-scripts/raspberrypi-buildbot.sh b/jni/SDL2-2.0.1/build-scripts/raspberrypi-buildbot.sh index 4c746c01..1cc637c5 100755 --- a/jni/SDL2-2.0.1/build-scripts/raspberrypi-buildbot.sh +++ b/jni/SDL2-2.0.1/build-scripts/raspberrypi-buildbot.sh @@ -39,7 +39,7 @@ mkdir -p $BUILDBOTDIR pushd $BUILDBOTDIR SYSROOT="/opt/rpi-sysroot" -export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux" +export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib" # -L$SYSROOT/usr/lib/arm-linux-gnueabihf" # !!! FIXME: shouldn't have to --disable-* things here. ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd diff --git a/jni/SDL2-2.0.1/cmake/sdlchecks.cmake b/jni/SDL2-2.0.1/cmake/sdlchecks.cmake index fe763785..c2286b87 100644 --- a/jni/SDL2-2.0.1/cmake/sdlchecks.cmake +++ b/jni/SDL2-2.0.1/cmake/sdlchecks.cmake @@ -1,3 +1,34 @@ +macro(FindLibraryAndSONAME _LIB) + string(TOUPPER ${_LIB} _UPPERLNAME) + string(REGEX REPLACE "\\-" "_" _LNAME "${_UPPERLNAME}") + + find_library(${_LNAME}_LIB ${_LIB}) + if(${_LNAME}_LIB) + # reduce the library name for shared linking + + get_filename_component(_LIB_REALPATH ${${_LNAME}_LIB} REALPATH) # resolves symlinks + get_filename_component(_LIB_JUSTNAME ${_LIB_REALPATH} NAME) + + if(APPLE) + string(REGEX REPLACE "(\\.[0-9]*)\\.[0-9\\.]*dylib$" "\\1.dylib" _LIB_REGEXD "${_LIB_JUSTNAME}") + else() + string(REGEX REPLACE "(\\.[0-9]*)\\.[0-9\\.]*$" "\\1" _LIB_REGEXD "${_LIB_JUSTNAME}") + endif() + + SET(_DEBUG_FindSONAME FALSE) + if(_DEBUG_FindSONAME) + message_warn("DYNLIB OUTPUTVAR: ${_LIB} ... ${_LNAME}_LIB") + message_warn("DYNLIB ORIGINAL LIB: ${_LIB} ... ${${_LNAME}_LIB}") + message_warn("DYNLIB REALPATH LIB: ${_LIB} ... ${_LIB_REALPATH}") + message_warn("DYNLIB JUSTNAME LIB: ${_LIB} ... ${_LIB_JUSTNAME}") + message_warn("DYNLIB REGEX'd LIB: ${_LIB} ... ${_LIB_REGEXD}") + endif() + + message(STATUS "dynamic lib${_LIB} -> ${_LIB_REGEXD}") + set(${_LNAME}_LIB_SONAME ${_LIB_REGEXD}) + endif() +endmacro() + macro(CheckDLOPEN) check_function_exists(dlopen HAVE_DLOPEN) if(NOT HAVE_DLOPEN) @@ -83,9 +114,8 @@ macro(CheckALSA) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic ALSA loading") else() - find_library(_ALSA_LIB asound) - get_filename_component(F_ALSA_LIB ${_ALSA_LIB} NAME) - set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${F_ALSA_LIB}\"") + FindLibraryAndSONAME("asound") + set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"") set(HAVE_ALSA_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(ALSA_SHARED) @@ -114,9 +144,8 @@ macro(CheckPulseAudio) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading") else() - find_library(D_PULSE_LIB pulse-simple) - get_filename_component(F_PULSE_LIB ${D_PULSE_LIB} NAME) - set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${F_PULSE_LIB}\"") + FindLibraryAndSONAME("pulse-simple") + set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"") set(HAVE_PULSEAUDIO_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(PULSEAUDIO_SHARED) @@ -145,9 +174,8 @@ macro(CheckESD) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic ESD loading") else() - find_library(D_ESD_LIB esd) - get_filename_component(F_ESD_LIB ${D_ESD_LIB} NAME) - set(SDL_AUDIO_DRIVER_ESD_DYNAMIC "\"${F_ESD_LIB}\"") + FindLibraryAndSONAME(esd) + set(SDL_AUDIO_DRIVER_ESD_DYNAMIC "\"${ESD_LIB_SONAME}\"") set(HAVE_ESD_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(ESD_SHARED) @@ -181,9 +209,8 @@ macro(CheckARTS) message_warn("You must have SDL_LoadObject() support for dynamic ARTS loading") else() # TODO - find_library(D_ARTS_LIB artsc) - get_filename_component(F_ARTS_LIB ${D_ARTS_LIB} NAME) - set(SDL_AUDIO_DRIVER_ARTS_DYNAMIC "\"${F_ARTS_LIB}\"") + FindLibraryAndSONAME(artsc) + set(SDL_AUDIO_DRIVER_ARTS_DYNAMIC "\"${ARTSC_LIB_SONAME}\"") set(HAVE_ARTS_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(ARTS_SHARED) @@ -213,8 +240,8 @@ macro(CheckNAS) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic NAS loading") else() - get_filename_component(F_NAS_LIB ${D_NAS_LIB} NAME) - set(SDL_AUDIO_DRIVER_NAS_DYNAMIC "\"${F_NAS_LIB}\"") + FindLibraryAndSONAME("audio") + set(SDL_AUDIO_DRIVER_NAS_DYNAMIC "\"${AUDIO_LIB_SONAME}\"") set(HAVE_NAS_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(NAS_SHARED) @@ -234,7 +261,7 @@ macro(CheckSNDIO) if(SNDIO) # TODO: set include paths properly, so the sndio headers are found check_include_file(sndio.h HAVE_SNDIO_H) - find_library(D_SNDIO_LIB audio) + find_library(D_SNDIO_LIB sndio) if(HAVE_SNDIO_H AND D_SNDIO_LIB) set(HAVE_SNDIO TRUE) file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c) @@ -244,8 +271,8 @@ macro(CheckSNDIO) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic sndio loading") else() - get_filename_component(F_SNDIO_LIB ${D_SNDIO_LIB} NAME) - set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${F_SNDIO_LIB}\"") + FindLibraryAndSONAME("sndio") + set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"") set(HAVE_SNDIO_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(SNDIO_SHARED) @@ -274,9 +301,8 @@ macro(CheckFusionSound) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic FusionSound loading") else() - find_library(D_FUSIONSOUND_LIB fusionsound) - get_filename_component(F_FUSIONSOUND_LIB ${D_FUSIONSOUND_LIB} NAME) - set(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "\"${F_FUSIONSOUND_LIB}\"") + FindLibraryAndSONAME("fusionsound") + set(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "\"${FUSIONSOUND_LIB_SONAME}\"") set(HAVE_FUSIONSOUND_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(FUSIONSOUND_SHARED) @@ -295,13 +321,7 @@ endmacro(CheckFusionSound) macro(CheckX11) if(VIDEO_X11) foreach(_LIB X11 Xext Xcursor Xinerama Xi Xrandr Xrender Xss Xxf86vm) - string(TOUPPER ${_LIB} _LNAME) - find_library(${_LNAME}_LIB ${_LIB}) - if(${_LNAME}_LIB) - # reduce the library name for shared linking - get_filename_component(_TMP ${${_LNAME}_LIB} NAME) - set(${_LNAME}_LIB ${_TMP}) - endif() + FindLibraryAndSONAME("${_LIB}") endforeach() find_path(X_INCLUDEDIR X11/Xlib.h) @@ -331,15 +351,8 @@ macro(CheckX11) set(SOURCE_FILES ${SOURCE_FILES} ${X11_SOURCES}) set(SDL_VIDEO_DRIVER_X11 1) - if(HAVE_GCC_FVISIBILITY) - set(X11_SYMBOLS_PRIVATE TRUE) - else() - set(X11_SYMBOLS_PRIVATE FALSE) - endif(HAVE_GCC_FVISIBILITY) - if(APPLE) set(X11_SHARED OFF) - set(X11_SYMBOLS_PRIVATE TRUE) endif(APPLE) check_function_exists("shmat" HAVE_SHMAT) @@ -358,16 +371,12 @@ macro(CheckX11) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic X11 loading") set(HAVE_X11_SHARED FALSE) - if(X11_SYMBOLS_PRIVATE) - message_warn("You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading") - set(HAVE_X11_SHARED TRUE) - endif(X11_SYMBOLS_PRIVATE) else(NOT HAVE_DLOPEN) set(HAVE_X11_SHARED TRUE) endif() if(HAVE_X11_SHARED) - set(SDL_VIDEO_DRIVER_X11_DYNAMIC "\"${X11_LIB}\"") - set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "\"${XEXT_LIB}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC "\"${X11_LIB_SONAME}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "\"${XEXT_LIB_SONAME}\"") else(HAVE_X11_SHARED) list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB}) endif(HAVE_X11_SHARED) @@ -413,7 +422,7 @@ macro(CheckX11) if(VIDEO_X11_XCURSOR AND HAVE_XCURSOR_H) set(HAVE_VIDEO_X11_XCURSOR TRUE) if(HAVE_X11_SHARED AND XCURSOR_LIB) - set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"") else(HAVE_X11_SHARED AND XCURSOR_LIB) list(APPEND EXTRA_LIBS ${XCURSOR_LIB}) endif(HAVE_X11_SHARED AND XCURSOR_LIB) @@ -423,7 +432,7 @@ macro(CheckX11) if(VIDEO_X11_XINERAMA AND HAVE_XINERAMA_H) set(HAVE_VIDEO_X11_XINERAMA TRUE) if(HAVE_X11_SHARED AND XINERAMA_LIB) - set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "\"${XINERAMA_LIB}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "\"${XINERAMA_LIB_SONAME}\"") else(HAVE_X11_SHARED AND XINERAMA_LIB) list(APPEND EXTRA_LIBS ${XINERAMA_LIB}) endif(HAVE_X11_SHARED AND XINERAMA_LIB) @@ -433,7 +442,7 @@ macro(CheckX11) if(VIDEO_X11_XINPUT AND HAVE_XINPUT_H) set(HAVE_VIDEO_X11_XINPUT TRUE) if(HAVE_X11_SHARED AND XI_LIB) - set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"") else(HAVE_X11_SHARED AND XI_LIB) list(APPEND EXTRA_LIBS ${XI_LIB}) endif(HAVE_X11_SHARED AND XI_LIB) @@ -458,7 +467,7 @@ macro(CheckX11) if(VIDEO_X11_XRANDR AND HAVE_XRANDR_H) if(HAVE_X11_SHARED AND XRANDR_LIB) - set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"") else(HAVE_X11_SHARED AND XRANDR_LIB) list(APPEND EXTRA_LIBS ${XRANDR_LIB}) endif(HAVE_X11_SHARED AND XRANDR_LIB) @@ -468,7 +477,7 @@ macro(CheckX11) if(VIDEO_X11_XSCRNSAVER AND HAVE_XSS_H) if(HAVE_X11_SHARED AND XSS_LIB) - set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"") else(HAVE_X11_SHARED AND XSS_LIB) list(APPEND EXTRA_LIBS ${XSS_LIB}) endif(HAVE_X11_SHARED AND XSS_LIB) @@ -483,7 +492,7 @@ macro(CheckX11) if(VIDEO_X11_XVM AND HAVE_XF86VM_H) if(HAVE_X11_SHARED AND XF86VMODE_LIB) - set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "\"${XF86VMODE_LIB}\"") + set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "\"${XF86VMODE_LIB_SONAME}\"") else(HAVE_X11_SHARED AND XF86VMODE_LIB) list(APPEND EXTRA_LIBS ${XF86VMODE_LIB}) endif(HAVE_X11_SHARED AND XF86VMODE_LIB) @@ -496,6 +505,29 @@ macro(CheckX11) endif(VIDEO_X11) endmacro(CheckX11) +# Requires: +# - EGL +macro(CheckWayland) + if(VIDEO_WAYLAND) + pkg_check_modules(WAYLAND wayland-client wayland-cursor wayland-egl egl xkbcommon) + if(WAYLAND_FOUND) + link_directories( + ${WAYLAND_LIBRARY_DIRS} + ) + include_directories( + ${WAYLAND_INCLUDE_DIRS} + ) + set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS}) + set(HAVE_VIDEO_WAYLAND TRUE) + set(HAVE_SDL_VIDEO TRUE) + + file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${WAYLAND_SOURCES}) + set(SDL_VIDEO_DRIVER_WAYLAND 1) + endif(WAYLAND_FOUND) + endif(VIDEO_WAYLAND) +endmacro(CheckWayland) + # Requires: # - n/a # @@ -533,9 +565,8 @@ macro(CheckDirectFB) if(NOT HAVE_DLOPEN) message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading") else() - find_library(D_DIRECTFB_LIB directfb) - get_filename_component(F_DIRECTFB_LIB ${D_DIRECTFB_LIB} NAME) - set(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC "\"${F_DIRECTFB_LIB}\"") + FindLibraryAndSONAME("directfb") + set(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC "\"${DIRECTFB_LIB_SONAME}\"") set(HAVE_DIRECTFB_SHARED TRUE) endif(NOT HAVE_DLOPEN) else(DIRECTFB_SHARED) @@ -638,6 +669,9 @@ macro(CheckPTHREAD) elseif(HPUX) set(PTHREAD_CFLAGS "-D_REENTRANT") set(PTHREAD_LDFLAGS "-L/usr/lib -pthread") + elseif(HAIKU) + set(PTHREAD_CFLAGS "-D_REENTRANT") + set(PTHREAD_LDFLAGS "") else() set(PTHREAD_CFLAGS "-D_REENTRANT") set(PTHREAD_LDFLAGS "-lpthread") diff --git a/jni/SDL2-2.0.1/configure b/jni/SDL2-2.0.1/configure index ba248943..a5ce2e38 100755 --- a/jni/SDL2-2.0.1/configure +++ b/jni/SDL2-2.0.1/configure @@ -817,6 +817,8 @@ enable_sndio enable_sndio_shared enable_diskaudio enable_dummyaudio +enable_video_wayland +enable_video_wayland_qt_touch enable_video_x11 with_x enable_x11_shared @@ -1532,6 +1534,10 @@ Optional Features: --enable-sndio-shared dynamically load sndio audio support [[default=yes]] --enable-diskaudio support the disk writer audio driver [[default=yes]] --enable-dummyaudio support the dummy audio driver [[default=yes]] + --enable-video-wayland use Wayland video driver [[default=yes]] + --enable-video-wayland-qt-touch + QtWayland server support for Wayland video driver + [[default=yes]] --enable-video-x11 use X11 video driver [[default=yes]] --enable-x11-shared dynamically load X11 support [[default=maybe]] --enable-video-x11-xcursor @@ -15950,19 +15956,42 @@ $as_echo "$have_gcc_mmd_mt" >&6; } fi fi -# Actually this doesn't work on OpenBSD and BeOS -#AC_MSG_CHECKING(for linker option --no-undefined) -#have_no_undefined=no -#save_LDFLAGS="$LDFLAGS" -#LDFLAGS="$LDFLAGS -Wl,--no-undefined" -#AC_TRY_LINK([ -#],[ -#],[ -#have_no_undefined=yes -#EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" -#]) -#LDFLAGS="$save_LDFLAGS" -#AC_MSG_RESULT($have_no_undefined) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5 +$as_echo_n "checking for linker option --no-undefined... " >&6; } +have_no_undefined=no +case "$host" in + *-*-openbsd*) + ;; + + *) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--no-undefined" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + have_no_undefined=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5 +$as_echo "$have_no_undefined" >&6; } # Check whether --enable-libc was given. if test "${enable_libc+set}" = set; then : @@ -16552,7 +16581,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname + for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -16605,7 +16634,7 @@ if test "x$ac_cv_lib_m_pow" = xyes; then : LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm" fi - for ac_func in atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt + for ac_func in atan atan2 acos asin ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -16763,6 +16792,7 @@ SOURCES="$SOURCES $srcdir/src/*.c" SOURCES="$SOURCES $srcdir/src/atomic/*.c" SOURCES="$SOURCES $srcdir/src/audio/*.c" SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c" +SOURCES="$SOURCES $srcdir/src/dynapi/*.c" SOURCES="$SOURCES $srcdir/src/events/*.c" SOURCES="$SOURCES $srcdir/src/file/*.c" SOURCES="$SOURCES $srcdir/src/haptic/*.c" @@ -18598,7 +18628,7 @@ $as_echo "$have_gcc_Wall" >&6; } $as_echo_n "checking for necessary GCC -Wno-multichar option... " >&6; } need_gcc_Wno_multichar=no case "$host" in - *-*-beos* | *-*-haiku*) + *-*-haiku*) need_gcc_Wno_multichar=yes ;; esac @@ -18610,6 +18640,95 @@ $as_echo "$need_gcc_Wno_multichar" >&6; } fi } +CheckWayland() +{ + # Check whether --enable-video-wayland was given. +if test "${enable_video_wayland+set}" = set; then : + enableval=$enable_video_wayland; +else + enable_video_wayland=yes +fi + + + # Check whether --enable-video-wayland-qt-touch was given. +if test "${enable_video_wayland_qt_touch+set}" = set; then : + enableval=$enable_video_wayland_qt_touch; +else + enable_video_wayland_qt_touch=yes +fi + + + if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Wayland support" >&5 +$as_echo_n "checking for Wayland support... " >&6; } + video_wayland=no + if test x$PKG_CONFIG != xno; then + if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then + WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor egl xkbcommon` + WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor egl xkbcommon` + video_wayland=yes + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_wayland" >&5 +$as_echo "$video_wayland" >&6; } + + if test x$video_wayland = xyes; then + +$as_echo "#define SDL_VIDEO_DRIVER_WAYLAND 1" >>confdefs.h + + if test x$enable_video_wayland_qt_touch = xyes; then + +$as_echo "#define SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1" >>confdefs.h + + fi + SOURCES="$SOURCES $srcdir/src/video/wayland/*.c" + EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $WAYLAND_LIBS" + have_video=yes + fi + fi +} CheckX11() { @@ -19319,11 +19438,6 @@ fi fi if test x$have_x = xyes; then - # Only allow dynamically loaded X11 if the X11 function pointers - # will not end up in the global namespace, which causes problems - # with other libraries calling X11 functions. - x11_symbols_private=$have_gcc_fvisibility - # Check whether --enable-x11-shared was given. if test "${enable_x11_shared+set}" = set; then : enableval=$enable_x11_shared; @@ -19334,7 +19448,6 @@ fi case "$host" in *-*-darwin*) - x11_symbols_private=yes x11_lib='/usr/X11R6/lib/libX11.6.dylib' x11ext_lib='/usr/X11R6/lib/libXext.6.dylib' xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib' @@ -19402,7 +19515,7 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11 1" >>confdefs.h SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS" if test x$enable_x11_shared = xmaybe; then - enable_x11_shared=$x11_symbols_private + enable_x11_shared=yes fi if test x$have_loadso != xyes && \ test x$enable_x11_shared = xyes; then @@ -19410,13 +19523,6 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11 1" >>confdefs.h $as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic X11 loading" >&2;} enable_x11_shared=no fi - if test x$x11_symbols_private != xyes && \ - test x$enable_x11_shared = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading" >&5 -$as_echo "$as_me: WARNING: You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading" >&2;} - enable_x11_shared=no - fi - if test x$have_loadso = xyes && \ test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then echo "-- dynamic libX11 -> $x11_lib" @@ -20124,13 +20230,13 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1" >>confdefs.h fi } -CheckBWINDOW() +CheckHaikuVideo() { if test x$enable_video = xyes; then -$as_echo "#define SDL_VIDEO_DRIVER_BWINDOW 1" >>confdefs.h +$as_echo "#define SDL_VIDEO_DRIVER_HAIKU 1" >>confdefs.h - SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc" + SOURCES="$SOURCES $srcdir/src/video/haiku/*.cc" have_video=yes fi } @@ -20680,14 +20786,92 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL 1" >>confdefs.h fi } -CheckBeGL() +CheckWINDOWSGLES() +{ + if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGL support" >&5 +$as_echo_n "checking for EGL support... " >&6; } + video_opengl_egl=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + video_opengl_egl=yes + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl_egl" >&5 +$as_echo "$video_opengl_egl" >&6; } + if test x$video_opengl_egl = xyes; then + +$as_echo "#define SDL_VIDEO_OPENGL 1" >>confdefs.h + + +$as_echo "#define SDL_VIDEO_OPENGL_EGL 1" >>confdefs.h + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL ES v2 headers" >&5 +$as_echo_n "checking for OpenGL ES v2 headers... " >&6; } + video_opengles_v2=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + video_opengles_v2=yes + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengles_v2" >&5 +$as_echo "$video_opengles_v2" >&6; } + if test x$video_opengles_v2 = xyes; then + +$as_echo "#define SDL_VIDEO_OPENGL 1" >>confdefs.h + + +$as_echo "#define SDL_VIDEO_OPENGL_ES2 1" >>confdefs.h + + +$as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h + + fi + fi +} + +CheckHaikuGL() { if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then $as_echo "#define SDL_VIDEO_OPENGL 1" >>confdefs.h -$as_echo "#define SDL_VIDEO_OPENGL_BGL 1" >>confdefs.h +$as_echo "#define SDL_VIDEO_OPENGL_HAIKU 1" >>confdefs.h $as_echo "#define SDL_VIDEO_RENDER_OGL 1" >>confdefs.h @@ -21006,6 +21190,10 @@ fi pthread_cflags="-D_REENTRANT" pthread_lib="-L/usr/lib -lpthread" ;; + *-*-haiku*) + pthread_cflags="-D_REENTRANT" + pthread_lib="" + ;; *) pthread_cflags="-D_REENTRANT" pthread_lib="-lpthread" @@ -22075,11 +22263,10 @@ case "$host" in # Raspberry Pi ARCH=linux RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux" - RPI_LDFLAGS="-L/opt/vc/lib -lbcm_host" CFLAGS="$CFLAGS $RPI_CFLAGS" SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS" EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS" - SDL_LIBS="$SDL_LIBS $RPI_LDFLAGS" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/vc/lib -lbcm_host -ldl" if test x$enable_video = xyes; then SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c" @@ -22116,6 +22303,7 @@ case "$host" in CheckNAS CheckSNDIO CheckX11 + CheckWayland CheckDirectFB CheckFusionSound CheckOpenGLX11 @@ -22216,7 +22404,7 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h fi # Set up files for evdev input if test x$use_input_events = xyes; then - SOURCES="$SOURCES $srcdir/src/input/evdev/*.c" + SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev.c" fi ;; *-*-cygwin* | *-*-mingw32*) @@ -22235,6 +22423,7 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h CheckDummyAudio CheckWINDOWS CheckWINDOWSGL + CheckWINDOWSGLES CheckDIRECTX # Set up the core platform files @@ -22394,74 +22583,73 @@ fi SDL_LIBS="-lcygwin $SDL_LIBS" fi ;; - *-*-beos* | *-*-haiku*) - ARCH=beos - ac_default_prefix=/boot/common + + *-*-beos*) + as_fn_error $? " +*** BeOS support has been removed as of SDL 2.0.2. + " "$LINENO" 5 + ;; + + *-*-haiku*) + ARCH=haiku + ac_default_prefix=/boot/system CheckDummyVideo CheckDiskAudio CheckDummyAudio - CheckBWINDOW - CheckBeGL + CheckHaikuVideo + CheckHaikuGL + CheckPTHREAD + # Set up files for the audio library if test x$enable_audio = xyes; then -$as_echo "#define SDL_AUDIO_DRIVER_BEOSAUDIO 1" >>confdefs.h +$as_echo "#define SDL_AUDIO_DRIVER_HAIKU 1" >>confdefs.h - SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc" + SOURCES="$SOURCES $srcdir/src/audio/haiku/*.cc" have_audio=yes fi # Set up files for the joystick library if test x$enable_joystick = xyes; then -$as_echo "#define SDL_JOYSTICK_BEOS 1" >>confdefs.h +$as_echo "#define SDL_JOYSTICK_HAIKU 1" >>confdefs.h - SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc" + SOURCES="$SOURCES $srcdir/src/joystick/haiku/*.cc" have_joystick=yes fi - # Set up files for the thread library - if test x$enable_threads = xyes; then - -$as_echo "#define SDL_THREAD_BEOS 1" >>confdefs.h - - SOURCES="$SOURCES $srcdir/src/thread/beos/*.c" - SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c" - SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c" - have_threads=yes - fi # Set up files for the timer library if test x$enable_timers = xyes; then -$as_echo "#define SDL_TIMER_BEOS 1" >>confdefs.h +$as_echo "#define SDL_TIMER_HAIKU 1" >>confdefs.h - SOURCES="$SOURCES $srcdir/src/timer/beos/*.c" + SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c" have_timers=yes fi # Set up files for the shared object loading library if test x$enable_loadso = xyes; then -$as_echo "#define SDL_LOADSO_BEOS 1" >>confdefs.h +$as_echo "#define SDL_LOADSO_HAIKU 1" >>confdefs.h - SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c" + SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c" have_loadso=yes fi # Set up files for the system power library if test x$enable_power = xyes; then -$as_echo "#define SDL_POWER_BEOS 1" >>confdefs.h +$as_echo "#define SDL_POWER_HAIKU 1" >>confdefs.h - SOURCES="$SOURCES $srcdir/src/power/beos/*.c" + SOURCES="$SOURCES $srcdir/src/power/haiku/*.c" have_power=yes fi # Set up files for the system filesystem library if test x$enable_filesystem = xyes; then -$as_echo "#define SDL_FILESYSTEM_BEOS 1" >>confdefs.h +$as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h - SOURCES="$SOURCES $srcdir/src/filesystem/beos/*.cc" + SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc" have_filesystem=yes fi - # The BeOS platform requires special setup. - SOURCES="$srcdir/src/main/beos/*.cc $SOURCES" + # The Haiku platform requires special setup. + SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" ;; arm*-apple-darwin*) @@ -22546,9 +22734,6 @@ $as_echo "#define SDL_FILESYSTEM_BEOS 1" >>confdefs.h CheckOpenGLX11 CheckPTHREAD - # Good optimization on Mac OS X, yes... - EXTRA_CFLAGS="$EXTRA_CFLAGS -falign-loops=16" - # Need this or things might misbuild on a G3. EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL" diff --git a/jni/SDL2-2.0.1/configure.in b/jni/SDL2-2.0.1/configure.in index 5c56f008..17f5d187 100644 --- a/jni/SDL2-2.0.1/configure.in +++ b/jni/SDL2-2.0.1/configure.in @@ -204,19 +204,26 @@ if test x$enable_dependency_tracking = xyes; then fi fi -# Actually this doesn't work on OpenBSD and BeOS -#AC_MSG_CHECKING(for linker option --no-undefined) -#have_no_undefined=no -#save_LDFLAGS="$LDFLAGS" -#LDFLAGS="$LDFLAGS -Wl,--no-undefined" -#AC_TRY_LINK([ -#],[ -#],[ -#have_no_undefined=yes -#EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" -#]) -#LDFLAGS="$save_LDFLAGS" -#AC_MSG_RESULT($have_no_undefined) +AC_MSG_CHECKING(for linker option --no-undefined) +have_no_undefined=no +case "$host" in + dnl Skip this on platforms where it is just simply busted. + *-*-openbsd*) + ;; + + *) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--no-undefined" + AC_TRY_LINK([ + ],[ + ],[ + have_no_undefined=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" + ]) + LDFLAGS="$save_LDFLAGS" + ;; +esac +AC_MSG_RESULT($have_no_undefined) dnl See whether we are allowed to use the system C library AC_ARG_ENABLE(libc, @@ -261,10 +268,10 @@ if test x$enable_libc = xyes; then AC_DEFINE(HAVE_MPROTECT, 1, [ ]) ]), ) - AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname) + AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname) AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"]) - AC_CHECK_FUNCS(atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt) + AC_CHECK_FUNCS(atan atan2 acos asin ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt) AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"]) AC_CHECK_FUNCS(iconv) @@ -319,6 +326,7 @@ SOURCES="$SOURCES $srcdir/src/*.c" SOURCES="$SOURCES $srcdir/src/atomic/*.c" SOURCES="$SOURCES $srcdir/src/audio/*.c" SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c" +SOURCES="$SOURCES $srcdir/src/dynapi/*.c" SOURCES="$SOURCES $srcdir/src/events/*.c" SOURCES="$SOURCES $srcdir/src/file/*.c" SOURCES="$SOURCES $srcdir/src/haptic/*.c" @@ -1097,7 +1105,7 @@ CheckWarnAll() AC_MSG_CHECKING(for necessary GCC -Wno-multichar option) need_gcc_Wno_multichar=no case "$host" in - *-*-beos* | *-*-haiku*) + *-*-haiku*) need_gcc_Wno_multichar=yes ;; esac @@ -1108,6 +1116,43 @@ CheckWarnAll() fi } +dnl Check for Wayland +CheckWayland() +{ + AC_ARG_ENABLE(video-wayland, +AC_HELP_STRING([--enable-video-wayland], [use Wayland video driver [[default=yes]]]), + ,enable_video_wayland=yes) + + AC_ARG_ENABLE(video-wayland-qt-touch, +AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for Wayland video driver [[default=yes]]]), + ,enable_video_wayland_qt_touch=yes) + + if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + AC_MSG_CHECKING(for Wayland support) + video_wayland=no + if test x$PKG_CONFIG != xno; then + if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then + WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor egl xkbcommon` + WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor egl xkbcommon` + video_wayland=yes + fi + fi + AC_MSG_RESULT($video_wayland) + + if test x$video_wayland = xyes; then + AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND, 1, [ ]) + if test x$enable_video_wayland_qt_touch = xyes; then + AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ]) + fi + SOURCES="$SOURCES $srcdir/src/video/wayland/*.c" + EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS" + dnl FIXME do dynamic loading code here. + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $WAYLAND_LIBS" + have_video=yes + fi + fi +} dnl Find the X11 include and library directories CheckX11() @@ -1133,18 +1178,12 @@ AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]), AC_PATH_X AC_PATH_XTRA if test x$have_x = xyes; then - # Only allow dynamically loaded X11 if the X11 function pointers - # will not end up in the global namespace, which causes problems - # with other libraries calling X11 functions. - x11_symbols_private=$have_gcc_fvisibility - AC_ARG_ENABLE(x11-shared, AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]), , enable_x11_shared=maybe) case "$host" in *-*-darwin*) - x11_symbols_private=yes x11_lib='/usr/X11R6/lib/libX11.6.dylib' x11ext_lib='/usr/X11R6/lib/libXext.6.dylib' xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib' @@ -1205,19 +1244,13 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS" if test x$enable_x11_shared = xmaybe; then - enable_x11_shared=$x11_symbols_private + enable_x11_shared=yes fi if test x$have_loadso != xyes && \ test x$enable_x11_shared = xyes; then AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading]) enable_x11_shared=no fi - if test x$x11_symbols_private != xyes && \ - test x$enable_x11_shared = xyes; then - AC_MSG_WARN([You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading]) - enable_x11_shared=no - fi - if test x$have_loadso = xyes && \ test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then echo "-- dynamic libX11 -> $x11_lib" @@ -1474,12 +1507,12 @@ AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[d fi } -dnl Set up the BWindow video driver if enabled -CheckBWINDOW() +dnl Set up the Haiku video driver if enabled +CheckHaikuVideo() { if test x$enable_video = xyes; then - AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc" + AC_DEFINE(SDL_VIDEO_DRIVER_HAIKU, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/video/haiku/*.cc" have_video=yes fi } @@ -1743,12 +1776,49 @@ CheckWINDOWSGL() fi } -dnl Check for BeOS OpenGL -CheckBeGL() +dnl Check for Windows OpenGL +CheckWINDOWSGLES() +{ + if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then + + AC_MSG_CHECKING(for EGL support) + video_opengl_egl=no + AC_TRY_COMPILE([ + #include + ],[ + ],[ + video_opengl_egl=yes + ]) + AC_MSG_RESULT($video_opengl_egl) + if test x$video_opengl_egl = xyes; then + AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ]) + AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ]) + fi + + AC_MSG_CHECKING(for OpenGL ES v2 headers) + video_opengles_v2=no + AC_TRY_COMPILE([ + #include + #include + ],[ + ],[ + video_opengles_v2=yes + ]) + AC_MSG_RESULT($video_opengles_v2) + if test x$video_opengles_v2 = xyes; then + AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ]) + AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ]) + AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ]) + fi + fi +} + +dnl Check for Haiku OpenGL +CheckHaikuGL() { if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then AC_DEFINE(SDL_VIDEO_OPENGL, 1, [ ]) - AC_DEFINE(SDL_VIDEO_OPENGL_BGL, 1, [ ]) + AC_DEFINE(SDL_VIDEO_OPENGL_HAIKU, 1, [ ]) AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ]) EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL" fi @@ -1940,6 +2010,10 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]) pthread_cflags="-D_REENTRANT" pthread_lib="-L/usr/lib -lpthread" ;; + *-*-haiku*) + pthread_cflags="-D_REENTRANT" + pthread_lib="" + ;; *) pthread_cflags="-D_REENTRANT" pthread_lib="-lpthread" @@ -2373,11 +2447,10 @@ case "$host" in # Raspberry Pi ARCH=linux RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux" - RPI_LDFLAGS="-L/opt/vc/lib -lbcm_host" CFLAGS="$CFLAGS $RPI_CFLAGS" SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS" EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS" - SDL_LIBS="$SDL_LIBS $RPI_LDFLAGS" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/vc/lib -lbcm_host -ldl" if test x$enable_video = xyes; then SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c" @@ -2414,6 +2487,7 @@ case "$host" in CheckNAS CheckSNDIO CheckX11 + CheckWayland CheckDirectFB CheckFusionSound CheckOpenGLX11 @@ -2498,8 +2572,8 @@ case "$host" in fi # Set up files for evdev input if test x$use_input_events = xyes; then - SOURCES="$SOURCES $srcdir/src/input/evdev/*.c" - fi + SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev.c" + fi ;; *-*-cygwin* | *-*-mingw32*) ARCH=win32 @@ -2517,6 +2591,7 @@ case "$host" in CheckDummyAudio CheckWINDOWS CheckWINDOWSGL + CheckWINDOWSGLES CheckDIRECTX # Set up the core platform files @@ -2613,60 +2688,62 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau SDL_LIBS="-lcygwin $SDL_LIBS" fi ;; - *-*-beos* | *-*-haiku*) - ARCH=beos - ac_default_prefix=/boot/common + + dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan. + *-*-beos*) + AC_MSG_ERROR([ +*** BeOS support has been removed as of SDL 2.0.2. + ]) + ;; + + *-*-haiku*) + ARCH=haiku + ac_default_prefix=/boot/system CheckDummyVideo CheckDiskAudio CheckDummyAudio - CheckBWINDOW - CheckBeGL + CheckHaikuVideo + CheckHaikuGL + CheckPTHREAD + # Set up files for the audio library if test x$enable_audio = xyes; then - AC_DEFINE(SDL_AUDIO_DRIVER_BEOSAUDIO, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc" + AC_DEFINE(SDL_AUDIO_DRIVER_HAIKU, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/audio/haiku/*.cc" have_audio=yes fi # Set up files for the joystick library if test x$enable_joystick = xyes; then - AC_DEFINE(SDL_JOYSTICK_BEOS, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc" + AC_DEFINE(SDL_JOYSTICK_HAIKU, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/joystick/haiku/*.cc" have_joystick=yes fi - # Set up files for the thread library - if test x$enable_threads = xyes; then - AC_DEFINE(SDL_THREAD_BEOS, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/thread/beos/*.c" - SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c" - SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c" - have_threads=yes - fi # Set up files for the timer library if test x$enable_timers = xyes; then - AC_DEFINE(SDL_TIMER_BEOS, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/timer/beos/*.c" + AC_DEFINE(SDL_TIMER_HAIKU, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/timer/haiku/*.c" have_timers=yes fi # Set up files for the shared object loading library if test x$enable_loadso = xyes; then - AC_DEFINE(SDL_LOADSO_BEOS, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c" + AC_DEFINE(SDL_LOADSO_HAIKU, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/loadso/haiku/*.c" have_loadso=yes fi # Set up files for the system power library if test x$enable_power = xyes; then - AC_DEFINE(SDL_POWER_BEOS, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/power/beos/*.c" + AC_DEFINE(SDL_POWER_HAIKU, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/power/haiku/*.c" have_power=yes fi # Set up files for the system filesystem library if test x$enable_filesystem = xyes; then - AC_DEFINE(SDL_FILESYSTEM_BEOS, 1, [ ]) - SOURCES="$SOURCES $srcdir/src/filesystem/beos/*.cc" + AC_DEFINE(SDL_FILESYSTEM_HAIKU, 1, [ ]) + SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc" have_filesystem=yes fi - # The BeOS platform requires special setup. - SOURCES="$srcdir/src/main/beos/*.cc $SOURCES" + # The Haiku platform requires special setup. + SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES" EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" ;; arm*-apple-darwin*) @@ -2751,9 +2828,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau CheckOpenGLX11 CheckPTHREAD - # Good optimization on Mac OS X, yes... - EXTRA_CFLAGS="$EXTRA_CFLAGS -falign-loops=16" - # Need this or things might misbuild on a G3. EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL" diff --git a/jni/SDL2-2.0.1/debian/rules b/jni/SDL2-2.0.1/debian/rules index 3f4d8e62..4bde8f32 100755 --- a/jni/SDL2-2.0.1/debian/rules +++ b/jni/SDL2-2.0.1/debian/rules @@ -33,8 +33,8 @@ override_dh_installexamples: dh_installexamples --remaining-packages override_dh_link: - # to address lintian warning - # W: libsdl2-2.0-0: dev-pkg-without-shlib-symlink usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.0.0 usr/lib/x86_64-linux-gnu/libSDL2-2.0.so + # to address lintian warning + # W: libsdl2-2.0-0: dev-pkg-without-shlib-symlink usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.0.0 usr/lib/x86_64-linux-gnu/libSDL2-2.0.so dh_link -plibsdl2-dev usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so.0.0.0 usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so override_dh_strip: diff --git a/jni/SDL2-2.0.1/include/SDL_atomic.h b/jni/SDL2-2.0.1/include/SDL_atomic.h index 48b0053a..43ba7543 100644 --- a/jni/SDL2-2.0.1/include/SDL_atomic.h +++ b/jni/SDL2-2.0.1/include/SDL_atomic.h @@ -64,13 +64,6 @@ #include "begin_code.h" -/* Need to do this here because intrin.h has C++ code in it */ -/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */ -#if defined(_MSC_VER) && (_MSC_VER >= 1500) -#include -#define HAVE_MSC_ATOMICS 1 -#endif - /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { @@ -181,57 +174,11 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire(); #define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier() #endif - -/* Platform specific optimized versions of the atomic functions, - * you can disable these by defining SDL_DISABLE_ATOMIC_INLINE - */ -#if defined(SDL_ATOMIC_DISABLED) && SDL_ATOMIC_DISABLED -#define SDL_DISABLE_ATOMIC_INLINE -#endif -#ifndef SDL_DISABLE_ATOMIC_INLINE - -#ifdef HAVE_MSC_ATOMICS - -#define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v)) -#define SDL_AtomicAdd(a, v) _InterlockedExchangeAdd((long*)&(a)->value, (v)) -#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange((long*)&(a)->value, (newval), (oldval)) == (oldval)) -#define SDL_AtomicSetPtr(a, v) _InterlockedExchangePointer((a), (v)) -#if _M_IX86 -#define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchange((long*)(a), (long)(newval), (long)(oldval)) == (long)(oldval)) -#else -#define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchangePointer((a), (newval), (oldval)) == (oldval)) -#endif - -#elif defined(__MACOSX__) -#include - -#define SDL_AtomicCAS(a, oldval, newval) OSAtomicCompareAndSwap32Barrier((oldval), (newval), &(a)->value) -#ifdef __LP64__ -#define SDL_AtomicCASPtr(a, oldval, newval) OSAtomicCompareAndSwap64Barrier((int64_t)(oldval), (int64_t)(newval), (int64_t*)(a)) -#else -#define SDL_AtomicCASPtr(a, oldval, newval) OSAtomicCompareAndSwap32Barrier((int32_t)(oldval), (int32_t)(newval), (int32_t*)(a)) -#endif - -#elif defined(HAVE_GCC_ATOMICS) - -#define SDL_AtomicSet(a, v) __sync_lock_test_and_set(&(a)->value, v) -#define SDL_AtomicAdd(a, v) __sync_fetch_and_add(&(a)->value, v) -#define SDL_AtomicSetPtr(a, v) __sync_lock_test_and_set(a, v) -#define SDL_AtomicCAS(a, oldval, newval) __sync_bool_compare_and_swap(&(a)->value, oldval, newval) -#define SDL_AtomicCASPtr(a, oldval, newval) __sync_bool_compare_and_swap(a, oldval, newval) - -#endif - -#endif /* !SDL_DISABLE_ATOMIC_INLINE */ - - /** * \brief A type representing an atomic integer value. It is a struct * so people don't accidentally use numeric operations on it. */ -#ifndef SDL_atomic_t_defined typedef struct { int value; } SDL_atomic_t; -#endif /** * \brief Set an atomic variable to a new value if it is currently an old value. @@ -240,37 +187,19 @@ typedef struct { int value; } SDL_atomic_t; * * \note If you don't know what this function is for, you shouldn't use it! */ -#ifndef SDL_AtomicCAS extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval); -#endif /** * \brief Set an atomic variable to a value. * * \return The previous value of the atomic variable. */ -#ifndef SDL_AtomicSet -SDL_FORCE_INLINE int SDL_AtomicSet(SDL_atomic_t *a, int v) -{ - int value; - do { - value = a->value; - } while (!SDL_AtomicCAS(a, value, v)); - return value; -} -#endif +extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v); /** * \brief Get the value of an atomic variable */ -#ifndef SDL_AtomicGet -SDL_FORCE_INLINE int SDL_AtomicGet(SDL_atomic_t *a) -{ - int value = a->value; - SDL_CompilerBarrier(); - return value; -} -#endif +extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a); /** * \brief Add to an atomic variable. @@ -279,16 +208,7 @@ SDL_FORCE_INLINE int SDL_AtomicGet(SDL_atomic_t *a) * * \note This same style can be used for any number operation */ -#ifndef SDL_AtomicAdd -SDL_FORCE_INLINE int SDL_AtomicAdd(SDL_atomic_t *a, int v) -{ - int value; - do { - value = a->value; - } while (!SDL_AtomicCAS(a, value, (value + v))); - return value; -} -#endif +extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v); /** * \brief Increment an atomic variable used as a reference count. @@ -314,38 +234,19 @@ SDL_FORCE_INLINE int SDL_AtomicAdd(SDL_atomic_t *a, int v) * * \note If you don't know what this function is for, you shouldn't use it! */ -#ifndef SDL_AtomicCASPtr -extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void* *a, void *oldval, void *newval); -#endif +extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval); /** * \brief Set a pointer to a value atomically. * * \return The previous value of the pointer. */ -#ifndef SDL_AtomicSetPtr -SDL_FORCE_INLINE void* SDL_AtomicSetPtr(void* *a, void* v) -{ - void* value; - do { - value = *a; - } while (!SDL_AtomicCASPtr(a, value, v)); - return value; -} -#endif +extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v); /** * \brief Get the value of a pointer atomically. */ -#ifndef SDL_AtomicGetPtr -SDL_FORCE_INLINE void* SDL_AtomicGetPtr(void* *a) -{ - void* value = *a; - SDL_CompilerBarrier(); - return value; -} -#endif - +extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/jni/SDL2-2.0.1/include/SDL_config.h b/jni/SDL2-2.0.1/include/SDL_config.h index 7440940a..4d74bab7 100644 --- a/jni/SDL2-2.0.1/include/SDL_config.h +++ b/jni/SDL2-2.0.1/include/SDL_config.h @@ -29,7 +29,9 @@ */ /* Add any platform that doesn't build using the configure system. */ -#if defined(__WIN32__) +#ifdef USING_PREMAKE_CONFIG_H +#include "SDL_config_premake.h" +#elif defined(__WIN32__) #include "SDL_config_windows.h" #elif defined(__MACOSX__) #include "SDL_config_macosx.h" diff --git a/jni/SDL2-2.0.1/include/SDL_config.h.cmake b/jni/SDL2-2.0.1/include/SDL_config.h.cmake index 66107e49..e4f9f99f 100644 --- a/jni/SDL2-2.0.1/include/SDL_config.h.cmake +++ b/jni/SDL2-2.0.1/include/SDL_config.h.cmake @@ -124,12 +124,13 @@ #cmakedefine HAVE_STRCASECMP 1 #cmakedefine HAVE__STRNICMP 1 #cmakedefine HAVE_STRNCASECMP 1 -#cmakedefine HAVE_SSCANF 1 -#cmakedefine HAVE_SNPRINTF 1 +#cmakedefine HAVE_VSSCANF 1 #cmakedefine HAVE_VSNPRINTF 1 #cmakedefine HAVE_M_PI 1 #cmakedefine HAVE_ATAN 1 #cmakedefine HAVE_ATAN2 1 +#cmakedefine HAVE_ACOS 1 +#cmakedefine HAVE_ASIN 1 #cmakedefine HAVE_CEIL 1 #cmakedefine HAVE_COPYSIGN 1 #cmakedefine HAVE_COS 1 @@ -191,7 +192,7 @@ #cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@ #cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@ #cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@ -#cmakedefine SDL_AUDIO_DRIVER_BEOSAUDIO @SDL_AUDIO_DRIVER_BEOSAUDIO@ +#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@ #cmakedefine SDL_AUDIO_DRIVER_BSD @SDL_AUDIO_DRIVER_BSD@ #cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@ #cmakedefine SDL_AUDIO_DRIVER_DISK @SDL_AUDIO_DRIVER_DISK@ @@ -215,8 +216,9 @@ /* Enable various input drivers */ #cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@ +#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@ #cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@ -#cmakedefine SDL_JOYSTICK_BEOS @SDL_JOYSTICK_BEOS@ +#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@ #cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@ #cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@ #cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@ @@ -230,33 +232,33 @@ #cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@ /* Enable various shared object loading systems */ -#cmakedefine SDL_LOADSO_BEOS @SDL_LOADSO_BEOS@ +#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@ #cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@ #cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@ #cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@ #cmakedefine SDL_LOADSO_WINDOWS @SDL_LOADSO_WINDOWS@ /* Enable various threading systems */ -#cmakedefine SDL_THREAD_BEOS @SDL_THREAD_BEOS@ #cmakedefine SDL_THREAD_PTHREAD @SDL_THREAD_PTHREAD@ #cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX@ #cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP@ #cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@ /* Enable various timer systems */ -#cmakedefine SDL_TIMER_BEOS @SDL_TIMER_BEOS@ +#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@ #cmakedefine SDL_TIMER_DUMMY @SDL_TIMER_DUMMY@ #cmakedefine SDL_TIMER_UNIX @SDL_TIMER_UNIX@ #cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@ #cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@ /* Enable various video drivers */ -#cmakedefine SDL_VIDEO_DRIVER_BWINDOW @SDL_VIDEO_DRIVER_BWINDOW@ +#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@ #cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@ #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@ #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@ #cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ #cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ +#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ #cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@ #cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@ #cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@ @@ -301,11 +303,11 @@ #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ -#cmakedefine SDL_POWER_BEOS @SDL_POWER_BEOS@ +#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ #cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@ /* Enable system filesystem support */ -#cmakedefine SDL_FILESYSTEM_BEOS @SDL_FILESYSTEM_BEOS@ +#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@ #cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@ #cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@ #cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@ diff --git a/jni/SDL2-2.0.1/include/SDL_config.h.in b/jni/SDL2-2.0.1/include/SDL_config.h.in index b2daf6fa..e96bdfaa 100644 --- a/jni/SDL2-2.0.1/include/SDL_config.h.in +++ b/jni/SDL2-2.0.1/include/SDL_config.h.in @@ -128,11 +128,14 @@ #undef HAVE__STRNICMP #undef HAVE_STRNCASECMP #undef HAVE_SSCANF +#undef HAVE_VSSCANF #undef HAVE_SNPRINTF #undef HAVE_VSNPRINTF #undef HAVE_M_PI #undef HAVE_ATAN #undef HAVE_ATAN2 +#undef HAVE_ACOS +#undef HAVE_ASIN #undef HAVE_CEIL #undef HAVE_COPYSIGN #undef HAVE_COS @@ -193,7 +196,7 @@ #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC #undef SDL_AUDIO_DRIVER_PULSEAUDIO #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC -#undef SDL_AUDIO_DRIVER_BEOSAUDIO +#undef SDL_AUDIO_DRIVER_HAIKU #undef SDL_AUDIO_DRIVER_BSD #undef SDL_AUDIO_DRIVER_COREAUDIO #undef SDL_AUDIO_DRIVER_DISK @@ -219,7 +222,7 @@ #undef SDL_INPUT_LINUXEV #undef SDL_INPUT_LINUXKD #undef SDL_INPUT_TSLIB -#undef SDL_JOYSTICK_BEOS +#undef SDL_JOYSTICK_HAIKU #undef SDL_JOYSTICK_DINPUT #undef SDL_JOYSTICK_DUMMY #undef SDL_JOYSTICK_IOKIT @@ -233,32 +236,33 @@ #undef SDL_HAPTIC_DINPUT /* Enable various shared object loading systems */ -#undef SDL_LOADSO_BEOS +#undef SDL_LOADSO_HAIKU #undef SDL_LOADSO_DLOPEN #undef SDL_LOADSO_DUMMY #undef SDL_LOADSO_LDG #undef SDL_LOADSO_WINDOWS /* Enable various threading systems */ -#undef SDL_THREAD_BEOS #undef SDL_THREAD_PTHREAD #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP #undef SDL_THREAD_WINDOWS /* Enable various timer systems */ -#undef SDL_TIMER_BEOS +#undef SDL_TIMER_HAIKU #undef SDL_TIMER_DUMMY #undef SDL_TIMER_UNIX #undef SDL_TIMER_WINDOWS /* Enable various video drivers */ -#undef SDL_VIDEO_DRIVER_BWINDOW +#undef SDL_VIDEO_DRIVER_HAIKU #undef SDL_VIDEO_DRIVER_COCOA #undef SDL_VIDEO_DRIVER_DIRECTFB #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC #undef SDL_VIDEO_DRIVER_DUMMY #undef SDL_VIDEO_DRIVER_WINDOWS +#undef SDL_VIDEO_DRIVER_WAYLAND +#undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH #undef SDL_VIDEO_DRIVER_X11 #undef SDL_VIDEO_DRIVER_RPI #undef SDL_VIDEO_DRIVER_X11_DYNAMIC @@ -304,11 +308,11 @@ #undef SDL_POWER_LINUX #undef SDL_POWER_WINDOWS #undef SDL_POWER_MACOSX -#undef SDL_POWER_BEOS +#undef SDL_POWER_HAIKU #undef SDL_POWER_HARDWIRED /* Enable system filesystem support */ -#undef SDL_FILESYSTEM_BEOS +#undef SDL_FILESYSTEM_HAIKU #undef SDL_FILESYSTEM_COCOA #undef SDL_FILESYSTEM_DUMMY #undef SDL_FILESYSTEM_UNIX diff --git a/jni/SDL2-2.0.1/include/SDL_config_android.h b/jni/SDL2-2.0.1/include/SDL_config_android.h index 0826415c..d9bd9d1c 100644 --- a/jni/SDL2-2.0.1/include/SDL_config_android.h +++ b/jni/SDL2-2.0.1/include/SDL_config_android.h @@ -81,12 +81,13 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 +#define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_M_PI 1 #define HAVE_ATAN 1 #define HAVE_ATAN2 1 +#define HAVE_ACOS 1 +#define HAVE_ASIN 1 #define HAVE_CEIL 1 #define HAVE_COPYSIGN 1 #define HAVE_COS 1 @@ -129,6 +130,7 @@ /* Enable OpenGL ES */ #define SDL_VIDEO_OPENGL_ES 1 +#define SDL_VIDEO_OPENGL_ES2 1 #define SDL_VIDEO_OPENGL_EGL 1 #define SDL_VIDEO_RENDER_OGL_ES 1 #define SDL_VIDEO_RENDER_OGL_ES2 1 diff --git a/jni/SDL2-2.0.1/include/SDL_config_iphoneos.h b/jni/SDL2-2.0.1/include/SDL_config_iphoneos.h index ade29661..348df13c 100644 --- a/jni/SDL2-2.0.1/include/SDL_config_iphoneos.h +++ b/jni/SDL2-2.0.1/include/SDL_config_iphoneos.h @@ -79,12 +79,13 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 +#define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_M_PI 1 #define HAVE_ATAN 1 #define HAVE_ATAN2 1 +#define HAVE_ACOS 1 +#define HAVE_ASIN 1 #define HAVE_CEIL 1 #define HAVE_COPYSIGN 1 #define HAVE_COS 1 diff --git a/jni/SDL2-2.0.1/include/SDL_config_macosx.h b/jni/SDL2-2.0.1/include/SDL_config_macosx.h index 9f2f76e3..1db36464 100644 --- a/jni/SDL2-2.0.1/include/SDL_config_macosx.h +++ b/jni/SDL2-2.0.1/include/SDL_config_macosx.h @@ -82,8 +82,7 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 +#define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_CEIL 1 #define HAVE_COPYSIGN 1 @@ -104,6 +103,8 @@ #define HAVE_SYSCTLBYNAME 1 #define HAVE_ATAN 1 #define HAVE_ATAN2 1 +#define HAVE_ACOS 1 +#define HAVE_ASIN 1 /* Enable various audio drivers */ #define SDL_AUDIO_DRIVER_COREAUDIO 1 diff --git a/jni/SDL2-2.0.1/include/SDL_config_pandora.h b/jni/SDL2-2.0.1/include/SDL_config_pandora.h index 4bfad486..4a95de78 100644 --- a/jni/SDL2-2.0.1/include/SDL_config_pandora.h +++ b/jni/SDL2-2.0.1/include/SDL_config_pandora.h @@ -81,8 +81,7 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 +#define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_M_PI 1 #define HAVE_CEIL 1 diff --git a/jni/SDL2-2.0.1/include/SDL_config_psp.h b/jni/SDL2-2.0.1/include/SDL_config_psp.h index 31ac2b2b..ca7cac60 100644 --- a/jni/SDL2-2.0.1/include/SDL_config_psp.h +++ b/jni/SDL2-2.0.1/include/SDL_config_psp.h @@ -79,12 +79,13 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 +#define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_M_PI 1 #define HAVE_ATAN 1 #define HAVE_ATAN2 1 +#define HAVE_ACOS 1 +#define HAVE_ASIN 1 #define HAVE_CEIL 1 #define HAVE_COPYSIGN 1 #define HAVE_COS 1 diff --git a/jni/SDL2-2.0.1/include/SDL_config_windows.h b/jni/SDL2-2.0.1/include/SDL_config_windows.h index 4d5c7c29..167e26a6 100644 --- a/jni/SDL2-2.0.1/include/SDL_config_windows.h +++ b/jni/SDL2-2.0.1/include/SDL_config_windows.h @@ -118,6 +118,8 @@ typedef unsigned int uintptr_t; #define HAVE__STRNICMP 1 #define HAVE_ATAN 1 #define HAVE_ATAN2 1 +#define HAVE_ACOS 1 +#define HAVE_ASIN 1 #define HAVE_CEIL 1 #define HAVE_COS 1 #define HAVE_COSF 1 @@ -130,7 +132,7 @@ typedef unsigned int uintptr_t; #define HAVE_SQRT 1 #if _MSC_VER >= 1800 #define HAVE_STRTOLL 1 -#define HAVE_SSCANF 1 +#define HAVE_VSSCANF 1 #define HAVE_COPYSIGN 1 #define HAVE_SCALBN 1 #endif @@ -180,6 +182,16 @@ typedef unsigned int uintptr_t; #ifndef SDL_VIDEO_RENDER_OGL #define SDL_VIDEO_RENDER_OGL 1 #endif +#ifndef SDL_VIDEO_RENDER_OGL_ES2 +#define SDL_VIDEO_RENDER_OGL_ES2 1 +#endif +#ifndef SDL_VIDEO_OPENGL_ES2 +#define SDL_VIDEO_OPENGL_ES2 1 +#endif +#ifndef SDL_VIDEO_OPENGL_EGL +#define SDL_VIDEO_OPENGL_EGL 1 +#endif + /* Enable system power support */ #define SDL_POWER_WINDOWS 1 diff --git a/jni/SDL2-2.0.1/include/SDL_config_wiz.h b/jni/SDL2-2.0.1/include/SDL_config_wiz.h index 9be04d92..acfe4fcf 100644 --- a/jni/SDL2-2.0.1/include/SDL_config_wiz.h +++ b/jni/SDL2-2.0.1/include/SDL_config_wiz.h @@ -75,8 +75,7 @@ #define HAVE_STRNCMP 1 #define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 +#define HAVE_VSSCANF 1 #define HAVE_VSNPRINTF 1 #define HAVE_M_PI 1 #define HAVE_CEIL 1 diff --git a/jni/SDL2-2.0.1/include/SDL_egl.h b/jni/SDL2-2.0.1/include/SDL_egl.h new file mode 100644 index 00000000..fc8fde4a --- /dev/null +++ b/jni/SDL2-2.0.1/include/SDL_egl.h @@ -0,0 +1,1389 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/** + * \file SDL_opengles.h + * + * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. + */ +#ifndef _MSC_VER + +#include + +#else /* _MSC_VER */ + +/* EGL headers for Visual Studio */ + +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. +* +* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ +* +* Adopters may modify this file to suit their platform. Adopters are +* encouraged to submit platform specific modifications to the Khronos +* group so that they can be included in future versions of this file. +* Please submit changes by sending them to the public Khronos Bugzilla +* (http://khronos.org/bugzilla) by filing a bug against product +* "Khronos (general)" component "Registry". +* +* A predefined template which fills in some of the bug fields can be +* reached using http://tinyurl.com/khrplatform-h-bugreport, but you +* must create a Bugzilla login first. +* +* +* See the Implementer's Guidelines for information about where this file +* should be located on your system and for more details of its use: +* http://www.khronos.org/registry/implementers_guide.pdf +* +* This file should be included as +* #include +* by Khronos client API header files that use its types and defines. +* +* The types in khrplatform.h should only be used to define API-specific types. +* +* Types defined in khrplatform.h: +* khronos_int8_t signed 8 bit +* khronos_uint8_t unsigned 8 bit +* khronos_int16_t signed 16 bit +* khronos_uint16_t unsigned 16 bit +* khronos_int32_t signed 32 bit +* khronos_uint32_t unsigned 32 bit +* khronos_int64_t signed 64 bit +* khronos_uint64_t unsigned 64 bit +* khronos_intptr_t signed same number of bits as a pointer +* khronos_uintptr_t unsigned same number of bits as a pointer +* khronos_ssize_t signed size +* khronos_usize_t unsigned size +* khronos_float_t signed 32 bit floating point +* khronos_time_ns_t unsigned 64 bit time in nanoseconds +* khronos_utime_nanoseconds_t unsigned time interval or absolute time in +* nanoseconds +* khronos_stime_nanoseconds_t signed time interval in nanoseconds +* khronos_boolean_enum_t enumerated boolean type. This should +* only be used as a base type when a client API's boolean type is +* an enum. Client APIs which use an integer or other type for +* booleans cannot use this as the base type for their boolean. +* +* Tokens defined in khrplatform.h: +* +* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. +* +* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. +* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. +* +* Calling convention macros defined in this file: +* KHRONOS_APICALL +* KHRONOS_APIENTRY +* KHRONOS_APIATTRIBUTES +* +* These may be used in function prototypes as: +* +* KHRONOS_APICALL void KHRONOS_APIENTRY funcname( +* int arg1, +* int arg2) KHRONOS_APIATTRIBUTES; +*/ + +/*------------------------------------------------------------------------- +* Definition of KHRONOS_APICALL +*------------------------------------------------------------------------- +* This precedes the return type of the function in the function prototype. +*/ +#if defined(_WIN32) && !defined(__SCITECH_SNAP__) +# define KHRONOS_APICALL __declspec(dllimport) +#elif defined (__SYMBIAN32__) +# define KHRONOS_APICALL IMPORT_C +#else +# define KHRONOS_APICALL +#endif + +/*------------------------------------------------------------------------- +* Definition of KHRONOS_APIENTRY +*------------------------------------------------------------------------- +* This follows the return type of the function and precedes the function +* name in the function prototype. +*/ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) +/* Win32 but not WinCE */ +# define KHRONOS_APIENTRY __stdcall +#else +# define KHRONOS_APIENTRY +#endif + +/*------------------------------------------------------------------------- +* Definition of KHRONOS_APIATTRIBUTES +*------------------------------------------------------------------------- +* This follows the closing parenthesis of the function prototype arguments. +*/ +#if defined (__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- +* basic type definitions +*-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + + +/* +* Using +*/ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__VMS ) || defined(__sgi) + +/* +* Using +*/ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* +* Win32 +*/ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* +* Sun or Digital +*/ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* +* Hypothetical platform with no float or int64 support +*/ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* +* Generic fallback +*/ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* +* Types that are (so far) the same on all platforms +*/ +typedef signed char khronos_int8_t; +typedef unsigned char khronos_uint8_t; +typedef signed short int khronos_int16_t; +typedef unsigned short int khronos_uint16_t; + +/* +* Types that differ between LLP64 and LP64 architectures - in LLP64, +* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears +* to be the only LLP64 architecture in current use. +*/ +#ifdef _WIN64 +typedef signed long long int khronos_intptr_t; +typedef unsigned long long int khronos_uintptr_t; +typedef signed long long int khronos_ssize_t; +typedef unsigned long long int khronos_usize_t; +#else +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; +#endif + +#if KHRONOS_SUPPORT_FLOAT +/* +* Float type +*/ +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +/* Time types +* +* These types can be used to represent a time interval in nanoseconds or +* an absolute Unadjusted System Time. Unadjusted System Time is the number +* of nanoseconds since some arbitrary system event (e.g. since the last +* time the system booted). The Unadjusted System Time is an unsigned +* 64 bit value that wraps back to 0 every 584 years. Time intervals +* may be either signed or unsigned. +*/ +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +/* +* Dummy value used to pad enum types to 32 bits. +*/ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* +* Enumerated boolean type +* +* Values other than zero should be considered to be true. Therefore +* comparisons should not be made against KHRONOS_TRUE. +*/ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + +#endif /* __khrplatform_h_ */ + + +#ifndef __eglplatform_h_ +#define __eglplatform_h_ + +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Platform-specific types and definitions for egl.h +* $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ +* +* Adopters may modify khrplatform.h and this file to suit their platform. +* You are encouraged to submit all modifications to the Khronos group so that +* they can be included in future versions of this file. Please submit changes +* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) +* by filing a bug against product "EGL" component "Registry". +*/ + +/*#include */ + +/* Macros used in EGL function prototype declarations. +* +* EGL functions should be prototyped as: +* +* EGLAPI return-type EGLAPIENTRY eglFunction(arguments); +* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); +* +* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h +*/ + +#ifndef EGLAPI +#define EGLAPI KHRONOS_APICALL +#endif + +#ifndef EGLAPIENTRY +#define EGLAPIENTRY KHRONOS_APIENTRY +#endif +#define EGLAPIENTRYP EGLAPIENTRY* + +/* The types NativeDisplayType, NativeWindowType, and NativePixmapType +* are aliases of window-system-dependent types, such as X Display * or +* Windows Device Context. They must be defined in platform-specific +* code below. The EGL-prefixed versions of Native*Type are the same +* types, renamed in EGL 1.3 so all types in the API start with "EGL". +* +* Khronos STRONGLY RECOMMENDS that you use the default definitions +* provided below, since these changes affect both binary and source +* portability of applications using EGL running on different EGL +* implementations. +*/ + +#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include + +typedef HDC EGLNativeDisplayType; +typedef HBITMAP EGLNativePixmapType; +typedef HWND EGLNativeWindowType; + +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ + +typedef int EGLNativeDisplayType; +typedef void *EGLNativeWindowType; +typedef void *EGLNativePixmapType; + +#elif defined(WL_EGL_PLATFORM) + +typedef struct wl_display *EGLNativeDisplayType; +typedef struct wl_egl_pixmap *EGLNativePixmapType; +typedef struct wl_egl_window *EGLNativeWindowType; + +#elif defined(__GBM__) + +typedef struct gbm_device *EGLNativeDisplayType; +typedef struct gbm_bo *EGLNativePixmapType; +typedef void *EGLNativeWindowType; + +#elif defined(ANDROID) /* Android */ + +struct ANativeWindow; +struct egl_native_pixmap_t; + +typedef struct ANativeWindow *EGLNativeWindowType; +typedef struct egl_native_pixmap_t *EGLNativePixmapType; +typedef void *EGLNativeDisplayType; + +#elif defined(MIR_EGL_PLATFORM) + +#include +typedef MirEGLNativeDisplayType EGLNativeDisplayType; +typedef void *EGLNativePixmapType; +typedef MirEGLNativeWindowType EGLNativeWindowType; + +#elif defined(__unix__) + +#ifdef MESA_EGL_NO_X11_HEADERS + +typedef void *EGLNativeDisplayType; +typedef khronos_uintptr_t EGLNativePixmapType; +typedef khronos_uintptr_t EGLNativeWindowType; + +#else + +/* X11 (tentative) */ +#include +#include + +typedef Display *EGLNativeDisplayType; +typedef Pixmap EGLNativePixmapType; +typedef Window EGLNativeWindowType; + +#endif /* MESA_EGL_NO_X11_HEADERS */ + +#else +#error "Platform not recognized" +#endif + +/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ +typedef EGLNativeDisplayType NativeDisplayType; +typedef EGLNativePixmapType NativePixmapType; +typedef EGLNativeWindowType NativeWindowType; + + +/* Define EGLint. This must be a signed integral type large enough to contain +* all legal attribute names and values passed into and out of EGL, whether +* their type is boolean, bitmask, enumerant (symbolic constant), integer, +* handle, or other. While in general a 32-bit integer will suffice, if +* handles are 64 bit types, then EGLint should be defined as a signed 64-bit +* integer type. +*/ +typedef khronos_int32_t EGLint; + +#endif /* __eglplatform_h */ + +/* -*- mode: c; tab-width: 8; -*- */ +/* vi: set sw=4 ts=8: */ +/* Reference version of egl.h for EGL 1.4. +* $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ +*/ + +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#ifndef __egl_h_ +#define __egl_h_ + +/* All platform-dependent types and macro boilerplate (such as EGLAPI +* and EGLAPIENTRY) should go in eglplatform.h. +*/ +/*#include */ + +#ifdef __cplusplus +extern "C" { +#endif + + /* EGL Types */ + /* EGLint is defined in eglplatform.h */ + typedef unsigned int EGLBoolean; + typedef unsigned int EGLenum; + typedef void *EGLConfig; + typedef void *EGLContext; + typedef void *EGLDisplay; + typedef void *EGLSurface; + typedef void *EGLClientBuffer; + + /* EGL Versioning */ +#define EGL_VERSION_1_0 1 +#define EGL_VERSION_1_1 1 +#define EGL_VERSION_1_2 1 +#define EGL_VERSION_1_3 1 +#define EGL_VERSION_1_4 1 + + /* EGL Enumerants. Bitmasks and other exceptional cases aside, most + * enums are assigned unique values starting at 0x3000. + */ + + /* EGL aliases */ +#define EGL_FALSE 0 +#define EGL_TRUE 1 + + /* Out-of-band handle values */ +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +#define EGL_NO_CONTEXT ((EGLContext)0) +#define EGL_NO_DISPLAY ((EGLDisplay)0) +#define EGL_NO_SURFACE ((EGLSurface)0) + + /* Out-of-band attribute value */ +#define EGL_DONT_CARE ((EGLint)-1) + + /* Errors / GetError return values */ +#define EGL_SUCCESS 0x3000 +#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_BAD_ACCESS 0x3002 +#define EGL_BAD_ALLOC 0x3003 +#define EGL_BAD_ATTRIBUTE 0x3004 +#define EGL_BAD_CONFIG 0x3005 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_MATCH 0x3009 +#define EGL_BAD_NATIVE_PIXMAP 0x300A +#define EGL_BAD_NATIVE_WINDOW 0x300B +#define EGL_BAD_PARAMETER 0x300C +#define EGL_BAD_SURFACE 0x300D +#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */ + + /* Reserved 0x300F-0x301F for additional errors */ + + /* Config attributes */ +#define EGL_BUFFER_SIZE 0x3020 +#define EGL_ALPHA_SIZE 0x3021 +#define EGL_BLUE_SIZE 0x3022 +#define EGL_GREEN_SIZE 0x3023 +#define EGL_RED_SIZE 0x3024 +#define EGL_DEPTH_SIZE 0x3025 +#define EGL_STENCIL_SIZE 0x3026 +#define EGL_CONFIG_CAVEAT 0x3027 +#define EGL_CONFIG_ID 0x3028 +#define EGL_LEVEL 0x3029 +#define EGL_MAX_PBUFFER_HEIGHT 0x302A +#define EGL_MAX_PBUFFER_PIXELS 0x302B +#define EGL_MAX_PBUFFER_WIDTH 0x302C +#define EGL_NATIVE_RENDERABLE 0x302D +#define EGL_NATIVE_VISUAL_ID 0x302E +#define EGL_NATIVE_VISUAL_TYPE 0x302F +#define EGL_SAMPLES 0x3031 +#define EGL_SAMPLE_BUFFERS 0x3032 +#define EGL_SURFACE_TYPE 0x3033 +#define EGL_TRANSPARENT_TYPE 0x3034 +#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 +#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 +#define EGL_TRANSPARENT_RED_VALUE 0x3037 +#define EGL_NONE 0x3038 /* Attrib list terminator */ +#define EGL_BIND_TO_TEXTURE_RGB 0x3039 +#define EGL_BIND_TO_TEXTURE_RGBA 0x303A +#define EGL_MIN_SWAP_INTERVAL 0x303B +#define EGL_MAX_SWAP_INTERVAL 0x303C +#define EGL_LUMINANCE_SIZE 0x303D +#define EGL_ALPHA_MASK_SIZE 0x303E +#define EGL_COLOR_BUFFER_TYPE 0x303F +#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */ +#define EGL_CONFORMANT 0x3042 + + /* Reserved 0x3041-0x304F for additional config attributes */ + + /* Config attribute values */ +#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ +#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */ +#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ +#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */ +#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */ + + /* More config attribute values, for EGL_TEXTURE_FORMAT */ +#define EGL_NO_TEXTURE 0x305C +#define EGL_TEXTURE_RGB 0x305D +#define EGL_TEXTURE_RGBA 0x305E +#define EGL_TEXTURE_2D 0x305F + + /* Config attribute mask bits */ +#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */ + +#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ + + /* QueryString targets */ +#define EGL_VENDOR 0x3053 +#define EGL_VERSION 0x3054 +#define EGL_EXTENSIONS 0x3055 +#define EGL_CLIENT_APIS 0x308D + + /* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */ +#define EGL_HEIGHT 0x3056 +#define EGL_WIDTH 0x3057 +#define EGL_LARGEST_PBUFFER 0x3058 +#define EGL_TEXTURE_FORMAT 0x3080 +#define EGL_TEXTURE_TARGET 0x3081 +#define EGL_MIPMAP_TEXTURE 0x3082 +#define EGL_MIPMAP_LEVEL 0x3083 +#define EGL_RENDER_BUFFER 0x3086 +#define EGL_VG_COLORSPACE 0x3087 +#define EGL_VG_ALPHA_FORMAT 0x3088 +#define EGL_HORIZONTAL_RESOLUTION 0x3090 +#define EGL_VERTICAL_RESOLUTION 0x3091 +#define EGL_PIXEL_ASPECT_RATIO 0x3092 +#define EGL_SWAP_BEHAVIOR 0x3093 +#define EGL_MULTISAMPLE_RESOLVE 0x3099 + + /* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ +#define EGL_BACK_BUFFER 0x3084 +#define EGL_SINGLE_BUFFER 0x3085 + + /* OpenVG color spaces */ +#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */ +#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */ + + /* OpenVG alpha formats */ +#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */ +#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */ + + /* Constant scale factor by which fractional display resolutions & + * aspect ratio are scaled when queried as integer values. + */ +#define EGL_DISPLAY_SCALING 10000 + + /* Unknown display resolution/aspect ratio */ +#define EGL_UNKNOWN ((EGLint)-1) + + /* Back buffer swap behaviors */ +#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */ +#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */ + + /* CreatePbufferFromClientBuffer buffer types */ +#define EGL_OPENVG_IMAGE 0x3096 + + /* QueryContext targets */ +#define EGL_CONTEXT_CLIENT_TYPE 0x3097 + + /* CreateContext attributes */ +#define EGL_CONTEXT_CLIENT_VERSION 0x3098 + + /* Multisample resolution behaviors */ +#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */ +#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */ + + /* BindAPI/QueryAPI targets */ +#define EGL_OPENGL_ES_API 0x30A0 +#define EGL_OPENVG_API 0x30A1 +#define EGL_OPENGL_API 0x30A2 + + /* GetCurrentSurface targets */ +#define EGL_DRAW 0x3059 +#define EGL_READ 0x305A + + /* WaitNative engines */ +#define EGL_CORE_NATIVE_ENGINE 0x305B + + /* EGL 1.2 tokens renamed for consistency in EGL 1.3 */ +#define EGL_COLORSPACE EGL_VG_COLORSPACE +#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT +#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB +#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR +#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE +#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE + + /* EGL extensions must request enum blocks from the Khronos + * API Registrar, who maintains the enumerant registry. Submit + * a bug in Khronos Bugzilla against task "Registry". + */ + + + + /* EGL Functions */ + + EGLAPI EGLint EGLAPIENTRY eglGetError(void); + + EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id); + EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); + EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy); + + EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name); + + EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, + EGLint config_size, EGLint *num_config); + EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, + EGLConfig *configs, EGLint config_size, + EGLint *num_config); + EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, + EGLint attribute, EGLint *value); + + EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, + EGLNativeWindowType win, + const EGLint *attrib_list); + EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, + const EGLint *attrib_list); + EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, + EGLNativePixmapType pixmap, + const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface); + EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint *value); + + EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api); + EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void); + + EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void); + + EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void); + + EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer( + EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, + EGLConfig config, const EGLint *attrib_list); + + EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint value); + EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + + + EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); + + + EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, + EGLContext share_context, + const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); + EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); + + EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void); + EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw); + EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void); + EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, + EGLint attribute, EGLint *value); + + EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void); + EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine); + EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); + EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, + EGLNativePixmapType target); + + /* This is a generic function pointer type, whose name indicates it must + * be cast to the proper type *and calling convention* before use. + */ + typedef void(*__eglMustCastToProperFunctionPointerType)(void); + + /* Now, define eglGetProcAddress using the generic function ptr. type */ + EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY + eglGetProcAddress(const char *procname); + +#ifdef __cplusplus +} +#endif + +#endif /* __egl_h_ */ + + + + +#ifndef __eglext_h_ +#define __eglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + + /* + ** Copyright (c) 2007-2013 The Khronos Group Inc. + ** + ** Permission is hereby granted, free of charge, to any person obtaining a + ** copy of this software and/or associated documentation files (the + ** "Materials"), to deal in the Materials without restriction, including + ** without limitation the rights to use, copy, modify, merge, publish, + ** distribute, sublicense, and/or sell copies of the Materials, and to + ** permit persons to whom the Materials are furnished to do so, subject to + ** the following conditions: + ** + ** The above copyright notice and this permission notice shall be included + ** in all copies or substantial portions of the Materials. + ** + ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + */ + +/* #include */ + + /*************************************************************/ + + /* Header file version number */ + /* Current version at http://www.khronos.org/registry/egl/ */ + /* $Revision: 21254 $ on $Date: 2013-04-25 03:11:55 -0700 (Thu, 25 Apr 2013) $ */ +#define EGL_EGLEXT_VERSION 16 + +#ifndef EGL_KHR_config_attribs +#define EGL_KHR_config_attribs 1 +#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ +#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ +#endif + +#ifndef EGL_KHR_lock_surface +#define EGL_KHR_lock_surface 1 +#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ +#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ +#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ +#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ +#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ +#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ +#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLBoolean(EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); +#endif + +#ifndef EGL_KHR_image +#define EGL_KHR_image 1 +#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ + typedef void *EGLImageKHR; +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_KHR_vg_parent_image +#define EGL_KHR_vg_parent_image 1 +#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_2D_image +#define EGL_KHR_gl_texture_2D_image 1 +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_texture_cubemap_image +#define EGL_KHR_gl_texture_cubemap_image 1 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_3D_image +#define EGL_KHR_gl_texture_3D_image 1 +#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_renderbuffer_image +#define EGL_KHR_gl_renderbuffer_image 1 +#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */ +#ifndef EGL_KHR_reusable_sync +#define EGL_KHR_reusable_sync 1 + + typedef void* EGLSyncKHR; + typedef khronos_utime_nanoseconds_t EGLTimeKHR; + +#define EGL_SYNC_STATUS_KHR 0x30F1 +#define EGL_SIGNALED_KHR 0x30F2 +#define EGL_UNSIGNALED_KHR 0x30F3 +#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 +#define EGL_CONDITION_SATISFIED_KHR 0x30F6 +#define EGL_SYNC_TYPE_KHR 0x30F7 +#define EGL_SYNC_REUSABLE_KHR 0x30FA +#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR bitfield */ +#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull +#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); + EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); + EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); + EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLSyncKHR(EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); + typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif +#endif + +#ifndef EGL_KHR_image_base +#define EGL_KHR_image_base 1 + /* Most interfaces defined by EGL_KHR_image_pixmap above */ +#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_image_pixmap +#define EGL_KHR_image_pixmap 1 + /* Interfaces defined by EGL_KHR_image above */ +#endif + +#ifndef EGL_IMG_context_priority +#define EGL_IMG_context_priority 1 +#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 +#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 +#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 +#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 +#endif + +#ifndef EGL_KHR_lock_surface2 +#define EGL_KHR_lock_surface2 1 +#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 +#endif + +#ifndef EGL_NV_coverage_sample +#define EGL_NV_coverage_sample 1 +#define EGL_COVERAGE_BUFFERS_NV 0x30E0 +#define EGL_COVERAGE_SAMPLES_NV 0x30E1 +#endif + +#ifndef EGL_NV_depth_nonlinear +#define EGL_NV_depth_nonlinear 1 +#define EGL_DEPTH_ENCODING_NV 0x30E2 +#define EGL_DEPTH_ENCODING_NONE_NV 0 +#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */ +#ifndef EGL_NV_sync +#define EGL_NV_sync 1 +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 +#define EGL_SYNC_STATUS_NV 0x30E7 +#define EGL_SIGNALED_NV 0x30E8 +#define EGL_UNSIGNALED_NV 0x30E9 +#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 +#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull +#define EGL_ALREADY_SIGNALED_NV 0x30EA +#define EGL_TIMEOUT_EXPIRED_NV 0x30EB +#define EGL_CONDITION_SATISFIED_NV 0x30EC +#define EGL_SYNC_TYPE_NV 0x30ED +#define EGL_SYNC_CONDITION_NV 0x30EE +#define EGL_SYNC_FENCE_NV 0x30EF +#define EGL_NO_SYNC_NV ((EGLSyncNV)0) + typedef void* EGLSyncNV; + typedef khronos_utime_nanoseconds_t EGLTimeNV; +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV(EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV(EGLSyncNV sync); + EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV(EGLSyncNV sync); + EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV(EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); + EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV(EGLSyncNV sync, EGLenum mode); + EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV(EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLSyncNV(EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); + typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif +#endif + +#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */ +#ifndef EGL_KHR_fence_sync +#define EGL_KHR_fence_sync 1 + /* Reuses most tokens and entry points from EGL_KHR_reusable_sync */ +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 +#define EGL_SYNC_CONDITION_KHR 0x30F8 +#define EGL_SYNC_FENCE_KHR 0x30F9 +#endif +#endif + +#ifndef EGL_HI_clientpixmap +#define EGL_HI_clientpixmap 1 + + /* Surface Attribute */ +#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 + /* + * Structure representing a client pixmap + * (pixmap's data is in client-space memory). + */ + struct EGLClientPixmapHI + { + void* pData; + EGLint iWidth; + EGLint iHeight; + EGLint iStride; + }; +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_HI_clientpixmap */ + +#ifndef EGL_HI_colorformats +#define EGL_HI_colorformats 1 + /* Config Attribute */ +#define EGL_COLOR_FORMAT_HI 0x8F70 + /* Color Formats */ +#define EGL_COLOR_RGB_HI 0x8F71 +#define EGL_COLOR_RGBA_HI 0x8F72 +#define EGL_COLOR_ARGB_HI 0x8F73 +#endif /* EGL_HI_colorformats */ + +#ifndef EGL_MESA_drm_image +#define EGL_MESA_drm_image 1 +#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */ +#define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */ +#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */ +#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */ +#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 +#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */ +#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */ +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +#endif + +#ifndef EGL_NV_post_sub_buffer +#define EGL_NV_post_sub_buffer 1 +#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLBoolean(EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); +#endif + +#ifndef EGL_ANGLE_query_surface_pointer +#define EGL_ANGLE_query_surface_pointer 1 +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); +#endif + typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); +#endif + +#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle +#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 +#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 +#endif + +#ifndef EGL_NV_coverage_sample_resolve +#define EGL_NV_coverage_sample_resolve 1 +#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 +#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 +#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLuint64NV requires 64-bit uint support */ +#ifndef EGL_NV_system_time +#define EGL_NV_system_time 1 + typedef khronos_utime_nanoseconds_t EGLuint64NV; +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void); + EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void); + typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void); +#endif +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */ +#ifndef EGL_KHR_stream +#define EGL_KHR_stream 1 + typedef void* EGLStreamKHR; + typedef khronos_uint64_t EGLuint64KHR; +#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0) +#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 +#define EGL_PRODUCER_FRAME_KHR 0x3212 +#define EGL_CONSUMER_FRAME_KHR 0x3213 +#define EGL_STREAM_STATE_KHR 0x3214 +#define EGL_STREAM_STATE_CREATED_KHR 0x3215 +#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 +#define EGL_STREAM_STATE_EMPTY_KHR 0x3217 +#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 +#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 +#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A +#define EGL_BAD_STREAM_KHR 0x321B +#define EGL_BAD_STATE_KHR 0x321C +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream); + EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); + EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); + EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_consumer_gltexture +#define EGL_KHR_stream_consumer_gltexture 1 +#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream); + EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream); + EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_producer_eglsurface +#define EGL_KHR_stream_producer_eglsurface 1 +#define EGL_STREAM_BIT_KHR 0x0800 +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_producer_aldatalocator +#define EGL_KHR_stream_producer_aldatalocator 1 +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_fifo +#define EGL_KHR_stream_fifo 1 + /* reuse EGLTimeKHR */ +#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC +#define EGL_STREAM_TIME_NOW_KHR 0x31FD +#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE +#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); +#endif +#endif + +#ifndef EGL_EXT_create_context_robustness +#define EGL_EXT_create_context_robustness 1 +#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF +#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 +#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE +#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF +#endif + +#ifndef EGL_ANGLE_d3d_share_handle_client_buffer +#define EGL_ANGLE_d3d_share_handle_client_buffer 1 + /* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */ +#endif + +#ifndef EGL_KHR_create_context +#define EGL_KHR_create_context 1 +#define EGL_CONTEXT_MAJOR_VERSION_KHR EGL_CONTEXT_CLIENT_VERSION +#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB +#define EGL_CONTEXT_FLAGS_KHR 0x30FC +#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD +#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD +#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE +#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF +#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 +#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 +#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 +#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 +#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 +#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 +#endif + +#ifndef EGL_KHR_surfaceless_context +#define EGL_KHR_surfaceless_context 1 + /* No tokens/entry points, just relaxes an error condition */ +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_cross_process_fd +#define EGL_KHR_stream_cross_process_fd 1 + typedef int EGLNativeFileDescriptorKHR; +#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream); + EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLNativeFileDescriptorKHR(EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); + typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); +#endif +#endif + +#ifndef EGL_EXT_multiview_window +#define EGL_EXT_multiview_window 1 +#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 +#endif + +#ifndef EGL_KHR_wait_sync +#define EGL_KHR_wait_sync 1 +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLint(EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); +#endif + +#ifndef EGL_NV_post_convert_rounding +#define EGL_NV_post_convert_rounding 1 + /* No tokens or entry points, just relaxes behavior of SwapBuffers */ +#endif + +#ifndef EGL_NV_native_query +#define EGL_NV_native_query 1 +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV(EGLDisplay dpy, EGLNativeDisplayType* display_id); + EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window); + EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)(EGLDisplay dpy, EGLNativeDisplayType *display_id); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); + typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); +#endif + +#ifndef EGL_NV_3dvision_surface +#define EGL_NV_3dvision_surface 1 +#define EGL_AUTO_STEREO_NV 0x3136 +#endif + +#ifndef EGL_ANDROID_framebuffer_target +#define EGL_ANDROID_framebuffer_target 1 +#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 +#endif + +#ifndef EGL_ANDROID_blob_cache +#define EGL_ANDROID_blob_cache 1 + typedef khronos_ssize_t EGLsizeiANDROID; + typedef void(*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); + typedef EGLsizeiANDROID(*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); +#endif + +#ifndef EGL_ANDROID_image_native_buffer +#define EGL_ANDROID_image_native_buffer 1 +#define EGL_NATIVE_BUFFER_ANDROID 0x3140 +#endif + +#ifndef EGL_ANDROID_native_fence_sync +#define EGL_ANDROID_native_fence_sync 1 +#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 +#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 +#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 +#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLint(EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR); +#endif + +#ifndef EGL_ANDROID_recordable +#define EGL_ANDROID_recordable 1 +#define EGL_RECORDABLE_ANDROID 0x3142 +#endif + +#ifndef EGL_EXT_buffer_age +#define EGL_EXT_buffer_age 1 +#define EGL_BUFFER_AGE_EXT 0x313D +#endif + +#ifndef EGL_EXT_image_dma_buf_import +#define EGL_EXT_image_dma_buf_import 1 +#define EGL_LINUX_DMA_BUF_EXT 0x3270 +#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 +#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 +#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 +#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 +#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 +#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 +#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 +#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 +#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 +#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A +#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B +#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C +#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D +#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E +#define EGL_ITU_REC601_EXT 0x327F +#define EGL_ITU_REC709_EXT 0x3280 +#define EGL_ITU_REC2020_EXT 0x3281 +#define EGL_YUV_FULL_RANGE_EXT 0x3282 +#define EGL_YUV_NARROW_RANGE_EXT 0x3283 +#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 +#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 +#endif + +#ifndef EGL_ARM_pixmap_multisample_discard +#define EGL_ARM_pixmap_multisample_discard 1 +#define EGL_DISCARD_SAMPLES_ARM 0x3286 +#endif + +#ifndef EGL_EXT_swap_buffers_with_damage +#define EGL_EXT_swap_buffers_with_damage 1 +#ifdef EGL_EGLEXT_PROTOTYPES + EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); +#endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); +#endif + +/* #include */ + +#ifdef __cplusplus +} +#endif + +#endif /* __eglext_h_ */ + + + +#endif /* _MSC_VER */ \ No newline at end of file diff --git a/jni/SDL2-2.0.1/include/SDL_events.h b/jni/SDL2-2.0.1/include/SDL_events.h index c0890307..81ff4dd5 100644 --- a/jni/SDL2-2.0.1/include/SDL_events.h +++ b/jni/SDL2-2.0.1/include/SDL_events.h @@ -239,8 +239,8 @@ typedef struct SDL_MouseButtonEvent Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */ Uint8 button; /**< The mouse button index */ Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ + Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */ Uint8 padding1; - Uint8 padding2; Sint32 x; /**< X coordinate, relative to window */ Sint32 y; /**< Y coordinate, relative to window */ } SDL_MouseButtonEvent; diff --git a/jni/SDL2-2.0.1/include/SDL_gamecontroller.h b/jni/SDL2-2.0.1/include/SDL_gamecontroller.h index e55749ce..891f3563 100644 --- a/jni/SDL2-2.0.1/include/SDL_gamecontroller.h +++ b/jni/SDL2-2.0.1/include/SDL_gamecontroller.h @@ -30,6 +30,7 @@ #include "SDL_stdinc.h" #include "SDL_error.h" +#include "SDL_rwops.h" #include "SDL_joystick.h" #include "begin_code.h" @@ -108,6 +109,23 @@ typedef struct SDL_GameControllerButtonBind * */ +/** + * Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform() + * A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt + * + * If \c freerw is non-zero, the stream will be closed after being read. + * + * \return number of mappings added, -1 on error + */ +extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw, int freerw ); + +/** + * Load a set of mappings from a file, filtered by the current SDL_GetPlatform() + * + * Convenience macro. + */ +#define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1) + /** * Add or update an existing mapping configuration * diff --git a/jni/SDL2-2.0.1/include/SDL_gesture.h b/jni/SDL2-2.0.1/include/SDL_gesture.h index 21f10ead..015fe020 100644 --- a/jni/SDL2-2.0.1/include/SDL_gesture.h +++ b/jni/SDL2-2.0.1/include/SDL_gesture.h @@ -58,14 +58,14 @@ extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); * * */ -extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *src); +extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); /** * \brief Save a currently loaded Dollar Gesture template * * */ -extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *src); +extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); /** diff --git a/jni/SDL2-2.0.1/include/SDL_hints.h b/jni/SDL2-2.0.1/include/SDL_hints.h index dac928e0..9aad2e32 100644 --- a/jni/SDL2-2.0.1/include/SDL_hints.h +++ b/jni/SDL2-2.0.1/include/SDL_hints.h @@ -173,11 +173,32 @@ extern "C" { #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD" /** - * \brief Minimize your SDL_Window if it loses key focus when in Fullscreen mode. Defaults to true. +* \brief A variable controlling whether relative mouse mode is implemented using mouse warping +* +* This variable can be set to the following values: +* "0" - Relative mouse mode uses raw input +* "1" - Relative mouse mode uses mouse warping +* +* By default SDL will use raw input for relative mouse mode +*/ +#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP" + +/** + * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true. * */ #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" +/** + * \brief Set whether windows go fullscreen in their own spaces on Mac OS X + * + * This variable can be set to the following values: + * "0" - Fullscreen windows will use the classic fullscreen mode + * "1" - Fullscreen windows will use fullscreen spaces + * + * By default SDL will use the classic fullscreen mode. + */ +#define SDL_HINT_VIDEO_FULLSCREEN_SPACES "SDL_VIDEO_FULLSCREEN_SPACES" /** * \brief A variable controlling whether the idle timer is disabled on iOS. @@ -203,6 +224,16 @@ extern "C" { * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown" */ #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS" + +/** + * \brief A variable controlling whether an Android built-in accelerometer should be + * listed as a joystick device, rather than listing actual joysticks only. + * + * This variable can be set to the following values: + * "0" - List only real joysticks and accept input from them + * "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default). + */ +#define SDL_HINT_ACCEL_AS_JOY "SDL_ACCEL_AS_JOY" /** @@ -273,6 +304,29 @@ extern "C" { */ #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED" +/** + * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac + * + * If present, holding ctrl while left clicking will generate a right click + * event when on Mac. + */ +#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK" + +/** +* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries +* +* SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It +* can use two different sets of binaries, those compiled by the user from source +* or those provided by the Chrome browser. In the later case, these binaries require +* that SDL loads +* +* This variable can be set to the following values: +* "d3dcompiler_46.dll" - default, best for Vista or later. +* "d3dcompiler_43.dll" - for XP support. +* "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries. +* +*/ +#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER" /** * \brief An enumeration of hint priorities diff --git a/jni/SDL2-2.0.1/include/SDL_joystick.h b/jni/SDL2-2.0.1/include/SDL_joystick.h index b0e4b5da..a2843bae 100644 --- a/jni/SDL2-2.0.1/include/SDL_joystick.h +++ b/jni/SDL2-2.0.1/include/SDL_joystick.h @@ -115,7 +115,7 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joys * Return a string representation for this guid. pszGUID must point to at least 33 bytes * (32 for the string plus a NULL terminator). */ -extern DECLSPEC void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID); +extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID); /** * convert a string into a joystick formatted guid diff --git a/jni/SDL2-2.0.1/include/SDL_main.h b/jni/SDL2-2.0.1/include/SDL_main.h index b7e4a10e..da80a780 100644 --- a/jni/SDL2-2.0.1/include/SDL_main.h +++ b/jni/SDL2-2.0.1/include/SDL_main.h @@ -101,7 +101,7 @@ extern "C" { * Calling this yourself without knowing what you're doing can cause * crashes and hard to diagnose problems with your application. */ -extern DECLSPEC void SDL_SetMainReady(void); +extern DECLSPEC void SDLCALL SDL_SetMainReady(void); #ifdef __WIN32__ diff --git a/jni/SDL2-2.0.1/include/SDL_opengles2.h b/jni/SDL2-2.0.1/include/SDL_opengles2.h index 7697626f..f51cfc23 100644 --- a/jni/SDL2-2.0.1/include/SDL_opengles2.h +++ b/jni/SDL2-2.0.1/include/SDL_opengles2.h @@ -24,7 +24,7 @@ * * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. */ - +#ifndef _MSC_VER #ifdef __IPHONEOS__ #include #include @@ -33,6 +33,2758 @@ #include #endif -#ifndef APIENTRY -#define APIENTRY +#else /* _MSC_VER */ + +/* OpenGL ES2 headers for Visual Studio */ + +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. +* +* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ +* +* Adopters may modify this file to suit their platform. Adopters are +* encouraged to submit platform specific modifications to the Khronos +* group so that they can be included in future versions of this file. +* Please submit changes by sending them to the public Khronos Bugzilla +* (http://khronos.org/bugzilla) by filing a bug against product +* "Khronos (general)" component "Registry". +* +* A predefined template which fills in some of the bug fields can be +* reached using http://tinyurl.com/khrplatform-h-bugreport, but you +* must create a Bugzilla login first. +* +* +* See the Implementer's Guidelines for information about where this file +* should be located on your system and for more details of its use: +* http://www.khronos.org/registry/implementers_guide.pdf +* +* This file should be included as +* #include +* by Khronos client API header files that use its types and defines. +* +* The types in khrplatform.h should only be used to define API-specific types. +* +* Types defined in khrplatform.h: +* khronos_int8_t signed 8 bit +* khronos_uint8_t unsigned 8 bit +* khronos_int16_t signed 16 bit +* khronos_uint16_t unsigned 16 bit +* khronos_int32_t signed 32 bit +* khronos_uint32_t unsigned 32 bit +* khronos_int64_t signed 64 bit +* khronos_uint64_t unsigned 64 bit +* khronos_intptr_t signed same number of bits as a pointer +* khronos_uintptr_t unsigned same number of bits as a pointer +* khronos_ssize_t signed size +* khronos_usize_t unsigned size +* khronos_float_t signed 32 bit floating point +* khronos_time_ns_t unsigned 64 bit time in nanoseconds +* khronos_utime_nanoseconds_t unsigned time interval or absolute time in +* nanoseconds +* khronos_stime_nanoseconds_t signed time interval in nanoseconds +* khronos_boolean_enum_t enumerated boolean type. This should +* only be used as a base type when a client API's boolean type is +* an enum. Client APIs which use an integer or other type for +* booleans cannot use this as the base type for their boolean. +* +* Tokens defined in khrplatform.h: +* +* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. +* +* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. +* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. +* +* Calling convention macros defined in this file: +* KHRONOS_APICALL +* KHRONOS_APIENTRY +* KHRONOS_APIATTRIBUTES +* +* These may be used in function prototypes as: +* +* KHRONOS_APICALL void KHRONOS_APIENTRY funcname( +* int arg1, +* int arg2) KHRONOS_APIATTRIBUTES; +*/ + +/*------------------------------------------------------------------------- +* Definition of KHRONOS_APICALL +*------------------------------------------------------------------------- +* This precedes the return type of the function in the function prototype. +*/ +#if defined(_WIN32) && !defined(__SCITECH_SNAP__) +# define KHRONOS_APICALL __declspec(dllimport) +#elif defined (__SYMBIAN32__) +# define KHRONOS_APICALL IMPORT_C +#else +# define KHRONOS_APICALL #endif + +/*------------------------------------------------------------------------- +* Definition of KHRONOS_APIENTRY +*------------------------------------------------------------------------- +* This follows the return type of the function and precedes the function +* name in the function prototype. +*/ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) +/* Win32 but not WinCE */ +# define KHRONOS_APIENTRY __stdcall +#else +# define KHRONOS_APIENTRY +#endif + +/*------------------------------------------------------------------------- +* Definition of KHRONOS_APIATTRIBUTES +*------------------------------------------------------------------------- +* This follows the closing parenthesis of the function prototype arguments. +*/ +#if defined (__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- +* basic type definitions +*-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + + +/* +* Using +*/ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__VMS ) || defined(__sgi) + +/* +* Using +*/ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* +* Win32 +*/ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* +* Sun or Digital +*/ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* +* Hypothetical platform with no float or int64 support +*/ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* +* Generic fallback +*/ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* +* Types that are (so far) the same on all platforms +*/ +typedef signed char khronos_int8_t; +typedef unsigned char khronos_uint8_t; +typedef signed short int khronos_int16_t; +typedef unsigned short int khronos_uint16_t; + +/* +* Types that differ between LLP64 and LP64 architectures - in LLP64, +* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears +* to be the only LLP64 architecture in current use. +*/ +#ifdef _WIN64 +typedef signed long long int khronos_intptr_t; +typedef unsigned long long int khronos_uintptr_t; +typedef signed long long int khronos_ssize_t; +typedef unsigned long long int khronos_usize_t; +#else +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; +#endif + +#if KHRONOS_SUPPORT_FLOAT +/* +* Float type +*/ +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +/* Time types +* +* These types can be used to represent a time interval in nanoseconds or +* an absolute Unadjusted System Time. Unadjusted System Time is the number +* of nanoseconds since some arbitrary system event (e.g. since the last +* time the system booted). The Unadjusted System Time is an unsigned +* 64 bit value that wraps back to 0 every 584 years. Time intervals +* may be either signed or unsigned. +*/ +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +/* +* Dummy value used to pad enum types to 32 bits. +*/ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* +* Enumerated boolean type +* +* Values other than zero should be considered to be true. Therefore +* comparisons should not be made against KHRONOS_TRUE. +*/ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + +#endif /* __khrplatform_h_ */ + + +#ifndef __gl2platform_h_ +#define __gl2platform_h_ + +/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "OpenGL-ES" component "Registry". + */ + +/*#include */ + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __gl2platform_h_ */ + +#ifndef __gl2_h_ +#define __gl2_h_ + +/* $Revision: 16803 $ on $Date:: 2012-02-02 09:49:18 -0800 #$ */ + +/*#include */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/*------------------------------------------------------------------------- + * Data type definitions + *-----------------------------------------------------------------------*/ + +typedef void GLvoid; +typedef char GLchar; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef khronos_int8_t GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; + +/* GL types for handling large vertex buffer objects */ +typedef khronos_intptr_t GLintptr; +typedef khronos_ssize_t GLsizeiptr; + +/* OpenGL ES core versions */ +#define GL_ES_VERSION_2_0 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction (not supported in ES20) */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* BlendEquationSeparate */ +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ +#define GL_BLEND_EQUATION_ALPHA 0x883D + +/* BlendSubtract */ +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B + +/* Separate Blend Functions */ +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 + +/* Buffer Objects */ +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 + +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 + +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 + +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +/* GL_SCISSOR_TEST */ +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +/* GL_POLYGON_OFFSET_FILL */ +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB + +/* GetTextureParameter */ +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* PixelFormat */ +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* Shaders */ +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D + +/* StencilFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ +#define GL_TEXTURE 0x1702 + +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 + +/* Uniform Types */ +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 + +/* Vertex Arrays */ +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F + +/* Read Format */ +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B + +/* Shader Source */ +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA + +/* Shader Binary */ +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 + +/* Shader Precision-Specified Types */ +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 + +/* Framebuffer Object. */ +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 + +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX8 0x8D48 + +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 + +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 + +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 + +#define GL_NONE 0 + +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD + +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 + +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 + +/*------------------------------------------------------------------------- + * GL core functions. + *-----------------------------------------------------------------------*/ + +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); +GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); +GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); +GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); +GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); +GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); +GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); +GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +#ifdef __cplusplus +} +#endif + +#endif /* __gl2_h_ */ + + +#ifndef __gl2ext_h_ +#define __gl2ext_h_ + +/* $Revision: 19436 $ on $Date:: 2012-10-10 10:37:04 -0700 #$ */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +#ifndef GL_APIENTRYP +# define GL_APIENTRYP GL_APIENTRY* +#endif + +/*------------------------------------------------------------------------* + * OES extension tokens + *------------------------------------------------------------------------*/ + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_ETC1_RGB8_OES 0x8D64 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif + +/* GL_OES_depth_texture */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +typedef void* GLeglImageOES; +#endif + +/* GL_OES_EGL_image_external */ +#ifndef GL_OES_EGL_image_external +/* GLeglImageOES defined in GL_OES_EGL_image already. */ +#define GL_TEXTURE_EXTERNAL_OES 0x8D65 +#define GL_SAMPLER_EXTERNAL_OES 0x8D66 +#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 +#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_UNSIGNED_INT 0x1405 +#endif + +/* GL_OES_get_program_binary */ +#ifndef GL_OES_get_program_binary +#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE +#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 +#endif + +/* GL_OES_required_internalformat */ +#ifndef GL_OES_required_internalformat +#define GL_ALPHA8_OES 0x803C +#define GL_DEPTH_COMPONENT16_OES 0x81A5 +/* reuse GL_DEPTH_COMPONENT24_OES */ +/* reuse GL_DEPTH24_STENCIL8_OES */ +/* reuse GL_DEPTH_COMPONENT32_OES */ +#define GL_LUMINANCE4_ALPHA4_OES 0x8043 +#define GL_LUMINANCE8_ALPHA8_OES 0x8045 +#define GL_LUMINANCE8_OES 0x8040 +#define GL_RGBA4_OES 0x8056 +#define GL_RGB5_A1_OES 0x8057 +#define GL_RGB565_OES 0x8D62 +/* reuse GL_RGB8_OES */ +/* reuse GL_RGBA8_OES */ +/* reuse GL_RGB10_EXT */ +/* reuse GL_RGB10_A2_EXT */ +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#endif + +/* GL_OES_standard_derivatives */ +#ifndef GL_OES_standard_derivatives +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_STENCIL_INDEX1_OES 0x8D46 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_STENCIL_INDEX4_OES 0x8D47 +#endif + +#ifndef GL_OES_surfaceless_context +#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 +#endif + +/* GL_OES_texture_3D */ +#ifndef GL_OES_texture_3D +#define GL_TEXTURE_WRAP_R_OES 0x8072 +#define GL_TEXTURE_3D_OES 0x806F +#define GL_TEXTURE_BINDING_3D_OES 0x806A +#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 +#define GL_SAMPLER_3D_OES 0x8B5F +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 +#endif + +/* GL_OES_texture_float */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_float_linear */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_half_float */ +#ifndef GL_OES_texture_half_float +#define GL_HALF_FLOAT_OES 0x8D61 +#endif + +/* GL_OES_texture_half_float_linear */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_npot */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_vertex_array_object */ +#ifndef GL_OES_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 +#endif + +/* GL_OES_vertex_half_float */ +/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ + +/* GL_OES_vertex_type_10_10_10_2 */ +#ifndef GL_OES_vertex_type_10_10_10_2 +#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 +#define GL_INT_10_10_10_2_OES 0x8DF7 +#endif + +/*------------------------------------------------------------------------* + * KHR extension tokens + *------------------------------------------------------------------------*/ + +#ifndef GL_KHR_debug +typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 +#define GL_DEBUG_SOURCE_API 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION 0x824A +#define GL_DEBUG_SOURCE_OTHER 0x824B +#define GL_DEBUG_TYPE_ERROR 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E +#define GL_DEBUG_TYPE_PORTABILITY 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 +#define GL_DEBUG_TYPE_OTHER 0x8251 +#define GL_DEBUG_TYPE_MARKER 0x8268 +#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 +#define GL_DEBUG_TYPE_POP_GROUP 0x826A +#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B +#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C +#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D +#define GL_BUFFER 0x82E0 +#define GL_SHADER 0x82E1 +#define GL_PROGRAM 0x82E2 +#define GL_QUERY 0x82E3 +/* PROGRAM_PIPELINE only in GL */ +#define GL_SAMPLER 0x82E6 +/* DISPLAY_LIST only in GL */ +#define GL_MAX_LABEL_LENGTH 0x82E8 +#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES 0x9145 +#define GL_DEBUG_SEVERITY_HIGH 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 +#define GL_DEBUG_SEVERITY_LOW 0x9148 +#define GL_DEBUG_OUTPUT 0x92E0 +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#endif + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#endif + +/*------------------------------------------------------------------------* + * AMD extension tokens + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +#endif + +/* GL_AMD_performance_monitor */ +#ifndef GL_AMD_performance_monitor +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +#endif + +/* GL_AMD_program_binary_Z400 */ +#ifndef GL_AMD_program_binary_Z400 +#define GL_Z400_BINARY_AMD 0x8740 +#endif + +/*------------------------------------------------------------------------* + * ANGLE extension tokens + *------------------------------------------------------------------------*/ + +/* GL_ANGLE_framebuffer_blit */ +#ifndef GL_ANGLE_framebuffer_blit +#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA +#endif + +/* GL_ANGLE_framebuffer_multisample */ +#ifndef GL_ANGLE_framebuffer_multisample +#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 +#define GL_MAX_SAMPLES_ANGLE 0x8D57 +#endif + +/* GL_ANGLE_instanced_arrays */ +#ifndef GL_ANGLE_instanced_arrays +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE +#endif + +/* GL_ANGLE_pack_reverse_row_order */ +#ifndef GL_ANGLE_pack_reverse_row_order +#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 +#endif + +/* GL_ANGLE_texture_compression_dxt3 */ +#ifndef GL_ANGLE_texture_compression_dxt3 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 +#endif + +/* GL_ANGLE_texture_compression_dxt5 */ +#ifndef GL_ANGLE_texture_compression_dxt5 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 +#endif + +/* GL_ANGLE_texture_usage */ +#ifndef GL_ANGLE_texture_usage +#define GL_TEXTURE_USAGE_ANGLE 0x93A2 +#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 +#endif + +/* GL_ANGLE_translated_shader_source */ +#ifndef GL_ANGLE_translated_shader_source +#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 +#endif + +/*------------------------------------------------------------------------* + * APPLE extension tokens + *------------------------------------------------------------------------*/ + +/* GL_APPLE_copy_texture_levels */ +/* No new tokens introduced by this extension. */ + +/* GL_APPLE_framebuffer_multisample */ +#ifndef GL_APPLE_framebuffer_multisample +#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 +#define GL_MAX_SAMPLES_APPLE 0x8D57 +#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA +#endif + +/* GL_APPLE_rgb_422 */ +#ifndef GL_APPLE_rgb_422 +#define GL_RGB_422_APPLE 0x8A1F +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#endif + +/* GL_APPLE_sync */ +#ifndef GL_APPLE_sync + +#ifndef __gl3_h_ +/* These types are defined with reference to + * in the Apple extension spec, but here we use the Khronos + * portable types in khrplatform.h, and assume those types + * are always defined. + * If any other extensions using these types are defined, + * the typedefs must move out of this block and be shared. + */ +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef struct __GLsync *GLsync; +#endif + +#define GL_SYNC_OBJECT_APPLE 0x8A53 +#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 +#define GL_OBJECT_TYPE_APPLE 0x9112 +#define GL_SYNC_CONDITION_APPLE 0x9113 +#define GL_SYNC_STATUS_APPLE 0x9114 +#define GL_SYNC_FLAGS_APPLE 0x9115 +#define GL_SYNC_FENCE_APPLE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 +#define GL_UNSIGNALED_APPLE 0x9118 +#define GL_SIGNALED_APPLE 0x9119 +#define GL_ALREADY_SIGNALED_APPLE 0x911A +#define GL_TIMEOUT_EXPIRED_APPLE 0x911B +#define GL_CONDITION_SATISFIED_APPLE 0x911C +#define GL_WAIT_FAILED_APPLE 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 +#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull +#endif + +/* GL_APPLE_texture_format_BGRA8888 */ +#ifndef GL_APPLE_texture_format_BGRA8888 +#define GL_BGRA_EXT 0x80E1 +#endif + +/* GL_APPLE_texture_max_level */ +#ifndef GL_APPLE_texture_max_level +#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D +#endif + +/*------------------------------------------------------------------------* + * ARM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_ARM_mali_program_binary */ +#ifndef GL_ARM_mali_program_binary +#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 +#endif + +/* GL_ARM_mali_shader_binary */ +#ifndef GL_ARM_mali_shader_binary +#define GL_MALI_SHADER_BINARY_ARM 0x8F60 +#endif + +/* GL_ARM_rgba8 */ +/* No new tokens introduced by this extension. */ + +/*------------------------------------------------------------------------* + * EXT extension tokens + *------------------------------------------------------------------------*/ + +/* GL_EXT_blend_minmax */ +#ifndef GL_EXT_blend_minmax +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#endif + +/* GL_EXT_color_buffer_half_float */ +#ifndef GL_EXT_color_buffer_half_float +#define GL_RGBA16F_EXT 0x881A +#define GL_RGB16F_EXT 0x881B +#define GL_RG16F_EXT 0x822F +#define GL_R16F_EXT 0x822D +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 +#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 +#endif + +/* GL_EXT_debug_label */ +#ifndef GL_EXT_debug_label +#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F +#define GL_PROGRAM_OBJECT_EXT 0x8B40 +#define GL_SHADER_OBJECT_EXT 0x8B48 +#define GL_BUFFER_OBJECT_EXT 0x9151 +#define GL_QUERY_OBJECT_EXT 0x9153 +#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 +#endif + +/* GL_EXT_debug_marker */ +/* No new tokens introduced by this extension. */ + +/* GL_EXT_discard_framebuffer */ +#ifndef GL_EXT_discard_framebuffer +#define GL_COLOR_EXT 0x1800 +#define GL_DEPTH_EXT 0x1801 +#define GL_STENCIL_EXT 0x1802 +#endif + +/* GL_EXT_map_buffer_range */ +#ifndef GL_EXT_map_buffer_range +#define GL_MAP_READ_BIT_EXT 0x0001 +#define GL_MAP_WRITE_BIT_EXT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 +#endif + +/* GL_EXT_multisampled_render_to_texture */ +#ifndef GL_EXT_multisampled_render_to_texture +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C +/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */ +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +#endif + +/* GL_EXT_multiview_draw_buffers */ +#ifndef GL_EXT_multiview_draw_buffers +#define GL_COLOR_ATTACHMENT_EXT 0x90F0 +#define GL_MULTIVIEW_EXT 0x90F1 +#define GL_DRAW_BUFFER_EXT 0x0C01 +#define GL_READ_BUFFER_EXT 0x0C02 +#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 +#endif + +/* GL_EXT_multi_draw_arrays */ +/* No new tokens introduced by this extension. */ + +/* GL_EXT_occlusion_query_boolean */ +#ifndef GL_EXT_occlusion_query_boolean +#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A +#define GL_CURRENT_QUERY_EXT 0x8865 +#define GL_QUERY_RESULT_EXT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 +#endif + +/* GL_EXT_read_format_bgra */ +#ifndef GL_EXT_read_format_bgra +#define GL_BGRA_EXT 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 +#endif + +/* GL_EXT_robustness */ +#ifndef GL_EXT_robustness +/* reuse GL_NO_ERROR */ +#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 +#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 +#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 +#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 +#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 +#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 +#define GL_NO_RESET_NOTIFICATION_EXT 0x8261 +#endif + +/* GL_EXT_separate_shader_objects */ +#ifndef GL_EXT_separate_shader_objects +#define GL_VERTEX_SHADER_BIT_EXT 0x00000001 +#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 +#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF +#define GL_PROGRAM_SEPARABLE_EXT 0x8258 +#define GL_ACTIVE_PROGRAM_EXT 0x8259 +#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A +#endif + +/* GL_EXT_shader_framebuffer_fetch */ +#ifndef GL_EXT_shader_framebuffer_fetch +#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 +#endif + +/* GL_EXT_shader_texture_lod */ +/* No new tokens introduced by this extension. */ + +/* GL_EXT_shadow_samplers */ +#ifndef GL_EXT_shadow_samplers +#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C +#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D +#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E +#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 +#endif + +/* GL_EXT_sRGB */ +#ifndef GL_EXT_sRGB +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 +#endif + +/* GL_EXT_texture_compression_dxt1 */ +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#endif + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_BGRA_EXT 0x80E1 +#endif + +/* GL_EXT_texture_rg */ +#ifndef GL_EXT_texture_rg +#define GL_RED_EXT 0x1903 +#define GL_RG_EXT 0x8227 +#define GL_R8_EXT 0x8229 +#define GL_RG8_EXT 0x822B +#endif + +/* GL_EXT_texture_storage */ +#ifndef GL_EXT_texture_storage +#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F +#define GL_ALPHA8_EXT 0x803C +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_RGBA32F_EXT 0x8814 +#define GL_RGB32F_EXT 0x8815 +#define GL_ALPHA32F_EXT 0x8816 +#define GL_LUMINANCE32F_EXT 0x8818 +#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 +/* reuse GL_RGBA16F_EXT */ +/* reuse GL_RGB16F_EXT */ +#define GL_ALPHA16F_EXT 0x881C +#define GL_LUMINANCE16F_EXT 0x881E +#define GL_LUMINANCE_ALPHA16F_EXT 0x881F +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGB10_EXT 0x8052 +#define GL_BGRA8_EXT 0x93A1 +#define GL_R8_EXT 0x8229 +#define GL_RG8_EXT 0x822B +#define GL_R32F_EXT 0x822E +#define GL_RG32F_EXT 0x8230 +#define GL_R16F_EXT 0x822D +#define GL_RG16F_EXT 0x822F +#endif + +/* GL_EXT_texture_type_2_10_10_10_REV */ +#ifndef GL_EXT_texture_type_2_10_10_10_REV +#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 +#endif + +/* GL_EXT_unpack_subimage */ +#ifndef GL_EXT_unpack_subimage +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#endif + +/*------------------------------------------------------------------------* + * DMP extension tokens + *------------------------------------------------------------------------*/ + +/* GL_DMP_shader_binary */ +#ifndef GL_DMP_shader_binary +#define GL_SHADER_BINARY_DMP 0x9250 +#endif + +/*------------------------------------------------------------------------* + * FJ extension tokens + *------------------------------------------------------------------------*/ + +/* GL_FJ_shader_binary_GCCSO */ +#ifndef GL_FJ_shader_binary_GCCSO +#define GCCSO_SHADER_BINARY_FJ 0x9260 +#endif + +/*------------------------------------------------------------------------* + * IMG extension tokens + *------------------------------------------------------------------------*/ + +/* GL_IMG_program_binary */ +#ifndef GL_IMG_program_binary +#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 +#endif + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_BGRA_IMG 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 +#endif + +/* GL_IMG_shader_binary */ +#ifndef GL_IMG_shader_binary +#define GL_SGX_BINARY_IMG 0x8C0A +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif + +/* GL_IMG_multisampled_render_to_texture */ +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 +#define GL_MAX_SAMPLES_IMG 0x9135 +#define GL_TEXTURE_SAMPLES_IMG 0x9136 +#endif + +/*------------------------------------------------------------------------* + * NV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_NV_coverage_sample */ +#ifndef GL_NV_coverage_sample +#define GL_COVERAGE_COMPONENT_NV 0x8ED0 +#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 +#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 +#define GL_COVERAGE_BUFFERS_NV 0x8ED3 +#define GL_COVERAGE_SAMPLES_NV 0x8ED4 +#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 +#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 +#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 +#define GL_COVERAGE_BUFFER_BIT_NV 0x8000 +#endif + +/* GL_NV_depth_nonlinear */ +#ifndef GL_NV_depth_nonlinear +#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C +#endif + +/* GL_NV_draw_buffers */ +#ifndef GL_NV_draw_buffers +#define GL_MAX_DRAW_BUFFERS_NV 0x8824 +#define GL_DRAW_BUFFER0_NV 0x8825 +#define GL_DRAW_BUFFER1_NV 0x8826 +#define GL_DRAW_BUFFER2_NV 0x8827 +#define GL_DRAW_BUFFER3_NV 0x8828 +#define GL_DRAW_BUFFER4_NV 0x8829 +#define GL_DRAW_BUFFER5_NV 0x882A +#define GL_DRAW_BUFFER6_NV 0x882B +#define GL_DRAW_BUFFER7_NV 0x882C +#define GL_DRAW_BUFFER8_NV 0x882D +#define GL_DRAW_BUFFER9_NV 0x882E +#define GL_DRAW_BUFFER10_NV 0x882F +#define GL_DRAW_BUFFER11_NV 0x8830 +#define GL_DRAW_BUFFER12_NV 0x8831 +#define GL_DRAW_BUFFER13_NV 0x8832 +#define GL_DRAW_BUFFER14_NV 0x8833 +#define GL_DRAW_BUFFER15_NV 0x8834 +#define GL_COLOR_ATTACHMENT0_NV 0x8CE0 +#define GL_COLOR_ATTACHMENT1_NV 0x8CE1 +#define GL_COLOR_ATTACHMENT2_NV 0x8CE2 +#define GL_COLOR_ATTACHMENT3_NV 0x8CE3 +#define GL_COLOR_ATTACHMENT4_NV 0x8CE4 +#define GL_COLOR_ATTACHMENT5_NV 0x8CE5 +#define GL_COLOR_ATTACHMENT6_NV 0x8CE6 +#define GL_COLOR_ATTACHMENT7_NV 0x8CE7 +#define GL_COLOR_ATTACHMENT8_NV 0x8CE8 +#define GL_COLOR_ATTACHMENT9_NV 0x8CE9 +#define GL_COLOR_ATTACHMENT10_NV 0x8CEA +#define GL_COLOR_ATTACHMENT11_NV 0x8CEB +#define GL_COLOR_ATTACHMENT12_NV 0x8CEC +#define GL_COLOR_ATTACHMENT13_NV 0x8CED +#define GL_COLOR_ATTACHMENT14_NV 0x8CEE +#define GL_COLOR_ATTACHMENT15_NV 0x8CEF +#endif + +/* GL_NV_fbo_color_attachments */ +#ifndef GL_NV_fbo_color_attachments +#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF +/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */ +#endif + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +/* GL_NV_read_buffer */ +#ifndef GL_NV_read_buffer +#define GL_READ_BUFFER_NV 0x0C02 +#endif + +/* GL_NV_read_buffer_front */ +/* No new tokens introduced by this extension. */ + +/* GL_NV_read_depth */ +/* No new tokens introduced by this extension. */ + +/* GL_NV_read_depth_stencil */ +/* No new tokens introduced by this extension. */ + +/* GL_NV_read_stencil */ +/* No new tokens introduced by this extension. */ + +/* GL_NV_texture_compression_s3tc_update */ +/* No new tokens introduced by this extension. */ + +/* GL_NV_texture_npot_2D_mipmap */ +/* No new tokens introduced by this extension. */ + +/*------------------------------------------------------------------------* + * QCOM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_QCOM_alpha_test */ +#ifndef GL_QCOM_alpha_test +#define GL_ALPHA_TEST_QCOM 0x0BC0 +#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 +#define GL_ALPHA_TEST_REF_QCOM 0x0BC2 +#endif + +/* GL_QCOM_binning_control */ +#ifndef GL_QCOM_binning_control +#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 +#define GL_CPU_OPTIMIZED_QCOM 0x8FB1 +#define GL_GPU_OPTIMIZED_QCOM 0x8FB2 +#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 +#endif + +/* GL_QCOM_driver_control */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_extended_get */ +#ifndef GL_QCOM_extended_get +#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 +#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 +#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 +#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 +#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 +#define GL_TEXTURE_TYPE_QCOM 0x8BD7 +#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 +#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 +#define GL_TEXTURE_TARGET_QCOM 0x8BDA +#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB +#define GL_STATE_RESTORE 0x8BDC +#endif + +/* GL_QCOM_extended_get2 */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 +#endif + +/* GL_QCOM_writeonly_rendering */ +#ifndef GL_QCOM_writeonly_rendering +#define GL_WRITEONLY_RENDERING_QCOM 0x8823 +#endif + +/* GL_QCOM_tiled_rendering */ +#ifndef GL_QCOM_tiled_rendering +#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 +#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 +#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 +#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 +#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 +#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 +#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 +#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 +#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 +#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 +#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 +#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 +#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 +#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 +#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 +#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 +#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 +#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 +#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 +#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 +#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 +#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 +#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 +#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 +#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 +#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 +#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 +#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 +#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 +#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 +#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 +#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 +#endif + +/*------------------------------------------------------------------------* + * VIV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_VIV_shader_binary */ +#ifndef GL_VIV_shader_binary +#define GL_SHADER_BINARY_VIV 0x8FC4 +#endif + +/*------------------------------------------------------------------------* + * End of extension tokens, start of corresponding extension functions + *------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------* + * OES extension functions + *------------------------------------------------------------------------*/ + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_OES_compressed_ETC1_RGB8_texture 1 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#endif + +/* GL_OES_depth_texture */ +#ifndef GL_OES_depth_texture +#define GL_OES_depth_texture 1 +#endif + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +#endif +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +#endif + +/* GL_OES_EGL_image_external */ +#ifndef GL_OES_EGL_image_external +#define GL_OES_EGL_image_external 1 +/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_OES_element_index_uint 1 +#endif + +/* GL_OES_fbo_render_mipmap */ +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif + +/* GL_OES_fragment_precision_high */ +#ifndef GL_OES_fragment_precision_high +#define GL_OES_fragment_precision_high 1 +#endif + +/* GL_OES_get_program_binary */ +#ifndef GL_OES_get_program_binary +#define GL_OES_get_program_binary 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); +#endif +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_OES_mapbuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); +GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params); +#endif +typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params); +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_OES_packed_depth_stencil 1 +#endif + +/* GL_OES_required_internalformat */ +#ifndef GL_OES_required_internalformat +#define GL_OES_required_internalformat 1 +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#endif + +/* GL_OES_standard_derivatives */ +#ifndef GL_OES_standard_derivatives +#define GL_OES_standard_derivatives 1 +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_OES_stencil1 1 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_OES_stencil4 1 +#endif + +#ifndef GL_OES_surfaceless_context +#define GL_OES_surfaceless_context 1 +#endif + +/* GL_OES_texture_3D */ +#ifndef GL_OES_texture_3D +#define GL_OES_texture_3D 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +#endif +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +#endif + +/* GL_OES_texture_float */ +#ifndef GL_OES_texture_float +#define GL_OES_texture_float 1 +#endif + +/* GL_OES_texture_float_linear */ +#ifndef GL_OES_texture_float_linear +#define GL_OES_texture_float_linear 1 +#endif + +/* GL_OES_texture_half_float */ +#ifndef GL_OES_texture_half_float +#define GL_OES_texture_half_float 1 +#endif + +/* GL_OES_texture_half_float_linear */ +#ifndef GL_OES_texture_half_float_linear +#define GL_OES_texture_half_float_linear 1 +#endif + +/* GL_OES_texture_npot */ +#ifndef GL_OES_texture_npot +#define GL_OES_texture_npot 1 +#endif + +/* GL_OES_vertex_array_object */ +#ifndef GL_OES_vertex_array_object +#define GL_OES_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); +GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); +GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); +#endif +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); +#endif + +/* GL_OES_vertex_half_float */ +#ifndef GL_OES_vertex_half_float +#define GL_OES_vertex_half_float 1 +#endif + +/* GL_OES_vertex_type_10_10_10_2 */ +#ifndef GL_OES_vertex_type_10_10_10_2 +#define GL_OES_vertex_type_10_10_10_2 1 +#endif + +/*------------------------------------------------------------------------* + * KHR extension functions + *------------------------------------------------------------------------*/ + +#ifndef GL_KHR_debug +#define GL_KHR_debug 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); +GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); +GL_APICALL void GL_APIENTRY glPopDebugGroup (void); +GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params); +#endif +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); +typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); +typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); +typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params); +#endif + +#ifndef GL_KHR_texture_compression_astc_ldr +#define GL_KHR_texture_compression_astc_ldr 1 +#endif + + +/*------------------------------------------------------------------------* + * AMD extension functions + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_AMD_compressed_3DC_texture 1 +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_AMD_compressed_ATC_texture 1 +#endif + +/* AMD_performance_monitor */ +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); +GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); +typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif + +/* GL_AMD_program_binary_Z400 */ +#ifndef GL_AMD_program_binary_Z400 +#define GL_AMD_program_binary_Z400 1 +#endif + +/*------------------------------------------------------------------------* + * ANGLE extension functions + *------------------------------------------------------------------------*/ + +/* GL_ANGLE_framebuffer_blit */ +#ifndef GL_ANGLE_framebuffer_blit +#define GL_ANGLE_framebuffer_blit 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif +typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +#endif + +/* GL_ANGLE_framebuffer_multisample */ +#ifndef GL_ANGLE_framebuffer_multisample +#define GL_ANGLE_framebuffer_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +#endif + +#ifndef GL_ANGLE_instanced_arrays +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); +#endif +typedef void (GL_APIENTRYP PFLGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (GL_APIENTRYP PFLGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); +typedef void (GL_APIENTRYP PFLGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); +#endif + +/* GL_ANGLE_pack_reverse_row_order */ +#ifndef GL_ANGLE_pack_reverse_row_order +#define GL_ANGLE_pack_reverse_row_order 1 +#endif + +/* GL_ANGLE_texture_compression_dxt3 */ +#ifndef GL_ANGLE_texture_compression_dxt3 +#define GL_ANGLE_texture_compression_dxt3 1 +#endif + +/* GL_ANGLE_texture_compression_dxt5 */ +#ifndef GL_ANGLE_texture_compression_dxt5 +#define GL_ANGLE_texture_compression_dxt5 1 +#endif + +/* GL_ANGLE_texture_usage */ +#ifndef GL_ANGLE_texture_usage +#define GL_ANGLE_texture_usage 1 +#endif + +#ifndef GL_ANGLE_translated_shader_source +#define GL_ANGLE_translated_shader_source 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); +#endif +typedef void (GL_APIENTRYP PFLGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); +#endif + +/*------------------------------------------------------------------------* + * APPLE extension functions + *------------------------------------------------------------------------*/ + +/* GL_APPLE_copy_texture_levels */ +#ifndef GL_APPLE_copy_texture_levels +#define GL_APPLE_copy_texture_levels 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +#endif +typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); +#endif + +/* GL_APPLE_framebuffer_multisample */ +#ifndef GL_APPLE_framebuffer_multisample +#define GL_APPLE_framebuffer_multisample 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); +#endif + +/* GL_APPLE_rgb_422 */ +#ifndef GL_APPLE_rgb_422 +#define GL_APPLE_rgb_422 1 +#endif + +/* GL_APPLE_sync */ +#ifndef GL_APPLE_sync +#define GL_APPLE_sync 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); +GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); +GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); +GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); +GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +#endif +typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); +typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); +typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); +typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +#endif + +/* GL_APPLE_texture_format_BGRA8888 */ +#ifndef GL_APPLE_texture_format_BGRA8888 +#define GL_APPLE_texture_format_BGRA8888 1 +#endif + +/* GL_APPLE_texture_max_level */ +#ifndef GL_APPLE_texture_max_level +#define GL_APPLE_texture_max_level 1 +#endif + +/*------------------------------------------------------------------------* + * ARM extension functions + *------------------------------------------------------------------------*/ + +/* GL_ARM_mali_program_binary */ +#ifndef GL_ARM_mali_program_binary +#define GL_ARM_mali_program_binary 1 +#endif + +/* GL_ARM_mali_shader_binary */ +#ifndef GL_ARM_mali_shader_binary +#define GL_ARM_mali_shader_binary 1 +#endif + +/* GL_ARM_rgba8 */ +#ifndef GL_ARM_rgba8 +#define GL_ARM_rgba8 1 +#endif + +/*------------------------------------------------------------------------* + * EXT extension functions + *------------------------------------------------------------------------*/ + +/* GL_EXT_blend_minmax */ +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#endif + +/* GL_EXT_color_buffer_half_float */ +#ifndef GL_EXT_color_buffer_half_float +#define GL_EXT_color_buffer_half_float 1 +#endif + +/* GL_EXT_debug_label */ +#ifndef GL_EXT_debug_label +#define GL_EXT_debug_label 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); +GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif +typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); +typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); +#endif + +/* GL_EXT_debug_marker */ +#ifndef GL_EXT_debug_marker +#define GL_EXT_debug_marker 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); +GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); +GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); +#endif +typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); +typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); +#endif + +/* GL_EXT_discard_framebuffer */ +#ifndef GL_EXT_discard_framebuffer +#define GL_EXT_discard_framebuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif +typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif + +/* GL_EXT_map_buffer_range */ +#ifndef GL_EXT_map_buffer_range +#define GL_EXT_map_buffer_range 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); +#endif +typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +#endif + +/* GL_EXT_multisampled_render_to_texture */ +#ifndef GL_EXT_multisampled_render_to_texture +#define GL_EXT_multisampled_render_to_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); +#endif +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif + +/* GL_EXT_multiview_draw_buffers */ +#ifndef GL_EXT_multiview_draw_buffers +#define GL_EXT_multiview_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); +GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); +GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); +#endif +typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); +typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); +#endif + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); +GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif + +/* GL_EXT_occlusion_query_boolean */ +#ifndef GL_EXT_occlusion_query_boolean +#define GL_EXT_occlusion_query_boolean 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); +GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); +GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); +GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); +GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); +#endif +typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); +typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); +typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); +typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); +#endif + +/* GL_EXT_read_format_bgra */ +#ifndef GL_EXT_read_format_bgra +#define GL_EXT_read_format_bgra 1 +#endif + +/* GL_EXT_robustness */ +#ifndef GL_EXT_robustness +#define GL_EXT_robustness 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); +GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params); +GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); +#endif +typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); +typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params); +typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +#endif + +/* GL_EXT_separate_shader_objects */ +#ifndef GL_EXT_separate_shader_objects +#define GL_EXT_separate_shader_objects 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); +GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); +GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); +GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); +GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); +GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); +GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); +GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x); +GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y); +GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z); +GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x); +GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); +GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif +typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); +typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); +typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); +typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); +typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +#endif + +/* GL_EXT_shader_framebuffer_fetch */ +#ifndef GL_EXT_shader_framebuffer_fetch +#define GL_EXT_shader_framebuffer_fetch 1 +#endif + +/* GL_EXT_shader_texture_lod */ +#ifndef GL_EXT_shader_texture_lod +#define GL_EXT_shader_texture_lod 1 +#endif + +/* GL_EXT_shadow_samplers */ +#ifndef GL_EXT_shadow_samplers +#define GL_EXT_shadow_samplers 1 +#endif + +/* GL_EXT_sRGB */ +#ifndef GL_EXT_sRGB +#define GL_EXT_sRGB 1 +#endif + +/* GL_EXT_texture_compression_dxt1 */ +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_EXT_texture_compression_dxt1 1 +#endif + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 1 +#endif + +/* GL_EXT_texture_rg */ +#ifndef GL_EXT_texture_rg +#define GL_EXT_texture_rg 1 +#endif + +/* GL_EXT_texture_storage */ +#ifndef GL_EXT_texture_storage +#define GL_EXT_texture_storage 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +#endif + +/* GL_EXT_texture_type_2_10_10_10_REV */ +#ifndef GL_EXT_texture_type_2_10_10_10_REV +#define GL_EXT_texture_type_2_10_10_10_REV 1 +#endif + +/* GL_EXT_unpack_subimage */ +#ifndef GL_EXT_unpack_subimage +#define GL_EXT_unpack_subimage 1 +#endif + +/*------------------------------------------------------------------------* + * DMP extension functions + *------------------------------------------------------------------------*/ + +/* GL_DMP_shader_binary */ +#ifndef GL_DMP_shader_binary +#define GL_DMP_shader_binary 1 +#endif + +/*------------------------------------------------------------------------* + * FJ extension functions + *------------------------------------------------------------------------*/ + +/* GL_FJ_shader_binary_GCCSO */ +#ifndef GL_FJ_shader_binary_GCCSO +#define GL_FJ_shader_binary_GCCSO 1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension functions + *------------------------------------------------------------------------*/ + +/* GL_IMG_program_binary */ +#ifndef GL_IMG_program_binary +#define GL_IMG_program_binary 1 +#endif + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_IMG_read_format 1 +#endif + +/* GL_IMG_shader_binary */ +#ifndef GL_IMG_shader_binary +#define GL_IMG_shader_binary 1 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#endif + +/* GL_IMG_multisampled_render_to_texture */ +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_IMG_multisampled_render_to_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); +#endif +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif + +/*------------------------------------------------------------------------* + * NV extension functions + *------------------------------------------------------------------------*/ + +/* GL_NV_coverage_sample */ +#ifndef GL_NV_coverage_sample +#define GL_NV_coverage_sample 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); +GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); +#endif +typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); +typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); +#endif + +/* GL_NV_depth_nonlinear */ +#ifndef GL_NV_depth_nonlinear +#define GL_NV_depth_nonlinear 1 +#endif + +/* GL_NV_draw_buffers */ +#ifndef GL_NV_draw_buffers +#define GL_NV_draw_buffers 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); +#endif +typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); +#endif + +/* GL_NV_fbo_color_attachments */ +#ifndef GL_NV_fbo_color_attachments +#define GL_NV_fbo_color_attachments 1 +#endif + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); +GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); +GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint); +GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint); +GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); +GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint); +GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum); +#endif +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#endif + +/* GL_NV_read_buffer */ +#ifndef GL_NV_read_buffer +#define GL_NV_read_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); +#endif +typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); +#endif + +/* GL_NV_read_buffer_front */ +#ifndef GL_NV_read_buffer_front +#define GL_NV_read_buffer_front 1 +#endif + +/* GL_NV_read_depth */ +#ifndef GL_NV_read_depth +#define GL_NV_read_depth 1 +#endif + +/* GL_NV_read_depth_stencil */ +#ifndef GL_NV_read_depth_stencil +#define GL_NV_read_depth_stencil 1 +#endif + +/* GL_NV_read_stencil */ +#ifndef GL_NV_read_stencil +#define GL_NV_read_stencil 1 +#endif + +/* GL_NV_texture_compression_s3tc_update */ +#ifndef GL_NV_texture_compression_s3tc_update +#define GL_NV_texture_compression_s3tc_update 1 +#endif + +/* GL_NV_texture_npot_2D_mipmap */ +#ifndef GL_NV_texture_npot_2D_mipmap +#define GL_NV_texture_npot_2D_mipmap 1 +#endif + +/*------------------------------------------------------------------------* + * QCOM extension functions + *------------------------------------------------------------------------*/ + +/* GL_QCOM_alpha_test */ +#ifndef GL_QCOM_alpha_test +#define GL_QCOM_alpha_test 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); +#endif +typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); +#endif + +/* GL_QCOM_binning_control */ +#ifndef GL_QCOM_binning_control +#define GL_QCOM_binning_control 1 +#endif + +/* GL_QCOM_driver_control */ +#ifndef GL_QCOM_driver_control +#define GL_QCOM_driver_control 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); +GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); +GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); +#endif +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +#endif + +/* GL_QCOM_extended_get */ +#ifndef GL_QCOM_extended_get +#define GL_QCOM_extended_get 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); +GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); +#endif +typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); +#endif + +/* GL_QCOM_extended_get2 */ +#ifndef GL_QCOM_extended_get2 +#define GL_QCOM_extended_get2 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); +GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); +GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif +typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_QCOM_perfmon_global_mode 1 +#endif + +/* GL_QCOM_writeonly_rendering */ +#ifndef GL_QCOM_writeonly_rendering +#define GL_QCOM_writeonly_rendering 1 +#endif + +/* GL_QCOM_tiled_rendering */ +#ifndef GL_QCOM_tiled_rendering +#define GL_QCOM_tiled_rendering 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); +#endif +typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); +#endif + +/*------------------------------------------------------------------------* + * VIV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_VIV_shader_binary */ +#ifndef GL_VIV_shader_binary +#define GL_VIV_shader_binary 1 +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __gl2ext_h_ */ + +#endif /* _MSC_VER */ + +#ifndef APIENTRY +#define APIENTRY GL_APIENTRY +#endif \ No newline at end of file diff --git a/jni/SDL2-2.0.1/include/SDL_platform.h b/jni/SDL2-2.0.1/include/SDL_platform.h index a40c41e2..7e56c45b 100644 --- a/jni/SDL2-2.0.1/include/SDL_platform.h +++ b/jni/SDL2-2.0.1/include/SDL_platform.h @@ -32,10 +32,6 @@ #undef __AIX__ #define __AIX__ 1 #endif -#if defined(__BEOS__) -#undef __BEOS__ -#define __BEOS__ 1 -#endif #if defined(__HAIKU__) #undef __HAIKU__ #define __HAIKU__ 1 @@ -86,9 +82,6 @@ #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 # error SDL for Mac OS X only supports deploying on 10.5 and above. #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */ -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 -# error SDL for Mac OS X must be built with a 10.6 SDK or above. -#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */ #endif /* TARGET_OS_IPHONE */ #endif /* defined(__APPLE__) */ diff --git a/jni/SDL2-2.0.1/include/SDL_render.h b/jni/SDL2-2.0.1/include/SDL_render.h index a765dc79..94bf1e6a 100644 --- a/jni/SDL2-2.0.1/include/SDL_render.h +++ b/jni/SDL2-2.0.1/include/SDL_render.h @@ -596,7 +596,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, * * \return 0 on success, or -1 on error */ -extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer, +extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a); @@ -612,7 +612,7 @@ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer, * * \return 0 on success, or -1 on error */ -extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer, +extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer, Uint8 * r, Uint8 * g, Uint8 * b, Uint8 * a); diff --git a/jni/SDL2-2.0.1/include/SDL_revision.h b/jni/SDL2-2.0.1/include/SDL_revision.h index fe3a9fc8..d70fd694 100644 --- a/jni/SDL2-2.0.1/include/SDL_revision.h +++ b/jni/SDL2-2.0.1/include/SDL_revision.h @@ -1,2 +1,2 @@ -#define SDL_REVISION "hg-7890:c031abe0b287" -#define SDL_REVISION_NUMBER 7890 +#define SDL_REVISION "hg-0:aaaaaaaaaaah" +#define SDL_REVISION_NUMBER 0 diff --git a/jni/SDL2-2.0.1/include/SDL_stdinc.h b/jni/SDL2-2.0.1/include/SDL_stdinc.h index 8f17d551..2a217149 100644 --- a/jni/SDL2-2.0.1/include/SDL_stdinc.h +++ b/jni/SDL2-2.0.1/include/SDL_stdinc.h @@ -255,7 +255,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len); #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x))) /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ -SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords) +SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) { #if defined(__GNUC__) && defined(i386) int u0, u1, u2; @@ -331,6 +331,7 @@ extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2); extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len); extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...); +extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap); extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...); extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap); @@ -340,6 +341,8 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char #endif #endif +extern DECLSPEC double SDLCALL SDL_acos(double x); +extern DECLSPEC double SDLCALL SDL_asin(double x); extern DECLSPEC double SDLCALL SDL_atan(double x); extern DECLSPEC double SDLCALL SDL_atan2(double x, double y); extern DECLSPEC double SDLCALL SDL_ceil(double x); diff --git a/jni/SDL2-2.0.1/include/SDL_syswm.h b/jni/SDL2-2.0.1/include/SDL_syswm.h index 5e4454f8..c43a78d2 100644 --- a/jni/SDL2-2.0.1/include/SDL_syswm.h +++ b/jni/SDL2-2.0.1/include/SDL_syswm.h @@ -101,6 +101,7 @@ typedef enum SDL_SYSWM_UNKNOWN, SDL_SYSWM_WINDOWS, SDL_SYSWM_X11, + SDL_SYSWM_WAYLAND, SDL_SYSWM_DIRECTFB, SDL_SYSWM_COCOA, SDL_SYSWM_UIKIT, @@ -175,6 +176,14 @@ struct SDL_SysWMinfo Window window; /**< The X11 window */ } x11; #endif +#if defined(SDL_VIDEO_DRIVER_WAYLAND) + struct + { + struct wl_display *display; /**< Wayland display */ + struct wl_surface *surface; /**< Wayland surface */ + struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */ + } wl; +#endif #if defined(SDL_VIDEO_DRIVER_DIRECTFB) struct { diff --git a/jni/SDL2-2.0.1/include/SDL_test_common.h b/jni/SDL2-2.0.1/include/SDL_test_common.h index 57f31146..5f67aa65 100644 --- a/jni/SDL2-2.0.1/include/SDL_test_common.h +++ b/jni/SDL2-2.0.1/include/SDL_test_common.h @@ -82,6 +82,7 @@ typedef struct Uint32 render_flags; SDL_bool skip_renderer; SDL_Renderer **renderers; + SDL_Texture **targets; /* Audio info */ const char *audiodriver; diff --git a/jni/SDL2-2.0.1/include/SDL_thread.h b/jni/SDL2-2.0.1/include/SDL_thread.h index f248c3d6..8f50f6e5 100644 --- a/jni/SDL2-2.0.1/include/SDL_thread.h +++ b/jni/SDL2-2.0.1/include/SDL_thread.h @@ -111,7 +111,12 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, /** * Create a thread. */ +#if defined(SDL_CreateThread) && SDL_DYNAMIC_API +#undef SDL_CreateThread +#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#else #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) +#endif #else @@ -119,7 +124,7 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, * Create a thread. * * Thread naming is a little complicated: Most systems have very small - * limits for the string length (BeOS has 32 bytes, Linux currently has 16, + * limits for the string length (Haiku has 32 bytes, Linux currently has 16, * Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll * have to see what happens with your system's debugger. The name should be * UTF-8 (but using the naming limits of C identifiers is a better bet). @@ -165,13 +170,53 @@ extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread); extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority); /** - * Wait for a thread to finish. + * Wait for a thread to finish. Threads that haven't been detached will + * remain (as a "zombie") until this function cleans them up. Not doing so + * is a resource leak. + * + * Once a thread has been cleaned up through this function, the SDL_Thread + * that references it becomes invalid and should not be referenced again. + * As such, only one thread may call SDL_WaitThread() on another. * * The return code for the thread function is placed in the area * pointed to by \c status, if \c status is not NULL. + * + * You may not wait on a thread that has been used in a call to + * SDL_DetachThread(). Use either that function or this one, but not + * both, or behavior is undefined. + * + * It is safe to pass NULL to this function; it is a no-op. */ extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status); +/** + * A thread may be "detached" to signify that it should not remain until + * another thread has called SDL_WaitThread() on it. Detaching a thread + * is useful for long-running threads that nothing needs to synchronize + * with or further manage. When a detached thread is done, it simply + * goes away. + * + * There is no way to recover the return code of a detached thread. If you + * need this, don't detach the thread and instead use SDL_WaitThread(). + * + * Once a thread is detached, you should usually assume the SDL_Thread isn't + * safe to reference again, as it will become invalid immediately upon + * the detached thread's exit, instead of remaining until someone has called + * SDL_WaitThread() to finally clean it up. As such, don't detach the same + * thread more than once. + * + * If a thread has already exited when passed to SDL_DetachThread(), it will + * stop waiting for a call to SDL_WaitThread() and clean up immediately. + * It is not safe to detach a thread that might be used with SDL_WaitThread(). + * + * You may not call SDL_WaitThread() on a thread that has been detached. + * Use either that function or this one, but not both, or behavior is + * undefined. + * + * It is safe to pass NULL to this function; it is a no-op. + */ +extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread); + /** * \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific. * diff --git a/jni/SDL2-2.0.1/src/SDL.c b/jni/SDL2-2.0.1/src/SDL.c index 0f6de9fe..d1a3ab5a 100644 --- a/jni/SDL2-2.0.1/src/SDL.c +++ b/jni/SDL2-2.0.1/src/SDL.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "./SDL_internal.h" #if defined(__WIN32__) #include "core/windows/SDL_windows.h" @@ -115,9 +115,11 @@ SDL_InitSubSystem(Uint32 flags) SDL_ClearError(); #if SDL_VIDEO_DRIVER_WINDOWS - if (SDL_HelperWindowCreate() < 0) { - return -1; - } + if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) { + if (SDL_HelperWindowCreate() < 0) { + return -1; + } + } #endif #if !SDL_TIMERS_DISABLED @@ -394,8 +396,6 @@ SDL_GetPlatform() return "AIX"; #elif __ANDROID__ return "Android"; -#elif __BEOS__ - return "BeOS"; #elif __BSDI__ return "BSDI"; #elif __DREAMCAST__ diff --git a/jni/SDL2-2.0.1/src/SDL_assert.c b/jni/SDL2-2.0.1/src/SDL_assert.c index 41c6ad6c..13e571f5 100644 --- a/jni/SDL2-2.0.1/src/SDL_assert.c +++ b/jni/SDL2-2.0.1/src/SDL_assert.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "./SDL_internal.h" #if defined(__WIN32__) #include "core/windows/SDL_windows.h" diff --git a/jni/SDL2-2.0.1/src/SDL_error.c b/jni/SDL2-2.0.1/src/SDL_error.c index 98ef84ac..bc9b10a7 100644 --- a/jni/SDL2-2.0.1/src/SDL_error.c +++ b/jni/SDL2-2.0.1/src/SDL_error.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "./SDL_internal.h" /* Simple error handling in SDL */ diff --git a/jni/SDL2-2.0.1/src/SDL_error_c.h b/jni/SDL2-2.0.1/src/SDL_error_c.h index 2014cc1e..49e6c69e 100644 --- a/jni/SDL2-2.0.1/src/SDL_error_c.h +++ b/jni/SDL2-2.0.1/src/SDL_error_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "./SDL_internal.h" /* This file defines a structure that carries language-independent error messages diff --git a/jni/SDL2-2.0.1/src/SDL_hints.c b/jni/SDL2-2.0.1/src/SDL_hints.c index a1eae9ff..837e7387 100644 --- a/jni/SDL2-2.0.1/src/SDL_hints.c +++ b/jni/SDL2-2.0.1/src/SDL_hints.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "./SDL_internal.h" #include "SDL_hints.h" #include "SDL_error.h" diff --git a/jni/SDL2-2.0.1/src/SDL_internal.h b/jni/SDL2-2.0.1/src/SDL_internal.h new file mode 100644 index 00000000..3ccae74c --- /dev/null +++ b/jni/SDL2-2.0.1/src/SDL_internal.h @@ -0,0 +1,38 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ +#ifndef _SDL_internal_h +#define _SDL_internal_h + +#include "dynapi/SDL_dynapi.h" + +#if SDL_DYNAMIC_API +#include "dynapi/SDL_dynapi_overrides.h" +/* force DECLSPEC and SDLCALL off...it's all internal symbols now. + These will have actual #defines during SDL_dynapi.c only */ +#define DECLSPEC +#define SDLCALL +#endif + +#include "SDL_config.h" + +#endif + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/SDL_log.c b/jni/SDL2-2.0.1/src/SDL_log.c index 18611ca9..7a2d8ac2 100644 --- a/jni/SDL2-2.0.1/src/SDL_log.c +++ b/jni/SDL2-2.0.1/src/SDL_log.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "./SDL_internal.h" #if defined(__WIN32__) #include "core/windows/SDL_windows.h" diff --git a/jni/SDL2-2.0.1/src/atomic/SDL_atomic.c b/jni/SDL2-2.0.1/src/atomic/SDL_atomic.c index e9b636f3..8be9a474 100644 --- a/jni/SDL2-2.0.1/src/atomic/SDL_atomic.c +++ b/jni/SDL2-2.0.1/src/atomic/SDL_atomic.c @@ -18,17 +18,18 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_atomic.h" -/* Note that we undefine the atomic operations here, in case they are - defined as compiler intrinsics while building SDL but the library user - doesn't have that compiler. That way we always have a working set of - atomic operations built into the library. -*/ -#undef SDL_AtomicCAS -#undef SDL_AtomicCASPtr +#if defined(_MSC_VER) && (_MSC_VER >= 1500) +#include +#define HAVE_MSC_ATOMICS 1 +#endif + +#if defined(__MACOSX__) /* !!! FIXME: should we favor gcc atomics? */ +#include +#endif /* If any of the operations are not provided then we must emulate some @@ -53,6 +54,11 @@ Contributed by Bob Pendleton, bob@pendleton.com */ +#if !defined(HAVE_MSC_ATOMICS) && !defined(HAVE_GCC_ATOMICS) && !defined(__MACOSX__) +#define EMULATE_CAS 1 +#endif + +#if EMULATE_CAS static SDL_SpinLock locks[32]; static SDL_INLINE void @@ -70,10 +76,19 @@ leaveLock(void *a) SDL_AtomicUnlock(&locks[index]); } +#endif -DECLSPEC SDL_bool SDLCALL + +SDL_bool SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval) { +#ifdef HAVE_MSC_ATOMICS + return (_InterlockedCompareExchange((long*)&a->value, (long)newval, (long)oldval) == (long)oldval); +#elif defined(__MACOSX__) /* !!! FIXME: should we favor gcc atomics? */ + return (SDL_bool) OSAtomicCompareAndSwap32Barrier(oldval, newval, &a->value); +#elif defined(HAVE_GCC_ATOMICS) + return (SDL_bool) __sync_bool_compare_and_swap(&a->value, oldval, newval); +#elif EMULATE_CAS SDL_bool retval = SDL_FALSE; enterLock(a); @@ -84,11 +99,25 @@ SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval) leaveLock(a); return retval; +#else + #error Please define your platform. +#endif } -DECLSPEC SDL_bool SDLCALL +SDL_bool SDL_AtomicCASPtr(void **a, void *oldval, void *newval) { +#if defined(HAVE_MSC_ATOMICS) && (_M_IX86) + return (_InterlockedCompareExchange((long*)a, (long)newval, (long)oldval) == (long)oldval); +#elif defined(HAVE_MSC_ATOMICS) && (!_M_IX86) + return (_InterlockedCompareExchangePointer(a, newval, oldval) == oldval); +#elif defined(__MACOSX__) && defined(__LP64__) /* !!! FIXME: should we favor gcc atomics? */ + return (SDL_bool) OSAtomicCompareAndSwap64Barrier((int64_t)oldval, (int64_t)newval, (int64_t*) a); +#elif defined(__MACOSX__) && !defined(__LP64__) /* !!! FIXME: should we favor gcc atomics? */ + return (SDL_bool) OSAtomicCompareAndSwap32Barrier((int32_t)oldval, (int32_t)newval, (int32_t*) a); +#elif defined(HAVE_GCC_ATOMICS) + return __sync_bool_compare_and_swap(a, oldval, newval); +#elif EMULATE_CAS SDL_bool retval = SDL_FALSE; enterLock(a); @@ -99,10 +128,83 @@ SDL_AtomicCASPtr(void **a, void *oldval, void *newval) leaveLock(a); return retval; +#else + #error Please define your platform. +#endif } -#if defined(__GNUC__) && defined(__arm__) && \ - (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)) +int +SDL_AtomicSet(SDL_atomic_t *a, int v) +{ +#ifdef HAVE_MSC_ATOMICS + return _InterlockedExchange((long*)&a->value, v); +#elif defined(HAVE_GCC_ATOMICS) + return __sync_lock_test_and_set(&a->value, v); +#else + int value; + do { + value = a->value; + } while (!SDL_AtomicCAS(a, value, v)); + return value; +#endif +} + +void* +SDL_AtomicSetPtr(void **a, void *v) +{ +#if defined(HAVE_MSC_ATOMICS) && (_M_IX86) + return (void *) _InterlockedExchange((long *)a, (long) v); +#elif defined(HAVE_MSC_ATOMICS) && (!_M_IX86) + return _InterlockedExchangePointer(a, v); +#elif defined(HAVE_GCC_ATOMICS) + return __sync_lock_test_and_set(a, v); +#else + void *value; + do { + value = *a; + } while (!SDL_AtomicCASPtr(a, value, v)); + return value; +#endif +} + +int +SDL_AtomicAdd(SDL_atomic_t *a, int v) +{ +#ifdef HAVE_MSC_ATOMICS + return _InterlockedExchangeAdd((long*)&a->value, v); +#elif defined(HAVE_GCC_ATOMICS) + return __sync_fetch_and_add(&a->value, v); +#else + int value; + do { + value = a->value; + } while (!SDL_AtomicCAS(a, value, (value + v))); + return value; +#endif +} + +int +SDL_AtomicGet(SDL_atomic_t *a) +{ + int value; + do { + value = a->value; + } while (!SDL_AtomicCAS(a, value, value)); + return value; +} + +void * +SDL_AtomicGetPtr(void **a) +{ + void *value; + do { + value = *a; + } while (!SDL_AtomicCASPtr(a, value, value)); + return value; +} + +#ifdef __thumb__ +#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) __asm__( " .align 2\n" " .globl _SDL_MemoryBarrierRelease\n" @@ -113,6 +215,7 @@ __asm__( " mcr p15, 0, r0, c7, c10, 5\n" " bx lr\n" ); -#endif /* __GNUC__ && __arm__ && ARMV6 */ +#endif +#endif /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/atomic/SDL_spinlock.c b/jni/SDL2-2.0.1/src/atomic/SDL_spinlock.c index 0826a3f9..f4346c5c 100644 --- a/jni/SDL2-2.0.1/src/atomic/SDL_spinlock.c +++ b/jni/SDL2-2.0.1/src/atomic/SDL_spinlock.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifdef __WIN32__ #include "../core/windows/SDL_windows.h" diff --git a/jni/SDL2-2.0.1/src/audio/SDL_audio.c b/jni/SDL2-2.0.1/src/audio/SDL_audio.c index 5631bb2f..c068887a 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_audio.c +++ b/jni/SDL2-2.0.1/src/audio/SDL_audio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Allow access to a raw mixing buffer */ @@ -56,7 +56,7 @@ extern AudioBootStrap XAUDIO2_bootstrap; extern AudioBootStrap DSOUND_bootstrap; extern AudioBootStrap WINMM_bootstrap; extern AudioBootStrap PAUDIO_bootstrap; -extern AudioBootStrap BEOSAUDIO_bootstrap; +extern AudioBootStrap HAIKUAUDIO_bootstrap; extern AudioBootStrap COREAUDIO_bootstrap; extern AudioBootStrap SNDMGR_bootstrap; extern AudioBootStrap DISKAUD_bootstrap; @@ -113,8 +113,8 @@ static const AudioBootStrap *const bootstrap[] = { #if SDL_AUDIO_DRIVER_PAUDIO &PAUDIO_bootstrap, #endif -#if SDL_AUDIO_DRIVER_BEOSAUDIO - &BEOSAUDIO_bootstrap, +#if SDL_AUDIO_DRIVER_HAIKU + &HAIKUAUDIO_bootstrap, #endif #if SDL_AUDIO_DRIVER_COREAUDIO &COREAUDIO_bootstrap, @@ -722,10 +722,16 @@ SDL_GetAudioDeviceName(int index, int iscapture) } if ((iscapture) && (current_audio.impl.OnlyHasDefaultInputDevice)) { + if (index > 0) { + goto no_such_device; + } return DEFAULT_INPUT_DEVNAME; } if ((!iscapture) && (current_audio.impl.OnlyHasDefaultOutputDevice)) { + if (index > 0) { + goto no_such_device; + } return DEFAULT_OUTPUT_DEVNAME; } @@ -1030,7 +1036,11 @@ open_audio_device(const char *devname, int iscapture, /* !!! FIXME: this is nasty. */ #if defined(__WIN32__) && !defined(HAVE_LIBC) #undef SDL_CreateThread +#if SDL_DYNAMIC_API + device->thread = SDL_CreateThread_REAL(SDL_RunAudio, name, device, NULL, NULL); +#else device->thread = SDL_CreateThread(SDL_RunAudio, name, device, NULL, NULL); +#endif #else device->thread = SDL_CreateThread(SDL_RunAudio, name, device); #endif diff --git a/jni/SDL2-2.0.1/src/audio/SDL_audio_c.h b/jni/SDL2-2.0.1/src/audio/SDL_audio_c.h index 6abae300..71b04cf7 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_audio_c.h +++ b/jni/SDL2-2.0.1/src/audio/SDL_audio_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */ diff --git a/jni/SDL2-2.0.1/src/audio/SDL_audiocvt.c b/jni/SDL2-2.0.1/src/audio/SDL_audiocvt.c index fc23b5d5..92ceeb14 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_audiocvt.c +++ b/jni/SDL2-2.0.1/src/audio/SDL_audiocvt.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Functions for audio drivers to perform runtime conversion of audio format */ diff --git a/jni/SDL2-2.0.1/src/audio/SDL_audiodev.c b/jni/SDL2-2.0.1/src/audio/SDL_audiodev.c index af45a8b9..0ecb26b9 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_audiodev.c +++ b/jni/SDL2-2.0.1/src/audio/SDL_audiodev.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Get the name of the audio device we use for output */ diff --git a/jni/SDL2-2.0.1/src/audio/SDL_audiodev_c.h b/jni/SDL2-2.0.1/src/audio/SDL_audiodev_c.h index d439926b..d2e1ddbb 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_audiodev_c.h +++ b/jni/SDL2-2.0.1/src/audio/SDL_audiodev_c.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ #include "SDL.h" -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_sysaudio.h" /* Open the audio device for playback, and don't block if busy */ diff --git a/jni/SDL2-2.0.1/src/audio/SDL_audiomem.h b/jni/SDL2-2.0.1/src/audio/SDL_audiomem.h index 8c027c3a..9e462c47 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_audiomem.h +++ b/jni/SDL2-2.0.1/src/audio/SDL_audiomem.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #define SDL_AllocAudioMem SDL_malloc #define SDL_FreeAudioMem SDL_free diff --git a/jni/SDL2-2.0.1/src/audio/SDL_audiotypecvt.c b/jni/SDL2-2.0.1/src/audio/SDL_audiotypecvt.c index 6245c534..5522041d 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_audiotypecvt.c +++ b/jni/SDL2-2.0.1/src/audio/SDL_audiotypecvt.c @@ -20,7 +20,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_audio.h" #include "SDL_audio_c.h" diff --git a/jni/SDL2-2.0.1/src/audio/SDL_mixer.c b/jni/SDL2-2.0.1/src/audio/SDL_mixer.c index 37907596..87ceac96 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_mixer.c +++ b/jni/SDL2-2.0.1/src/audio/SDL_mixer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This provides the default mixing callback for the SDL audio routines */ diff --git a/jni/SDL2-2.0.1/src/audio/SDL_sysaudio.h b/jni/SDL2-2.0.1/src/audio/SDL_sysaudio.h index 83919c6e..b4d6069d 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_sysaudio.h +++ b/jni/SDL2-2.0.1/src/audio/SDL_sysaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_sysaudio_h #define _SDL_sysaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/SDL_wave.c b/jni/SDL2-2.0.1/src/audio/SDL_wave.c index fac24cb3..4d09cf30 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_wave.c +++ b/jni/SDL2-2.0.1/src/audio/SDL_wave.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Microsoft WAVE file loading routines */ diff --git a/jni/SDL2-2.0.1/src/audio/SDL_wave.h b/jni/SDL2-2.0.1/src/audio/SDL_wave.h index d82399cb..4fdc8cb0 100644 --- a/jni/SDL2-2.0.1/src/audio/SDL_wave.h +++ b/jni/SDL2-2.0.1/src/audio/SDL_wave.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* WAVE files are little-endian */ diff --git a/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.c b/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.c index 5ff4cef4..b60f71dc 100644 --- a/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.c +++ b/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_ALSA diff --git a/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.h b/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.h index 31c65340..78e892d8 100644 --- a/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.h +++ b/jni/SDL2-2.0.1/src/audio/alsa/SDL_alsa_audio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_ALSA_audio_h #define _SDL_ALSA_audio_h diff --git a/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.c b/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.c index 94e27f32..ac9fd9de 100644 --- a/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.c +++ b/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_ANDROID diff --git a/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.h b/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.h index c02ad1a7..bad6a42a 100644 --- a/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.h +++ b/jni/SDL2-2.0.1/src/audio/android/SDL_androidaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_androidaudio_h #define _SDL_androidaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.c b/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.c index 7e835c18..516602dc 100644 --- a/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.c +++ b/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_ARTS diff --git a/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.h b/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.h index 1387cc5c..94fa5257 100644 --- a/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.h +++ b/jni/SDL2-2.0.1/src/audio/arts/SDL_artsaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_artscaudio_h #define _SDL_artscaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.c b/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.c index 6694683b..90fd9a4f 100644 --- a/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.c +++ b/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_BSD diff --git a/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.h b/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.h index b64be31b..2550a9ed 100644 --- a/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.h +++ b/jni/SDL2-2.0.1/src/audio/bsd/SDL_bsdaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_bsdaudio_h #define _SDL_bsdaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.c b/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.c index a35135a2..653b8ceb 100644 --- a/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.c +++ b/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_audio.h" #include "../SDL_audio_c.h" #include "../SDL_sysaudio.h" diff --git a/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.h b/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.h index 2f0db5ba..da003aa6 100644 --- a/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.h +++ b/jni/SDL2-2.0.1/src/audio/coreaudio/SDL_coreaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_coreaudio_h #define _SDL_coreaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.c b/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.c index 86563a62..b3d08736 100644 --- a/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.c +++ b/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_DSOUND diff --git a/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.h b/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.h index 758299f1..46dbd3fc 100644 --- a/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.h +++ b/jni/SDL2-2.0.1/src/audio/directsound/SDL_directsound.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_directsound_h #define _SDL_directsound_h diff --git a/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.c b/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.c index 0dc650e1..7429c0e6 100644 --- a/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.c +++ b/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_DISK diff --git a/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.h b/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.h index 7e5b4840..94d44abc 100644 --- a/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.h +++ b/jni/SDL2-2.0.1/src/audio/disk/SDL_diskaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_diskaudio_h #define _SDL_diskaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.c b/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.c index e3190170..10426bc3 100644 --- a/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.c +++ b/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_OSS diff --git a/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.h b/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.h index 62ed45f1..5c3204a1 100644 --- a/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.h +++ b/jni/SDL2-2.0.1/src/audio/dsp/SDL_dspaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_dspaudio_h #define _SDL_dspaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.c b/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.c index c3e8ea41..a1130320 100644 --- a/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.c +++ b/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* Output audio to nowhere... */ diff --git a/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.h b/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.h index c0015a54..1b948311 100644 --- a/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.h +++ b/jni/SDL2-2.0.1/src/audio/dummy/SDL_dummyaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_dummyaudio_h #define _SDL_dummyaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.c b/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.c index 8bba6409..28c45c75 100644 --- a/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.c +++ b/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_ESD diff --git a/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.h b/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.h index 26bea9cf..4f772376 100644 --- a/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.h +++ b/jni/SDL2-2.0.1/src/audio/esd/SDL_esdaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_esdaudio_h #define _SDL_esdaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.c b/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.c index 49ad2c16..452a9a81 100644 --- a/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.c +++ b/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_FUSIONSOUND diff --git a/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.h b/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.h index 7f227750..2e3d28d8 100644 --- a/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.h +++ b/jni/SDL2-2.0.1/src/audio/fusionsound/SDL_fsaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_fsaudio_h #define _SDL_fsaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/baudio/SDL_beaudio.cc b/jni/SDL2-2.0.1/src/audio/haiku/SDL_haikuaudio.cc similarity index 81% rename from jni/SDL2-2.0.1/src/audio/baudio/SDL_beaudio.cc rename to jni/SDL2-2.0.1/src/audio/haiku/SDL_haikuaudio.cc index e2edf85f..09549c0e 100644 --- a/jni/SDL2-2.0.1/src/audio/baudio/SDL_beaudio.cc +++ b/jni/SDL2-2.0.1/src/audio/haiku/SDL_haikuaudio.cc @@ -18,15 +18,16 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_AUDIO_DRIVER_BEOSAUDIO +#if SDL_AUDIO_DRIVER_HAIKU -/* Allow access to the audio stream on BeOS */ +/* Allow access to the audio stream on Haiku */ #include +#include -#include "../../main/beos/SDL_BeApp.h" +#include "../../main/haiku/SDL_BeApp.h" extern "C" { @@ -34,14 +35,13 @@ extern "C" #include "SDL_audio.h" #include "../SDL_audio_c.h" #include "../SDL_sysaudio.h" -#include "../../thread/beos/SDL_systhread_c.h" -#include "SDL_beaudio.h" +#include "SDL_haikuaudio.h" } /* !!! FIXME: have the callback call the higher level to avoid code dupe. */ -/* The BeOS callback for handling the audio buffer */ +/* The Haiku callback for handling the audio buffer */ static void FillSound(void *device, void *stream, size_t len, const media_raw_audio_format & format) @@ -71,7 +71,7 @@ FillSound(void *device, void *stream, size_t len, } static void -BEOSAUDIO_CloseDevice(_THIS) +HAIKUAUDIO_CloseDevice(_THIS) { if (_this->hidden != NULL) { if (_this->hidden->audio_obj) { @@ -85,8 +85,33 @@ BEOSAUDIO_CloseDevice(_THIS) } } + +static const int sig_list[] = { + SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGWINCH, 0 +}; + +static inline void +MaskSignals(sigset_t * omask) +{ + sigset_t mask; + int i; + + sigemptyset(&mask); + for (i = 0; sig_list[i]; ++i) { + sigaddset(&mask, sig_list[i]); + } + sigprocmask(SIG_BLOCK, &mask, omask); +} + +static inline void +UnmaskSignals(sigset_t * omask) +{ + sigprocmask(SIG_SETMASK, omask, NULL); +} + + static int -BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture) +HAIKUAUDIO_OpenDevice(_THIS, const char *devname, int iscapture) { int valid_datatype = 0; media_raw_audio_format format; @@ -151,7 +176,7 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture) } if (!valid_datatype) { /* shouldn't happen, but just in case... */ - BEOSAUDIO_CloseDevice(_this); + HAIKUAUDIO_CloseDevice(_this); return SDL_SetError("Unsupported audio format"); } @@ -162,15 +187,15 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture) /* Subscribe to the audio stream (creates a new thread) */ sigset_t omask; - SDL_MaskSignals(&omask); + MaskSignals(&omask); _this->hidden->audio_obj = new BSoundPlayer(&format, "SDL Audio", FillSound, NULL, _this); - SDL_UnmaskSignals(&omask); + UnmaskSignals(&omask); if (_this->hidden->audio_obj->Start() == B_NO_ERROR) { _this->hidden->audio_obj->SetHasData(true); } else { - BEOSAUDIO_CloseDevice(_this); + HAIKUAUDIO_CloseDevice(_this); return SDL_SetError("Unable to start Be audio"); } @@ -179,13 +204,13 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture) } static void -BEOSAUDIO_Deinitialize(void) +HAIKUAUDIO_Deinitialize(void) { SDL_QuitBeApp(); } static int -BEOSAUDIO_Init(SDL_AudioDriverImpl * impl) +HAIKUAUDIO_Init(SDL_AudioDriverImpl * impl) { /* Initialize the Be Application, if it's not already started */ if (SDL_InitBeApp() < 0) { @@ -193,9 +218,9 @@ BEOSAUDIO_Init(SDL_AudioDriverImpl * impl) } /* Set the function pointers */ - impl->OpenDevice = BEOSAUDIO_OpenDevice; - impl->CloseDevice = BEOSAUDIO_CloseDevice; - impl->Deinitialize = BEOSAUDIO_Deinitialize; + impl->OpenDevice = HAIKUAUDIO_OpenDevice; + impl->CloseDevice = HAIKUAUDIO_CloseDevice; + impl->Deinitialize = HAIKUAUDIO_Deinitialize; impl->ProvidesOwnCallbackThread = 1; impl->OnlyHasDefaultOutputDevice = 1; @@ -204,12 +229,12 @@ BEOSAUDIO_Init(SDL_AudioDriverImpl * impl) extern "C" { - extern AudioBootStrap BEOSAUDIO_bootstrap; + extern AudioBootStrap HAIKUAUDIO_bootstrap; } -AudioBootStrap BEOSAUDIO_bootstrap = { - "baudio", "BeOS BSoundPlayer", BEOSAUDIO_Init, 0 +AudioBootStrap HAIKUAUDIO_bootstrap = { + "haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, 0 }; -#endif /* SDL_AUDIO_DRIVER_BEOSAUDIO */ +#endif /* SDL_AUDIO_DRIVER_HAIKU */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/audio/baudio/SDL_beaudio.h b/jni/SDL2-2.0.1/src/audio/haiku/SDL_haikuaudio.h similarity index 97% rename from jni/SDL2-2.0.1/src/audio/baudio/SDL_beaudio.h rename to jni/SDL2-2.0.1/src/audio/haiku/SDL_haikuaudio.h index 61f9dec8..17621974 100644 --- a/jni/SDL2-2.0.1/src/audio/baudio/SDL_beaudio.h +++ b/jni/SDL2-2.0.1/src/audio/haiku/SDL_haikuaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_beaudio_h #define _SDL_beaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.c b/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.c index c2bf6774..7b09d7ed 100644 --- a/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.c +++ b/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_NAS diff --git a/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.h b/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.h index 85bd761d..f44d74be 100644 --- a/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.h +++ b/jni/SDL2-2.0.1/src/audio/nas/SDL_nasaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_nasaudio_h #define _SDL_nasaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.c b/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.c index 8a248af4..4cbebb0d 100644 --- a/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.c +++ b/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_PAUDIO diff --git a/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.h b/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.h index 7be1ed65..f21c21f8 100644 --- a/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.h +++ b/jni/SDL2-2.0.1/src/audio/paudio/SDL_paudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_paudaudio_h #define _SDL_paudaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.c b/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.c index 5923eaec..0ac71817 100644 --- a/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.c +++ b/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.c @@ -25,7 +25,7 @@ was the cleanest way to move it to 1.3. The 1.2 target was written by Stéphan Kochen: stephan .a.t. kochen.nl */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_PULSEAUDIO diff --git a/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.h b/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.h index cb960399..648f29d2 100644 --- a/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.h +++ b/jni/SDL2-2.0.1/src/audio/pulseaudio/SDL_pulseaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_pulseaudio_h #define _SDL_pulseaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.c b/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.c index 78f69c0d..7bc91d4e 100644 --- a/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.c +++ b/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_QSA diff --git a/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.h b/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.h index 1717d087..e89b2c3a 100644 --- a/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.h +++ b/jni/SDL2-2.0.1/src/audio/qsa/SDL_qsa_audio.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef __SDL_QSA_AUDIO_H__ #define __SDL_QSA_AUDIO_H__ diff --git a/jni/SDL2-2.0.1/src/audio/sdlgenaudiocvt.pl b/jni/SDL2-2.0.1/src/audio/sdlgenaudiocvt.pl index 474ce811..25a6c2e1 100755 --- a/jni/SDL2-2.0.1/src/audio/sdlgenaudiocvt.pl +++ b/jni/SDL2-2.0.1/src/audio/sdlgenaudiocvt.pl @@ -57,7 +57,7 @@ sub outputHeader { 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_audio.h" #include "SDL_audio_c.h" diff --git a/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.c b/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.c index 309472da..a8ed63c5 100644 --- a/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.c +++ b/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_SNDIO diff --git a/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.h b/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.h index 94e1542e..ca72c712 100644 --- a/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.h +++ b/jni/SDL2-2.0.1/src/audio/sndio/SDL_sndioaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_sndioaudio_h #define _SDL_sndioaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.c b/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.c index 98acf444..8b867b5b 100644 --- a/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.c +++ b/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_SUNAUDIO diff --git a/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.h b/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.h index 9b92266f..fb47eb84 100644 --- a/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.h +++ b/jni/SDL2-2.0.1/src/audio/sun/SDL_sunaudio.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_sunaudio_h #define _SDL_sunaudio_h diff --git a/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.c b/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.c index 4220afd4..20a9c78a 100644 --- a/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.c +++ b/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_WINMM diff --git a/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.h b/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.h index 5a0574d1..784f7b8a 100644 --- a/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.h +++ b/jni/SDL2-2.0.1/src/audio/winmm/SDL_winmm.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_winmm_h #define _SDL_winmm_h diff --git a/jni/SDL2-2.0.1/src/audio/xaudio2/SDL_xaudio2.c b/jni/SDL2-2.0.1/src/audio/xaudio2/SDL_xaudio2.c index 557c3bb9..5ec8abcd 100644 --- a/jni/SDL2-2.0.1/src/audio/xaudio2/SDL_xaudio2.c +++ b/jni/SDL2-2.0.1/src/audio/xaudio2/SDL_xaudio2.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_AUDIO_DRIVER_XAUDIO2 @@ -32,7 +32,11 @@ /* The configure script already did any necessary checking */ # define SDL_XAUDIO2_HAS_SDK 1 #else -#include /* XAudio2 exists as of the March 2008 DirectX SDK */ +/* XAudio2 exists as of the March 2008 DirectX SDK + The XAudio2 implementation available in the Windows 8 SDK targets Windows 8 and newer. + If you want to build SDL with XAudio2 support you should install the DirectX SDK. + */ +#include #if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284)) # pragma message("Your DirectX SDK is too old. Disabling XAudio2 support.") #else diff --git a/jni/SDL2-2.0.1/src/core/android/SDL_android.c b/jni/SDL2-2.0.1/src/core/android/SDL_android.c index 763715e6..c3944f41 100644 --- a/jni/SDL2-2.0.1/src/core/android/SDL_android.c +++ b/jni/SDL2-2.0.1/src/core/android/SDL_android.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_stdinc.h" #include "SDL_assert.h" #include "SDL_log.h" @@ -34,6 +34,7 @@ #include "../../video/android/SDL_androidtouch.h" #include "../../video/android/SDL_androidvideo.h" #include "../../video/android/SDL_androidwindow.h" +#include "../../joystick/android/SDL_sysjoystick_c.h" #include #include @@ -74,6 +75,7 @@ static jmethodID midAudioInit; static jmethodID midAudioWriteShortBuffer; static jmethodID midAudioWriteByteBuffer; static jmethodID midAudioQuit; +static jmethodID midPollInputDevices; /* Accelerometer data storage */ static float fLastAccelerometer[3]; @@ -97,12 +99,10 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) * Create mThreadKey so we can keep track of the JNIEnv assigned to each thread * Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this */ - if (pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed)) { + if (pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed) != 0) { __android_log_print(ANDROID_LOG_ERROR, "SDL", "Error initializing pthread key"); } - else { - Android_JNI_SetupThread(); - } + Android_JNI_SetupThread(); return JNI_VERSION_1_4; } @@ -128,11 +128,13 @@ void SDL_Android_Init(JNIEnv* mEnv, jclass cls) "audioWriteByteBuffer", "([B)V"); midAudioQuit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "audioQuit", "()V"); + midPollInputDevices = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, + "pollInputDevices", "()V"); bHasNewData = false; if(!midGetNativeSurface || !midFlipBuffers || !midAudioInit || - !midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit) { + !midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit || !midPollInputDevices) { __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL: Couldn't locate Java callbacks, check that they're named and typed correctly"); } __android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init() finished!"); @@ -146,6 +148,52 @@ void Java_org_libsdl_app_SDLActivity_onNativeResize( Android_SetScreenResolution(width, height, format); } +// Paddown +int Java_org_libsdl_app_SDLActivity_onNativePadDown( + JNIEnv* env, jclass jcls, + jint device_id, jint keycode) +{ + return Android_OnPadDown(device_id, keycode); +} + +// Padup +int Java_org_libsdl_app_SDLActivity_onNativePadUp( + JNIEnv* env, jclass jcls, + jint device_id, jint keycode) +{ + return Android_OnPadUp(device_id, keycode); +} + +/* Joy */ +void Java_org_libsdl_app_SDLActivity_onNativeJoy( + JNIEnv* env, jclass jcls, + jint device_id, jint axis, jfloat value) +{ + Android_OnJoy(device_id, axis, value); +} + + +int Java_org_libsdl_app_SDLActivity_nativeAddJoystick( + JNIEnv* env, jclass jcls, + jint device_id, jstring device_name, jint is_accelerometer, + jint nbuttons, jint naxes, jint nhats, jint nballs) +{ + int retval; + const char *name = (*env)->GetStringUTFChars(env, device_name, NULL); + + retval = Android_AddJoystick(device_id, name, (SDL_bool) is_accelerometer, nbuttons, naxes, nhats, nballs); + + (*env)->ReleaseStringUTFChars(env, device_name, name); + + return retval; +} + +int Java_org_libsdl_app_SDLActivity_nativeRemoveJoystick( + JNIEnv* env, jclass jcls, jint device_id) +{ + return Android_RemoveJoystick(device_id); +} + /* Surface Created */ void Java_org_libsdl_app_SDLActivity_onNativeSurfaceChanged(JNIEnv* env, jclass jcls) @@ -259,25 +307,33 @@ void Java_org_libsdl_app_SDLActivity_nativeLowMemory( void Java_org_libsdl_app_SDLActivity_nativeQuit( JNIEnv* env, jclass cls) { + /* Discard previous events. The user should have handled state storage + * in SDL_APP_WILLENTERBACKGROUND. After nativeQuit() is called, no + * events other than SDL_QUIT and SDL_APP_TERMINATING should fire */ + SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT); /* Inject a SDL_QUIT event */ SDL_SendQuit(); SDL_SendAppEvent(SDL_APP_TERMINATING); + /* Resume the event loop so that the app can catch SDL_QUIT which + * should now be the top event in the event queue. */ + if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem); } /* Pause */ void Java_org_libsdl_app_SDLActivity_nativePause( JNIEnv* env, jclass cls) { + __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativePause()"); if (Android_Window) { - /* Signal the pause semaphore so the event loop knows to pause and (optionally) block itself */ - if (!SDL_SemValue(Android_PauseSem)) SDL_SemPost(Android_PauseSem); SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0); SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); + SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND); + SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND); + + /* *After* sending the relevant events, signal the pause semaphore + * so the event loop knows to pause and (optionally) block itself */ + if (!SDL_SemValue(Android_PauseSem)) SDL_SemPost(Android_PauseSem); } - - __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativePause()"); - SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND); - SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND); } /* Resume */ @@ -285,17 +341,17 @@ void Java_org_libsdl_app_SDLActivity_nativeResume( JNIEnv* env, jclass cls) { __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeResume()"); - SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND); - SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND); if (Android_Window) { + SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND); + SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND); + SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0); + SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0); /* Signal the resume semaphore so the event loop knows to resume and restore the GL Context * We can't restore the GL Context here because it needs to be done on the SDL main thread * and this function will be called from the Java thread instead. */ if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem); - SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0); - SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0); } } @@ -421,7 +477,8 @@ SDL_bool Android_JNI_GetAccelerometerValues(float values[3]) return retval; } -static void Android_JNI_ThreadDestroyed(void* value) { +static void Android_JNI_ThreadDestroyed(void* value) +{ /* The thread is being destroyed, detach it from the Java VM and set the mThreadKey value to NULL as required */ JNIEnv *env = (JNIEnv*) value; if (env != NULL) { @@ -430,7 +487,8 @@ static void Android_JNI_ThreadDestroyed(void* value) { } } -JNIEnv* Android_JNI_GetEnv(void) { +JNIEnv* Android_JNI_GetEnv(void) +{ /* From http://developer.android.com/guide/practices/jni.html * All threads are Linux threads, scheduled by the kernel. * They're usually started from managed code (using Thread.start), but they can also be created elsewhere and then @@ -450,10 +508,6 @@ JNIEnv* Android_JNI_GetEnv(void) { return 0; } - return env; -} - -int Android_JNI_SetupThread(void) { /* From http://developer.android.com/guide/practices/jni.html * Threads attached through JNI must call DetachCurrentThread before they exit. If coding this directly is awkward, * in Android 2.0 (Eclair) and higher you can use pthread_key_create to define a destructor function that will be @@ -463,8 +517,14 @@ int Android_JNI_SetupThread(void) { * Note: You can call this function any number of times for the same thread, there's no harm in it * (except for some lost CPU cycles) */ - JNIEnv *env = Android_JNI_GetEnv(); pthread_setspecific(mThreadKey, (void*) env); + + return env; +} + +int Android_JNI_SetupThread(void) +{ + Android_JNI_GetEnv(); return 1; } @@ -1009,7 +1069,7 @@ static jobject Android_JNI_GetSystemServiceObject(const char* name) mid = (*env)->GetStaticMethodID(env, mActivityClass, "getContext", "()Landroid/content/Context;"); jobject context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid); - mid = (*env)->GetMethodID(env, mActivityClass, "getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;"); + mid = (*env)->GetMethodID(env, mActivityClass, "getSystemServiceFromUiThread", "(Ljava/lang/String;)Ljava/lang/Object;"); jobject manager = (*env)->CallObjectMethod(env, context, mid, service); (*env)->DeleteLocalRef(env, service); @@ -1212,6 +1272,12 @@ int Android_JNI_GetTouchDeviceIds(int **ids) { return number; } +void Android_JNI_PollInputDevices() +{ + JNIEnv *env = Android_JNI_GetEnv(); + (*env)->CallStaticVoidMethod(env, mActivityClass, midPollInputDevices); +} + /* sends message to be handled on the UI event dispatch thread */ int Android_JNI_SendMessage(int command, int param) { diff --git a/jni/SDL2-2.0.1/src/core/android/SDL_android.h b/jni/SDL2-2.0.1/src/core/android/SDL_android.h index 6181a15d..fc154677 100644 --- a/jni/SDL2-2.0.1/src/core/android/SDL_android.h +++ b/jni/SDL2-2.0.1/src/core/android/SDL_android.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -64,6 +64,10 @@ SDL_bool Android_JNI_HasClipboardText(); /* Power support */ int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent); + +/* Joystick support */ +void Android_JNI_PollInputDevices(); + /* Touch support */ int Android_JNI_GetTouchDeviceIds(int **ids); diff --git a/jni/SDL2-2.0.1/src/input/evdev/SDL_evdev.c b/jni/SDL2-2.0.1/src/core/linux/SDL_evdev.c similarity index 99% rename from jni/SDL2-2.0.1/src/input/evdev/SDL_evdev.c rename to jni/SDL2-2.0.1/src/core/linux/SDL_evdev.c index 92dc4fed..5c424f2a 100644 --- a/jni/SDL2-2.0.1/src/input/evdev/SDL_evdev.c +++ b/jni/SDL2-2.0.1/src/core/linux/SDL_evdev.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_INPUT_LINUXEV diff --git a/jni/SDL2-2.0.1/src/input/evdev/SDL_evdev.h b/jni/SDL2-2.0.1/src/core/linux/SDL_evdev.h similarity index 98% rename from jni/SDL2-2.0.1/src/input/evdev/SDL_evdev.h rename to jni/SDL2-2.0.1/src/core/linux/SDL_evdev.h index b9311d4f..0a0f44dd 100644 --- a/jni/SDL2-2.0.1/src/input/evdev/SDL_evdev.h +++ b/jni/SDL2-2.0.1/src/core/linux/SDL_evdev.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_evdev_h #define _SDL_evdev_h diff --git a/jni/SDL2-2.0.1/src/core/linux/SDL_udev.h b/jni/SDL2-2.0.1/src/core/linux/SDL_udev.h index 1c26f110..f7d48c8b 100644 --- a/jni/SDL2-2.0.1/src/core/linux/SDL_udev.h +++ b/jni/SDL2-2.0.1/src/core/linux/SDL_udev.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_udev_h #define _SDL_udev_h diff --git a/jni/SDL2-2.0.1/src/core/windows/SDL_windows.c b/jni/SDL2-2.0.1/src/core/windows/SDL_windows.c index 6ac86a6e..7580608b 100644 --- a/jni/SDL2-2.0.1/src/core/windows/SDL_windows.c +++ b/jni/SDL2-2.0.1/src/core/windows/SDL_windows.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef __WIN32__ @@ -45,7 +45,15 @@ WIN_SetError(const char *prefix) HRESULT WIN_CoInitialize(void) { - const HRESULT hr = CoInitialize(NULL); + /* SDL handles any threading model, so initialize with the default, which + is compatible with OLE and if that doesn't work, try multi-threaded mode. + + If you need multi-threaded mode, call CoInitializeEx() before SDL_Init() + */ + HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + if (hr == RPC_E_CHANGED_MODE) { + hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); + } /* S_FALSE means success, but someone else already initialized. */ /* You still need to call CoUninitialize in this case! */ diff --git a/jni/SDL2-2.0.1/src/cpuinfo/SDL_cpuinfo.c b/jni/SDL2-2.0.1/src/cpuinfo/SDL_cpuinfo.c index fcb60065..c73dd80c 100644 --- a/jni/SDL2-2.0.1/src/cpuinfo/SDL_cpuinfo.c +++ b/jni/SDL2-2.0.1/src/cpuinfo/SDL_cpuinfo.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #if defined(__WIN32__) #include "../core/windows/SDL_windows.h" diff --git a/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.c b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.c new file mode 100644 index 00000000..8266185c --- /dev/null +++ b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.c @@ -0,0 +1,302 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" +#include "SDL_dynapi.h" + +#if SDL_DYNAMIC_API + +#include "SDL.h" + +/* !!! FIXME: Shouldn't these be included in SDL.h? */ +#include "SDL_shape.h" +#include "SDL_syswm.h" + +/* This is the version of the dynamic API. This doesn't match the SDL version + and should not change until there's been a major revamp in API/ABI. + So 2.0.5 adds functions over 2.0.4? This number doesn't change; + the sizeof (jump_table) changes instead. But 2.1.0 changes how a function + works in an incompatible way or removes a function? This number changes, + since sizeof (jump_table) isn't sufficient anymore. It's likely + we'll forget to bump every time we add a function, so this is the + failsafe switch for major API change decisions. Respect it and use it + sparingly. */ +#define SDL_DYNAPI_VERSION 1 + +static void SDL_InitDynamicAPI(void); + + +/* BE CAREFUL CALLING ANY SDL CODE IN HERE, IT WILL BLOW UP. + Even self-contained stuff might call SDL_Error and break everything. */ + + +/* behold, the macro salsa! */ + +/* !!! FIXME: ...disabled...until we write it. :) */ +#define DISABLE_JUMP_MAGIC 1 + +#if DISABLE_JUMP_MAGIC +/* Can't use the macro for varargs nonsense. This is atrocious. */ +#define SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, logname, prio) \ + _static void SDL_Log##logname##name(int category, const char *fmt, ...) { \ + va_list ap; initcall; va_start(ap, fmt); \ + jump_table.SDL_LogMessageV(category, SDL_LOG_PRIORITY_##prio, fmt, ap); \ + va_end(ap); \ + } + +#define SDL_DYNAPI_VARARGS(_static, name, initcall) \ + _static int SDL_SetError##name(const char *fmt, ...) { \ + char buf[512]; /* !!! FIXME: dynamic allocation */ \ + va_list ap; initcall; va_start(ap, fmt); \ + jump_table.SDL_vsnprintf(buf, sizeof (buf), fmt, ap); \ + va_end(ap); \ + return jump_table.SDL_SetError("%s", buf); \ + } \ + _static int SDL_sscanf##name(const char *buf, const char *fmt, ...) { \ + int retval; va_list ap; initcall; va_start(ap, fmt); \ + retval = jump_table.SDL_vsscanf(buf, fmt, ap); \ + va_end(ap); \ + return retval; \ + } \ + _static int SDL_snprintf##name(char *buf, size_t buflen, const char *fmt, ...) { \ + int retval; va_list ap; initcall; va_start(ap, fmt); \ + retval = jump_table.SDL_vsnprintf(buf, buflen, fmt, ap); \ + va_end(ap); \ + return retval; \ + } \ + _static void SDL_Log##name(const char *fmt, ...) { \ + va_list ap; initcall; va_start(ap, fmt); \ + jump_table.SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); \ + va_end(ap); \ + } \ + _static void SDL_LogMessage##name(int category, SDL_LogPriority priority, const char *fmt, ...) { \ + va_list ap; initcall; va_start(ap, fmt); \ + jump_table.SDL_LogMessageV(category, priority, fmt, ap); \ + va_end(ap); \ + } \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Verbose, VERBOSE) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Debug, DEBUG) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Info, INFO) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Warn, WARN) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Error, ERROR) \ + SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Critical, CRITICAL) +#endif + + +/* Typedefs for function pointers for jump table, and predeclare funcs */ +/* The DEFAULT funcs will init jump table and then call real function. */ +/* The REAL funcs are the actual functions, name-mangled to not clash. */ +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \ + typedef rc (*SDL_DYNAPIFN_##fn) params; \ + static rc fn##_DEFAULT params; \ + extern rc fn##_REAL params; +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC + +/* The jump table! */ +typedef struct { + #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) SDL_DYNAPIFN_##fn fn; + #include "SDL_dynapi_procs.h" + #undef SDL_DYNAPI_PROC +} SDL_DYNAPI_jump_table; + +/* Predeclare the default functions for initializing the jump table. */ +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) static rc fn##_DEFAULT params; +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC + +/* The actual jump table. */ +static SDL_DYNAPI_jump_table jump_table = { + #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) fn##_DEFAULT, + #include "SDL_dynapi_procs.h" + #undef SDL_DYNAPI_PROC +}; + +/* Default functions init the function table then call right thing. */ +#if DISABLE_JUMP_MAGIC +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \ + static rc fn##_DEFAULT params { \ + SDL_InitDynamicAPI(); \ + ret jump_table.fn args; \ + } +#define SDL_DYNAPI_PROC_NO_VARARGS 1 +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC +#undef SDL_DYNAPI_PROC_NO_VARARGS +SDL_DYNAPI_VARARGS(static, _DEFAULT, SDL_InitDynamicAPI()) +#else +/* !!! FIXME: need the jump magic. */ +#error Write me. +#endif + +/* Public API functions to jump into the jump table. */ +#if DISABLE_JUMP_MAGIC +#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \ + rc fn params { ret jump_table.fn args; } +#define SDL_DYNAPI_PROC_NO_VARARGS 1 +#include "SDL_dynapi_procs.h" +#undef SDL_DYNAPI_PROC +#undef SDL_DYNAPI_PROC_NO_VARARGS +SDL_DYNAPI_VARARGS(,,) +#else +/* !!! FIXME: need the jump magic. */ +#error Write me. +#endif + + + +/* Here's the exported entry point that fills in the jump table. */ +/* Use specific types when an "int" might suffice to keep this sane. */ +typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize); +extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32); + +Sint32 +SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) +{ + SDL_DYNAPI_jump_table *output_jump_table = (SDL_DYNAPI_jump_table *) table; + + if (apiver != SDL_DYNAPI_VERSION) { + /* !!! FIXME: can maybe handle older versions? */ + return -1; /* not compatible. */ + } else if (tablesize > sizeof (jump_table)) { + return -1; /* newer version of SDL with functions we can't provide. */ + } + + /* Init our jump table first. */ + #define SDL_DYNAPI_PROC(rc,fn,params,args,ret) jump_table.fn = fn##_REAL; + #include "SDL_dynapi_procs.h" + #undef SDL_DYNAPI_PROC + + /* Then the external table... */ + if (output_jump_table != &jump_table) { + jump_table.SDL_memcpy(output_jump_table, &jump_table, tablesize); + } + + /* Safe to call SDL functions now; jump table is initialized! */ + + return 0; /* success! */ +} + + +/* Obviously we can't use SDL_LoadObject() to load SDL. :) */ +/* Also obviously, we never close the loaded library. */ +#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include +static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym) +{ + HANDLE lib = LoadLibraryA(fname); + return lib ? GetProcAddress(lib, sym) : NULL; +} + +#elif defined(__HAIKU__) +#include +static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym) +{ + image_id lib = load_add_on(fname); + void *retval = NULL; + if ((lib < 0) || (get_image_symbol(lib, sym, B_SYMBOL_TYPE_TEXT, &retval) != B_NO_ERROR)) { + retval = NULL; + } + return retval; +} +#elif defined(unix) || defined(__unix__) || defined(__APPLE__) +#include +static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym) +{ + void *lib = dlopen(fname, RTLD_NOW | RTLD_LOCAL); + return lib ? dlsym(lib, sym) : NULL; +} +#else +#error Please define your platform. +#endif + + +static void +SDL_InitDynamicAPILocked(void) +{ + const char *libname = SDL_getenv_REAL("SDL_DYNAMIC_API"); + SDL_DYNAPI_ENTRYFN entry = SDL_DYNAPI_entry; /* funcs from here by default. */ + + if (libname) { + entry = (SDL_DYNAPI_ENTRYFN) get_sdlapi_entry(libname, "SDL_DYNAPI_entry"); + if (!entry) { + /* !!! FIXME: fail to startup here instead? */ + /* !!! FIXME: definitely warn user. */ + /* Just fill in the function pointers from this library. */ + entry = SDL_DYNAPI_entry; + } + } + + if (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0) { + /* !!! FIXME: fail to startup here instead? */ + /* !!! FIXME: definitely warn user. */ + /* Just fill in the function pointers from this library. */ + if (entry != SDL_DYNAPI_entry) { + if (!SDL_DYNAPI_entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) { + /* !!! FIXME: now we're screwed. Should definitely abort now. */ + } + } + } + + /* we intentionally never close the newly-loaded lib, of course. */ +} + +static void +SDL_InitDynamicAPI(void) +{ + /* So the theory is that every function in the jump table defaults to + * calling this function, and then replaces itself with a version that + * doesn't call this function anymore. But it's possible that, in an + * extreme corner case, you can have a second thread hit this function + * while the jump table is being initialized by the first. + * In this case, a spinlock is really painful compared to what spinlocks + * _should_ be used for, but this would only happen once, and should be + * insanely rare, as you would have to spin a thread outside of SDL (as + * SDL_CreateThread() would also call this function before building the + * new thread). + */ + static volatile SDL_bool already_initialized = SDL_FALSE; + + /* SDL_AtomicLock calls SDL mutex functions to emulate if + SDL_ATOMIC_DISABLED, which we can't do here, so in such a + configuration, you're on your own. */ + #if !SDL_ATOMIC_DISABLED + static SDL_SpinLock lock = 0; + SDL_AtomicLock_REAL(&lock); + #endif + + if (!already_initialized) { + SDL_InitDynamicAPILocked(); + already_initialized = SDL_TRUE; + } + + #if !SDL_ATOMIC_DISABLED + SDL_AtomicUnlock_REAL(&lock); + #endif +} + +#endif /* SDL_DYNAMIC_API */ + +/* vi: set ts=4 sw=4 expandtab: */ + diff --git a/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.h b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.h new file mode 100644 index 00000000..eb1c0144 --- /dev/null +++ b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi.h @@ -0,0 +1,50 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef _SDL_dynapi_h +#define _SDL_dynapi_h + +/* IMPORTANT: + This is the master switch to disabling the dynamic API. We made it so you + have to hand-edit an internal source file in SDL to turn it off; you + can do it if you want it badly enough, but hopefully you won't want to. + You should understand the ramifications of turning this off: it makes it + hard to update your SDL in the field, and impossible if you've statically + linked SDL into your app. Understand that platforms change, and if we can't + drop in an updated SDL, your application can definitely break some time + in the future, even if it's fine today. + To be sure, as new system-level video and audio APIs are introduced, an + updated SDL can transparently take advantage of them, but your program will + not without this feature. Think hard before turning it off. +*/ +#ifdef SDL_DYNAMIC_API /* Tried to force it on the command line? */ +#error Nope, you have to edit this file to force this off. +#endif + +#if defined(__APPLE__) && TARGET_OS_IPHONE /* probably not useful on iOS. */ +#define SDL_DYNAMIC_API 0 +#else /* everyone else. */ +#define SDL_DYNAMIC_API 1 +#endif + +#endif + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_overrides.h b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_overrides.h new file mode 100644 index 00000000..613582d1 --- /dev/null +++ b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_overrides.h @@ -0,0 +1,572 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* vi: set ts=4 sw=4 expandtab: */ + +/* DO NOT EDIT THIS FILE BY HAND. It is autogenerated by gendynapi.pl. */ + +#if !SDL_DYNAMIC_API +#error You should not be here. +#endif + +/* so annoying. */ +#if defined(__thumb__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)) +#define SDL_MemoryBarrierRelease SDL_MemoryBarrierRelease_REAL +#define SDL_MemoryBarrierAcquire SDL_MemoryBarrierAcquire_REAL +#endif + +#define SDL_SetError SDL_SetError_REAL +#define SDL_Log SDL_Log_REAL +#define SDL_LogVerbose SDL_LogVerbose_REAL +#define SDL_LogDebug SDL_LogDebug_REAL +#define SDL_LogInfo SDL_LogInfo_REAL +#define SDL_LogWarn SDL_LogWarn_REAL +#define SDL_LogError SDL_LogError_REAL +#define SDL_LogCritical SDL_LogCritical_REAL +#define SDL_LogMessage SDL_LogMessage_REAL +#define SDL_sscanf SDL_sscanf_REAL +#define SDL_snprintf SDL_snprintf_REAL +#define SDL_CreateThread SDL_CreateThread_REAL +#define SDL_RWFromFP SDL_RWFromFP_REAL +#define SDL_RegisterApp SDL_RegisterApp_REAL +#define SDL_UnregisterApp SDL_UnregisterApp_REAL +#define SDL_Direct3D9GetAdapterIndex SDL_Direct3D9GetAdapterIndex_REAL +#define SDL_RenderGetD3D9Device SDL_RenderGetD3D9Device_REAL +#define SDL_iPhoneSetAnimationCallback SDL_iPhoneSetAnimationCallback_REAL +#define SDL_iPhoneSetEventPump SDL_iPhoneSetEventPump_REAL +#define SDL_AndroidGetJNIEnv SDL_AndroidGetJNIEnv_REAL +#define SDL_AndroidGetActivity SDL_AndroidGetActivity_REAL +#define SDL_AndroidGetInternalStoragePath SDL_AndroidGetInternalStoragePath_REAL +#define SDL_AndroidGetExternalStorageState SDL_AndroidGetExternalStorageState_REAL +#define SDL_AndroidGetExternalStoragePath SDL_AndroidGetExternalStoragePath_REAL +#define SDL_Init SDL_Init_REAL +#define SDL_InitSubSystem SDL_InitSubSystem_REAL +#define SDL_QuitSubSystem SDL_QuitSubSystem_REAL +#define SDL_WasInit SDL_WasInit_REAL +#define SDL_Quit SDL_Quit_REAL +#define SDL_ReportAssertion SDL_ReportAssertion_REAL +#define SDL_SetAssertionHandler SDL_SetAssertionHandler_REAL +#define SDL_GetAssertionReport SDL_GetAssertionReport_REAL +#define SDL_ResetAssertionReport SDL_ResetAssertionReport_REAL +#define SDL_AtomicTryLock SDL_AtomicTryLock_REAL +#define SDL_AtomicLock SDL_AtomicLock_REAL +#define SDL_AtomicUnlock SDL_AtomicUnlock_REAL +#define SDL_AtomicCAS SDL_AtomicCAS_REAL +#define SDL_AtomicSet SDL_AtomicSet_REAL +#define SDL_AtomicGet SDL_AtomicGet_REAL +#define SDL_AtomicAdd SDL_AtomicAdd_REAL +#define SDL_AtomicCASPtr SDL_AtomicCASPtr_REAL +#define SDL_AtomicSetPtr SDL_AtomicSetPtr_REAL +#define SDL_AtomicGetPtr SDL_AtomicGetPtr_REAL +#define SDL_GetNumAudioDrivers SDL_GetNumAudioDrivers_REAL +#define SDL_GetAudioDriver SDL_GetAudioDriver_REAL +#define SDL_AudioInit SDL_AudioInit_REAL +#define SDL_AudioQuit SDL_AudioQuit_REAL +#define SDL_GetCurrentAudioDriver SDL_GetCurrentAudioDriver_REAL +#define SDL_OpenAudio SDL_OpenAudio_REAL +#define SDL_GetNumAudioDevices SDL_GetNumAudioDevices_REAL +#define SDL_GetAudioDeviceName SDL_GetAudioDeviceName_REAL +#define SDL_OpenAudioDevice SDL_OpenAudioDevice_REAL +#define SDL_GetAudioStatus SDL_GetAudioStatus_REAL +#define SDL_GetAudioDeviceStatus SDL_GetAudioDeviceStatus_REAL +#define SDL_PauseAudio SDL_PauseAudio_REAL +#define SDL_PauseAudioDevice SDL_PauseAudioDevice_REAL +#define SDL_LoadWAV_RW SDL_LoadWAV_RW_REAL +#define SDL_FreeWAV SDL_FreeWAV_REAL +#define SDL_BuildAudioCVT SDL_BuildAudioCVT_REAL +#define SDL_ConvertAudio SDL_ConvertAudio_REAL +#define SDL_MixAudio SDL_MixAudio_REAL +#define SDL_MixAudioFormat SDL_MixAudioFormat_REAL +#define SDL_LockAudio SDL_LockAudio_REAL +#define SDL_LockAudioDevice SDL_LockAudioDevice_REAL +#define SDL_UnlockAudio SDL_UnlockAudio_REAL +#define SDL_UnlockAudioDevice SDL_UnlockAudioDevice_REAL +#define SDL_CloseAudio SDL_CloseAudio_REAL +#define SDL_CloseAudioDevice SDL_CloseAudioDevice_REAL +#define SDL_SetClipboardText SDL_SetClipboardText_REAL +#define SDL_GetClipboardText SDL_GetClipboardText_REAL +#define SDL_HasClipboardText SDL_HasClipboardText_REAL +#define SDL_GetCPUCount SDL_GetCPUCount_REAL +#define SDL_GetCPUCacheLineSize SDL_GetCPUCacheLineSize_REAL +#define SDL_HasRDTSC SDL_HasRDTSC_REAL +#define SDL_HasAltiVec SDL_HasAltiVec_REAL +#define SDL_HasMMX SDL_HasMMX_REAL +#define SDL_Has3DNow SDL_Has3DNow_REAL +#define SDL_HasSSE SDL_HasSSE_REAL +#define SDL_HasSSE2 SDL_HasSSE2_REAL +#define SDL_HasSSE3 SDL_HasSSE3_REAL +#define SDL_HasSSE41 SDL_HasSSE41_REAL +#define SDL_HasSSE42 SDL_HasSSE42_REAL +#define SDL_GetSystemRAM SDL_GetSystemRAM_REAL +#define SDL_GetError SDL_GetError_REAL +#define SDL_ClearError SDL_ClearError_REAL +#define SDL_Error SDL_Error_REAL +#define SDL_PumpEvents SDL_PumpEvents_REAL +#define SDL_PeepEvents SDL_PeepEvents_REAL +#define SDL_HasEvent SDL_HasEvent_REAL +#define SDL_HasEvents SDL_HasEvents_REAL +#define SDL_FlushEvent SDL_FlushEvent_REAL +#define SDL_FlushEvents SDL_FlushEvents_REAL +#define SDL_PollEvent SDL_PollEvent_REAL +#define SDL_WaitEvent SDL_WaitEvent_REAL +#define SDL_WaitEventTimeout SDL_WaitEventTimeout_REAL +#define SDL_PushEvent SDL_PushEvent_REAL +#define SDL_SetEventFilter SDL_SetEventFilter_REAL +#define SDL_GetEventFilter SDL_GetEventFilter_REAL +#define SDL_AddEventWatch SDL_AddEventWatch_REAL +#define SDL_DelEventWatch SDL_DelEventWatch_REAL +#define SDL_FilterEvents SDL_FilterEvents_REAL +#define SDL_EventState SDL_EventState_REAL +#define SDL_RegisterEvents SDL_RegisterEvents_REAL +#define SDL_GetBasePath SDL_GetBasePath_REAL +#define SDL_GetPrefPath SDL_GetPrefPath_REAL +#define SDL_GameControllerAddMapping SDL_GameControllerAddMapping_REAL +#define SDL_GameControllerMappingForGUID SDL_GameControllerMappingForGUID_REAL +#define SDL_GameControllerMapping SDL_GameControllerMapping_REAL +#define SDL_IsGameController SDL_IsGameController_REAL +#define SDL_GameControllerNameForIndex SDL_GameControllerNameForIndex_REAL +#define SDL_GameControllerOpen SDL_GameControllerOpen_REAL +#define SDL_GameControllerName SDL_GameControllerName_REAL +#define SDL_GameControllerGetAttached SDL_GameControllerGetAttached_REAL +#define SDL_GameControllerGetJoystick SDL_GameControllerGetJoystick_REAL +#define SDL_GameControllerEventState SDL_GameControllerEventState_REAL +#define SDL_GameControllerUpdate SDL_GameControllerUpdate_REAL +#define SDL_GameControllerGetAxisFromString SDL_GameControllerGetAxisFromString_REAL +#define SDL_GameControllerGetStringForAxis SDL_GameControllerGetStringForAxis_REAL +#define SDL_GameControllerGetBindForAxis SDL_GameControllerGetBindForAxis_REAL +#define SDL_GameControllerGetAxis SDL_GameControllerGetAxis_REAL +#define SDL_GameControllerGetButtonFromString SDL_GameControllerGetButtonFromString_REAL +#define SDL_GameControllerGetStringForButton SDL_GameControllerGetStringForButton_REAL +#define SDL_GameControllerGetBindForButton SDL_GameControllerGetBindForButton_REAL +#define SDL_GameControllerGetButton SDL_GameControllerGetButton_REAL +#define SDL_GameControllerClose SDL_GameControllerClose_REAL +#define SDL_RecordGesture SDL_RecordGesture_REAL +#define SDL_SaveAllDollarTemplates SDL_SaveAllDollarTemplates_REAL +#define SDL_SaveDollarTemplate SDL_SaveDollarTemplate_REAL +#define SDL_LoadDollarTemplates SDL_LoadDollarTemplates_REAL +#define SDL_NumHaptics SDL_NumHaptics_REAL +#define SDL_HapticName SDL_HapticName_REAL +#define SDL_HapticOpen SDL_HapticOpen_REAL +#define SDL_HapticOpened SDL_HapticOpened_REAL +#define SDL_HapticIndex SDL_HapticIndex_REAL +#define SDL_MouseIsHaptic SDL_MouseIsHaptic_REAL +#define SDL_HapticOpenFromMouse SDL_HapticOpenFromMouse_REAL +#define SDL_JoystickIsHaptic SDL_JoystickIsHaptic_REAL +#define SDL_HapticOpenFromJoystick SDL_HapticOpenFromJoystick_REAL +#define SDL_HapticClose SDL_HapticClose_REAL +#define SDL_HapticNumEffects SDL_HapticNumEffects_REAL +#define SDL_HapticNumEffectsPlaying SDL_HapticNumEffectsPlaying_REAL +#define SDL_HapticQuery SDL_HapticQuery_REAL +#define SDL_HapticNumAxes SDL_HapticNumAxes_REAL +#define SDL_HapticEffectSupported SDL_HapticEffectSupported_REAL +#define SDL_HapticNewEffect SDL_HapticNewEffect_REAL +#define SDL_HapticUpdateEffect SDL_HapticUpdateEffect_REAL +#define SDL_HapticRunEffect SDL_HapticRunEffect_REAL +#define SDL_HapticStopEffect SDL_HapticStopEffect_REAL +#define SDL_HapticDestroyEffect SDL_HapticDestroyEffect_REAL +#define SDL_HapticGetEffectStatus SDL_HapticGetEffectStatus_REAL +#define SDL_HapticSetGain SDL_HapticSetGain_REAL +#define SDL_HapticSetAutocenter SDL_HapticSetAutocenter_REAL +#define SDL_HapticPause SDL_HapticPause_REAL +#define SDL_HapticUnpause SDL_HapticUnpause_REAL +#define SDL_HapticStopAll SDL_HapticStopAll_REAL +#define SDL_HapticRumbleSupported SDL_HapticRumbleSupported_REAL +#define SDL_HapticRumbleInit SDL_HapticRumbleInit_REAL +#define SDL_HapticRumblePlay SDL_HapticRumblePlay_REAL +#define SDL_HapticRumbleStop SDL_HapticRumbleStop_REAL +#define SDL_SetHintWithPriority SDL_SetHintWithPriority_REAL +#define SDL_SetHint SDL_SetHint_REAL +#define SDL_GetHint SDL_GetHint_REAL +#define SDL_AddHintCallback SDL_AddHintCallback_REAL +#define SDL_DelHintCallback SDL_DelHintCallback_REAL +#define SDL_ClearHints SDL_ClearHints_REAL +#define SDL_NumJoysticks SDL_NumJoysticks_REAL +#define SDL_JoystickNameForIndex SDL_JoystickNameForIndex_REAL +#define SDL_JoystickOpen SDL_JoystickOpen_REAL +#define SDL_JoystickName SDL_JoystickName_REAL +#define SDL_JoystickGetDeviceGUID SDL_JoystickGetDeviceGUID_REAL +#define SDL_JoystickGetGUID SDL_JoystickGetGUID_REAL +#define SDL_JoystickGetGUIDString SDL_JoystickGetGUIDString_REAL +#define SDL_JoystickGetGUIDFromString SDL_JoystickGetGUIDFromString_REAL +#define SDL_JoystickGetAttached SDL_JoystickGetAttached_REAL +#define SDL_JoystickInstanceID SDL_JoystickInstanceID_REAL +#define SDL_JoystickNumAxes SDL_JoystickNumAxes_REAL +#define SDL_JoystickNumBalls SDL_JoystickNumBalls_REAL +#define SDL_JoystickNumHats SDL_JoystickNumHats_REAL +#define SDL_JoystickNumButtons SDL_JoystickNumButtons_REAL +#define SDL_JoystickUpdate SDL_JoystickUpdate_REAL +#define SDL_JoystickEventState SDL_JoystickEventState_REAL +#define SDL_JoystickGetAxis SDL_JoystickGetAxis_REAL +#define SDL_JoystickGetHat SDL_JoystickGetHat_REAL +#define SDL_JoystickGetBall SDL_JoystickGetBall_REAL +#define SDL_JoystickGetButton SDL_JoystickGetButton_REAL +#define SDL_JoystickClose SDL_JoystickClose_REAL +#define SDL_GetKeyboardFocus SDL_GetKeyboardFocus_REAL +#define SDL_GetKeyboardState SDL_GetKeyboardState_REAL +#define SDL_GetModState SDL_GetModState_REAL +#define SDL_SetModState SDL_SetModState_REAL +#define SDL_GetKeyFromScancode SDL_GetKeyFromScancode_REAL +#define SDL_GetScancodeFromKey SDL_GetScancodeFromKey_REAL +#define SDL_GetScancodeName SDL_GetScancodeName_REAL +#define SDL_GetScancodeFromName SDL_GetScancodeFromName_REAL +#define SDL_GetKeyName SDL_GetKeyName_REAL +#define SDL_GetKeyFromName SDL_GetKeyFromName_REAL +#define SDL_StartTextInput SDL_StartTextInput_REAL +#define SDL_IsTextInputActive SDL_IsTextInputActive_REAL +#define SDL_StopTextInput SDL_StopTextInput_REAL +#define SDL_SetTextInputRect SDL_SetTextInputRect_REAL +#define SDL_HasScreenKeyboardSupport SDL_HasScreenKeyboardSupport_REAL +#define SDL_IsScreenKeyboardShown SDL_IsScreenKeyboardShown_REAL +#define SDL_LoadObject SDL_LoadObject_REAL +#define SDL_LoadFunction SDL_LoadFunction_REAL +#define SDL_UnloadObject SDL_UnloadObject_REAL +#define SDL_LogSetAllPriority SDL_LogSetAllPriority_REAL +#define SDL_LogSetPriority SDL_LogSetPriority_REAL +#define SDL_LogGetPriority SDL_LogGetPriority_REAL +#define SDL_LogResetPriorities SDL_LogResetPriorities_REAL +#define SDL_LogMessageV SDL_LogMessageV_REAL +#define SDL_LogGetOutputFunction SDL_LogGetOutputFunction_REAL +#define SDL_LogSetOutputFunction SDL_LogSetOutputFunction_REAL +#define SDL_SetMainReady SDL_SetMainReady_REAL +#define SDL_ShowMessageBox SDL_ShowMessageBox_REAL +#define SDL_ShowSimpleMessageBox SDL_ShowSimpleMessageBox_REAL +#define SDL_GetMouseFocus SDL_GetMouseFocus_REAL +#define SDL_GetMouseState SDL_GetMouseState_REAL +#define SDL_GetRelativeMouseState SDL_GetRelativeMouseState_REAL +#define SDL_WarpMouseInWindow SDL_WarpMouseInWindow_REAL +#define SDL_SetRelativeMouseMode SDL_SetRelativeMouseMode_REAL +#define SDL_GetRelativeMouseMode SDL_GetRelativeMouseMode_REAL +#define SDL_CreateCursor SDL_CreateCursor_REAL +#define SDL_CreateColorCursor SDL_CreateColorCursor_REAL +#define SDL_CreateSystemCursor SDL_CreateSystemCursor_REAL +#define SDL_SetCursor SDL_SetCursor_REAL +#define SDL_GetCursor SDL_GetCursor_REAL +#define SDL_GetDefaultCursor SDL_GetDefaultCursor_REAL +#define SDL_FreeCursor SDL_FreeCursor_REAL +#define SDL_ShowCursor SDL_ShowCursor_REAL +#define SDL_CreateMutex SDL_CreateMutex_REAL +#define SDL_LockMutex SDL_LockMutex_REAL +#define SDL_TryLockMutex SDL_TryLockMutex_REAL +#define SDL_UnlockMutex SDL_UnlockMutex_REAL +#define SDL_DestroyMutex SDL_DestroyMutex_REAL +#define SDL_CreateSemaphore SDL_CreateSemaphore_REAL +#define SDL_DestroySemaphore SDL_DestroySemaphore_REAL +#define SDL_SemWait SDL_SemWait_REAL +#define SDL_SemTryWait SDL_SemTryWait_REAL +#define SDL_SemWaitTimeout SDL_SemWaitTimeout_REAL +#define SDL_SemPost SDL_SemPost_REAL +#define SDL_SemValue SDL_SemValue_REAL +#define SDL_CreateCond SDL_CreateCond_REAL +#define SDL_DestroyCond SDL_DestroyCond_REAL +#define SDL_CondSignal SDL_CondSignal_REAL +#define SDL_CondBroadcast SDL_CondBroadcast_REAL +#define SDL_CondWait SDL_CondWait_REAL +#define SDL_CondWaitTimeout SDL_CondWaitTimeout_REAL +#define SDL_GetPixelFormatName SDL_GetPixelFormatName_REAL +#define SDL_PixelFormatEnumToMasks SDL_PixelFormatEnumToMasks_REAL +#define SDL_MasksToPixelFormatEnum SDL_MasksToPixelFormatEnum_REAL +#define SDL_AllocFormat SDL_AllocFormat_REAL +#define SDL_FreeFormat SDL_FreeFormat_REAL +#define SDL_AllocPalette SDL_AllocPalette_REAL +#define SDL_SetPixelFormatPalette SDL_SetPixelFormatPalette_REAL +#define SDL_SetPaletteColors SDL_SetPaletteColors_REAL +#define SDL_FreePalette SDL_FreePalette_REAL +#define SDL_MapRGB SDL_MapRGB_REAL +#define SDL_MapRGBA SDL_MapRGBA_REAL +#define SDL_GetRGB SDL_GetRGB_REAL +#define SDL_GetRGBA SDL_GetRGBA_REAL +#define SDL_CalculateGammaRamp SDL_CalculateGammaRamp_REAL +#define SDL_GetPlatform SDL_GetPlatform_REAL +#define SDL_GetPowerInfo SDL_GetPowerInfo_REAL +#define SDL_HasIntersection SDL_HasIntersection_REAL +#define SDL_IntersectRect SDL_IntersectRect_REAL +#define SDL_UnionRect SDL_UnionRect_REAL +#define SDL_EnclosePoints SDL_EnclosePoints_REAL +#define SDL_IntersectRectAndLine SDL_IntersectRectAndLine_REAL +#define SDL_GetNumRenderDrivers SDL_GetNumRenderDrivers_REAL +#define SDL_GetRenderDriverInfo SDL_GetRenderDriverInfo_REAL +#define SDL_CreateWindowAndRenderer SDL_CreateWindowAndRenderer_REAL +#define SDL_CreateRenderer SDL_CreateRenderer_REAL +#define SDL_CreateSoftwareRenderer SDL_CreateSoftwareRenderer_REAL +#define SDL_GetRenderer SDL_GetRenderer_REAL +#define SDL_GetRendererInfo SDL_GetRendererInfo_REAL +#define SDL_GetRendererOutputSize SDL_GetRendererOutputSize_REAL +#define SDL_CreateTexture SDL_CreateTexture_REAL +#define SDL_CreateTextureFromSurface SDL_CreateTextureFromSurface_REAL +#define SDL_QueryTexture SDL_QueryTexture_REAL +#define SDL_SetTextureColorMod SDL_SetTextureColorMod_REAL +#define SDL_GetTextureColorMod SDL_GetTextureColorMod_REAL +#define SDL_SetTextureAlphaMod SDL_SetTextureAlphaMod_REAL +#define SDL_GetTextureAlphaMod SDL_GetTextureAlphaMod_REAL +#define SDL_SetTextureBlendMode SDL_SetTextureBlendMode_REAL +#define SDL_GetTextureBlendMode SDL_GetTextureBlendMode_REAL +#define SDL_UpdateTexture SDL_UpdateTexture_REAL +#define SDL_UpdateYUVTexture SDL_UpdateYUVTexture_REAL +#define SDL_LockTexture SDL_LockTexture_REAL +#define SDL_UnlockTexture SDL_UnlockTexture_REAL +#define SDL_RenderTargetSupported SDL_RenderTargetSupported_REAL +#define SDL_SetRenderTarget SDL_SetRenderTarget_REAL +#define SDL_GetRenderTarget SDL_GetRenderTarget_REAL +#define SDL_RenderSetLogicalSize SDL_RenderSetLogicalSize_REAL +#define SDL_RenderGetLogicalSize SDL_RenderGetLogicalSize_REAL +#define SDL_RenderSetViewport SDL_RenderSetViewport_REAL +#define SDL_RenderGetViewport SDL_RenderGetViewport_REAL +#define SDL_RenderSetClipRect SDL_RenderSetClipRect_REAL +#define SDL_RenderGetClipRect SDL_RenderGetClipRect_REAL +#define SDL_RenderSetScale SDL_RenderSetScale_REAL +#define SDL_RenderGetScale SDL_RenderGetScale_REAL +#define SDL_SetRenderDrawColor SDL_SetRenderDrawColor_REAL +#define SDL_GetRenderDrawColor SDL_GetRenderDrawColor_REAL +#define SDL_SetRenderDrawBlendMode SDL_SetRenderDrawBlendMode_REAL +#define SDL_GetRenderDrawBlendMode SDL_GetRenderDrawBlendMode_REAL +#define SDL_RenderClear SDL_RenderClear_REAL +#define SDL_RenderDrawPoint SDL_RenderDrawPoint_REAL +#define SDL_RenderDrawPoints SDL_RenderDrawPoints_REAL +#define SDL_RenderDrawLine SDL_RenderDrawLine_REAL +#define SDL_RenderDrawLines SDL_RenderDrawLines_REAL +#define SDL_RenderDrawRect SDL_RenderDrawRect_REAL +#define SDL_RenderDrawRects SDL_RenderDrawRects_REAL +#define SDL_RenderFillRect SDL_RenderFillRect_REAL +#define SDL_RenderFillRects SDL_RenderFillRects_REAL +#define SDL_RenderCopy SDL_RenderCopy_REAL +#define SDL_RenderCopyEx SDL_RenderCopyEx_REAL +#define SDL_RenderReadPixels SDL_RenderReadPixels_REAL +#define SDL_RenderPresent SDL_RenderPresent_REAL +#define SDL_DestroyTexture SDL_DestroyTexture_REAL +#define SDL_DestroyRenderer SDL_DestroyRenderer_REAL +#define SDL_GL_BindTexture SDL_GL_BindTexture_REAL +#define SDL_GL_UnbindTexture SDL_GL_UnbindTexture_REAL +#define SDL_RWFromFile SDL_RWFromFile_REAL +#define SDL_RWFromMem SDL_RWFromMem_REAL +#define SDL_RWFromConstMem SDL_RWFromConstMem_REAL +#define SDL_AllocRW SDL_AllocRW_REAL +#define SDL_FreeRW SDL_FreeRW_REAL +#define SDL_ReadU8 SDL_ReadU8_REAL +#define SDL_ReadLE16 SDL_ReadLE16_REAL +#define SDL_ReadBE16 SDL_ReadBE16_REAL +#define SDL_ReadLE32 SDL_ReadLE32_REAL +#define SDL_ReadBE32 SDL_ReadBE32_REAL +#define SDL_ReadLE64 SDL_ReadLE64_REAL +#define SDL_ReadBE64 SDL_ReadBE64_REAL +#define SDL_WriteU8 SDL_WriteU8_REAL +#define SDL_WriteLE16 SDL_WriteLE16_REAL +#define SDL_WriteBE16 SDL_WriteBE16_REAL +#define SDL_WriteLE32 SDL_WriteLE32_REAL +#define SDL_WriteBE32 SDL_WriteBE32_REAL +#define SDL_WriteLE64 SDL_WriteLE64_REAL +#define SDL_WriteBE64 SDL_WriteBE64_REAL +#define SDL_CreateShapedWindow SDL_CreateShapedWindow_REAL +#define SDL_IsShapedWindow SDL_IsShapedWindow_REAL +#define SDL_SetWindowShape SDL_SetWindowShape_REAL +#define SDL_GetShapedWindowMode SDL_GetShapedWindowMode_REAL +#define SDL_malloc SDL_malloc_REAL +#define SDL_calloc SDL_calloc_REAL +#define SDL_realloc SDL_realloc_REAL +#define SDL_free SDL_free_REAL +#define SDL_getenv SDL_getenv_REAL +#define SDL_setenv SDL_setenv_REAL +#define SDL_qsort SDL_qsort_REAL +#define SDL_abs SDL_abs_REAL +#define SDL_isdigit SDL_isdigit_REAL +#define SDL_isspace SDL_isspace_REAL +#define SDL_toupper SDL_toupper_REAL +#define SDL_tolower SDL_tolower_REAL +#define SDL_memset SDL_memset_REAL +#define SDL_memcpy SDL_memcpy_REAL +#define SDL_memmove SDL_memmove_REAL +#define SDL_memcmp SDL_memcmp_REAL +#define SDL_wcslen SDL_wcslen_REAL +#define SDL_wcslcpy SDL_wcslcpy_REAL +#define SDL_wcslcat SDL_wcslcat_REAL +#define SDL_strlen SDL_strlen_REAL +#define SDL_strlcpy SDL_strlcpy_REAL +#define SDL_utf8strlcpy SDL_utf8strlcpy_REAL +#define SDL_strlcat SDL_strlcat_REAL +#define SDL_strdup SDL_strdup_REAL +#define SDL_strrev SDL_strrev_REAL +#define SDL_strupr SDL_strupr_REAL +#define SDL_strlwr SDL_strlwr_REAL +#define SDL_strchr SDL_strchr_REAL +#define SDL_strrchr SDL_strrchr_REAL +#define SDL_strstr SDL_strstr_REAL +#define SDL_itoa SDL_itoa_REAL +#define SDL_uitoa SDL_uitoa_REAL +#define SDL_ltoa SDL_ltoa_REAL +#define SDL_ultoa SDL_ultoa_REAL +#define SDL_lltoa SDL_lltoa_REAL +#define SDL_ulltoa SDL_ulltoa_REAL +#define SDL_atoi SDL_atoi_REAL +#define SDL_atof SDL_atof_REAL +#define SDL_strtol SDL_strtol_REAL +#define SDL_strtoul SDL_strtoul_REAL +#define SDL_strtoll SDL_strtoll_REAL +#define SDL_strtoull SDL_strtoull_REAL +#define SDL_strtod SDL_strtod_REAL +#define SDL_strcmp SDL_strcmp_REAL +#define SDL_strncmp SDL_strncmp_REAL +#define SDL_strcasecmp SDL_strcasecmp_REAL +#define SDL_strncasecmp SDL_strncasecmp_REAL +#define SDL_vsnprintf SDL_vsnprintf_REAL +#define SDL_acos SDL_acos_REAL +#define SDL_asin SDL_asin_REAL +#define SDL_atan SDL_atan_REAL +#define SDL_atan2 SDL_atan2_REAL +#define SDL_ceil SDL_ceil_REAL +#define SDL_copysign SDL_copysign_REAL +#define SDL_cos SDL_cos_REAL +#define SDL_cosf SDL_cosf_REAL +#define SDL_fabs SDL_fabs_REAL +#define SDL_floor SDL_floor_REAL +#define SDL_log SDL_log_REAL +#define SDL_pow SDL_pow_REAL +#define SDL_scalbn SDL_scalbn_REAL +#define SDL_sin SDL_sin_REAL +#define SDL_sinf SDL_sinf_REAL +#define SDL_sqrt SDL_sqrt_REAL +#define SDL_iconv_open SDL_iconv_open_REAL +#define SDL_iconv_close SDL_iconv_close_REAL +#define SDL_iconv SDL_iconv_REAL +#define SDL_iconv_string SDL_iconv_string_REAL +#define SDL_CreateRGBSurface SDL_CreateRGBSurface_REAL +#define SDL_CreateRGBSurfaceFrom SDL_CreateRGBSurfaceFrom_REAL +#define SDL_FreeSurface SDL_FreeSurface_REAL +#define SDL_SetSurfacePalette SDL_SetSurfacePalette_REAL +#define SDL_LockSurface SDL_LockSurface_REAL +#define SDL_UnlockSurface SDL_UnlockSurface_REAL +#define SDL_LoadBMP_RW SDL_LoadBMP_RW_REAL +#define SDL_SaveBMP_RW SDL_SaveBMP_RW_REAL +#define SDL_SetSurfaceRLE SDL_SetSurfaceRLE_REAL +#define SDL_SetColorKey SDL_SetColorKey_REAL +#define SDL_GetColorKey SDL_GetColorKey_REAL +#define SDL_SetSurfaceColorMod SDL_SetSurfaceColorMod_REAL +#define SDL_GetSurfaceColorMod SDL_GetSurfaceColorMod_REAL +#define SDL_SetSurfaceAlphaMod SDL_SetSurfaceAlphaMod_REAL +#define SDL_GetSurfaceAlphaMod SDL_GetSurfaceAlphaMod_REAL +#define SDL_SetSurfaceBlendMode SDL_SetSurfaceBlendMode_REAL +#define SDL_GetSurfaceBlendMode SDL_GetSurfaceBlendMode_REAL +#define SDL_SetClipRect SDL_SetClipRect_REAL +#define SDL_GetClipRect SDL_GetClipRect_REAL +#define SDL_ConvertSurface SDL_ConvertSurface_REAL +#define SDL_ConvertSurfaceFormat SDL_ConvertSurfaceFormat_REAL +#define SDL_ConvertPixels SDL_ConvertPixels_REAL +#define SDL_FillRect SDL_FillRect_REAL +#define SDL_FillRects SDL_FillRects_REAL +#define SDL_UpperBlit SDL_UpperBlit_REAL +#define SDL_LowerBlit SDL_LowerBlit_REAL +#define SDL_SoftStretch SDL_SoftStretch_REAL +#define SDL_UpperBlitScaled SDL_UpperBlitScaled_REAL +#define SDL_LowerBlitScaled SDL_LowerBlitScaled_REAL +#define SDL_GetWindowWMInfo SDL_GetWindowWMInfo_REAL +#define SDL_GetThreadName SDL_GetThreadName_REAL +#define SDL_ThreadID SDL_ThreadID_REAL +#define SDL_GetThreadID SDL_GetThreadID_REAL +#define SDL_SetThreadPriority SDL_SetThreadPriority_REAL +#define SDL_WaitThread SDL_WaitThread_REAL +#define SDL_DetachThread SDL_DetachThread_REAL +#define SDL_TLSCreate SDL_TLSCreate_REAL +#define SDL_TLSGet SDL_TLSGet_REAL +#define SDL_TLSSet SDL_TLSSet_REAL +#define SDL_GetTicks SDL_GetTicks_REAL +#define SDL_GetPerformanceCounter SDL_GetPerformanceCounter_REAL +#define SDL_GetPerformanceFrequency SDL_GetPerformanceFrequency_REAL +#define SDL_Delay SDL_Delay_REAL +#define SDL_AddTimer SDL_AddTimer_REAL +#define SDL_RemoveTimer SDL_RemoveTimer_REAL +#define SDL_GetNumTouchDevices SDL_GetNumTouchDevices_REAL +#define SDL_GetTouchDevice SDL_GetTouchDevice_REAL +#define SDL_GetNumTouchFingers SDL_GetNumTouchFingers_REAL +#define SDL_GetTouchFinger SDL_GetTouchFinger_REAL +#define SDL_GetVersion SDL_GetVersion_REAL +#define SDL_GetRevision SDL_GetRevision_REAL +#define SDL_GetRevisionNumber SDL_GetRevisionNumber_REAL +#define SDL_GetNumVideoDrivers SDL_GetNumVideoDrivers_REAL +#define SDL_GetVideoDriver SDL_GetVideoDriver_REAL +#define SDL_VideoInit SDL_VideoInit_REAL +#define SDL_VideoQuit SDL_VideoQuit_REAL +#define SDL_GetCurrentVideoDriver SDL_GetCurrentVideoDriver_REAL +#define SDL_GetNumVideoDisplays SDL_GetNumVideoDisplays_REAL +#define SDL_GetDisplayName SDL_GetDisplayName_REAL +#define SDL_GetDisplayBounds SDL_GetDisplayBounds_REAL +#define SDL_GetNumDisplayModes SDL_GetNumDisplayModes_REAL +#define SDL_GetDisplayMode SDL_GetDisplayMode_REAL +#define SDL_GetDesktopDisplayMode SDL_GetDesktopDisplayMode_REAL +#define SDL_GetCurrentDisplayMode SDL_GetCurrentDisplayMode_REAL +#define SDL_GetClosestDisplayMode SDL_GetClosestDisplayMode_REAL +#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_REAL +#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_REAL +#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_REAL +#define SDL_GetWindowPixelFormat SDL_GetWindowPixelFormat_REAL +#define SDL_CreateWindow SDL_CreateWindow_REAL +#define SDL_CreateWindowFrom SDL_CreateWindowFrom_REAL +#define SDL_GetWindowID SDL_GetWindowID_REAL +#define SDL_GetWindowFromID SDL_GetWindowFromID_REAL +#define SDL_GetWindowFlags SDL_GetWindowFlags_REAL +#define SDL_SetWindowTitle SDL_SetWindowTitle_REAL +#define SDL_GetWindowTitle SDL_GetWindowTitle_REAL +#define SDL_SetWindowIcon SDL_SetWindowIcon_REAL +#define SDL_SetWindowData SDL_SetWindowData_REAL +#define SDL_GetWindowData SDL_GetWindowData_REAL +#define SDL_SetWindowPosition SDL_SetWindowPosition_REAL +#define SDL_GetWindowPosition SDL_GetWindowPosition_REAL +#define SDL_SetWindowSize SDL_SetWindowSize_REAL +#define SDL_GetWindowSize SDL_GetWindowSize_REAL +#define SDL_SetWindowMinimumSize SDL_SetWindowMinimumSize_REAL +#define SDL_GetWindowMinimumSize SDL_GetWindowMinimumSize_REAL +#define SDL_SetWindowMaximumSize SDL_SetWindowMaximumSize_REAL +#define SDL_GetWindowMaximumSize SDL_GetWindowMaximumSize_REAL +#define SDL_SetWindowBordered SDL_SetWindowBordered_REAL +#define SDL_ShowWindow SDL_ShowWindow_REAL +#define SDL_HideWindow SDL_HideWindow_REAL +#define SDL_RaiseWindow SDL_RaiseWindow_REAL +#define SDL_MaximizeWindow SDL_MaximizeWindow_REAL +#define SDL_MinimizeWindow SDL_MinimizeWindow_REAL +#define SDL_RestoreWindow SDL_RestoreWindow_REAL +#define SDL_SetWindowFullscreen SDL_SetWindowFullscreen_REAL +#define SDL_GetWindowSurface SDL_GetWindowSurface_REAL +#define SDL_UpdateWindowSurface SDL_UpdateWindowSurface_REAL +#define SDL_UpdateWindowSurfaceRects SDL_UpdateWindowSurfaceRects_REAL +#define SDL_SetWindowGrab SDL_SetWindowGrab_REAL +#define SDL_GetWindowGrab SDL_GetWindowGrab_REAL +#define SDL_SetWindowBrightness SDL_SetWindowBrightness_REAL +#define SDL_GetWindowBrightness SDL_GetWindowBrightness_REAL +#define SDL_SetWindowGammaRamp SDL_SetWindowGammaRamp_REAL +#define SDL_GetWindowGammaRamp SDL_GetWindowGammaRamp_REAL +#define SDL_DestroyWindow SDL_DestroyWindow_REAL +#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_REAL +#define SDL_EnableScreenSaver SDL_EnableScreenSaver_REAL +#define SDL_DisableScreenSaver SDL_DisableScreenSaver_REAL +#define SDL_GL_LoadLibrary SDL_GL_LoadLibrary_REAL +#define SDL_GL_GetProcAddress SDL_GL_GetProcAddress_REAL +#define SDL_GL_UnloadLibrary SDL_GL_UnloadLibrary_REAL +#define SDL_GL_ExtensionSupported SDL_GL_ExtensionSupported_REAL +#define SDL_GL_SetAttribute SDL_GL_SetAttribute_REAL +#define SDL_GL_GetAttribute SDL_GL_GetAttribute_REAL +#define SDL_GL_CreateContext SDL_GL_CreateContext_REAL +#define SDL_GL_MakeCurrent SDL_GL_MakeCurrent_REAL +#define SDL_GL_GetCurrentWindow SDL_GL_GetCurrentWindow_REAL +#define SDL_GL_GetCurrentContext SDL_GL_GetCurrentContext_REAL +#define SDL_GL_GetDrawableSize SDL_GL_GetDrawableSize_REAL +#define SDL_GL_SetSwapInterval SDL_GL_SetSwapInterval_REAL +#define SDL_GL_GetSwapInterval SDL_GL_GetSwapInterval_REAL +#define SDL_GL_SwapWindow SDL_GL_SwapWindow_REAL +#define SDL_GL_DeleteContext SDL_GL_DeleteContext_REAL +#define SDL_vsscanf SDL_vsscanf_REAL +#define SDL_GameControllerAddMappingsFromRW SDL_GameControllerAddMappingsFromRW_REAL diff --git a/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_procs.h b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_procs.h new file mode 100644 index 00000000..cf34efc9 --- /dev/null +++ b/jni/SDL2-2.0.1/src/dynapi/SDL_dynapi_procs.h @@ -0,0 +1,601 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* vi: set ts=4 sw=4 expandtab: */ + +/* + DO NOT EDIT THIS FILE BY HAND. It is autogenerated by gendynapi.pl. + NEVER REARRANGE THIS FILE, THE ORDER IS ABI LAW. + Changing this file means bumping SDL_DYNAPI_VERSION. You can safely add + new items to the end of the file, though. + Also, this file gets included multiple times, don't add #pragma once, etc. +*/ + +/* direct jump magic can use these, the rest needs special code. */ +#if !SDL_DYNAPI_PROC_NO_VARARGS +SDL_DYNAPI_PROC(int,SDL_SetError,(const char *a, ...),(a),return) +SDL_DYNAPI_PROC(void,SDL_Log,(const char *a, ...),(a),) +SDL_DYNAPI_PROC(void,SDL_LogVerbose,(int a, const char *b, ...),(a,b),) +SDL_DYNAPI_PROC(void,SDL_LogDebug,(int a, const char *b, ...),(a,b),) +SDL_DYNAPI_PROC(void,SDL_LogInfo,(int a, const char *b, ...),(a,b),) +SDL_DYNAPI_PROC(void,SDL_LogWarn,(int a, const char *b, ...),(a,b),) +SDL_DYNAPI_PROC(void,SDL_LogError,(int a, const char *b, ...),(a,b),) +SDL_DYNAPI_PROC(void,SDL_LogCritical,(int a, const char *b, ...),(a,b),) +SDL_DYNAPI_PROC(void,SDL_LogMessage,(int a, SDL_LogPriority b, const char *c, ...),(a,b,c),) +SDL_DYNAPI_PROC(int,SDL_sscanf,(const char *a, const char *b, ...),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_snprintf,(char *a, size_t b, const char *c, ...),(a,b,c),return) +#endif + +#ifdef SDL_CreateThread +#undef SDL_CreateThread +#endif + +#if defined(__WIN32__) && !defined(HAVE_LIBC) +SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c, pfnSDL_CurrentBeginThread d, pfnSDL_CurrentEndThread e),(a,b,c,d,e),return) +#else +SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c),(a,b,c),return) +#endif + +#ifdef HAVE_STDIO_H +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFP,(FILE *a, SDL_bool b),(a,b),return) +#else +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFP,(void *a, SDL_bool b),(a,b),return) +#endif + +/* so annoying. */ +#if defined(__thumb__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)) +SDL_DYNAPI_PROC(void,SDL_MemoryBarrierRelease,(void),(),) +SDL_DYNAPI_PROC(void,SDL_MemoryBarrierAcquire,(void),(),) +#endif + +#ifdef __WIN32__ +SDL_DYNAPI_PROC(int,SDL_RegisterApp,(char *a, Uint32 b, void *c),(a,b,c),return) +SDL_DYNAPI_PROC(void,SDL_UnregisterApp,(void),(),) +SDL_DYNAPI_PROC(int,SDL_Direct3D9GetAdapterIndex,(int a),(a),return) +SDL_DYNAPI_PROC(IDirect3DDevice9*,SDL_RenderGetD3D9Device,(SDL_Renderer *a),(a),return) +#endif + +#if defined(__IPHONEOS__) && __IPHONEOS__ +SDL_DYNAPI_PROC(int,SDL_iPhoneSetAnimationCallback,(SDL_Window *a, int b, void c, void *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(void,SDL_iPhoneSetEventPump,(SDL_bool a),(a),) +#endif + +#if defined(__ANDROID__) && __ANDROID__ +SDL_DYNAPI_PROC(void*,SDL_AndroidGetJNIEnv,(void),(),return) +SDL_DYNAPI_PROC(void*,SDL_AndroidGetActivity,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_AndroidGetInternalStoragePath,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_AndroidGetExternalStorageState,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_AndroidGetExternalStoragePath,(void),(),return) +#endif + +SDL_DYNAPI_PROC(int,SDL_Init,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(int,SDL_InitSubSystem,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(void,SDL_QuitSubSystem,(Uint32 a),(a),) +SDL_DYNAPI_PROC(Uint32,SDL_WasInit,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(void,SDL_Quit,(void),(),) +SDL_DYNAPI_PROC(SDL_assert_state,SDL_ReportAssertion,(SDL_assert_data *a, const char *b, const char *c, int d),(a,b,c,d),return) +SDL_DYNAPI_PROC(void,SDL_SetAssertionHandler,(SDL_AssertionHandler a, void *b),(a,b),) +SDL_DYNAPI_PROC(const SDL_assert_data*,SDL_GetAssertionReport,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_ResetAssertionReport,(void),(),) +SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicTryLock,(SDL_SpinLock *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_AtomicLock,(SDL_SpinLock *a),(a),) +SDL_DYNAPI_PROC(void,SDL_AtomicUnlock,(SDL_SpinLock *a),(a),) +SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicCAS,(SDL_atomic_t *a, int b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_AtomicSet,(SDL_atomic_t *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_AtomicGet,(SDL_atomic_t *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_AtomicAdd,(SDL_atomic_t *a, int b),(a,b),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicCASPtr,(void **a, void *b, void *c),(a,b,c),return) +SDL_DYNAPI_PROC(void*,SDL_AtomicSetPtr,(void **a, void *b),(a,b),return) +SDL_DYNAPI_PROC(void*,SDL_AtomicGetPtr,(void **a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetNumAudioDrivers,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_GetAudioDriver,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_AudioInit,(const char *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_AudioQuit,(void),(),) +SDL_DYNAPI_PROC(const char*,SDL_GetCurrentAudioDriver,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_OpenAudio,(SDL_AudioSpec *a, SDL_AudioSpec *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetNumAudioDevices,(int a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetAudioDeviceName,(int a, int b),(a,b),return) +SDL_DYNAPI_PROC(SDL_AudioDeviceID,SDL_OpenAudioDevice,(const char *a, int b, const SDL_AudioSpec *c, SDL_AudioSpec *d, int e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(SDL_AudioStatus,SDL_GetAudioStatus,(void),(),return) +SDL_DYNAPI_PROC(SDL_AudioStatus,SDL_GetAudioDeviceStatus,(SDL_AudioDeviceID a),(a),return) +SDL_DYNAPI_PROC(void,SDL_PauseAudio,(int a),(a),) +SDL_DYNAPI_PROC(void,SDL_PauseAudioDevice,(SDL_AudioDeviceID a, int b),(a,b),) +SDL_DYNAPI_PROC(SDL_AudioSpec*,SDL_LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(void,SDL_FreeWAV,(Uint8 *a),(a),) +SDL_DYNAPI_PROC(int,SDL_BuildAudioCVT,(SDL_AudioCVT *a, SDL_AudioFormat b, Uint8 c, int d, SDL_AudioFormat e, Uint8 f, int g),(a,b,c,d,e,f,g),return) +SDL_DYNAPI_PROC(int,SDL_ConvertAudio,(SDL_AudioCVT *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_MixAudio,(Uint8 *a, const Uint8 *b, Uint32 c, int d),(a,b,c,d),) +SDL_DYNAPI_PROC(void,SDL_MixAudioFormat,(Uint8 *a, const Uint8 *b, SDL_AudioFormat c, Uint32 d, int e),(a,b,c,d,e),) +SDL_DYNAPI_PROC(void,SDL_LockAudio,(void),(),) +SDL_DYNAPI_PROC(void,SDL_LockAudioDevice,(SDL_AudioDeviceID a),(a),) +SDL_DYNAPI_PROC(void,SDL_UnlockAudio,(void),(),) +SDL_DYNAPI_PROC(void,SDL_UnlockAudioDevice,(SDL_AudioDeviceID a),(a),) +SDL_DYNAPI_PROC(void,SDL_CloseAudio,(void),(),) +SDL_DYNAPI_PROC(void,SDL_CloseAudioDevice,(SDL_AudioDeviceID a),(a),) +SDL_DYNAPI_PROC(int,SDL_SetClipboardText,(const char *a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_GetClipboardText,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasClipboardText,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_GetCPUCount,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_GetCPUCacheLineSize,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasRDTSC,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasAltiVec,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasMMX,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_Has3DNow,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE2,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE3,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE41,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE42,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_GetSystemRAM,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_GetError,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_ClearError,(void),(),) +SDL_DYNAPI_PROC(int,SDL_Error,(SDL_errorcode a),(a),return) +SDL_DYNAPI_PROC(void,SDL_PumpEvents,(void),(),) +SDL_DYNAPI_PROC(int,SDL_PeepEvents,(SDL_Event *a, int b, SDL_eventaction c, Uint32 d, Uint32 e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasEvent,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasEvents,(Uint32 a, Uint32 b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_FlushEvent,(Uint32 a),(a),) +SDL_DYNAPI_PROC(void,SDL_FlushEvents,(Uint32 a, Uint32 b),(a,b),) +SDL_DYNAPI_PROC(int,SDL_PollEvent,(SDL_Event *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_WaitEvent,(SDL_Event *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_WaitEventTimeout,(SDL_Event *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_PushEvent,(SDL_Event *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_SetEventFilter,(SDL_EventFilter a, void *b),(a,b),) +SDL_DYNAPI_PROC(SDL_bool,SDL_GetEventFilter,(SDL_EventFilter *a, void **b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_AddEventWatch,(SDL_EventFilter a, void *b),(a,b),) +SDL_DYNAPI_PROC(void,SDL_DelEventWatch,(SDL_EventFilter a, void *b),(a,b),) +SDL_DYNAPI_PROC(void,SDL_FilterEvents,(SDL_EventFilter a, void *b),(a,b),) +SDL_DYNAPI_PROC(Uint8,SDL_EventState,(Uint32 a, int b),(a,b),return) +SDL_DYNAPI_PROC(Uint32,SDL_RegisterEvents,(int a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_GetBasePath,(void),(),return) +SDL_DYNAPI_PROC(char*,SDL_GetPrefPath,(const char *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GameControllerAddMapping,(const char *a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_GameControllerMappingForGUID,(SDL_JoystickGUID a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_GameControllerMapping,(SDL_GameController *a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_IsGameController,(int a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GameControllerNameForIndex,(int a),(a),return) +SDL_DYNAPI_PROC(SDL_GameController*,SDL_GameControllerOpen,(int a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GameControllerName,(SDL_GameController *a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerGetAttached,(SDL_GameController *a),(a),return) +SDL_DYNAPI_PROC(SDL_Joystick*,SDL_GameControllerGetJoystick,(SDL_GameController *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GameControllerEventState,(int a),(a),return) +SDL_DYNAPI_PROC(void,SDL_GameControllerUpdate,(void),(),) +SDL_DYNAPI_PROC(SDL_GameControllerAxis,SDL_GameControllerGetAxisFromString,(const char *a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetStringForAxis,(SDL_GameControllerAxis a),(a),return) +SDL_DYNAPI_PROC(SDL_GameControllerButtonBind,SDL_GameControllerGetBindForAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return) +SDL_DYNAPI_PROC(Sint16,SDL_GameControllerGetAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return) +SDL_DYNAPI_PROC(SDL_GameControllerButton,SDL_GameControllerGetButtonFromString,(const char *a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetStringForButton,(SDL_GameControllerButton a),(a),return) +SDL_DYNAPI_PROC(SDL_GameControllerButtonBind,SDL_GameControllerGetBindForButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return) +SDL_DYNAPI_PROC(Uint8,SDL_GameControllerGetButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_GameControllerClose,(SDL_GameController *a),(a),) +SDL_DYNAPI_PROC(int,SDL_RecordGesture,(SDL_TouchID a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SaveAllDollarTemplates,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SaveDollarTemplate,(SDL_GestureID a, SDL_RWops *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_LoadDollarTemplates,(SDL_TouchID a, SDL_RWops *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_NumHaptics,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_HapticName,(int a),(a),return) +SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpen,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticOpened,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticIndex,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_MouseIsHaptic,(void),(),return) +SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpenFromMouse,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_JoystickIsHaptic,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpenFromJoystick,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_HapticClose,(SDL_Haptic *a),(a),) +SDL_DYNAPI_PROC(int,SDL_HapticNumEffects,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticNumEffectsPlaying,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(unsigned int,SDL_HapticQuery,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticNumAxes,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticEffectSupported,(SDL_Haptic *a, SDL_HapticEffect *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_HapticNewEffect,(SDL_Haptic *a, SDL_HapticEffect *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_HapticUpdateEffect,(SDL_Haptic *a, int b, SDL_HapticEffect *c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_HapticRunEffect,(SDL_Haptic *a, int b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_HapticStopEffect,(SDL_Haptic *a, int b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_HapticDestroyEffect,(SDL_Haptic *a, int b),(a,b),) +SDL_DYNAPI_PROC(int,SDL_HapticGetEffectStatus,(SDL_Haptic *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_HapticSetGain,(SDL_Haptic *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_HapticSetAutocenter,(SDL_Haptic *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_HapticPause,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticUnpause,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticStopAll,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticRumbleSupported,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticRumbleInit,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_HapticRumblePlay,(SDL_Haptic *a, float b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_HapticRumbleStop,(SDL_Haptic *a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_SetHintWithPriority,(const char *a, const char *b, SDL_HintPriority c),(a,b,c),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_SetHint,(const char *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(const char*,SDL_GetHint,(const char *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_AddHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_DelHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_ClearHints,(void),(),) +SDL_DYNAPI_PROC(int,SDL_NumJoysticks,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_JoystickNameForIndex,(int a),(a),return) +SDL_DYNAPI_PROC(SDL_Joystick*,SDL_JoystickOpen,(int a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_JoystickName,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetDeviceGUID,(int a),(a),return) +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetGUID,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_JoystickGetGUIDString,(SDL_JoystickGUID a, char *b, int c),(a,b,c),) +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetGUIDFromString,(const char *a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickGetAttached,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(SDL_JoystickID,SDL_JoystickInstanceID,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_JoystickNumAxes,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_JoystickNumBalls,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_JoystickNumHats,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_JoystickNumButtons,(SDL_Joystick *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_JoystickUpdate,(void),(),) +SDL_DYNAPI_PROC(int,SDL_JoystickEventState,(int a),(a),return) +SDL_DYNAPI_PROC(Sint16,SDL_JoystickGetAxis,(SDL_Joystick *a, int b),(a,b),return) +SDL_DYNAPI_PROC(Uint8,SDL_JoystickGetHat,(SDL_Joystick *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_JoystickGetBall,(SDL_Joystick *a, int b, int *c, int *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(Uint8,SDL_JoystickGetButton,(SDL_Joystick *a, int b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_JoystickClose,(SDL_Joystick *a),(a),) +SDL_DYNAPI_PROC(SDL_Window*,SDL_GetKeyboardFocus,(void),(),return) +SDL_DYNAPI_PROC(const Uint8*,SDL_GetKeyboardState,(int *a),(a),return) +SDL_DYNAPI_PROC(SDL_Keymod,SDL_GetModState,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_SetModState,(SDL_Keymod a),(a),) +SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromScancode,(SDL_Scancode a),(a),return) +SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromKey,(SDL_Keycode a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetScancodeName,(SDL_Scancode a),(a),return) +SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromName,(const char *a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetKeyName,(SDL_Keycode a),(a),return) +SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromName,(const char *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_StartTextInput,(void),(),) +SDL_DYNAPI_PROC(SDL_bool,SDL_IsTextInputActive,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_StopTextInput,(void),(),) +SDL_DYNAPI_PROC(void,SDL_SetTextInputRect,(SDL_Rect *a),(a),) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasScreenKeyboardSupport,(void),(),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenKeyboardShown,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(void*,SDL_LoadObject,(const char *a),(a),return) +SDL_DYNAPI_PROC(void*,SDL_LoadFunction,(void *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_UnloadObject,(void *a),(a),) +SDL_DYNAPI_PROC(void,SDL_LogSetAllPriority,(SDL_LogPriority a),(a),) +SDL_DYNAPI_PROC(void,SDL_LogSetPriority,(int a, SDL_LogPriority b),(a,b),) +SDL_DYNAPI_PROC(SDL_LogPriority,SDL_LogGetPriority,(int a),(a),return) +SDL_DYNAPI_PROC(void,SDL_LogResetPriorities,(void),(),) +SDL_DYNAPI_PROC(void,SDL_LogMessageV,(int a, SDL_LogPriority b, const char *c, va_list d),(a,b,c,d),) +SDL_DYNAPI_PROC(void,SDL_LogGetOutputFunction,(SDL_LogOutputFunction *a, void **b),(a,b),) +SDL_DYNAPI_PROC(void,SDL_LogSetOutputFunction,(SDL_LogOutputFunction a, void *b),(a,b),) +SDL_DYNAPI_PROC(void,SDL_SetMainReady,(void),(),) +SDL_DYNAPI_PROC(int,SDL_ShowMessageBox,(const SDL_MessageBoxData *a, int *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_ShowSimpleMessageBox,(Uint32 a, const char *b, const char *c, SDL_Window *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(SDL_Window*,SDL_GetMouseFocus,(void),(),return) +SDL_DYNAPI_PROC(Uint32,SDL_GetMouseState,(int *a, int *b),(a,b),return) +SDL_DYNAPI_PROC(Uint32,SDL_GetRelativeMouseState,(int *a, int *b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_WarpMouseInWindow,(SDL_Window *a, int b, int c),(a,b,c),) +SDL_DYNAPI_PROC(int,SDL_SetRelativeMouseMode,(SDL_bool a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_GetRelativeMouseMode,(void),(),return) +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateCursor,(const Uint8 *a, const Uint8 *b, int c, int d, int e, int f),(a,b,c,d,e,f),return) +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateColorCursor,(SDL_Surface *a, int b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateSystemCursor,(SDL_SystemCursor a),(a),return) +SDL_DYNAPI_PROC(void,SDL_SetCursor,(SDL_Cursor *a),(a),) +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetCursor,(void),(),return) +SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetDefaultCursor,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_FreeCursor,(SDL_Cursor *a),(a),) +SDL_DYNAPI_PROC(int,SDL_ShowCursor,(int a),(a),return) +SDL_DYNAPI_PROC(SDL_mutex*,SDL_CreateMutex,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_LockMutex,(SDL_mutex *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_TryLockMutex,(SDL_mutex *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_UnlockMutex,(SDL_mutex *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_DestroyMutex,(SDL_mutex *a),(a),) +SDL_DYNAPI_PROC(SDL_sem*,SDL_CreateSemaphore,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(void,SDL_DestroySemaphore,(SDL_sem *a),(a),) +SDL_DYNAPI_PROC(int,SDL_SemWait,(SDL_sem *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SemTryWait,(SDL_sem *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SemWaitTimeout,(SDL_sem *a, Uint32 b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_SemPost,(SDL_sem *a),(a),return) +SDL_DYNAPI_PROC(Uint32,SDL_SemValue,(SDL_sem *a),(a),return) +SDL_DYNAPI_PROC(SDL_cond*,SDL_CreateCond,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_DestroyCond,(SDL_cond *a),(a),) +SDL_DYNAPI_PROC(int,SDL_CondSignal,(SDL_cond *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_CondBroadcast,(SDL_cond *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_CondWait,(SDL_cond *a, SDL_mutex *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_CondWaitTimeout,(SDL_cond *a, SDL_mutex *b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(const char*,SDL_GetPixelFormatName,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_PixelFormatEnumToMasks,(Uint32 a, int *b, Uint32 *c, Uint32 *d, Uint32 *e, Uint32 *f),(a,b,c,d,e,f),return) +SDL_DYNAPI_PROC(Uint32,SDL_MasksToPixelFormatEnum,(int a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(SDL_PixelFormat*,SDL_AllocFormat,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(void,SDL_FreeFormat,(SDL_PixelFormat *a),(a),) +SDL_DYNAPI_PROC(SDL_Palette*,SDL_AllocPalette,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SetPixelFormatPalette,(SDL_PixelFormat *a, SDL_Palette *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_SetPaletteColors,(SDL_Palette *a, const SDL_Color *b, int c, int d),(a,b,c,d),return) +SDL_DYNAPI_PROC(void,SDL_FreePalette,(SDL_Palette *a),(a),) +SDL_DYNAPI_PROC(Uint32,SDL_MapRGB,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return) +SDL_DYNAPI_PROC(Uint32,SDL_MapRGBA,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(void,SDL_GetRGB,(Uint32 a, const SDL_PixelFormat *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),) +SDL_DYNAPI_PROC(void,SDL_GetRGBA,(Uint32 a, const SDL_PixelFormat *b, Uint8 *c, Uint8 *d, Uint8 *e, Uint8 *f),(a,b,c,d,e,f),) +SDL_DYNAPI_PROC(void,SDL_CalculateGammaRamp,(float a, Uint16 *b),(a,b),) +SDL_DYNAPI_PROC(const char*,SDL_GetPlatform,(void),(),return) +SDL_DYNAPI_PROC(SDL_PowerState,SDL_GetPowerInfo,(int *a, int *b),(a,b),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_HasIntersection,(const SDL_Rect *a, const SDL_Rect *b),(a,b),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectRect,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),return) +SDL_DYNAPI_PROC(void,SDL_UnionRect,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),) +SDL_DYNAPI_PROC(SDL_bool,SDL_EnclosePoints,(const SDL_Point *a, int b, const SDL_Rect *c, SDL_Rect *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectRectAndLine,(const SDL_Rect *a, int *b, int *c, int *d, int *e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(int,SDL_GetNumRenderDrivers,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_GetRenderDriverInfo,(int a, SDL_RendererInfo *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_CreateWindowAndRenderer,(int a, int b, Uint32 c, SDL_Window **d, SDL_Renderer **e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateRenderer,(SDL_Window *a, int b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateSoftwareRenderer,(SDL_Surface *a),(a),return) +SDL_DYNAPI_PROC(SDL_Renderer*,SDL_GetRenderer,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetRendererInfo,(SDL_Renderer *a, SDL_RendererInfo *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetRendererOutputSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),return) +SDL_DYNAPI_PROC(SDL_Texture*,SDL_CreateTexture,(SDL_Renderer *a, Uint32 b, int c, int d, int e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(SDL_Texture*,SDL_CreateTextureFromSurface,(SDL_Renderer *a, SDL_Surface *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_QueryTexture,(SDL_Texture *a, Uint32 *b, int *c, int *d, int *e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(int,SDL_SetTextureColorMod,(SDL_Texture *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_GetTextureColorMod,(SDL_Texture *a, Uint8 *b, Uint8 *c, Uint8 *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_SetTextureAlphaMod,(SDL_Texture *a, Uint8 b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetTextureAlphaMod,(SDL_Texture *a, Uint8 *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_SetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_UpdateTexture,(SDL_Texture *a, const SDL_Rect *b, const void *c, int d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return) +SDL_DYNAPI_PROC(int,SDL_LockTexture,(SDL_Texture *a, const SDL_Rect *b, void **c, int *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(void,SDL_UnlockTexture,(SDL_Texture *a),(a),) +SDL_DYNAPI_PROC(SDL_bool,SDL_RenderTargetSupported,(SDL_Renderer *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SetRenderTarget,(SDL_Renderer *a, SDL_Texture *b),(a,b),return) +SDL_DYNAPI_PROC(SDL_Texture*,SDL_GetRenderTarget,(SDL_Renderer *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_RenderSetLogicalSize,(SDL_Renderer *a, int b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(void,SDL_RenderGetLogicalSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),) +SDL_DYNAPI_PROC(int,SDL_RenderSetViewport,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_RenderGetViewport,(SDL_Renderer *a, SDL_Rect *b),(a,b),) +SDL_DYNAPI_PROC(int,SDL_RenderSetClipRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_RenderGetClipRect,(SDL_Renderer *a, SDL_Rect *b),(a,b),) +SDL_DYNAPI_PROC(int,SDL_RenderSetScale,(SDL_Renderer *a, float b, float c),(a,b,c),return) +SDL_DYNAPI_PROC(void,SDL_RenderGetScale,(SDL_Renderer *a, float *b, float *c),(a,b,c),) +SDL_DYNAPI_PROC(int,SDL_SetRenderDrawColor,(SDL_Renderer *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(int,SDL_GetRenderDrawColor,(SDL_Renderer *a, Uint8 *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(int,SDL_SetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_RenderClear,(SDL_Renderer *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_RenderDrawPoint,(SDL_Renderer *a, int b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_RenderDrawPoints,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_RenderDrawLine,(SDL_Renderer *a, int b, int c, int d, int e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(int,SDL_RenderDrawLines,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_RenderDrawRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_RenderDrawRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_RenderFillRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_RenderFillRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_RenderCopy,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_RenderCopyEx,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d, const double e, const SDL_Point *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return) +SDL_DYNAPI_PROC(int,SDL_RenderReadPixels,(SDL_Renderer *a, const SDL_Rect *b, Uint32 c, void *d, int e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(void,SDL_RenderPresent,(SDL_Renderer *a),(a),) +SDL_DYNAPI_PROC(void,SDL_DestroyTexture,(SDL_Texture *a),(a),) +SDL_DYNAPI_PROC(void,SDL_DestroyRenderer,(SDL_Renderer *a),(a),) +SDL_DYNAPI_PROC(int,SDL_GL_BindTexture,(SDL_Texture *a, float *b, float *c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_GL_UnbindTexture,(SDL_Texture *a),(a),return) +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFile,(const char *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromMem,(void *a, int b),(a,b),return) +SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromConstMem,(const void *a, int b),(a,b),return) +SDL_DYNAPI_PROC(SDL_RWops*,SDL_AllocRW,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_FreeRW,(SDL_RWops *a),(a),) +SDL_DYNAPI_PROC(Uint8,SDL_ReadU8,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_ReadLE16,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_ReadBE16,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(Uint32,SDL_ReadLE32,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(Uint32,SDL_ReadBE32,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(Uint64,SDL_ReadLE64,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(Uint64,SDL_ReadBE64,(SDL_RWops *a),(a),return) +SDL_DYNAPI_PROC(size_t,SDL_WriteU8,(SDL_RWops *a, Uint8 b),(a,b),return) +SDL_DYNAPI_PROC(size_t,SDL_WriteLE16,(SDL_RWops *a, Uint16 b),(a,b),return) +SDL_DYNAPI_PROC(size_t,SDL_WriteBE16,(SDL_RWops *a, Uint16 b),(a,b),return) +SDL_DYNAPI_PROC(size_t,SDL_WriteLE32,(SDL_RWops *a, Uint32 b),(a,b),return) +SDL_DYNAPI_PROC(size_t,SDL_WriteBE32,(SDL_RWops *a, Uint32 b),(a,b),return) +SDL_DYNAPI_PROC(size_t,SDL_WriteLE64,(SDL_RWops *a, Uint64 b),(a,b),return) +SDL_DYNAPI_PROC(size_t,SDL_WriteBE64,(SDL_RWops *a, Uint64 b),(a,b),return) +SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateShapedWindow,(const char *a, unsigned int b, unsigned int c, unsigned int d, unsigned int e, Uint32 f),(a,b,c,d,e,f),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_IsShapedWindow,(const SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SetWindowShape,(SDL_Window *a, SDL_Surface *b, SDL_WindowShapeMode *c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_GetShapedWindowMode,(SDL_Window *a, SDL_WindowShapeMode *b),(a,b),return) +SDL_DYNAPI_PROC(void*,SDL_malloc,(size_t a),(a),return) +SDL_DYNAPI_PROC(void*,SDL_calloc,(size_t a, size_t b),(a,b),return) +SDL_DYNAPI_PROC(void*,SDL_realloc,(void *a, size_t b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_free,(void *a),(a),) +SDL_DYNAPI_PROC(char*,SDL_getenv,(const char *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_setenv,(const char *a, const char *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(void,SDL_qsort,(void *a, size_t b, size_t c, int (*d)(const void *, const void *)),(a,b,c,d),) +SDL_DYNAPI_PROC(int,SDL_abs,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_isdigit,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_isspace,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_toupper,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_tolower,(int a),(a),return) +SDL_DYNAPI_PROC(void*,SDL_memset,(void *a, int b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(void*,SDL_memcpy,(void *a, const void *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(void*,SDL_memmove,(void *a, const void *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_memcmp,(const void *a, const void *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(size_t,SDL_wcslen,(const wchar_t *a),(a),return) +SDL_DYNAPI_PROC(size_t,SDL_wcslcpy,(wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(size_t,SDL_wcslcat,(wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(size_t,SDL_strlen,(const char *a),(a),return) +SDL_DYNAPI_PROC(size_t,SDL_strlcpy,(char *a, const char *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(size_t,SDL_utf8strlcpy,(char *a, const char *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(size_t,SDL_strlcat,(char *a, const char *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(char*,SDL_strdup,(const char *a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_strrev,(char *a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_strupr,(char *a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_strlwr,(char *a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_strchr,(const char *a, int b),(a,b),return) +SDL_DYNAPI_PROC(char*,SDL_strrchr,(const char *a, int b),(a,b),return) +SDL_DYNAPI_PROC(char*,SDL_strstr,(const char *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(char*,SDL_itoa,(int a, char *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(char*,SDL_uitoa,(unsigned int a, char *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(char*,SDL_ltoa,(long a, char *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(char*,SDL_ultoa,(unsigned long a, char *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(char*,SDL_lltoa,(Sint64 a, char *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(char*,SDL_ulltoa,(Uint64 a, char *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_atoi,(const char *a),(a),return) +SDL_DYNAPI_PROC(double,SDL_atof,(const char *a),(a),return) +SDL_DYNAPI_PROC(long,SDL_strtol,(const char *a, char **b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(unsigned long,SDL_strtoul,(const char *a, char **b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(Sint64,SDL_strtoll,(const char *a, char **b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(Uint64,SDL_strtoull,(const char *a, char **b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(double,SDL_strtod,(const char *a, char **b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_strcmp,(const char *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_strncmp,(const char *a, const char *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_strcasecmp,(const char *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_strncasecmp,(const char *a, const char *b, size_t c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_vsnprintf,(char *a, size_t b, const char *c, va_list d),(a,b,c,d),return) +SDL_DYNAPI_PROC(double,SDL_acos,(double a),(a),return) +SDL_DYNAPI_PROC(double,SDL_asin,(double a),(a),return) +SDL_DYNAPI_PROC(double,SDL_atan,(double a),(a),return) +SDL_DYNAPI_PROC(double,SDL_atan2,(double a, double b),(a,b),return) +SDL_DYNAPI_PROC(double,SDL_ceil,(double a),(a),return) +SDL_DYNAPI_PROC(double,SDL_copysign,(double a, double b),(a,b),return) +SDL_DYNAPI_PROC(double,SDL_cos,(double a),(a),return) +SDL_DYNAPI_PROC(float,SDL_cosf,(float a),(a),return) +SDL_DYNAPI_PROC(double,SDL_fabs,(double a),(a),return) +SDL_DYNAPI_PROC(double,SDL_floor,(double a),(a),return) +SDL_DYNAPI_PROC(double,SDL_log,(double a),(a),return) +SDL_DYNAPI_PROC(double,SDL_pow,(double a, double b),(a,b),return) +SDL_DYNAPI_PROC(double,SDL_scalbn,(double a, int b),(a,b),return) +SDL_DYNAPI_PROC(double,SDL_sin,(double a),(a),return) +SDL_DYNAPI_PROC(float,SDL_sinf,(float a),(a),return) +SDL_DYNAPI_PROC(double,SDL_sqrt,(double a),(a),return) +SDL_DYNAPI_PROC(SDL_iconv_t,SDL_iconv_open,(const char *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_iconv_close,(SDL_iconv_t a),(a),return) +SDL_DYNAPI_PROC(size_t,SDL_iconv,(SDL_iconv_t a, const char **b, size_t *c, char **d, size_t *e),(a,b,c,d,e),return) +SDL_DYNAPI_PROC(char*,SDL_iconv_string,(const char *a, const char *b, const char *c, size_t d),(a,b,c,d),return) +SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateRGBSurface,(Uint32 a, int b, int c, int d, Uint32 e, Uint32 f, Uint32 g, Uint32 h),(a,b,c,d,e,f,g,h),return) +SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateRGBSurfaceFrom,(void *a, int b, int c, int d, int e, Uint32 f, Uint32 g, Uint32 h, Uint32 i),(a,b,c,d,e,f,g,h,i),return) +SDL_DYNAPI_PROC(void,SDL_FreeSurface,(SDL_Surface *a),(a),) +SDL_DYNAPI_PROC(int,SDL_SetSurfacePalette,(SDL_Surface *a, SDL_Palette *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_LockSurface,(SDL_Surface *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_UnlockSurface,(SDL_Surface *a),(a),) +SDL_DYNAPI_PROC(SDL_Surface*,SDL_LoadBMP_RW,(SDL_RWops *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_SaveBMP_RW,(SDL_Surface *a, SDL_RWops *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_SetSurfaceRLE,(SDL_Surface *a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_SetColorKey,(SDL_Surface *a, int b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_GetColorKey,(SDL_Surface *a, Uint32 *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_SetSurfaceColorMod,(SDL_Surface *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_GetSurfaceColorMod,(SDL_Surface *a, Uint8 *b, Uint8 *c, Uint8 *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_SetSurfaceAlphaMod,(SDL_Surface *a, Uint8 b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetSurfaceAlphaMod,(SDL_Surface *a, Uint8 *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_SetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode *b),(a,b),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_SetClipRect,(SDL_Surface *a, const SDL_Rect *b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_GetClipRect,(SDL_Surface *a, SDL_Rect *b),(a,b),) +SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurface,(SDL_Surface *a, const SDL_PixelFormat *b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurfaceFormat,(SDL_Surface *a, Uint32 b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_ConvertPixels,(int a, int b, Uint32 c, const void *d, int e, Uint32 f, void *g, int h),(a,b,c,d,e,f,g,h),return) +SDL_DYNAPI_PROC(int,SDL_FillRect,(SDL_Surface *a, const SDL_Rect *b, Uint32 c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_FillRects,(SDL_Surface *a, const SDL_Rect *b, int c, Uint32 d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_UpperBlit,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_LowerBlit,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_SoftStretch,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_UpperBlitScaled,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_LowerBlitScaled,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowWMInfo,(SDL_Window *a, SDL_SysWMinfo *b),(a,b),return) +SDL_DYNAPI_PROC(const char*,SDL_GetThreadName,(SDL_Thread *a),(a),return) +SDL_DYNAPI_PROC(SDL_threadID,SDL_ThreadID,(void),(),return) +SDL_DYNAPI_PROC(SDL_threadID,SDL_GetThreadID,(SDL_Thread *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SetThreadPriority,(SDL_ThreadPriority a),(a),return) +SDL_DYNAPI_PROC(void,SDL_WaitThread,(SDL_Thread *a, int *b),(a,b),) +SDL_DYNAPI_PROC(void,SDL_DetachThread,(SDL_Thread *a),(a),) +SDL_DYNAPI_PROC(SDL_TLSID,SDL_TLSCreate,(void),(),return) +SDL_DYNAPI_PROC(void*,SDL_TLSGet,(SDL_TLSID a),(a),return) +SDL_DYNAPI_PROC(int,SDL_TLSSet,(SDL_TLSID a, const void *b, void (*c)(void*)),(a,b,c),return) +SDL_DYNAPI_PROC(Uint32,SDL_GetTicks,(void),(),return) +SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceCounter,(void),(),return) +SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceFrequency,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_Delay,(Uint32 a),(a),) +SDL_DYNAPI_PROC(SDL_TimerID,SDL_AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_RemoveTimer,(SDL_TimerID a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetNumTouchDevices,(void),(),return) +SDL_DYNAPI_PROC(SDL_TouchID,SDL_GetTouchDevice,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetNumTouchFingers,(SDL_TouchID a),(a),return) +SDL_DYNAPI_PROC(SDL_Finger*,SDL_GetTouchFinger,(SDL_TouchID a, int b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_GetVersion,(SDL_version *a),(a),) +SDL_DYNAPI_PROC(const char*,SDL_GetRevision,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_GetRevisionNumber,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_GetNumVideoDrivers,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_GetVideoDriver,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_VideoInit,(const char *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_VideoQuit,(void),(),) +SDL_DYNAPI_PROC(const char*,SDL_GetCurrentVideoDriver,(void),(),return) +SDL_DYNAPI_PROC(int,SDL_GetNumVideoDisplays,(void),(),return) +SDL_DYNAPI_PROC(const char*,SDL_GetDisplayName,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetDisplayBounds,(int a, SDL_Rect *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetNumDisplayModes,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetDisplayMode,(int a, int b, SDL_DisplayMode *c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_GetDesktopDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetCurrentDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return) +SDL_DYNAPI_PROC(SDL_DisplayMode*,SDL_GetClosestDisplayMode,(int a, const SDL_DisplayMode *b, SDL_DisplayMode *c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_GetWindowDisplayIndex,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SetWindowDisplayMode,(SDL_Window *a, const SDL_DisplayMode *b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GetWindowDisplayMode,(SDL_Window *a, SDL_DisplayMode *b),(a,b),return) +SDL_DYNAPI_PROC(Uint32,SDL_GetWindowPixelFormat,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateWindow,(const char *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return) +SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateWindowFrom,(const void *a),(a),return) +SDL_DYNAPI_PROC(Uint32,SDL_GetWindowID,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(SDL_Window*,SDL_GetWindowFromID,(Uint32 a),(a),return) +SDL_DYNAPI_PROC(Uint32,SDL_GetWindowFlags,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_SetWindowTitle,(SDL_Window *a, const char *b),(a,b),) +SDL_DYNAPI_PROC(const char*,SDL_GetWindowTitle,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_SetWindowIcon,(SDL_Window *a, SDL_Surface *b),(a,b),) +SDL_DYNAPI_PROC(void*,SDL_SetWindowData,(SDL_Window *a, const char *b, void *c),(a,b,c),return) +SDL_DYNAPI_PROC(void*,SDL_GetWindowData,(SDL_Window *a, const char *b),(a,b),return) +SDL_DYNAPI_PROC(void,SDL_SetWindowPosition,(SDL_Window *a, int b, int c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_GetWindowPosition,(SDL_Window *a, int *b, int *c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_SetWindowSize,(SDL_Window *a, int b, int c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_GetWindowSize,(SDL_Window *a, int *b, int *c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_SetWindowMinimumSize,(SDL_Window *a, int b, int c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_GetWindowMinimumSize,(SDL_Window *a, int *b, int *c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_SetWindowMaximumSize,(SDL_Window *a, int b, int c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_GetWindowMaximumSize,(SDL_Window *a, int *b, int *c),(a,b,c),) +SDL_DYNAPI_PROC(void,SDL_SetWindowBordered,(SDL_Window *a, SDL_bool b),(a,b),) +SDL_DYNAPI_PROC(void,SDL_ShowWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(void,SDL_HideWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(void,SDL_RaiseWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(void,SDL_MaximizeWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(void,SDL_MinimizeWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(void,SDL_RestoreWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(int,SDL_SetWindowFullscreen,(SDL_Window *a, Uint32 b),(a,b),return) +SDL_DYNAPI_PROC(SDL_Surface*,SDL_GetWindowSurface,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurface,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return) +SDL_DYNAPI_PROC(void,SDL_SetWindowGrab,(SDL_Window *a, SDL_bool b),(a,b),) +SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowGrab,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SetWindowBrightness,(SDL_Window *a, float b),(a,b),return) +SDL_DYNAPI_PROC(float,SDL_GetWindowBrightness,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_SetWindowGammaRamp,(SDL_Window *a, const Uint16 *b, const Uint16 *c, const Uint16 *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(int,SDL_GetWindowGammaRamp,(SDL_Window *a, Uint16 *b, Uint16 *c, Uint16 *d),(a,b,c,d),return) +SDL_DYNAPI_PROC(void,SDL_DestroyWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenSaverEnabled,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_EnableScreenSaver,(void),(),) +SDL_DYNAPI_PROC(void,SDL_DisableScreenSaver,(void),(),) +SDL_DYNAPI_PROC(int,SDL_GL_LoadLibrary,(const char *a),(a),return) +SDL_DYNAPI_PROC(void*,SDL_GL_GetProcAddress,(const char *a),(a),return) +SDL_DYNAPI_PROC(void,SDL_GL_UnloadLibrary,(void),(),) +SDL_DYNAPI_PROC(SDL_bool,SDL_GL_ExtensionSupported,(const char *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GL_SetAttribute,(SDL_GLattr a, int b),(a,b),return) +SDL_DYNAPI_PROC(int,SDL_GL_GetAttribute,(SDL_GLattr a, int *b),(a,b),return) +SDL_DYNAPI_PROC(SDL_GLContext,SDL_GL_CreateContext,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GL_MakeCurrent,(SDL_Window *a, SDL_GLContext b),(a,b),return) +SDL_DYNAPI_PROC(SDL_Window*,SDL_GL_GetCurrentWindow,(void),(),return) +SDL_DYNAPI_PROC(SDL_GLContext,SDL_GL_GetCurrentContext,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_GL_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),) +SDL_DYNAPI_PROC(int,SDL_GL_SetSwapInterval,(int a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GL_GetSwapInterval,(void),(),return) +SDL_DYNAPI_PROC(void,SDL_GL_SwapWindow,(SDL_Window *a),(a),) +SDL_DYNAPI_PROC(void,SDL_GL_DeleteContext,(SDL_GLContext a),(a),) +SDL_DYNAPI_PROC(int,SDL_vsscanf,(const char *a, const char *b, va_list c),(a,b,c),return) +SDL_DYNAPI_PROC(int,SDL_GameControllerAddMappingsFromRW,(SDL_RWops *a, int b),(a,b),return) diff --git a/jni/SDL2-2.0.1/src/dynapi/gendynapi.pl b/jni/SDL2-2.0.1/src/dynapi/gendynapi.pl new file mode 100755 index 00000000..b76afbd8 --- /dev/null +++ b/jni/SDL2-2.0.1/src/dynapi/gendynapi.pl @@ -0,0 +1,141 @@ +#!/usr/bin/perl -w + +# Simple DirectMedia Layer +# Copyright (C) 1997-2013 Sam Lantinga +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + +# WHAT IS THIS? +# When you add a public API to SDL, please run this script, make sure the +# output looks sane (hg diff, it adds to existing files), and commit it. +# It keeps the dynamic API jump table operating correctly. + +# If you wanted this to be readable, you shouldn't have used perl. + +use warnings; +use strict; +use File::Basename; + +chdir(dirname(__FILE__) . '/../..'); +my $sdl_dynapi_procs_h = "src/dynapi/SDL_dynapi_procs.h"; +my $sdl_dynapi_overrides_h = "src/dynapi/SDL_dynapi_overrides.h"; + +my %existing = (); +if (-f $sdl_dynapi_procs_h) { + open(SDL_DYNAPI_PROCS_H, '<', $sdl_dynapi_procs_h) or die("Can't open $sdl_dynapi_procs_h: $!\n"); + while () { + if (/\ASDL_DYNAPI_PROC\(.*?,(.*?),/) { + $existing{$1} = 1; + } + } + close(SDL_DYNAPI_PROCS_H) +} + +open(SDL_DYNAPI_PROCS_H, '>>', $sdl_dynapi_procs_h) or die("Can't open $sdl_dynapi_procs_h: $!\n"); +open(SDL_DYNAPI_OVERRIDES_H, '>>', $sdl_dynapi_overrides_h) or die("Can't open $sdl_dynapi_overrides_h: $!\n"); + +opendir(HEADERS, 'include') or die("Can't open include dir: $!\n"); +while (readdir(HEADERS)) { + next if not /\.h\Z/; + my $header = "include/$_"; + open(HEADER, '<', $header) or die("Can't open $header: $!\n"); + while (
) { + chomp; + next if not /\A\s*extern\s+DECLSPEC/; + my $decl = "$_ "; + if (not $decl =~ /\)\s*;/) { + while (
) { + chomp; + s/\A\s+//; + s/\s+\Z//; + $decl .= "$_ "; + last if /\)\s*;/; + } + } + + $decl =~ s/\s+\Z//; + #print("DECL: [$decl]\n"); + + if ($decl =~ /\A\s*extern\s+DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) { + my $rc = "$1$2$3$4"; + my $fn = $5; + + next if $existing{$fn}; # already slotted into the jump table. + + my @params = split(',', $6); + + #print("rc == '$rc', fn == '$fn', params == '$params'\n"); + + my $retstr = ($rc eq 'void') ? '' : 'return'; + my $paramstr = '('; + my $argstr = '('; + my $i = 0; + foreach (@params) { + my $str = $_; + $str =~ s/\A\s+//; + $str =~ s/\s+\Z//; + #print("1PARAM: $str\n"); + if ($str eq 'void') { + $paramstr .= 'void'; + } elsif ($str eq '...') { + if ($i > 0) { + $paramstr .= ', '; + } + $paramstr .= $str; + } elsif ($str =~ /\A\s*((const\s+|)(unsigned\s+|)([a-zA-Z0-9_]*)\s*([\*\s]*))\s*(.*?)\Z/) { + #print("PARSED: [$1], [$2], [$3], [$4], [$5]\n"); + my $type = $1; + my $var = $6; + $type =~ s/\A\s+//; + $type =~ s/\s+\Z//; + $var =~ s/\A\s+//; + $var =~ s/\s+\Z//; + $type =~ s/\s*\*\Z/*/g; + $type =~ s/\s*(\*+)\Z/ $1/; + #print("SPLIT: ($type, $var)\n"); + my $name = chr(ord('a') + $i); + if ($i > 0) { + $paramstr .= ', '; + $argstr .= ','; + } + my $spc = ($type =~ /\*\Z/) ? '' : ' '; + $paramstr .= "$type$spc$name"; + $argstr .= "$name"; + } + $i++; + } + + $paramstr = '(void' if ($i == 0); # Just to make this consistent. + + $paramstr .= ')'; + $argstr .= ')'; + + print("NEW: $decl\n"); + print SDL_DYNAPI_PROCS_H "SDL_DYNAPI_PROC($rc,$fn,$paramstr,$argstr,$retstr)\n"; + print SDL_DYNAPI_OVERRIDES_H "#define $fn ${fn}_REAL\n"; + } else { + print("Failed to parse decl [$decl]!\n"); + } + } + close(HEADER); +} +closedir(HEADERS); + +close(SDL_DYNAPI_PROCS_H); +close(SDL_DYNAPI_OVERRIDES_H); + +# vi: set ts=4 sw=4 expandtab: diff --git a/jni/SDL2-2.0.1/src/events/SDL_clipboardevents.c b/jni/SDL2-2.0.1/src/events/SDL_clipboardevents.c index 99ead8f5..2a2f5ae0 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_clipboardevents.c +++ b/jni/SDL2-2.0.1/src/events/SDL_clipboardevents.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Clipboard event handling code for SDL */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_clipboardevents_c.h b/jni/SDL2-2.0.1/src/events/SDL_clipboardevents_c.h index 4f320f04..9cd19538 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_clipboardevents_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_clipboardevents_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_clipboardevents_c_h #define _SDL_clipboardevents_c_h diff --git a/jni/SDL2-2.0.1/src/events/SDL_dropevents.c b/jni/SDL2-2.0.1/src/events/SDL_dropevents.c index 1ce2f1c1..553d1c3f 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_dropevents.c +++ b/jni/SDL2-2.0.1/src/events/SDL_dropevents.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Drag and drop event handling code for SDL */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_dropevents_c.h b/jni/SDL2-2.0.1/src/events/SDL_dropevents_c.h index d658e447..0458653a 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_dropevents_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_dropevents_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_dropevents_c_h #define _SDL_dropevents_c_h diff --git a/jni/SDL2-2.0.1/src/events/SDL_events.c b/jni/SDL2-2.0.1/src/events/SDL_events.c index 99845034..0510b518 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_events.c +++ b/jni/SDL2-2.0.1/src/events/SDL_events.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* General event handling code for SDL */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_events_c.h b/jni/SDL2-2.0.1/src/events/SDL_events_c.h index f365ee3e..7ddda192 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_events_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_events_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Useful functions and variables from SDL_events.c */ #include "SDL_events.h" diff --git a/jni/SDL2-2.0.1/src/events/SDL_gesture.c b/jni/SDL2-2.0.1/src/events/SDL_gesture.c index 20ce57b5..6841f730 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_gesture.c +++ b/jni/SDL2-2.0.1/src/events/SDL_gesture.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* General mouse handling code for SDL */ @@ -116,15 +116,14 @@ static unsigned long SDL_HashDollar(SDL_FloatPoint* points) } -static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops * src) +static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst) { - if (src == NULL) return 0; - + if (dst == NULL) return 0; /* No Longer storing the Hash, rehash on load */ - /* if(SDL_RWops.write(src,&(templ->hash),sizeof(templ->hash),1) != 1) return 0; */ + /* if (SDL_RWops.write(dst, &(templ->hash), sizeof(templ->hash), 1) != 1) return 0; */ - if (SDL_RWwrite(src,templ->path, + if (SDL_RWwrite(dst, templ->path, sizeof(templ->path[0]),DOLLARNPOINTS) != DOLLARNPOINTS) return 0; @@ -132,26 +131,26 @@ static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops * src) } -int SDL_SaveAllDollarTemplates(SDL_RWops *src) +int SDL_SaveAllDollarTemplates(SDL_RWops *dst) { int i,j,rtrn = 0; for (i = 0; i < SDL_numGestureTouches; i++) { SDL_GestureTouch* touch = &SDL_gestureTouch[i]; for (j = 0; j < touch->numDollarTemplates; j++) { - rtrn += SaveTemplate(&touch->dollarTemplate[i],src); + rtrn += SaveTemplate(&touch->dollarTemplate[i], dst); } } return rtrn; } -int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *src) +int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *dst) { int i,j; for (i = 0; i < SDL_numGestureTouches; i++) { SDL_GestureTouch* touch = &SDL_gestureTouch[i]; for (j = 0; j < touch->numDollarTemplates; j++) { if (touch->dollarTemplate[i].hash == gestureId) { - return SaveTemplate(&touch->dollarTemplate[i],src); + return SaveTemplate(&touch->dollarTemplate[i], dst); } } } @@ -198,10 +197,8 @@ static int SDL_AddDollarGesture(SDL_GestureTouch* inTouch, SDL_FloatPoint* path) } /* Use the index of the last one added. */ return index; - } else { - return SDL_AddDollarGesture_one(inTouch, path); } - return -1; + return SDL_AddDollarGesture_one(inTouch, path); } int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src) diff --git a/jni/SDL2-2.0.1/src/events/SDL_gesture_c.h b/jni/SDL2-2.0.1/src/events/SDL_gesture_c.h index 08ba2e80..d172cba4 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_gesture_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_gesture_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_gesture_c_h #define _SDL_gesture_c_h diff --git a/jni/SDL2-2.0.1/src/events/SDL_keyboard.c b/jni/SDL2-2.0.1/src/events/SDL_keyboard.c index 34d94d0e..b56a4661 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_keyboard.c +++ b/jni/SDL2-2.0.1/src/events/SDL_keyboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* General keyboard handling code for SDL */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_keyboard_c.h b/jni/SDL2-2.0.1/src/events/SDL_keyboard_c.h index cd9f1bb6..5a99d971 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_keyboard_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_keyboard_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_keyboard_c_h #define _SDL_keyboard_c_h diff --git a/jni/SDL2-2.0.1/src/events/SDL_mouse.c b/jni/SDL2-2.0.1/src/events/SDL_mouse.c index 0886f54f..0d17670c 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_mouse.c +++ b/jni/SDL2-2.0.1/src/events/SDL_mouse.c @@ -18,11 +18,13 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* General mouse handling code for SDL */ #include "SDL_assert.h" +#include "SDL_hints.h" +#include "SDL_timer.h" #include "SDL_events.h" #include "SDL_events_c.h" #include "default_cursor.h" @@ -32,6 +34,8 @@ /* The mouse state */ static SDL_Mouse SDL_mouse; +static Uint32 SDL_double_click_time = 500; +static int SDL_double_click_radius = 1; static int SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y); @@ -64,6 +68,12 @@ SDL_GetMouse(void) return &SDL_mouse; } +void +SDL_SetDoubleClickTime(Uint32 interval) +{ + SDL_double_click_time = interval; +} + SDL_Window * SDL_GetMouseFocus(void) { @@ -196,12 +206,24 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ int yrel; int x_max = 0, y_max = 0; - /* relative motion is calculated regarding the system cursor last position */ + if (mouse->relative_mode_warp) { + int center_x = 0, center_y = 0; + SDL_GetWindowSize(window, ¢er_x, ¢er_y); + center_x /= 2; + center_y /= 2; + if (x == center_x && y == center_y) { + mouse->last_x = center_x; + mouse->last_y = center_y; + return 0; + } + SDL_WarpMouseInWindow(window, center_x, center_y); + } + if (relative) { xrel = x; yrel = y; - x = (mouse->last_x + x); - y = (mouse->last_y + y); + x = (mouse->last_x + xrel); + y = (mouse->last_y + yrel); } else { xrel = x - mouse->last_x; yrel = y - mouse->last_y; @@ -216,7 +238,7 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ } /* Update internal mouse coordinates */ - if (mouse->relative_mode == SDL_FALSE) { + if (!mouse->relative_mode) { mouse->x = x; mouse->y = y; } else { @@ -272,6 +294,23 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ return posted; } +static SDL_MouseClickState *GetMouseClickState(SDL_Mouse *mouse, Uint8 button) +{ + if (button >= mouse->num_clickstates) { + int i, count = button + 1; + mouse->clickstate = (SDL_MouseClickState *)SDL_realloc(mouse->clickstate, count * sizeof(*mouse->clickstate)); + if (!mouse->clickstate) { + return NULL; + } + + for (i = mouse->num_clickstates; i < count; ++i) { + SDL_zero(mouse->clickstate[i]); + } + mouse->num_clickstates = count; + } + return &mouse->clickstate[button]; +} + int SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button) { @@ -279,6 +318,8 @@ SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 int posted; Uint32 type; Uint32 buttonstate = mouse->buttonstate; + SDL_MouseClickState *clickstate = GetMouseClickState(mouse, button); + Uint8 click_count; /* Figure out which event to perform */ switch (state) { @@ -306,6 +347,27 @@ SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 } mouse->buttonstate = buttonstate; + if (clickstate) { + if (state == SDL_PRESSED) { + Uint32 now = SDL_GetTicks(); + + if (SDL_TICKS_PASSED(now, clickstate->last_timestamp + SDL_double_click_time) || + SDL_abs(mouse->x - clickstate->last_x) > SDL_double_click_radius || + SDL_abs(mouse->y - clickstate->last_y) > SDL_double_click_radius) { + clickstate->click_count = 0; + } + clickstate->last_timestamp = now; + clickstate->last_x = mouse->x; + clickstate->last_y = mouse->y; + if (clickstate->click_count < 255) { + ++clickstate->click_count; + } + } + click_count = clickstate->click_count; + } else { + click_count = 1; + } + /* Post the event, if desired */ posted = 0; if (SDL_GetEventState(type) == SDL_ENABLE) { @@ -315,6 +377,7 @@ SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 event.button.which = mouseID; event.button.state = state; event.button.button = button; + event.button.clicks = click_count; event.button.x = mouse->x; event.button.y = mouse->y; posted = (SDL_PushEvent(&event) > 0); @@ -362,6 +425,7 @@ SDL_MouseQuit(void) SDL_Cursor *cursor, *next; SDL_Mouse *mouse = SDL_GetMouse(); + SDL_SetRelativeMouseMode(SDL_FALSE); SDL_ShowCursor(1); cursor = mouse->cursors; @@ -375,6 +439,10 @@ SDL_MouseQuit(void) mouse->FreeCursor(mouse->def_cursor); } + if (mouse->clickstate) { + SDL_free(mouse->clickstate); + } + SDL_zerop(mouse); } @@ -426,21 +494,36 @@ SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) } } +static SDL_bool +ShouldUseRelativeModeWarp(SDL_Mouse *mouse) +{ + const char *hint; + + if (!mouse->SetRelativeMouseMode) { + return SDL_TRUE; + } + + hint = SDL_GetHint(SDL_HINT_MOUSE_RELATIVE_MODE_WARP); + if (hint) { + if (*hint == '0') { + return SDL_FALSE; + } else { + return SDL_TRUE; + } + } + return SDL_FALSE; +} + int SDL_SetRelativeMouseMode(SDL_bool enabled) { SDL_Mouse *mouse = SDL_GetMouse(); SDL_Window *focusWindow = SDL_GetKeyboardFocus(); - int original_x = mouse->x, original_y = mouse->y; if (enabled == mouse->relative_mode) { return 0; } - if (!mouse->SetRelativeMouseMode) { - return SDL_Unsupported(); - } - if (enabled && focusWindow) { /* Center it in the focused window to prevent clicks from going through * to background windows. @@ -449,23 +532,26 @@ SDL_SetRelativeMouseMode(SDL_bool enabled) SDL_WarpMouseInWindow(focusWindow, focusWindow->w/2, focusWindow->h/2); } - if (mouse->SetRelativeMouseMode(enabled) < 0) { + /* Set the relative mode */ + if (!enabled && mouse->relative_mode_warp) { + mouse->relative_mode_warp = SDL_FALSE; + } else if (enabled && ShouldUseRelativeModeWarp(mouse)) { + mouse->relative_mode_warp = SDL_TRUE; + } else if (mouse->SetRelativeMouseMode(enabled) < 0) { return -1; } - - /* Set the relative mode */ mouse->relative_mode = enabled; - if (enabled) { - /* Save the expected mouse position */ - mouse->original_x = original_x; - mouse->original_y = original_y; - } else if (mouse->focus) { - /* Restore the expected mouse position */ - SDL_WarpMouseInWindow(mouse->focus, mouse->original_x, mouse->original_y); + if (mouse->focus) { + SDL_UpdateWindowGrab(mouse->focus); + + /* Put the cursor back to where the application expects it */ + if (!enabled) { + SDL_WarpMouseInWindow(mouse->focus, mouse->x, mouse->y); + } } - /* Flush pending mouse motion */ + /* Flush pending mouse motion - ideally we would pump events, but that's not always safe */ SDL_FlushEvent(SDL_MOUSEMOTION); /* Update cursor visibility */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_mouse_c.h b/jni/SDL2-2.0.1/src/events/SDL_mouse_c.h index a8faa2e1..a8b8aa5e 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_mouse_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_mouse_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_mouse_c_h #define _SDL_mouse_c_h @@ -33,6 +33,13 @@ struct SDL_Cursor void *driverdata; }; +typedef struct +{ + int last_x, last_y; + Uint32 last_timestamp; + Uint8 click_count; +} SDL_MouseClickState; + typedef struct { /* Create a cursor from a surface */ @@ -66,8 +73,11 @@ typedef struct int last_x, last_y; /* the last reported x and y coordinates */ Uint32 buttonstate; SDL_bool relative_mode; - /* the x and y coordinates when relative mode was activated */ - int original_x, original_y; + SDL_bool relative_mode_warp; + + /* Data for double-click tracking */ + int num_clickstates; + SDL_MouseClickState *clickstate; SDL_Cursor *cursors; SDL_Cursor *def_cursor; @@ -85,6 +95,9 @@ extern int SDL_MouseInit(void); /* Get the mouse state structure */ SDL_Mouse *SDL_GetMouse(void); +/* Set the default double-click interval */ +extern void SDL_SetDoubleClickTime(Uint32 interval); + /* Set the default mouse cursor */ extern void SDL_SetDefaultCursor(SDL_Cursor * cursor); diff --git a/jni/SDL2-2.0.1/src/events/SDL_quit.c b/jni/SDL2-2.0.1/src/events/SDL_quit.c index 5e9f8ad8..14cf89dc 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_quit.c +++ b/jni/SDL2-2.0.1/src/events/SDL_quit.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* General quit handling code for SDL */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_sysevents.h b/jni/SDL2-2.0.1/src/events/SDL_sysevents.h index c2f1e097..a25247f5 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_sysevents.h +++ b/jni/SDL2-2.0.1/src/events/SDL_sysevents.h @@ -18,14 +18,14 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "../video/SDL_sysvideo.h" /* Useful functions and variables from SDL_sysevents.c */ -#if defined(__BEOS__) || defined(__HAIKU__) -/* The Be and Haiku event loops run in a separate thread */ +#if defined(__HAIKU__) +/* The Haiku event loops run in a separate thread */ #define MUST_THREAD_EVENTS #endif diff --git a/jni/SDL2-2.0.1/src/events/SDL_touch.c b/jni/SDL2-2.0.1/src/events/SDL_touch.c index 1874ba7f..d37cee2d 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_touch.c +++ b/jni/SDL2-2.0.1/src/events/SDL_touch.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* General touch handling code for SDL */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_touch_c.h b/jni/SDL2-2.0.1/src/events/SDL_touch_c.h index d0a2cf2f..8786c61e 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_touch_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_touch_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "../../include/SDL_touch.h" #ifndef _SDL_touch_c_h diff --git a/jni/SDL2-2.0.1/src/events/SDL_windowevents.c b/jni/SDL2-2.0.1/src/events/SDL_windowevents.c index 9011f68e..28041c24 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_windowevents.c +++ b/jni/SDL2-2.0.1/src/events/SDL_windowevents.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Window event handling code for SDL */ diff --git a/jni/SDL2-2.0.1/src/events/SDL_windowevents_c.h b/jni/SDL2-2.0.1/src/events/SDL_windowevents_c.h index 0d14a034..c97d2aff 100644 --- a/jni/SDL2-2.0.1/src/events/SDL_windowevents_c.h +++ b/jni/SDL2-2.0.1/src/events/SDL_windowevents_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_windowevents_c_h #define _SDL_windowevents_c_h diff --git a/jni/SDL2-2.0.1/src/file/SDL_rwops.c b/jni/SDL2-2.0.1/src/file/SDL_rwops.c index d71dbfdf..c994c8fd 100644 --- a/jni/SDL2-2.0.1/src/file/SDL_rwops.c +++ b/jni/SDL2-2.0.1/src/file/SDL_rwops.c @@ -20,7 +20,7 @@ */ /* Need this so Linux systems define fseek64o, ftell64o and off64_t */ #define _LARGEFILE64_SOURCE -#include "SDL_config.h" +#include "../SDL_internal.h" #if defined(__WIN32__) #include "../core/windows/SDL_windows.h" diff --git a/jni/SDL2-2.0.1/src/filesystem/cocoa/SDL_sysfilesystem.m b/jni/SDL2-2.0.1/src/filesystem/cocoa/SDL_sysfilesystem.m index 760830a7..2b29cc9a 100644 --- a/jni/SDL2-2.0.1/src/filesystem/cocoa/SDL_sysfilesystem.m +++ b/jni/SDL2-2.0.1/src/filesystem/cocoa/SDL_sysfilesystem.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_FILESYSTEM_COCOA @@ -77,7 +77,7 @@ SDL_GetPrefPath(const char *org, const char *app) NSString *str = [array objectAtIndex:0]; const char *base = [str fileSystemRepresentation]; if (base) { - const size_t len = SDL_strlen(base) + SDL_strlen(app) + 4; + const size_t len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4; retval = (char *) SDL_malloc(len); if (retval == NULL) { SDL_OutOfMemory(); diff --git a/jni/SDL2-2.0.1/src/filesystem/dummy/SDL_sysfilesystem.c b/jni/SDL2-2.0.1/src/filesystem/dummy/SDL_sysfilesystem.c index a6bd5776..4c92362e 100644 --- a/jni/SDL2-2.0.1/src/filesystem/dummy/SDL_sysfilesystem.c +++ b/jni/SDL2-2.0.1/src/filesystem/dummy/SDL_sysfilesystem.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_FILESYSTEM_DUMMY diff --git a/jni/SDL2-2.0.1/src/filesystem/beos/SDL_sysfilesystem.cc b/jni/SDL2-2.0.1/src/filesystem/haiku/SDL_sysfilesystem.cc similarity index 93% rename from jni/SDL2-2.0.1/src/filesystem/beos/SDL_sysfilesystem.cc rename to jni/SDL2-2.0.1/src/filesystem/haiku/SDL_sysfilesystem.cc index dc7a9706..701a98e1 100644 --- a/jni/SDL2-2.0.1/src/filesystem/beos/SDL_sysfilesystem.cc +++ b/jni/SDL2-2.0.1/src/filesystem/haiku/SDL_sysfilesystem.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#ifdef SDL_FILESYSTEM_BEOS +#ifdef SDL_FILESYSTEM_HAIKU /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* System dependent filesystem routines */ @@ -82,12 +82,12 @@ SDL_GetPrefPath(const char *org, const char *app) SDL_OutOfMemory(); } else { SDL_snprintf(retval, len, "%s%s%s/%s/", home, append, org, app); - create_directory(retval, 0700); // BeOS api: creates missing dirs + create_directory(retval, 0700); // Haiku api: creates missing dirs } return retval; } -#endif /* SDL_FILESYSTEM_BEOS */ +#endif /* SDL_FILESYSTEM_HAIKU */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/filesystem/unix/SDL_sysfilesystem.c b/jni/SDL2-2.0.1/src/filesystem/unix/SDL_sysfilesystem.c index 0f6e62e2..0046c2d0 100644 --- a/jni/SDL2-2.0.1/src/filesystem/unix/SDL_sysfilesystem.c +++ b/jni/SDL2-2.0.1/src/filesystem/unix/SDL_sysfilesystem.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_FILESYSTEM_UNIX diff --git a/jni/SDL2-2.0.1/src/filesystem/windows/SDL_sysfilesystem.c b/jni/SDL2-2.0.1/src/filesystem/windows/SDL_sysfilesystem.c index 7b101ffe..8da41719 100644 --- a/jni/SDL2-2.0.1/src/filesystem/windows/SDL_sysfilesystem.c +++ b/jni/SDL2-2.0.1/src/filesystem/windows/SDL_sysfilesystem.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_FILESYSTEM_WINDOWS diff --git a/jni/SDL2-2.0.1/src/haptic/SDL_haptic.c b/jni/SDL2-2.0.1/src/haptic/SDL_haptic.c index 33dd4277..c629deaf 100644 --- a/jni/SDL2-2.0.1/src/haptic/SDL_haptic.c +++ b/jni/SDL2-2.0.1/src/haptic/SDL_haptic.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_syshaptic.h" #include "SDL_haptic_c.h" diff --git a/jni/SDL2-2.0.1/src/haptic/SDL_syshaptic.h b/jni/SDL2-2.0.1/src/haptic/SDL_syshaptic.h index ac5198ff..bb4095dc 100644 --- a/jni/SDL2-2.0.1/src/haptic/SDL_syshaptic.h +++ b/jni/SDL2-2.0.1/src/haptic/SDL_syshaptic.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_haptic.h" diff --git a/jni/SDL2-2.0.1/src/haptic/darwin/SDL_syshaptic.c b/jni/SDL2-2.0.1/src/haptic/darwin/SDL_syshaptic.c index c999a77d..12dceee4 100644 --- a/jni/SDL2-2.0.1/src/haptic/darwin/SDL_syshaptic.c +++ b/jni/SDL2-2.0.1/src/haptic/darwin/SDL_syshaptic.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_HAPTIC_IOKIT diff --git a/jni/SDL2-2.0.1/src/haptic/dummy/SDL_syshaptic.c b/jni/SDL2-2.0.1/src/haptic/dummy/SDL_syshaptic.c index 29084eb1..1c9f5af4 100644 --- a/jni/SDL2-2.0.1/src/haptic/dummy/SDL_syshaptic.c +++ b/jni/SDL2-2.0.1/src/haptic/dummy/SDL_syshaptic.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if defined(SDL_HAPTIC_DUMMY) || defined(SDL_HAPTIC_DISABLED) diff --git a/jni/SDL2-2.0.1/src/haptic/linux/SDL_syshaptic.c b/jni/SDL2-2.0.1/src/haptic/linux/SDL_syshaptic.c index e209d050..aa937ed8 100644 --- a/jni/SDL2-2.0.1/src/haptic/linux/SDL_syshaptic.c +++ b/jni/SDL2-2.0.1/src/haptic/linux/SDL_syshaptic.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_HAPTIC_LINUX diff --git a/jni/SDL2-2.0.1/src/haptic/windows/SDL_syshaptic.c b/jni/SDL2-2.0.1/src/haptic/windows/SDL_syshaptic.c index 1506235e..3025f9bb 100644 --- a/jni/SDL2-2.0.1/src/haptic/windows/SDL_syshaptic.c +++ b/jni/SDL2-2.0.1/src/haptic/windows/SDL_syshaptic.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_HAPTIC_DINPUT @@ -428,7 +428,11 @@ SDL_SYS_HapticOpenFromXInput(SDL_Haptic * haptic, Uint8 userid) #if defined(__WIN32__) && !defined(HAVE_LIBC) /* !!! FIXME: this is nasty. */ #undef SDL_CreateThread + #if SDL_DYNAMIC_API + haptic->hwdata->thread = SDL_CreateThread_REAL(SDL_RunXInputHaptic, threadName, haptic->hwdata, NULL, NULL); + #else haptic->hwdata->thread = SDL_CreateThread(SDL_RunXInputHaptic, threadName, haptic->hwdata, NULL, NULL); + #endif #else haptic->hwdata->thread = SDL_CreateThread(SDL_RunXInputHaptic, threadName, haptic->hwdata); #endif diff --git a/jni/SDL2-2.0.1/src/joystick/SDL_gamecontroller.c b/jni/SDL2-2.0.1/src/joystick/SDL_gamecontroller.c index 603d4db3..940e2054 100644 --- a/jni/SDL2-2.0.1/src/joystick/SDL_gamecontroller.c +++ b/jni/SDL2-2.0.1/src/joystick/SDL_gamecontroller.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This is the game controller API for Simple DirectMedia Layer */ @@ -33,6 +33,7 @@ #endif #define ABS(_x) ((_x) < 0 ? -(_x) : (_x)) +#define SDL_CONTROLLER_PLATFORM_FIELD "platform:" /* a list of currently opened game controllers */ static SDL_GameController *SDL_gamecontrollers = NULL; @@ -289,8 +290,6 @@ ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index) SDL_JoystickGUID jGUID = SDL_JoystickGetDeviceGUID( device_index ); return SDL_PrivateGetControllerMappingForGUID(&jGUID); } - - return NULL; } static const char* map_StringForControllerAxis[] = { @@ -655,6 +654,78 @@ void SDL_PrivateGameControllerRefreshMapping( ControllerMapping_t *pControllerMa } } +/* + * Add or update an entry into the Mappings Database + */ +int +SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw, int freerw ) +{ + const char *platform = SDL_GetPlatform(); + int controllers = 0; + char *buf, *line, *line_end, *tmp, *comma, line_platform[64]; + size_t db_size, platform_len; + + if (rw == NULL) { + return SDL_SetError("Invalid RWops"); + } + db_size = (size_t)SDL_RWsize(rw); + + buf = (char *)SDL_malloc(db_size + 1); + if (buf == NULL) { + if (freerw) { + SDL_RWclose(rw); + } + return SDL_SetError("Could allocate space to not read DB into memory"); + } + + if (SDL_RWread(rw, buf, db_size, 1) != 1) { + if (freerw) { + SDL_RWclose(rw); + } + SDL_free(buf); + return SDL_SetError("Could not read DB"); + } + + if (freerw) { + SDL_RWclose(rw); + } + + buf[db_size] = '\0'; + line = buf; + + while (line < buf + db_size) { + line_end = SDL_strchr( line, '\n' ); + if (line_end != NULL) { + *line_end = '\0'; + } + else { + line_end = buf + db_size; + } + + /* Extract and verify the platform */ + tmp = SDL_strstr(line, SDL_CONTROLLER_PLATFORM_FIELD); + if ( tmp != NULL ) { + tmp += SDL_strlen(SDL_CONTROLLER_PLATFORM_FIELD); + comma = SDL_strchr(tmp, ','); + if (comma != NULL) { + platform_len = comma - tmp + 1; + if (platform_len + 1 < SDL_arraysize(line_platform)) { + SDL_strlcpy(line_platform, tmp, platform_len); + if(SDL_strncasecmp(line_platform, platform, platform_len) == 0 + && SDL_GameControllerAddMapping(line) > 0) { + controllers++; + } + } + } + } + + line = line_end + 1; + } + + SDL_free(buf); + return controllers; +} + /* * Add or update an entry into the Mappings Database */ @@ -672,7 +743,7 @@ SDL_GameControllerAddMapping( const char *mappingString ) pchGUID = SDL_PrivateGetControllerGUIDFromMappingString( mappingString ); if (!pchGUID) { - return -1; + return SDL_SetError("Couldn't parse GUID from %s", mappingString); } #ifdef SDL_JOYSTICK_DINPUT if ( !SDL_strcasecmp( pchGUID, "xinput" ) ) { @@ -682,17 +753,19 @@ SDL_GameControllerAddMapping( const char *mappingString ) jGUID = SDL_JoystickGetGUIDFromString(pchGUID); SDL_free(pchGUID); - pControllerMapping = SDL_PrivateGetControllerMappingForGUID(&jGUID); - pchName = SDL_PrivateGetControllerNameFromMappingString( mappingString ); - if (!pchName) return -1; + if (!pchName) { + return SDL_SetError("Couldn't parse name from %s", mappingString); + } pchMapping = SDL_PrivateGetControllerMappingFromMappingString( mappingString ); if (!pchMapping) { SDL_free( pchName ); - return -1; + return SDL_SetError("Couldn't parse %s", mappingString); } + pControllerMapping = SDL_PrivateGetControllerMappingForGUID(&jGUID); + if (pControllerMapping) { /* Update existing mapping */ SDL_free( pControllerMapping->name ); @@ -790,8 +863,7 @@ SDL_GameControllerInit(void) const char *pMappingString = NULL; s_pSupportedControllers = NULL; pMappingString = s_ControllerMappings[i]; - while ( pMappingString ) - { + while ( pMappingString ) { SDL_GameControllerAddMapping( pMappingString ); i++; @@ -804,6 +876,16 @@ SDL_GameControllerInit(void) /* watch for joy events and fire controller ones if needed */ SDL_AddEventWatch( SDL_GameControllerEventWatcher, NULL ); + /* Send added events for controllers currently attached */ + for (i = 0; i < SDL_NumJoysticks(); ++i) { + if (SDL_IsGameController(i)) { + SDL_Event deviceevent; + deviceevent.type = SDL_CONTROLLERDEVICEADDED; + deviceevent.cdevice.which = i; + SDL_PushEvent(&deviceevent); + } + } + return (0); } diff --git a/jni/SDL2-2.0.1/src/joystick/SDL_gamecontrollerdb.h b/jni/SDL2-2.0.1/src/joystick/SDL_gamecontrollerdb.h index 7f6c7b29..39ae4efe 100644 --- a/jni/SDL2-2.0.1/src/joystick/SDL_gamecontrollerdb.h +++ b/jni/SDL2-2.0.1/src/joystick/SDL_gamecontrollerdb.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Default mappings we support @@ -26,6 +26,8 @@ The easiest way to generate a new mapping is to start Steam in Big Picture mode, configure your joystick and then look in config/config.vdf in your Steam installation directory for the "SDL_GamepadBind" entry. + + Alternatively, you can use the app located in test/controllermap */ static const char *s_ControllerMappings [] = { @@ -55,9 +57,11 @@ static const char *s_ControllerMappings [] = "030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", /* Guide button doesn't seem to be sent in DInput mode. */ "030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,", + "03000000de280000ff11000001000000,Valve Streaming Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", "030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", + "030000005e0400009102000007010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,", #endif NULL }; diff --git a/jni/SDL2-2.0.1/src/joystick/SDL_joystick.c b/jni/SDL2-2.0.1/src/joystick/SDL_joystick.c index 3906ec2b..69aa37d5 100644 --- a/jni/SDL2-2.0.1/src/joystick/SDL_joystick.c +++ b/jni/SDL2-2.0.1/src/joystick/SDL_joystick.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This is the joystick API for Simple DirectMedia Layer */ @@ -832,7 +832,7 @@ SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID) int maxoutputbytes= sizeof(guid); size_t len = SDL_strlen( pchGUID ); Uint8 *p; - int i; + size_t i; /* Make sure it's even */ len = ( len ) & ~0x1; diff --git a/jni/SDL2-2.0.1/src/joystick/SDL_joystick_c.h b/jni/SDL2-2.0.1/src/joystick/SDL_joystick_c.h index 38bc7855..32410638 100644 --- a/jni/SDL2-2.0.1/src/joystick/SDL_joystick_c.h +++ b/jni/SDL2-2.0.1/src/joystick/SDL_joystick_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Useful functions and variables from SDL_joystick.c */ #include "SDL_joystick.h" diff --git a/jni/SDL2-2.0.1/src/joystick/SDL_sysjoystick.h b/jni/SDL2-2.0.1/src/joystick/SDL_sysjoystick.h index 3aeaf082..b125c1c7 100644 --- a/jni/SDL2-2.0.1/src/joystick/SDL_sysjoystick.h +++ b/jni/SDL2-2.0.1/src/joystick/SDL_sysjoystick.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This is the system specific header for the SDL joystick API */ diff --git a/jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick.c b/jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick.c index adaca528..0772eaed 100644 --- a/jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick.c +++ b/jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick.c @@ -19,58 +19,397 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_JOYSTICK_ANDROID -/* This is the system specific header for the SDL joystick API */ #include /* For the definition of NULL */ - #include "SDL_error.h" #include "SDL_events.h" + +#if !SDL_EVENTS_DISABLED +#include "../../events/SDL_events_c.h" +#endif + #include "SDL_joystick.h" -#include "../SDL_sysjoystick.h" +#include "SDL_hints.h" +#include "SDL_assert.h" +#include "SDL_timer.h" +#include "SDL_log.h" +#include "SDL_sysjoystick_c.h" #include "../SDL_joystick_c.h" #include "../../core/android/SDL_android.h" -static const char *accelerometerName = "Android accelerometer"; +#include "android/keycodes.h" -/* Function to scan the system for joysticks. - * This function should set SDL_numjoysticks to the number of available - * joysticks. Joystick 0 should be the system default joystick. - * It should return 0, or -1 on an unrecoverable fatal error. +/* As of platform android-14, android/keycodes.h is missing these defines */ +#ifndef AKEYCODE_BUTTON_1 +#define AKEYCODE_BUTTON_1 188 +#define AKEYCODE_BUTTON_2 189 +#define AKEYCODE_BUTTON_3 190 +#define AKEYCODE_BUTTON_4 191 +#define AKEYCODE_BUTTON_5 192 +#define AKEYCODE_BUTTON_6 193 +#define AKEYCODE_BUTTON_7 194 +#define AKEYCODE_BUTTON_8 195 +#define AKEYCODE_BUTTON_9 196 +#define AKEYCODE_BUTTON_10 197 +#define AKEYCODE_BUTTON_11 198 +#define AKEYCODE_BUTTON_12 199 +#define AKEYCODE_BUTTON_13 200 +#define AKEYCODE_BUTTON_14 201 +#define AKEYCODE_BUTTON_15 202 +#define AKEYCODE_BUTTON_16 203 +#endif + +#define ANDROID_ACCELEROMETER_NAME "Android Accelerometer" +#define ANDROID_ACCELEROMETER_DEVICE_ID INT_MIN +#define ANDROID_MAX_NBUTTONS 36 + +static SDL_joylist_item * JoystickByDeviceId(int device_id); + +static SDL_joylist_item *SDL_joylist = NULL; +static SDL_joylist_item *SDL_joylist_tail = NULL; +static int numjoysticks = 0; +static int instance_counter = 0; + + +/* Function to convert Android keyCodes into SDL ones. + * This code manipulation is done to get a sequential list of codes. + * FIXME: This is only suited for the case where we use a fixed number of buttons determined by ANDROID_MAX_NBUTTONS */ +static int +keycode_to_SDL(int keycode) +{ + /* FIXME: If this function gets too unwiedly in the future, replace with a lookup table */ + int button = 0; + switch(keycode) + { + /* D-Pad key codes (API 1), these get mapped to 0...4 */ + case AKEYCODE_DPAD_UP: + case AKEYCODE_DPAD_DOWN: + case AKEYCODE_DPAD_LEFT: + case AKEYCODE_DPAD_RIGHT: + case AKEYCODE_DPAD_CENTER: + button = keycode - AKEYCODE_DPAD_UP; + break; + + /* Some gamepad buttons (API 9), these get mapped to 5...19*/ + case AKEYCODE_BUTTON_A: + case AKEYCODE_BUTTON_B: + case AKEYCODE_BUTTON_C: + case AKEYCODE_BUTTON_X: + case AKEYCODE_BUTTON_Y: + case AKEYCODE_BUTTON_Z: + case AKEYCODE_BUTTON_L1: + case AKEYCODE_BUTTON_L2: + case AKEYCODE_BUTTON_R1: + case AKEYCODE_BUTTON_R2: + case AKEYCODE_BUTTON_THUMBL: + case AKEYCODE_BUTTON_THUMBR: + case AKEYCODE_BUTTON_START: + case AKEYCODE_BUTTON_SELECT: + case AKEYCODE_BUTTON_MODE: + button = keycode - AKEYCODE_BUTTON_A + 5; + break; + + + /* More gamepad buttons (API 12), these get mapped to 20...35*/ + case AKEYCODE_BUTTON_1: + case AKEYCODE_BUTTON_2: + case AKEYCODE_BUTTON_3: + case AKEYCODE_BUTTON_4: + case AKEYCODE_BUTTON_5: + case AKEYCODE_BUTTON_6: + case AKEYCODE_BUTTON_7: + case AKEYCODE_BUTTON_8: + case AKEYCODE_BUTTON_9: + case AKEYCODE_BUTTON_10: + case AKEYCODE_BUTTON_11: + case AKEYCODE_BUTTON_12: + case AKEYCODE_BUTTON_13: + case AKEYCODE_BUTTON_14: + case AKEYCODE_BUTTON_15: + case AKEYCODE_BUTTON_16: + button = keycode - AKEYCODE_BUTTON_1 + 20; + break; + + default: + return -1; + break; + } + + /* This is here in case future generations, probably with six fingers per hand, + * happily add new cases up above and forget to update the max number of buttons. + */ + SDL_assert(button < ANDROID_MAX_NBUTTONS); + return button; + +} + +int +Android_OnPadDown(int device_id, int keycode) +{ + SDL_joylist_item *item; + int button = keycode_to_SDL(keycode); + if (button >= 0) { + item = JoystickByDeviceId(device_id); + if (item && item->joystick) { + SDL_PrivateJoystickButton(item->joystick, button , SDL_PRESSED); + } + return 0; + } + + return -1; +} + +int +Android_OnPadUp(int device_id, int keycode) +{ + SDL_joylist_item *item; + int button = keycode_to_SDL(keycode); + if (button >= 0) { + item = JoystickByDeviceId(device_id); + if (item && item->joystick) { + SDL_PrivateJoystickButton(item->joystick, button, SDL_RELEASED); + } + return 0; + } + + return -1; +} + +int +Android_OnJoy(int device_id, int axis, float value) +{ + /* Android gives joy info normalized as [-1.0, 1.0] or [0.0, 1.0] */ + SDL_joylist_item *item = JoystickByDeviceId(device_id); + if (item && item->joystick) { + SDL_PrivateJoystickAxis(item->joystick, axis, (Sint16) (32767.*value) ); + } + + return 0; +} + + +int +Android_AddJoystick(int device_id, const char *name, SDL_bool is_accelerometer, int nbuttons, int naxes, int nhats, int nballs) +{ + SDL_JoystickGUID guid; + SDL_joylist_item *item; +#if !SDL_EVENTS_DISABLED + SDL_Event event; +#endif + + if(JoystickByDeviceId(device_id) != NULL || name == NULL) { + return -1; + } + + /* the GUID is just the first 16 chars of the name for now */ + SDL_zero( guid ); + SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); + + item = (SDL_joylist_item *) SDL_malloc(sizeof (SDL_joylist_item)); + if (item == NULL) { + return -1; + } + + SDL_zerop(item); + item->guid = guid; + item->device_id = device_id; + item->name = SDL_strdup(name); + if ( item->name == NULL ) { + SDL_free(item); + return -1; + } + + item->is_accelerometer = is_accelerometer; + if (nbuttons > -1) { + item->nbuttons = nbuttons; + } + else { + item->nbuttons = ANDROID_MAX_NBUTTONS; + } + item->naxes = naxes; + item->nhats = nhats; + item->nballs = nballs; + item->device_instance = instance_counter++; + if (SDL_joylist_tail == NULL) { + SDL_joylist = SDL_joylist_tail = item; + } else { + SDL_joylist_tail->next = item; + SDL_joylist_tail = item; + } + + /* Need to increment the joystick count before we post the event */ + ++numjoysticks; + +#if !SDL_EVENTS_DISABLED + event.type = SDL_JOYDEVICEADDED; + + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = (numjoysticks - 1); + if ( (SDL_EventOK == NULL) || + (*SDL_EventOK) (SDL_EventOKParam, &event) ) { + SDL_PushEvent(&event); + } + } +#endif /* !SDL_EVENTS_DISABLED */ + + SDL_Log("Added joystick %s with device_id %d", name, device_id); + + return numjoysticks; +} + +int +Android_RemoveJoystick(int device_id) +{ + SDL_joylist_item *item = SDL_joylist; + SDL_joylist_item *prev = NULL; +#if !SDL_EVENTS_DISABLED + SDL_Event event; +#endif + + /* Don't call JoystickByDeviceId here or there'll be an infinite loop! */ + while (item != NULL) { + if (item->device_id == device_id) { + break; + } + prev = item; + item = item->next; + } + + if (item == NULL) { + return -1; + } + + const int retval = item->device_instance; + if (prev != NULL) { + prev->next = item->next; + } else { + SDL_assert(SDL_joylist == item); + SDL_joylist = item->next; + } + if (item == SDL_joylist_tail) { + SDL_joylist_tail = prev; + } + + /* Need to decrement the joystick count before we post the event */ + --numjoysticks; + +#if !SDL_EVENTS_DISABLED + event.type = SDL_JOYDEVICEREMOVED; + + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = item->device_instance; + if ( (SDL_EventOK == NULL) || + (*SDL_EventOK) (SDL_EventOKParam, &event) ) { + SDL_PushEvent(&event); + } + } +#endif /* !SDL_EVENTS_DISABLED */ + + SDL_Log("Removed joystick with device_id %d", device_id); + + SDL_free(item->name); + SDL_free(item); + return retval; +} + + int SDL_SYS_JoystickInit(void) { - return (1); + const char *env; + SDL_SYS_JoystickDetect(); + + env = SDL_GetHint(SDL_HINT_ACCEL_AS_JOY); + if (!env || SDL_atoi(env)) { + /* Default behavior, accelerometer as joystick */ + Android_AddJoystick(ANDROID_ACCELEROMETER_DEVICE_ID, ANDROID_ACCELEROMETER_NAME, SDL_TRUE, 0, 3, 0, 0); + } + + return (numjoysticks); + } int SDL_SYS_NumJoysticks() { - return 1; + return numjoysticks; } void SDL_SYS_JoystickDetect() { + /* Support for device connect/disconnect is API >= 16 only, + * so we poll every three seconds + * Ref: http://developer.android.com/reference/android/hardware/input/InputManager.InputDeviceListener.html + */ + static Uint32 timeout = 0; + if (SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) { + timeout = SDL_GetTicks() + 3000; + Android_JNI_PollInputDevices(); + } } SDL_bool SDL_SYS_JoystickNeedsPolling() { - return SDL_FALSE; + return SDL_TRUE; +} + +static SDL_joylist_item * +JoystickByDevIndex(int device_index) +{ + SDL_joylist_item *item = SDL_joylist; + + if ((device_index < 0) || (device_index >= numjoysticks)) { + return NULL; + } + + while (device_index > 0) { + SDL_assert(item != NULL); + device_index--; + item = item->next; + } + + return item; +} + +static SDL_joylist_item * +JoystickByDeviceId(int device_id) +{ + SDL_joylist_item *item = SDL_joylist; + + while (item != NULL) { + if (item->device_id == device_id) { + return item; + } + item = item->next; + } + + /* Joystick not found, try adding it */ + SDL_SYS_JoystickDetect(); + + while (item != NULL) { + if (item->device_id == device_id) { + return item; + } + item = item->next; + } + + return NULL; } /* Function to get the device-dependent name of a joystick */ const char * SDL_SYS_JoystickNameForDeviceIndex(int device_index) { - return accelerometerName; + return JoystickByDevIndex(device_index)->name; } /* Function to perform the mapping from device index to the instance id for this index */ SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex(int device_index) { - return device_index; + return JoystickByDevIndex(device_index)->device_instance; } /* Function to open a joystick for use. @@ -81,41 +420,53 @@ SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex(int device_index) int SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) { - if (device_index == 0) { - joystick->nbuttons = 0; - joystick->nhats = 0; - joystick->nballs = 0; - joystick->naxes = 3; - return 0; - } else { - SDL_SetError("No joystick available with that index"); - return (-1); + SDL_joylist_item *item = JoystickByDevIndex(device_index); + + if (item == NULL ) { + return SDL_SetError("No such device"); } + + if (item->joystick != NULL) { + return SDL_SetError("Joystick already opened"); + } + + joystick->instance_id = item->device_instance; + joystick->hwdata = (struct joystick_hwdata *) item; + item->joystick = joystick; + joystick->nhats = item->nhats; + joystick->nballs = item->nballs; + joystick->nbuttons = item->nbuttons; + joystick->naxes = item->naxes; + + return (0); } /* Function to determine is this joystick is attached to the system right now */ SDL_bool SDL_SYS_JoystickAttached(SDL_Joystick *joystick) { - return SDL_TRUE; + return !joystick->closed && (joystick->hwdata != NULL); } -/* Function to update the state of a joystick - called as a device poll. - * This function shouldn't update the joystick structure directly, - * but instead should call SDL_PrivateJoystick*() to deliver events - * and update joystick device state. - */ void SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) { int i; Sint16 value; float values[3]; + SDL_joylist_item *item = SDL_joylist; - if (Android_JNI_GetAccelerometerValues(values)) { - for ( i = 0; i < 3; i++ ) { - value = (Sint16)(values[i] * 32767.0f); - SDL_PrivateJoystickAxis(joystick, i, value); + while (item) { + if (item->is_accelerometer) { + if (item->joystick) { + Android_JNI_GetAccelerometerValues(values); + for ( i = 0; i < 3; i++ ) { + value = (Sint16)(values[i] * 32767.0f); + SDL_PrivateJoystickAxis(item->joystick, i, value); + } + } + break; } + item = item->next; } } @@ -123,32 +474,40 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) void SDL_SYS_JoystickClose(SDL_Joystick * joystick) { + if (joystick->hwdata) { + ((SDL_joylist_item*)joystick->hwdata)->joystick = NULL; + joystick->hwdata = NULL; + } + joystick->closed = 1; } /* Function to perform any system-specific joystick related cleanup */ void SDL_SYS_JoystickQuit(void) { + SDL_joylist_item *item = NULL; + SDL_joylist_item *next = NULL; + + for (item = SDL_joylist; item; item = next) { + next = item->next; + SDL_free(item->name); + SDL_free(item); + } + + SDL_joylist = SDL_joylist_tail = NULL; + + numjoysticks = 0; + instance_counter = 0; } SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { - SDL_JoystickGUID guid; - /* the GUID is just the first 16 chars of the name for now */ - const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index ); - SDL_zero( guid ); - SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); - return guid; + return JoystickByDevIndex(device_index)->guid; } SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick) { - SDL_JoystickGUID guid; - /* the GUID is just the first 16 chars of the name for now */ - const char *name = joystick->name; - SDL_zero( guid ); - SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); - return guid; + return ((SDL_joylist_item*)joystick->hwdata)->guid; } #endif /* SDL_JOYSTICK_ANDROID */ diff --git a/jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick_c.h b/jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick_c.h new file mode 100644 index 00000000..1c1d975c --- /dev/null +++ b/jni/SDL2-2.0.1/src/joystick/android/SDL_sysjoystick_c.h @@ -0,0 +1,51 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + */ + +#include "SDL_config.h" + +#ifdef SDL_JOYSTICK_ANDROID +#include "../SDL_sysjoystick.h" + +extern int Android_OnPadDown(int device_id, int keycode); +extern int Android_OnPadUp(int device_id, int keycode); +extern int Android_OnJoy(int device_id, int axisnum, float value); +extern int Android_AddJoystick(int device_id, const char *name, SDL_bool is_accelerometer, int nbuttons, int naxes, int nhats, int nballs); +extern int Android_RemoveJoystick(int device_id); + +/* A linked list of available joysticks */ +typedef struct SDL_joylist_item +{ + int device_instance; + int device_id; /* Android's device id */ + char *name; /* "SideWinder 3D Pro" or whatever */ + SDL_JoystickGUID guid; + SDL_bool is_accelerometer; + SDL_Joystick *joystick; + int nbuttons, naxes, nhats, nballs; + + struct SDL_joylist_item *next; +} SDL_joylist_item; + +typedef SDL_joylist_item joystick_hwdata; + +#endif /* SDL_JOYSTICK_ANDROID */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/joystick/bsd/SDL_sysjoystick.c b/jni/SDL2-2.0.1/src/joystick/bsd/SDL_sysjoystick.c index 41a8693d..3b4c6cd6 100644 --- a/jni/SDL2-2.0.1/src/joystick/bsd/SDL_sysjoystick.c +++ b/jni/SDL2-2.0.1/src/joystick/bsd/SDL_sysjoystick.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_JOYSTICK_USBHID diff --git a/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick.c b/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick.c index 55ec41ed..ace65970 100644 --- a/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick.c +++ b/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_JOYSTICK_IOKIT @@ -32,12 +32,7 @@ #include #include #include -#ifdef MACOS_10_0_4 -#include -#else -/* The header was moved here in Mac OS X 10.1 */ #include -#endif #include #include #include diff --git a/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick_c.h b/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick_c.h index f99dbd8a..a44d9a4b 100644 --- a/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick_c.h +++ b/jni/SDL2-2.0.1/src/joystick/darwin/SDL_sysjoystick_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_JOYSTICK_IOKIT_H diff --git a/jni/SDL2-2.0.1/src/joystick/dummy/SDL_sysjoystick.c b/jni/SDL2-2.0.1/src/joystick/dummy/SDL_sysjoystick.c index 7dd9153b..4ec6d1bd 100644 --- a/jni/SDL2-2.0.1/src/joystick/dummy/SDL_sysjoystick.c +++ b/jni/SDL2-2.0.1/src/joystick/dummy/SDL_sysjoystick.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if defined(SDL_JOYSTICK_DUMMY) || defined(SDL_JOYSTICK_DISABLED) diff --git a/jni/SDL2-2.0.1/src/joystick/beos/SDL_bejoystick.cc b/jni/SDL2-2.0.1/src/joystick/haiku/SDL_haikujoystick.cc similarity index 98% rename from jni/SDL2-2.0.1/src/joystick/beos/SDL_bejoystick.cc rename to jni/SDL2-2.0.1/src/joystick/haiku/SDL_haikujoystick.cc index c3245813..e3c98414 100644 --- a/jni/SDL2-2.0.1/src/joystick/beos/SDL_bejoystick.cc +++ b/jni/SDL2-2.0.1/src/joystick/haiku/SDL_haikujoystick.cc @@ -18,14 +18,14 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#ifdef SDL_JOYSTICK_BEOS +#ifdef SDL_JOYSTICK_HAIKU /* This is the system specific header for the SDL joystick API */ -#include -#include +#include +#include extern "C" { @@ -276,5 +276,6 @@ extern "C" }; // extern "C" -#endif /* SDL_JOYSTICK_BEOS */ +#endif /* SDL_JOYSTICK_HAIKU */ + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/joystick/iphoneos/SDL_sysjoystick.m b/jni/SDL2-2.0.1/src/joystick/iphoneos/SDL_sysjoystick.m index 6082389f..31d40a5f 100644 --- a/jni/SDL2-2.0.1/src/joystick/iphoneos/SDL_sysjoystick.m +++ b/jni/SDL2-2.0.1/src/joystick/iphoneos/SDL_sysjoystick.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* This is the system specific header for the SDL joystick API */ diff --git a/jni/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c b/jni/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c index 72fa52ca..a8e10bc7 100644 --- a/jni/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c +++ b/jni/SDL2-2.0.1/src/joystick/linux/SDL_sysjoystick.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_JOYSTICK_LINUX @@ -85,11 +85,14 @@ static int instance_counter = 0; static int IsJoystick(int fd, char *namebuf, const size_t namebuflen, SDL_JoystickGUID *guid) { + struct input_id inpid; + Uint16 *guid16 = (Uint16 *) ((char *) &guid->data); + +#if !SDL_USE_LIBUDEV + /* When udev is enabled we only get joystick devices here, so there's no need to test them */ unsigned long evbit[NBITS(EV_MAX)] = { 0 }; unsigned long keybit[NBITS(KEY_MAX)] = { 0 }; unsigned long absbit[NBITS(ABS_MAX)] = { 0 }; - struct input_id inpid; - Uint16 *guid16 = (Uint16 *) ((char *) &guid->data); if ((ioctl(fd, EVIOCGBIT(0, sizeof(evbit)), evbit) < 0) || (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) || @@ -101,6 +104,7 @@ IsJoystick(int fd, char *namebuf, const size_t namebuflen, SDL_JoystickGUID *gui test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit))) { return 0; } +#endif if (ioctl(fd, EVIOCGNAME(namebuflen), namebuf) < 0) { return 0; @@ -230,12 +234,15 @@ MaybeAddDevice(const char *path) SDL_joylist_tail = item; } + /* Need to increment the joystick count before we post the event */ + ++numjoysticks; + /* !!! FIXME: Move this to an SDL_PrivateJoyDeviceAdded() function? */ #if !SDL_EVENTS_DISABLED event.type = SDL_JOYDEVICEADDED; if (SDL_GetEventState(event.type) == SDL_ENABLE) { - event.jdevice.which = numjoysticks; + event.jdevice.which = (numjoysticks - 1); if ( (SDL_EventOK == NULL) || (*SDL_EventOK) (SDL_EventOKParam, &event) ) { SDL_PushEvent(&event); @@ -243,7 +250,7 @@ MaybeAddDevice(const char *path) } #endif /* !SDL_EVENTS_DISABLED */ - return numjoysticks++; + return numjoysticks; } #if SDL_USE_LIBUDEV @@ -278,6 +285,9 @@ MaybeRemoveDevice(const char *path) SDL_joylist_tail = prev; } + /* Need to decrement the joystick count before we post the event */ + --numjoysticks; + /* !!! FIXME: Move this to an SDL_PrivateJoyDeviceRemoved() function? */ #if !SDL_EVENTS_DISABLED event.type = SDL_JOYDEVICEREMOVED; @@ -294,7 +304,6 @@ MaybeRemoveDevice(const char *path) SDL_free(item->path); SDL_free(item->name); SDL_free(item); - numjoysticks--; return retval; } prev = item; @@ -500,10 +509,11 @@ ConfigJoystick(SDL_Joystick * joystick, int fd) if (test_bit(i, absbit)) { struct input_absinfo absinfo; - if (ioctl(fd, EVIOCGABS(i), &absinfo) < 0) + if (ioctl(fd, EVIOCGABS(i), &absinfo) < 0) { continue; + } #ifdef DEBUG_INPUT_EVENTS - printf("Joystick has absolute axis: %x\n", i); + printf("Joystick has absolute axis: 0x%.2x\n", i); printf("Values = { %d, %d, %d, %d, %d }\n", absinfo.value, absinfo.minimum, absinfo.maximum, absinfo.fuzz, absinfo.flat); @@ -530,9 +540,17 @@ ConfigJoystick(SDL_Joystick * joystick, int fd) } for (i = ABS_HAT0X; i <= ABS_HAT3Y; i += 2) { if (test_bit(i, absbit) || test_bit(i + 1, absbit)) { + struct input_absinfo absinfo; + + if (ioctl(fd, EVIOCGABS(i), &absinfo) < 0) { + continue; + } #ifdef DEBUG_INPUT_EVENTS printf("Joystick has hat %d\n", (i - ABS_HAT0X) / 2); -#endif + printf("Values = { %d, %d, %d, %d, %d }\n", + absinfo.value, absinfo.minimum, absinfo.maximum, + absinfo.fuzz, absinfo.flat); +#endif /* DEBUG_INPUT_EVENTS */ ++joystick->nhats; } } diff --git a/jni/SDL2-2.0.1/src/joystick/sort_controllers.py b/jni/SDL2-2.0.1/src/joystick/sort_controllers.py index 344a4232..03b857a0 100755 --- a/jni/SDL2-2.0.1/src/joystick/sort_controllers.py +++ b/jni/SDL2-2.0.1/src/joystick/sort_controllers.py @@ -29,6 +29,8 @@ def write_controllers(): global controller_guids for entry in sorted(controllers, key=lambda entry: entry[2]): line = "".join(entry) + "\n" + if not line.endswith(",\n") and not line.endswith("*/\n"): + print "Warning: '%s' is missing a comma at the end of the line" % (line) if (entry[1] in controller_guids): print "Warning: entry '%s' is duplicate of entry '%s'" % (entry[2], controller_guids[entry[1]][2]) controller_guids[entry[1]] = entry diff --git a/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick.c b/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick.c index d8149a30..c8a0d7ba 100644 --- a/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick.c +++ b/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_JOYSTICK_DINPUT @@ -630,7 +630,11 @@ SDL_SYS_JoystickInit(void) /* spin up the thread to detect hotplug of devices */ #if defined(__WIN32__) && !defined(HAVE_LIBC) #undef SDL_CreateThread +#if SDL_DYNAMIC_API + s_threadJoystick= SDL_CreateThread_REAL( SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL ); +#else s_threadJoystick= SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL ); +#endif #else s_threadJoystick = SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL ); #endif diff --git a/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick_c.h b/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick_c.h index 1a4703e5..9e04881b 100644 --- a/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick_c.h +++ b/jni/SDL2-2.0.1/src/joystick/windows/SDL_dxjoystick_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_JOYSTICK_DINPUT_H diff --git a/jni/SDL2-2.0.1/src/joystick/windows/SDL_mmjoystick.c b/jni/SDL2-2.0.1/src/joystick/windows/SDL_mmjoystick.c index e012d446..824ecc93 100644 --- a/jni/SDL2-2.0.1/src/joystick/windows/SDL_mmjoystick.c +++ b/jni/SDL2-2.0.1/src/joystick/windows/SDL_mmjoystick.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_JOYSTICK_WINMM diff --git a/jni/SDL2-2.0.1/src/libm/math_libm.h b/jni/SDL2-2.0.1/src/libm/math_libm.h index 45a34d8a..861dece3 100644 --- a/jni/SDL2-2.0.1/src/libm/math_libm.h +++ b/jni/SDL2-2.0.1/src/libm/math_libm.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Math routines from uClibc: http://www.uclibc.org */ diff --git a/jni/SDL2-2.0.1/src/libm/s_atan.c b/jni/SDL2-2.0.1/src/libm/s_atan.c index f664f0eb..970ea4db 100644 --- a/jni/SDL2-2.0.1/src/libm/s_atan.c +++ b/jni/SDL2-2.0.1/src/libm/s_atan.c @@ -112,3 +112,4 @@ double atan(double x) } } libm_hidden_def(atan) + diff --git a/jni/SDL2-2.0.1/src/loadso/dlopen/SDL_sysloadso.c b/jni/SDL2-2.0.1/src/loadso/dlopen/SDL_sysloadso.c index c2cbdd4c..337f050d 100644 --- a/jni/SDL2-2.0.1/src/loadso/dlopen/SDL_sysloadso.c +++ b/jni/SDL2-2.0.1/src/loadso/dlopen/SDL_sysloadso.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_LOADSO_DLOPEN diff --git a/jni/SDL2-2.0.1/src/loadso/dummy/SDL_sysloadso.c b/jni/SDL2-2.0.1/src/loadso/dummy/SDL_sysloadso.c index d890a148..652b6f4e 100644 --- a/jni/SDL2-2.0.1/src/loadso/dummy/SDL_sysloadso.c +++ b/jni/SDL2-2.0.1/src/loadso/dummy/SDL_sysloadso.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if defined(SDL_LOADSO_DUMMY) || defined(SDL_LOADSO_DISABLED) diff --git a/jni/SDL2-2.0.1/src/loadso/beos/SDL_sysloadso.c b/jni/SDL2-2.0.1/src/loadso/haiku/SDL_sysloadso.c similarity index 94% rename from jni/SDL2-2.0.1/src/loadso/beos/SDL_sysloadso.c rename to jni/SDL2-2.0.1/src/loadso/haiku/SDL_sysloadso.c index 524cd715..95a4ce93 100644 --- a/jni/SDL2-2.0.1/src/loadso/beos/SDL_sysloadso.c +++ b/jni/SDL2-2.0.1/src/loadso/haiku/SDL_sysloadso.c @@ -18,15 +18,15 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#ifdef SDL_LOADSO_BEOS +#ifdef SDL_LOADSO_HAIKU /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* System dependent library loading routines */ #include -#include +#include #include "SDL_loadso.h" @@ -66,6 +66,6 @@ SDL_UnloadObject(void *handle) } } -#endif /* SDL_LOADSO_BEOS */ +#endif /* SDL_LOADSO_HAIKU */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/loadso/windows/SDL_sysloadso.c b/jni/SDL2-2.0.1/src/loadso/windows/SDL_sysloadso.c index 21e7a6c5..fe6f19fc 100644 --- a/jni/SDL2-2.0.1/src/loadso/windows/SDL_sysloadso.c +++ b/jni/SDL2-2.0.1/src/loadso/windows/SDL_sysloadso.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_LOADSO_WINDOWS diff --git a/jni/SDL2-2.0.1/src/main/android/SDL_android_main.c b/jni/SDL2-2.0.1/src/main/android/SDL_android_main.c index 4e248061..a2603bed 100644 --- a/jni/SDL2-2.0.1/src/main/android/SDL_android_main.c +++ b/jni/SDL2-2.0.1/src/main/android/SDL_android_main.c @@ -1,5 +1,5 @@ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef __ANDROID__ @@ -22,30 +22,12 @@ void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject SDL_SetMainReady(); - /* get argument from SDLMain in SDLActivity.java */ - jboolean isCopy; - const char* str = (*env)->GetStringUTFChars(env, obj, &isCopy); - /* Run the application code! */ int status; - int argc; - - if (SDL_strlen(str) > 0) - argc = 2; - else - argc = 1; - - /* assemble argv depending on whether we have an argument or not */ - char *argv[argc + 1]; + char *argv[2]; argv[0] = SDL_strdup("SDL_app"); - if (SDL_strlen(str) > 0) - argv[1] = SDL_strdup(str); - argv[argc] = NULL; - - if (isCopy == JNI_TRUE) - (*env)->ReleaseStringUTFChars(env, obj, str); - - status = SDL_main(argc, argv); + argv[1] = NULL; + status = SDL_main(1, argv); /* Do not issue an exit or the whole application will terminate instead of just the SDL thread */ /* exit(status); */ diff --git a/jni/SDL2-2.0.1/src/main/dummy/SDL_dummy_main.c b/jni/SDL2-2.0.1/src/main/dummy/SDL_dummy_main.c index 87955239..4737d459 100644 --- a/jni/SDL2-2.0.1/src/main/dummy/SDL_dummy_main.c +++ b/jni/SDL2-2.0.1/src/main/dummy/SDL_dummy_main.c @@ -1,6 +1,6 @@ /* Include the SDL main definition header */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_main.h" #ifdef main diff --git a/jni/SDL2-2.0.1/src/main/beos/SDL_BApp.h b/jni/SDL2-2.0.1/src/main/haiku/SDL_BApp.h similarity index 98% rename from jni/SDL2-2.0.1/src/main/beos/SDL_BApp.h rename to jni/SDL2-2.0.1/src/main/haiku/SDL_BApp.h index 9b731e3e..bbdb34c0 100644 --- a/jni/SDL2-2.0.1/src/main/beos/SDL_BApp.h +++ b/jni/SDL2-2.0.1/src/main/haiku/SDL_BApp.h @@ -24,21 +24,21 @@ #include #include -#include "../../video/bwindow/SDL_bkeyboard.h" +#include "../../video/haiku/SDL_bkeyboard.h" #ifdef __cplusplus extern "C" { #endif -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_video.h" /* Local includes */ #include "../../events/SDL_events_c.h" -#include "../../video/bwindow/SDL_bkeyboard.h" -#include "../../video/bwindow/SDL_bframebuffer.h" +#include "../../video/haiku/SDL_bkeyboard.h" +#include "../../video/haiku/SDL_bframebuffer.h" #ifdef __cplusplus } diff --git a/jni/SDL2-2.0.1/src/main/beos/SDL_BeApp.cc b/jni/SDL2-2.0.1/src/main/haiku/SDL_BeApp.cc similarity index 94% rename from jni/SDL2-2.0.1/src/main/beos/SDL_BeApp.cc rename to jni/SDL2-2.0.1/src/main/haiku/SDL_BeApp.cc index fb622ab1..959ccbc6 100644 --- a/jni/SDL2-2.0.1/src/main/beos/SDL_BeApp.cc +++ b/jni/SDL2-2.0.1/src/main/haiku/SDL_BeApp.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if defined(__BEOS__) || defined(__HAIKU__) +#if defined(__HAIKU__) /* Handle the BeApp specific portions of the application */ @@ -35,7 +35,7 @@ #include "SDL_timer.h" #include "SDL_error.h" -#include "../../video/bwindow/SDL_BWin.h" +#include "../../video/haiku/SDL_BWin.h" #ifdef __cplusplus extern "C" { @@ -67,7 +67,7 @@ SDL_InitBeApp(void) return SDL_SetError("Couldn't create BApplication thread"); } - /* Change working to directory to that of executable */ + /* Change working directory to that of executable */ app_info info; if (B_OK == be_app->GetAppInfo(&info)) { entry_ref ref = info.ref; @@ -131,6 +131,6 @@ void SDL_BApp::ClearID(SDL_BWin *bwin) { } } -#endif /* __BEOS__ */ +#endif /* __HAIKU__ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/main/beos/SDL_BeApp.h b/jni/SDL2-2.0.1/src/main/haiku/SDL_BeApp.h similarity index 97% rename from jni/SDL2-2.0.1/src/main/beos/SDL_BeApp.h rename to jni/SDL2-2.0.1/src/main/haiku/SDL_BeApp.h index 5bc5251d..ccee0b21 100644 --- a/jni/SDL2-2.0.1/src/main/beos/SDL_BeApp.h +++ b/jni/SDL2-2.0.1/src/main/haiku/SDL_BeApp.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef __cplusplus diff --git a/jni/SDL2-2.0.1/src/power/SDL_power.c b/jni/SDL2-2.0.1/src/power/SDL_power.c index b8f3ae40..0ce4f686 100644 --- a/jni/SDL2-2.0.1/src/power/SDL_power.c +++ b/jni/SDL2-2.0.1/src/power/SDL_power.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_power.h" /* @@ -33,7 +33,7 @@ SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *, int *, int *); SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *, int *, int *); SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *, int *, int *); SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *, int *, int *); -SDL_bool SDL_GetPowerInfo_BeOS(SDL_PowerState *, int *, int *); +SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *, int *, int *); SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *, int *, int *); SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *, int *, int *); SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *); @@ -68,8 +68,8 @@ static SDL_GetPowerInfo_Impl implementations[] = { #ifdef SDL_POWER_MACOSX /* handles Mac OS X, Darwin. */ SDL_GetPowerInfo_MacOSX, #endif -#ifdef SDL_POWER_BEOS /* handles BeOS, Zeta, with euc.jp apm driver. */ - SDL_GetPowerInfo_BeOS, +#ifdef SDL_POWER_HAIKU /* with BeOS euc.jp apm driver. Does this work on Haiku? */ + SDL_GetPowerInfo_Haiku, #endif #ifdef SDL_POWER_ANDROID /* handles Android. */ SDL_GetPowerInfo_Android, diff --git a/jni/SDL2-2.0.1/src/power/android/SDL_syspower.c b/jni/SDL2-2.0.1/src/power/android/SDL_syspower.c index adedd04c..9f4c55f5 100644 --- a/jni/SDL2-2.0.1/src/power/android/SDL_syspower.c +++ b/jni/SDL2-2.0.1/src/power/android/SDL_syspower.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_POWER_DISABLED #if SDL_POWER_ANDROID diff --git a/jni/SDL2-2.0.1/src/power/beos/SDL_syspower.c b/jni/SDL2-2.0.1/src/power/haiku/SDL_syspower.c similarity index 94% rename from jni/SDL2-2.0.1/src/power/beos/SDL_syspower.c rename to jni/SDL2-2.0.1/src/power/haiku/SDL_syspower.c index 8f172cc0..a627a907 100644 --- a/jni/SDL2-2.0.1/src/power/beos/SDL_syspower.c +++ b/jni/SDL2-2.0.1/src/power/haiku/SDL_syspower.c @@ -18,10 +18,11 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" +/* !!! FIXME: does this thing even work on Haiku? */ #ifndef SDL_POWER_DISABLED -#if SDL_POWER_BEOS +#if SDL_POWER_HAIKU #include #include @@ -40,7 +41,7 @@ #include "SDL_power.h" SDL_bool -SDL_GetPowerInfo_BeOS(SDL_PowerState * state, int *seconds, int *percent) +SDL_GetPowerInfo_Haiku(SDL_PowerState * state, int *seconds, int *percent) { const int fd = open("/dev/misc/apm", O_RDONLY); SDL_bool need_details = SDL_FALSE; @@ -119,7 +120,7 @@ SDL_GetPowerInfo_BeOS(SDL_PowerState * state, int *seconds, int *percent) return SDL_TRUE; /* the definitive answer if APM driver replied. */ } -#endif /* SDL_POWER_BEOS */ +#endif /* SDL_POWER_HAIKU */ #endif /* SDL_POWER_DISABLED */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/power/linux/SDL_syspower.c b/jni/SDL2-2.0.1/src/power/linux/SDL_syspower.c index d9616de2..b8169806 100644 --- a/jni/SDL2-2.0.1/src/power/linux/SDL_syspower.c +++ b/jni/SDL2-2.0.1/src/power/linux/SDL_syspower.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_POWER_DISABLED #if SDL_POWER_LINUX diff --git a/jni/SDL2-2.0.1/src/power/macosx/SDL_syspower.c b/jni/SDL2-2.0.1/src/power/macosx/SDL_syspower.c index 572dcfdd..d60cdbc1 100644 --- a/jni/SDL2-2.0.1/src/power/macosx/SDL_syspower.c +++ b/jni/SDL2-2.0.1/src/power/macosx/SDL_syspower.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_POWER_DISABLED #if SDL_POWER_MACOSX diff --git a/jni/SDL2-2.0.1/src/power/psp/SDL_syspower.c b/jni/SDL2-2.0.1/src/power/psp/SDL_syspower.c index 8c791bba..b1096b80 100644 --- a/jni/SDL2-2.0.1/src/power/psp/SDL_syspower.c +++ b/jni/SDL2-2.0.1/src/power/psp/SDL_syspower.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_POWER_DISABLED #if SDL_POWER_PSP diff --git a/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.h b/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.h index ce3bc2e7..187ee590 100644 --- a/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.h +++ b/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_POWER_UIKIT diff --git a/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.m b/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.m index f870ea2a..cf1c207c 100644 --- a/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.m +++ b/jni/SDL2-2.0.1/src/power/uikit/SDL_syspower.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_POWER_DISABLED #if SDL_POWER_UIKIT diff --git a/jni/SDL2-2.0.1/src/power/windows/SDL_syspower.c b/jni/SDL2-2.0.1/src/power/windows/SDL_syspower.c index 29ddb0f8..d2485fb4 100644 --- a/jni/SDL2-2.0.1/src/power/windows/SDL_syspower.c +++ b/jni/SDL2-2.0.1/src/power/windows/SDL_syspower.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_POWER_DISABLED #if SDL_POWER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/render/SDL_render.c b/jni/SDL2-2.0.1/src/render/SDL_render.c index 5546d4a6..aa717149 100644 --- a/jni/SDL2-2.0.1/src/render/SDL_render.c +++ b/jni/SDL2-2.0.1/src/render/SDL_render.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* The SDL 2D rendering system */ @@ -348,8 +348,7 @@ SDL_GetRendererOutputSize(SDL_Renderer * renderer, int *w, int *h) return 0; } else { /* This should never happen */ - SDL_SetError("Renderer doesn't support querying output size"); - return -1; + return SDL_SetError("Renderer doesn't support querying output size"); } } diff --git a/jni/SDL2-2.0.1/src/render/SDL_sysrender.h b/jni/SDL2-2.0.1/src/render/SDL_sysrender.h index b3d68688..c2eaa3f1 100644 --- a/jni/SDL2-2.0.1/src/render/SDL_sysrender.h +++ b/jni/SDL2-2.0.1/src/render/SDL_sysrender.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_sysrender_h #define _SDL_sysrender_h diff --git a/jni/SDL2-2.0.1/src/render/SDL_yuv_mmx.c b/jni/SDL2-2.0.1/src/render/SDL_yuv_mmx.c index b223d2d2..9e9976f0 100644 --- a/jni/SDL2-2.0.1/src/render/SDL_yuv_mmx.c +++ b/jni/SDL2-2.0.1/src/render/SDL_yuv_mmx.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES diff --git a/jni/SDL2-2.0.1/src/render/SDL_yuv_sw.c b/jni/SDL2-2.0.1/src/render/SDL_yuv_sw.c index 14b825d9..39387a2a 100644 --- a/jni/SDL2-2.0.1/src/render/SDL_yuv_sw.c +++ b/jni/SDL2-2.0.1/src/render/SDL_yuv_sw.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This is the software implementation of the YUV texture support */ diff --git a/jni/SDL2-2.0.1/src/render/SDL_yuv_sw_c.h b/jni/SDL2-2.0.1/src/render/SDL_yuv_sw_c.h index f1280417..75fe9363 100644 --- a/jni/SDL2-2.0.1/src/render/SDL_yuv_sw_c.h +++ b/jni/SDL2-2.0.1/src/render/SDL_yuv_sw_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" diff --git a/jni/SDL2-2.0.1/src/render/direct3d/SDL_render_d3d.c b/jni/SDL2-2.0.1/src/render/direct3d/SDL_render_d3d.c index a4c60275..74dbea2f 100644 --- a/jni/SDL2-2.0.1/src/render/direct3d/SDL_render_d3d.c +++ b/jni/SDL2-2.0.1/src/render/direct3d/SDL_render_d3d.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/opengl/SDL_glfuncs.h b/jni/SDL2-2.0.1/src/render/opengl/SDL_glfuncs.h index 4915c64b..c7e577b0 100644 --- a/jni/SDL2-2.0.1/src/render/opengl/SDL_glfuncs.h +++ b/jni/SDL2-2.0.1/src/render/opengl/SDL_glfuncs.h @@ -30,7 +30,7 @@ SDL_PROC_UNUSED(void, glColor3bv, (const GLbyte *)) SDL_PROC_UNUSED(void, glColor3d, (GLdouble, GLdouble, GLdouble)) SDL_PROC_UNUSED(void, glColor3dv, (const GLdouble *)) SDL_PROC_UNUSED(void, glColor3f, (GLfloat, GLfloat, GLfloat)) -SDL_PROC_UNUSED(void, glColor3fv, (const GLfloat *)) +SDL_PROC(void, glColor3fv, (const GLfloat *)) SDL_PROC_UNUSED(void, glColor3i, (GLint, GLint, GLint)) SDL_PROC_UNUSED(void, glColor3iv, (const GLint *)) SDL_PROC_UNUSED(void, glColor3s, (GLshort, GLshort, GLshort)) @@ -85,12 +85,12 @@ SDL_PROC_UNUSED(void, glCopyTexSubImage2D, SDL_PROC_UNUSED(void, glCullFace, (GLenum mode)) SDL_PROC_UNUSED(void, glDeleteLists, (GLuint list, GLsizei range)) SDL_PROC(void, glDeleteTextures, (GLsizei n, const GLuint * textures)) -SDL_PROC_UNUSED(void, glDepthFunc, (GLenum func)) +SDL_PROC(void, glDepthFunc, (GLenum func)) SDL_PROC_UNUSED(void, glDepthMask, (GLboolean flag)) SDL_PROC_UNUSED(void, glDepthRange, (GLclampd zNear, GLclampd zFar)) SDL_PROC(void, glDisable, (GLenum cap)) -SDL_PROC(void, glDisableClientState, (GLenum array)) -SDL_PROC(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count)) +SDL_PROC_UNUSED(void, glDisableClientState, (GLenum array)) +SDL_PROC_UNUSED(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count)) SDL_PROC_UNUSED(void, glDrawBuffer, (GLenum mode)) SDL_PROC_UNUSED(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, @@ -103,7 +103,7 @@ SDL_PROC_UNUSED(void, glEdgeFlagPointer, (GLsizei stride, const GLvoid * pointer)) SDL_PROC_UNUSED(void, glEdgeFlagv, (const GLboolean * flag)) SDL_PROC(void, glEnable, (GLenum cap)) -SDL_PROC(void, glEnableClientState, (GLenum array)) +SDL_PROC_UNUSED(void, glEnableClientState, (GLenum array)) SDL_PROC(void, glEnd, (void)) SDL_PROC_UNUSED(void, glEndList, (void)) SDL_PROC_UNUSED(void, glEvalCoord1d, (GLdouble u)) @@ -334,13 +334,13 @@ SDL_PROC_UNUSED(void, glRectsv, (const GLshort * v1, const GLshort * v2)) SDL_PROC_UNUSED(GLint, glRenderMode, (GLenum mode)) SDL_PROC(void, glRotated, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) -SDL_PROC_UNUSED(void, glRotatef, +SDL_PROC(void, glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) SDL_PROC_UNUSED(void, glScaled, (GLdouble x, GLdouble y, GLdouble z)) SDL_PROC_UNUSED(void, glScalef, (GLfloat x, GLfloat y, GLfloat z)) SDL_PROC(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height)) SDL_PROC_UNUSED(void, glSelectBuffer, (GLsizei size, GLuint * buffer)) -SDL_PROC_UNUSED(void, glShadeModel, (GLenum mode)) +SDL_PROC(void, glShadeModel, (GLenum mode)) SDL_PROC_UNUSED(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask)) SDL_PROC_UNUSED(void, glStencilMask, (GLuint mask)) SDL_PROC_UNUSED(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) @@ -432,7 +432,7 @@ SDL_PROC_UNUSED(void, glVertex2sv, (const GLshort * v)) SDL_PROC_UNUSED(void, glVertex3d, (GLdouble x, GLdouble y, GLdouble z)) SDL_PROC_UNUSED(void, glVertex3dv, (const GLdouble * v)) SDL_PROC_UNUSED(void, glVertex3f, (GLfloat x, GLfloat y, GLfloat z)) -SDL_PROC_UNUSED(void, glVertex3fv, (const GLfloat * v)) +SDL_PROC(void, glVertex3fv, (const GLfloat * v)) SDL_PROC_UNUSED(void, glVertex3i, (GLint x, GLint y, GLint z)) SDL_PROC_UNUSED(void, glVertex3iv, (const GLint * v)) SDL_PROC_UNUSED(void, glVertex3s, (GLshort x, GLshort y, GLshort z)) @@ -448,7 +448,7 @@ SDL_PROC_UNUSED(void, glVertex4iv, (const GLint * v)) SDL_PROC_UNUSED(void, glVertex4s, (GLshort x, GLshort y, GLshort z, GLshort w)) SDL_PROC_UNUSED(void, glVertex4sv, (const GLshort * v)) -SDL_PROC(void, glVertexPointer, +SDL_PROC_UNUSED(void, glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer)) SDL_PROC(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height)) diff --git a/jni/SDL2-2.0.1/src/render/opengl/SDL_render_gl.c b/jni/SDL2-2.0.1/src/render/opengl/SDL_render_gl.c index 51fc9ad7..1cd03d46 100644 --- a/jni/SDL2-2.0.1/src/render/opengl/SDL_render_gl.c +++ b/jni/SDL2-2.0.1/src/render/opengl/SDL_render_gl.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED @@ -919,8 +919,16 @@ GL_UpdateViewport(SDL_Renderer * renderer) return 0; } - data->glViewport(renderer->viewport.x, renderer->viewport.y, - renderer->viewport.w, renderer->viewport.h); + if (renderer->target) { + data->glViewport(renderer->viewport.x, renderer->viewport.y, + renderer->viewport.w, renderer->viewport.h); + } else { + int w, h; + + SDL_GetRendererOutputSize(renderer, &w, &h); + data->glViewport(renderer->viewport.x, (h - renderer->viewport.y - renderer->viewport.h), + renderer->viewport.w, renderer->viewport.h); + } data->glMatrixMode(GL_PROJECTION); data->glLoadIdentity(); @@ -1048,17 +1056,15 @@ GL_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points, int count) { GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + int i; GL_SetDrawingState(renderer); - data->glTranslatef(0.5f, 0.5f, 0.0f); - data->glVertexPointer(2, GL_FLOAT, 0, points); - data->glEnableClientState(GL_VERTEX_ARRAY); - - data->glDrawArrays(GL_POINTS, 0, count); - - data->glDisableClientState(GL_VERTEX_ARRAY); - data->glTranslatef(-0.5f, -0.5f, 0.0f); + data->glBegin(GL_POINTS); + for (i = 0; i < count; ++i) { + data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y); + } + data->glEnd(); return 0; } @@ -1068,28 +1074,62 @@ GL_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points, int count) { GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + int i; GL_SetDrawingState(renderer); - data->glTranslatef(0.5f, 0.5f, 0.0f); - data->glVertexPointer(2, GL_FLOAT, 0, points); - data->glEnableClientState(GL_VERTEX_ARRAY); - if (count > 2 && points[0].x == points[count-1].x && points[0].y == points[count-1].y) { + data->glBegin(GL_LINE_LOOP); /* GL_LINE_LOOP takes care of the final segment */ - data->glDrawArrays(GL_LINE_LOOP, 0, count-1); + --count; + for (i = 0; i < count; ++i) { + data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y); + } + data->glEnd(); } else { - data->glDrawArrays(GL_LINE_STRIP, 0, count); - } - /* Make sure all the line endpoints are closed. - * http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node47.html - * Which points need to be drawn varies by driver, so just draw all of them. - */ - data->glDrawArrays(GL_POINTS, 0, count); - data->glDisableClientState(GL_VERTEX_ARRAY); - data->glTranslatef(-0.5f, -0.5f, 0.0f); +#if defined(__MACOSX__) || defined(__WIN32__) +#else + int x1, y1, x2, y2; +#endif + data->glBegin(GL_LINE_STRIP); + for (i = 0; i < count; ++i) { + data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y); + } + data->glEnd(); + + /* The line is half open, so we need one more point to complete it. + * http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node47.html + * If we have to, we can use vertical line and horizontal line textures + * for vertical and horizontal lines, and then create custom textures + * for diagonal lines and software render those. It's terrible, but at + * least it would be pixel perfect. + */ + data->glBegin(GL_POINTS); +#if defined(__MACOSX__) || defined(__WIN32__) + /* Mac OS X and Windows seem to always leave the last point open */ + data->glVertex2f(0.5f + points[count-1].x, 0.5f + points[count-1].y); +#else + /* Linux seems to leave the right-most or bottom-most point open */ + x1 = points[0].x; + y1 = points[0].y; + x2 = points[count-1].x; + y2 = points[count-1].y; + + if (x1 > x2) { + data->glVertex2f(0.5f + x1, 0.5f + y1); + } else if (x2 > x1) { + data->glVertex2f(0.5f + x2, 0.5f + y2); + } + if (y1 > y2) { + data->glVertex2f(0.5f + x1, 0.5f + y1); + } else if (y2 > y1) { + data->glVertex2f(0.5f + x2, 0.5f + y2); + } +#endif + data->glEnd(); + } return GL_CheckError("", renderer); } diff --git a/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.c b/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.c index ebf641bb..80e173b8 100644 --- a/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.c +++ b/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.h b/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.h index c4b7e0b1..4080b1d3 100644 --- a/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.h +++ b/jni/SDL2-2.0.1/src/render/opengl/SDL_shaders_gl.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* OpenGL shader implementation */ diff --git a/jni/SDL2-2.0.1/src/render/opengles/SDL_render_gles.c b/jni/SDL2-2.0.1/src/render/opengles/SDL_render_gles.c index 3be1998d..10e42567 100644 --- a/jni/SDL2-2.0.1/src/render/opengles/SDL_render_gles.c +++ b/jni/SDL2-2.0.1/src/render/opengles/SDL_render_gles.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_OGL_ES && !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/opengles2/SDL_gles2funcs.h b/jni/SDL2-2.0.1/src/render/opengles2/SDL_gles2funcs.h index b201bdfd..9faad133 100644 --- a/jni/SDL2-2.0.1/src/render/opengles2/SDL_gles2funcs.h +++ b/jni/SDL2-2.0.1/src/render/opengles2/SDL_gles2funcs.h @@ -46,3 +46,5 @@ SDL_PROC(void, glBindFramebuffer, (GLenum, GLuint)) SDL_PROC(void, glFramebufferTexture2D, (GLenum, GLenum, GLenum, GLuint, GLint)) SDL_PROC(GLenum, glCheckFramebufferStatus, (GLenum)) SDL_PROC(void, glDeleteFramebuffers, (GLsizei, const GLuint *)) +SDL_PROC(GLint, glGetAttribLocation, (GLuint, const GLchar *)) + \ No newline at end of file diff --git a/jni/SDL2-2.0.1/src/render/opengles2/SDL_render_gles2.c b/jni/SDL2-2.0.1/src/render/opengles2/SDL_render_gles2.c index 31a1598c..f7ac5613 100644 --- a/jni/SDL2-2.0.1/src/render/opengles2/SDL_render_gles2.c +++ b/jni/SDL2-2.0.1/src/render/opengles2/SDL_render_gles2.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED @@ -724,8 +724,8 @@ GLES2_CacheProgram(SDL_Renderer *renderer, GLES2_ShaderCacheEntry *vertex, entry->uniform_locations[GLES2_UNIFORM_COLOR] = data->glGetUniformLocation(entry->id, "u_color"); - entry->modulation_r = entry->modulation_g = entry->modulation_b = entry->modulation_a = 1.0f; - entry->color_r = entry->color_g = entry->color_b = entry->color_a = 1.0f; + entry->modulation_r = entry->modulation_g = entry->modulation_b = entry->modulation_a = 255; + entry->color_r = entry->color_g = entry->color_b = entry->color_a = 255; data->glUseProgram(entry->id); data->glUniformMatrix4fv(entry->uniform_locations[GLES2_UNIFORM_PROJECTION], 1, GL_FALSE, (GLfloat *)entry->projection); diff --git a/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.c b/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.c index fb6921fd..e4bbebb0 100644 --- a/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.c +++ b/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.h b/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.h index 73f70664..eeee876a 100644 --- a/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.h +++ b/jni/SDL2-2.0.1/src/render/opengles2/SDL_shaders_gles2.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_OGL_ES2 diff --git a/jni/SDL2-2.0.1/src/render/psp/SDL_render_psp.c b/jni/SDL2-2.0.1/src/render/psp/SDL_render_psp.c index b8cd265d..c867af36 100644 --- a/jni/SDL2-2.0.1/src/render/psp/SDL_render_psp.c +++ b/jni/SDL2-2.0.1/src/render/psp/SDL_render_psp.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_RENDER_PSP diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.c b/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.c index ea05ea64..4ba2fca3 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.c +++ b/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.h b/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.h index ed7981da..cdae7d0e 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.h +++ b/jni/SDL2-2.0.1/src/render/software/SDL_blendfillrect.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int SDL_BlendFillRect(SDL_Surface * dst, const SDL_Rect * rect, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_blendline.c b/jni/SDL2-2.0.1/src/render/software/SDL_blendline.c index 2ab0231b..c090a50c 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_blendline.c +++ b/jni/SDL2-2.0.1/src/render/software/SDL_blendline.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_blendline.h b/jni/SDL2-2.0.1/src/render/software/SDL_blendline.h index 81324014..aa818068 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_blendline.h +++ b/jni/SDL2-2.0.1/src/render/software/SDL_blendline.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int SDL_BlendLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.c b/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.c index e2fa66fd..eecf203f 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.c +++ b/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.h b/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.h index ec7cfa75..cbfb4be2 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.h +++ b/jni/SDL2-2.0.1/src/render/software/SDL_blendpoint.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int SDL_BlendPoint(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_draw.h b/jni/SDL2-2.0.1/src/render/software/SDL_draw.h index c529e98e..f643abb2 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_draw.h +++ b/jni/SDL2-2.0.1/src/render/software/SDL_draw.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "../../video/SDL_blit.h" diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_drawline.c b/jni/SDL2-2.0.1/src/render/software/SDL_drawline.c index 5cda4ccc..71bee9de 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_drawline.c +++ b/jni/SDL2-2.0.1/src/render/software/SDL_drawline.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_drawline.h b/jni/SDL2-2.0.1/src/render/software/SDL_drawline.h index 5b6a0984..08b975a5 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_drawline.h +++ b/jni/SDL2-2.0.1/src/render/software/SDL_drawline.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int SDL_DrawLine(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color); diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.c b/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.c index 1ae8419c..c5c74e0e 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.c +++ b/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.h b/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.h index 512ef647..2beb453f 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.h +++ b/jni/SDL2-2.0.1/src/render/software/SDL_drawpoint.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int SDL_DrawPoint(SDL_Surface * dst, int x, int y, Uint32 color); diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_render_sw.c b/jni/SDL2-2.0.1/src/render/software/SDL_render_sw.c index 29aab8c8..cd42d9b6 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_render_sw.c +++ b/jni/SDL2-2.0.1/src/render/software/SDL_render_sw.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if !SDL_RENDER_DISABLED diff --git a/jni/SDL2-2.0.1/src/render/software/SDL_rotate.c b/jni/SDL2-2.0.1/src/render/software/SDL_rotate.c index 3006eda6..f29d70d4 100644 --- a/jni/SDL2-2.0.1/src/render/software/SDL_rotate.c +++ b/jni/SDL2-2.0.1/src/render/software/SDL_rotate.c @@ -28,7 +28,7 @@ freely, subject to the following restrictions: Andreas Schiffler -- aschiffler at ferzkopp dot net */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if defined(__WIN32__) #include "../../core/windows/SDL_windows.h" diff --git a/jni/SDL2-2.0.1/src/stdlib/SDL_getenv.c b/jni/SDL2-2.0.1/src/stdlib/SDL_getenv.c index 10fa7c5c..348fe45c 100644 --- a/jni/SDL2-2.0.1/src/stdlib/SDL_getenv.c +++ b/jni/SDL2-2.0.1/src/stdlib/SDL_getenv.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #if defined(__WIN32__) #include "../core/windows/SDL_windows.h" @@ -26,13 +26,12 @@ #include "SDL_stdinc.h" -#if !defined(SDL_setenv) && defined(__WIN32__) +#if defined(__WIN32__) && (!defined(HAVE_SETENV) || !defined(HAVE_GETENV)) /* Note this isn't thread-safe! */ static char *SDL_envmem = NULL; /* Ugh, memory leak */ static size_t SDL_envmemlen = 0; #endif - /* Put a variable into the environment */ #if defined(HAVE_SETENV) int diff --git a/jni/SDL2-2.0.1/src/stdlib/SDL_iconv.c b/jni/SDL2-2.0.1/src/stdlib/SDL_iconv.c index 4de2ebe3..8963177c 100644 --- a/jni/SDL2-2.0.1/src/stdlib/SDL_iconv.c +++ b/jni/SDL2-2.0.1/src/stdlib/SDL_iconv.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This file contains portable iconv functions for SDL */ diff --git a/jni/SDL2-2.0.1/src/stdlib/SDL_malloc.c b/jni/SDL2-2.0.1/src/stdlib/SDL_malloc.c index 7a85a3b4..91d07c56 100644 --- a/jni/SDL2-2.0.1/src/stdlib/SDL_malloc.c +++ b/jni/SDL2-2.0.1/src/stdlib/SDL_malloc.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This file contains portable memory management functions for SDL */ diff --git a/jni/SDL2-2.0.1/src/stdlib/SDL_qsort.c b/jni/SDL2-2.0.1/src/stdlib/SDL_qsort.c index 0130d5a3..8329a35e 100644 --- a/jni/SDL2-2.0.1/src/stdlib/SDL_qsort.c +++ b/jni/SDL2-2.0.1/src/stdlib/SDL_qsort.c @@ -41,7 +41,7 @@ * * Gareth McCaughan Peterhouse Cambridge 1998 */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* #include diff --git a/jni/SDL2-2.0.1/src/stdlib/SDL_stdlib.c b/jni/SDL2-2.0.1/src/stdlib/SDL_stdlib.c index 2ee62bee..082c9568 100644 --- a/jni/SDL2-2.0.1/src/stdlib/SDL_stdlib.c +++ b/jni/SDL2-2.0.1/src/stdlib/SDL_stdlib.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This file contains portable stdlib functions for SDL */ @@ -46,13 +46,54 @@ SDL_atan2(double x, double y) #endif /* HAVE_ATAN2 */ } +double +SDL_acos(double val) +{ +#if defined(HAVE_ACOS) + return acos(val); +#else + double result; + if (val == -1.0) { + result = M_PI; + } else { + result = SDL_atan(SDL_sqrt(1.0 - val * val) / val); + if (result < 0.0) + { + result += M_PI; + } + } + return result; +#endif +} + +double +SDL_asin(double val) +{ +#if defined(HAVE_ASIN) + return asin(val); +#else + double result; + if (val == -1.0) { + result = -(M_PI / 2.0); + } else { + result = (M_PI / 2.0) - SDL_acos(val); + } + return result; +#endif +} + double SDL_ceil(double x) { #ifdef HAVE_CEIL return ceil(x); #else - return (double)(int)((x)+0.5); + double integer = SDL_floor(x); + double fraction = x - integer; + if (fraction > 0.0) { + integer += 1.0; + } + return integer; #endif /* HAVE_CEIL */ } diff --git a/jni/SDL2-2.0.1/src/stdlib/SDL_string.c b/jni/SDL2-2.0.1/src/stdlib/SDL_string.c index 980f025a..c351e3ac 100644 --- a/jni/SDL2-2.0.1/src/stdlib/SDL_string.c +++ b/jni/SDL2-2.0.1/src/stdlib/SDL_string.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This file contains portable string manipulation functions for SDL */ @@ -43,7 +43,7 @@ static int UTF8_TrailingBytes(unsigned char c) return 0; } -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOL) +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOL) static size_t SDL_ScanLong(const char *text, int radix, long *valuep) { @@ -84,7 +84,7 @@ SDL_ScanLong(const char *text, int radix, long *valuep) } #endif -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD) +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD) static size_t SDL_ScanUnsignedLong(const char *text, int radix, unsigned long *valuep) { @@ -116,7 +116,7 @@ SDL_ScanUnsignedLong(const char *text, int radix, unsigned long *valuep) } #endif -#ifndef HAVE_SSCANF +#ifndef HAVE_VSSCANF static size_t SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep) { @@ -148,7 +148,7 @@ SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep) } #endif -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOLL) +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOLL) static size_t SDL_ScanLongLong(const char *text, int radix, Sint64 * valuep) { @@ -189,7 +189,7 @@ SDL_ScanLongLong(const char *text, int radix, Sint64 * valuep) } #endif -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOULL) +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOULL) static size_t SDL_ScanUnsignedLongLong(const char *text, int radix, Uint64 * valuep) { @@ -221,7 +221,7 @@ SDL_ScanUnsignedLongLong(const char *text, int radix, Uint64 * valuep) } #endif -#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOD) +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOD) static size_t SDL_ScanFloat(const char *text, double *valuep) { @@ -665,23 +665,9 @@ SDL_ltoa(long value, char *string, int radix) if (value < 0) { *bufp++ = '-'; - value = -value; - } - if (value) { - while (value > 0) { - *bufp++ = ntoa_table[value % radix]; - value /= radix; - } + SDL_ultoa(-value, bufp, radix); } else { - *bufp++ = '0'; - } - *bufp = '\0'; - - /* The numbers went into the string backwards. :) */ - if (*string == '-') { - SDL_strrev(string + 1); - } else { - SDL_strrev(string); + SDL_ultoa(value, bufp, radix); } return string; @@ -723,23 +709,9 @@ SDL_lltoa(Sint64 value, char *string, int radix) if (value < 0) { *bufp++ = '-'; - value = -value; - } - if (value) { - while (value > 0) { - *bufp++ = ntoa_table[value % radix]; - value /= radix; - } + SDL_ulltoa(-value, bufp, radix); } else { - *bufp++ = '0'; - } - *bufp = '\0'; - - /* The numbers went into the string backwards. :) */ - if (*string == '-') { - SDL_strrev(string + 1); - } else { - SDL_strrev(string); + SDL_ulltoa(value, bufp, radix); } return string; @@ -995,25 +967,29 @@ SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen) #endif /* HAVE_STRNCASECMP */ } -#ifdef HAVE_SSCANF int SDL_sscanf(const char *text, const char *fmt, ...) { int rc; va_list ap; va_start(ap, fmt); - rc = vsscanf(text, fmt, ap); + rc = SDL_vsscanf(text, fmt, ap); va_end(ap); return rc; } + +#ifdef HAVE_VSSCANF +int +SDL_vsscanf(const char *text, const char *fmt, va_list ap) +{ + return vsscanf(text, fmt, ap); +} #else int -SDL_sscanf(const char *text, const char *fmt, ...) +SDL_vsscanf(const char *text, const char *fmt, va_list ap) { - va_list ap; int retval = 0; - va_start(ap, fmt); while (*fmt) { if (*fmt == ' ') { while (SDL_isspace((unsigned char) *text)) { @@ -1267,11 +1243,10 @@ SDL_sscanf(const char *text, const char *fmt, ...) /* Text didn't match format specifier */ break; } - va_end(ap); return retval; } -#endif /* HAVE_SSCANF */ +#endif /* HAVE_VSSCANF */ int SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...) diff --git a/jni/SDL2-2.0.1/src/test/SDL_test_common.c b/jni/SDL2-2.0.1/src/test/SDL_test_common.c index c117a93a..72b73e3f 100644 --- a/jni/SDL2-2.0.1/src/test/SDL_test_common.c +++ b/jni/SDL2-2.0.1/src/test/SDL_test_common.c @@ -27,7 +27,7 @@ #include #define VIDEO_USAGE \ -"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--logical WxH] [--scale N] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab] [--allow-hidpi]" +"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--logical WxH] [--scale N] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab] [--allow-highdpi]" #define AUDIO_USAGE \ "[--rate N] [--format U8|S8|U16|U16LE|U16BE|S16|S16LE|S16BE] [--channels N] [--samples N]" @@ -809,6 +809,9 @@ SDLTest_CommonInit(SDLTest_CommonState * state) state->renderers = (SDL_Renderer **) SDL_malloc(state->num_windows * sizeof(*state->renderers)); + state->targets = + (SDL_Texture **) SDL_malloc(state->num_windows * + sizeof(*state->targets)); if (!state->windows || !state->renderers) { fprintf(stderr, "Out of memory!\n"); return SDL_FALSE; @@ -861,6 +864,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state) SDL_ShowWindow(state->windows[i]); state->renderers[i] = NULL; + state->targets[i] = NULL; if (!state->skip_renderer && (state->renderdriver @@ -942,6 +946,51 @@ SDLTest_CommonInit(SDLTest_CommonState * state) return SDL_TRUE; } +static const char * +ControllerAxisName(const SDL_GameControllerAxis axis) +{ + switch (axis) + { +#define AXIS_CASE(ax) case SDL_CONTROLLER_AXIS_##ax: return #ax + AXIS_CASE(INVALID); + AXIS_CASE(LEFTX); + AXIS_CASE(LEFTY); + AXIS_CASE(RIGHTX); + AXIS_CASE(RIGHTY); + AXIS_CASE(TRIGGERLEFT); + AXIS_CASE(TRIGGERRIGHT); +#undef AXIS_CASE +default: return "???"; + } +} + +static const char * +ControllerButtonName(const SDL_GameControllerButton button) +{ + switch (button) + { +#define BUTTON_CASE(btn) case SDL_CONTROLLER_BUTTON_##btn: return #btn + BUTTON_CASE(INVALID); + BUTTON_CASE(A); + BUTTON_CASE(B); + BUTTON_CASE(X); + BUTTON_CASE(Y); + BUTTON_CASE(BACK); + BUTTON_CASE(GUIDE); + BUTTON_CASE(START); + BUTTON_CASE(LEFTSTICK); + BUTTON_CASE(RIGHTSTICK); + BUTTON_CASE(LEFTSHOULDER); + BUTTON_CASE(RIGHTSHOULDER); + BUTTON_CASE(DPAD_UP); + BUTTON_CASE(DPAD_DOWN); + BUTTON_CASE(DPAD_LEFT); + BUTTON_CASE(DPAD_RIGHT); +#undef BUTTON_CASE +default: return "???"; + } +} + static void SDLTest_PrintEvent(SDL_Event * event) { @@ -950,164 +999,193 @@ SDLTest_PrintEvent(SDL_Event * event) return; } - fprintf(stderr, "SDL EVENT: "); switch (event->type) { case SDL_WINDOWEVENT: switch (event->window.event) { case SDL_WINDOWEVENT_SHOWN: - fprintf(stderr, "Window %d shown", event->window.windowID); + SDL_Log("SDL EVENT: Window %d shown", event->window.windowID); break; case SDL_WINDOWEVENT_HIDDEN: - fprintf(stderr, "Window %d hidden", event->window.windowID); + SDL_Log("SDL EVENT: Window %d hidden", event->window.windowID); break; case SDL_WINDOWEVENT_EXPOSED: - fprintf(stderr, "Window %d exposed", event->window.windowID); + SDL_Log("SDL EVENT: Window %d exposed", event->window.windowID); break; case SDL_WINDOWEVENT_MOVED: - fprintf(stderr, "Window %d moved to %d,%d", + SDL_Log("SDL EVENT: Window %d moved to %d,%d", event->window.windowID, event->window.data1, event->window.data2); break; case SDL_WINDOWEVENT_RESIZED: - fprintf(stderr, "Window %d resized to %dx%d", + SDL_Log("SDL EVENT: Window %d resized to %dx%d", event->window.windowID, event->window.data1, event->window.data2); break; case SDL_WINDOWEVENT_SIZE_CHANGED: - fprintf(stderr, "Window %d changed size to %dx%d", + SDL_Log("SDL EVENT: Window %d changed size to %dx%d", event->window.windowID, event->window.data1, event->window.data2); break; case SDL_WINDOWEVENT_MINIMIZED: - fprintf(stderr, "Window %d minimized", event->window.windowID); + SDL_Log("SDL EVENT: Window %d minimized", event->window.windowID); break; case SDL_WINDOWEVENT_MAXIMIZED: - fprintf(stderr, "Window %d maximized", event->window.windowID); + SDL_Log("SDL EVENT: Window %d maximized", event->window.windowID); break; case SDL_WINDOWEVENT_RESTORED: - fprintf(stderr, "Window %d restored", event->window.windowID); + SDL_Log("SDL EVENT: Window %d restored", event->window.windowID); break; case SDL_WINDOWEVENT_ENTER: - fprintf(stderr, "Mouse entered window %d", + SDL_Log("SDL EVENT: Mouse entered window %d", event->window.windowID); break; case SDL_WINDOWEVENT_LEAVE: - fprintf(stderr, "Mouse left window %d", event->window.windowID); + SDL_Log("SDL EVENT: Mouse left window %d", event->window.windowID); break; case SDL_WINDOWEVENT_FOCUS_GAINED: - fprintf(stderr, "Window %d gained keyboard focus", + SDL_Log("SDL EVENT: Window %d gained keyboard focus", event->window.windowID); break; case SDL_WINDOWEVENT_FOCUS_LOST: - fprintf(stderr, "Window %d lost keyboard focus", + SDL_Log("SDL EVENT: Window %d lost keyboard focus", event->window.windowID); break; case SDL_WINDOWEVENT_CLOSE: - fprintf(stderr, "Window %d closed", event->window.windowID); + SDL_Log("SDL EVENT: Window %d closed", event->window.windowID); break; default: - fprintf(stderr, "Window %d got unknown event %d", + SDL_Log("SDL EVENT: Window %d got unknown event %d", event->window.windowID, event->window.event); break; } break; case SDL_KEYDOWN: - fprintf(stderr, - "Keyboard: key pressed in window %d: scancode 0x%08X = %s, keycode 0x%08X = %s", + SDL_Log("SDL EVENT: Keyboard: key pressed in window %d: scancode 0x%08X = %s, keycode 0x%08X = %s", event->key.windowID, event->key.keysym.scancode, SDL_GetScancodeName(event->key.keysym.scancode), event->key.keysym.sym, SDL_GetKeyName(event->key.keysym.sym)); break; case SDL_KEYUP: - fprintf(stderr, - "Keyboard: key released in window %d: scancode 0x%08X = %s, keycode 0x%08X = %s", + SDL_Log("SDL EVENT: Keyboard: key released in window %d: scancode 0x%08X = %s, keycode 0x%08X = %s", event->key.windowID, event->key.keysym.scancode, SDL_GetScancodeName(event->key.keysym.scancode), event->key.keysym.sym, SDL_GetKeyName(event->key.keysym.sym)); break; case SDL_TEXTINPUT: - fprintf(stderr, "Keyboard: text input \"%s\" in window %d", + SDL_Log("SDL EVENT: Keyboard: text input \"%s\" in window %d", event->text.text, event->text.windowID); break; case SDL_MOUSEMOTION: - fprintf(stderr, "Mouse: moved to %d,%d (%d,%d) in window %d", + SDL_Log("SDL EVENT: Mouse: moved to %d,%d (%d,%d) in window %d", event->motion.x, event->motion.y, event->motion.xrel, event->motion.yrel, event->motion.windowID); break; case SDL_MOUSEBUTTONDOWN: - fprintf(stderr, "Mouse: button %d pressed at %d,%d in window %d", - event->button.button, event->button.x, event->button.y, + SDL_Log("SDL EVENT: Mouse: button %d pressed at %d,%d with click count %d in window %d", + event->button.button, event->button.x, event->button.y, event->button.clicks, event->button.windowID); break; case SDL_MOUSEBUTTONUP: - fprintf(stderr, "Mouse: button %d released at %d,%d in window %d", - event->button.button, event->button.x, event->button.y, + SDL_Log("SDL EVENT: Mouse: button %d released at %d,%d with click count %d in window %d", + event->button.button, event->button.x, event->button.y, event->button.clicks, event->button.windowID); break; case SDL_MOUSEWHEEL: - fprintf(stderr, - "Mouse: wheel scrolled %d in x and %d in y in window %d", + SDL_Log("SDL EVENT: Mouse: wheel scrolled %d in x and %d in y in window %d", event->wheel.x, event->wheel.y, event->wheel.windowID); break; + case SDL_JOYDEVICEADDED: + SDL_Log("SDL EVENT: Joystick index %d attached", + event->jdevice.which); + break; + case SDL_JOYDEVICEREMOVED: + SDL_Log("SDL EVENT: Joystick %d removed", + event->jdevice.which); + break; case SDL_JOYBALLMOTION: - fprintf(stderr, "Joystick %d: ball %d moved by %d,%d", + SDL_Log("SDL EVENT: Joystick %d: ball %d moved by %d,%d", event->jball.which, event->jball.ball, event->jball.xrel, event->jball.yrel); break; case SDL_JOYHATMOTION: - fprintf(stderr, "Joystick %d: hat %d moved to ", event->jhat.which, - event->jhat.hat); - switch (event->jhat.value) { - case SDL_HAT_CENTERED: - fprintf(stderr, "CENTER"); - break; - case SDL_HAT_UP: - fprintf(stderr, "UP"); - break; - case SDL_HAT_RIGHTUP: - fprintf(stderr, "RIGHTUP"); - break; - case SDL_HAT_RIGHT: - fprintf(stderr, "RIGHT"); - break; - case SDL_HAT_RIGHTDOWN: - fprintf(stderr, "RIGHTDOWN"); - break; - case SDL_HAT_DOWN: - fprintf(stderr, "DOWN"); - break; - case SDL_HAT_LEFTDOWN: - fprintf(stderr, "LEFTDOWN"); - break; - case SDL_HAT_LEFT: - fprintf(stderr, "LEFT"); - break; - case SDL_HAT_LEFTUP: - fprintf(stderr, "LEFTUP"); - break; - default: - fprintf(stderr, "UNKNOWN"); - break; + { + const char *position = "UNKNOWN"; + switch (event->jhat.value) { + case SDL_HAT_CENTERED: + position = "CENTER"; + break; + case SDL_HAT_UP: + position = "UP"; + break; + case SDL_HAT_RIGHTUP: + position = "RIGHTUP"; + break; + case SDL_HAT_RIGHT: + position = "RIGHT"; + break; + case SDL_HAT_RIGHTDOWN: + position = "RIGHTDOWN"; + break; + case SDL_HAT_DOWN: + position = "DOWN"; + break; + case SDL_HAT_LEFTDOWN: + position = "LEFTDOWN"; + break; + case SDL_HAT_LEFT: + position = "LEFT"; + break; + case SDL_HAT_LEFTUP: + position = "LEFTUP"; + break; + } + SDL_Log("SDL EVENT: Joystick %d: hat %d moved to %s", event->jhat.which, + event->jhat.hat, position); } break; case SDL_JOYBUTTONDOWN: - fprintf(stderr, "Joystick %d: button %d pressed", + SDL_Log("SDL EVENT: Joystick %d: button %d pressed", event->jbutton.which, event->jbutton.button); break; case SDL_JOYBUTTONUP: - fprintf(stderr, "Joystick %d: button %d released", + SDL_Log("SDL EVENT: Joystick %d: button %d released", event->jbutton.which, event->jbutton.button); break; + case SDL_CONTROLLERDEVICEADDED: + SDL_Log("SDL EVENT: Controller index %d attached", + event->cdevice.which); + break; + case SDL_CONTROLLERDEVICEREMOVED: + SDL_Log("SDL EVENT: Controller %d removed", + event->cdevice.which); + break; + case SDL_CONTROLLERAXISMOTION: + SDL_Log("SDL EVENT: Controller %d axis %d ('%s') value: %d", + event->caxis.which, + event->caxis.axis, + ControllerAxisName((SDL_GameControllerAxis)event->caxis.axis), + event->caxis.value); + break; + case SDL_CONTROLLERBUTTONDOWN: + SDL_Log("SDL EVENT: Controller %d button %d ('%s') down", + event->cbutton.which, event->cbutton.button, + ControllerButtonName((SDL_GameControllerButton)event->cbutton.button)); + break; + case SDL_CONTROLLERBUTTONUP: + SDL_Log("SDL EVENT: Controller %d button %d ('%s') up", + event->cbutton.which, event->cbutton.button, + ControllerButtonName((SDL_GameControllerButton)event->cbutton.button)); + break; case SDL_CLIPBOARDUPDATE: - fprintf(stderr, "Clipboard updated"); + SDL_Log("SDL EVENT: Clipboard updated"); break; case SDL_FINGERDOWN: case SDL_FINGERUP: - fprintf(stderr, "Finger: %s touch=%ld, finger=%ld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f", + SDL_Log("SDL EVENT: Finger: %s touch=%ld, finger=%ld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f", (event->type == SDL_FINGERDOWN) ? "down" : "up", (long) event->tfinger.touchId, (long) event->tfinger.fingerId, @@ -1116,16 +1194,15 @@ SDLTest_PrintEvent(SDL_Event * event) break; case SDL_QUIT: - fprintf(stderr, "Quit requested"); + SDL_Log("SDL EVENT: Quit requested"); break; case SDL_USEREVENT: - fprintf(stderr, "User event %d", event->user.code); + SDL_Log("SDL EVENT: User event %d", event->user.code); break; default: - fprintf(stderr, "Unknown event %d", event->type); + SDL_Log("Unknown event %d", event->type); break; } - fprintf(stderr, "\n"); } static void @@ -1338,7 +1415,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) if (flags & SDL_WINDOW_FULLSCREEN) { SDL_SetWindowFullscreen(window, SDL_FALSE); } else { - SDL_SetWindowFullscreen(window, SDL_TRUE); + SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN); } } } else if (event->key.keysym.mod & KMOD_ALT) { @@ -1412,6 +1489,14 @@ SDLTest_CommonQuit(SDLTest_CommonState * state) int i; SDL_free(state->windows); + if (state->targets) { + for (i = 0; i < state->num_windows; ++i) { + if (state->targets[i]) { + SDL_DestroyTexture(state->targets[i]); + } + } + SDL_free(state->targets); + } if (state->renderers) { for (i = 0; i < state->num_windows; ++i) { if (state->renderers[i]) { diff --git a/jni/SDL2-2.0.1/src/thread/SDL_systhread.h b/jni/SDL2-2.0.1/src/thread/SDL_systhread.h index 36898f38..82af6e42 100644 --- a/jni/SDL2-2.0.1/src/thread/SDL_systhread.h +++ b/jni/SDL2-2.0.1/src/thread/SDL_systhread.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* These are functions that need to be implemented by a port of SDL */ @@ -51,6 +51,9 @@ extern int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority); */ extern void SDL_SYS_WaitThread(SDL_Thread * thread); +/* Mark thread as cleaned up as soon as it exits, without joining. */ +extern void SDL_SYS_DetachThread(SDL_Thread * thread); + /* Get the thread local storage for this thread */ extern SDL_TLSData *SDL_SYS_GetTLSData(); diff --git a/jni/SDL2-2.0.1/src/thread/SDL_thread.c b/jni/SDL2-2.0.1/src/thread/SDL_thread.c index 4b070dad..ce514892 100644 --- a/jni/SDL2-2.0.1/src/thread/SDL_thread.c +++ b/jni/SDL2-2.0.1/src/thread/SDL_thread.c @@ -18,10 +18,11 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* System independent thread management routines for SDL */ +#include "SDL_assert.h" #include "SDL_thread.h" #include "SDL_thread_c.h" #include "SDL_systhread.h" @@ -265,13 +266,14 @@ SDL_RunThread(void *data) thread_args *args = (thread_args *) data; int (SDLCALL * userfunc) (void *) = args->func; void *userdata = args->data; - int *statusloc = &args->info->status; + SDL_Thread *thread = args->info; + int *statusloc = &thread->status; /* Perform any system-dependent setup - this function may not fail */ - SDL_SYS_SetupThread(args->info->name); + SDL_SYS_SetupThread(thread->name); /* Get the thread id */ - args->info->threadid = SDL_ThreadID(); + thread->threadid = SDL_ThreadID(); /* Wake up the parent thread */ SDL_SemPost(args->wait); @@ -281,10 +283,27 @@ SDL_RunThread(void *data) /* Clean up thread-local storage */ SDL_TLSCleanup(); + + /* Mark us as ready to be joined (or detached) */ + if (!SDL_AtomicCAS(&thread->state, SDL_THREAD_STATE_ALIVE, SDL_THREAD_STATE_ZOMBIE)) { + /* Clean up if something already detached us. */ + if (SDL_AtomicCAS(&thread->state, SDL_THREAD_STATE_DETACHED, SDL_THREAD_STATE_CLEANED)) { + if (thread->name) { + SDL_free(thread->name); + } + SDL_free(thread); + } + } } -#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD +#ifdef SDL_CreateThread #undef SDL_CreateThread +#endif +#if SDL_DYNAMIC_API +#define SDL_CreateThread SDL_CreateThread_REAL +#endif + +#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (SDLCALL * fn) (void *), const char *name, void *data, @@ -306,8 +325,9 @@ SDL_CreateThread(int (SDLCALL * fn) (void *), SDL_OutOfMemory(); return (NULL); } - SDL_memset(thread, 0, (sizeof *thread)); + SDL_zerop(thread); thread->status = -1; + SDL_AtomicSet(&thread->state, SDL_THREAD_STATE_ALIVE); /* Set up the arguments for the thread */ if (name != NULL) { @@ -410,4 +430,27 @@ SDL_WaitThread(SDL_Thread * thread, int *status) } } +void +SDL_DetachThread(SDL_Thread * thread) +{ + if (!thread) { + return; + } + + /* Grab dibs if the state is alive+joinable. */ + if (SDL_AtomicCAS(&thread->state, SDL_THREAD_STATE_ALIVE, SDL_THREAD_STATE_DETACHED)) { + SDL_SYS_DetachThread(thread); + } else { + /* all other states are pretty final, see where we landed. */ + const int state = SDL_AtomicGet(&thread->state); + if ((state == SDL_THREAD_STATE_DETACHED) || (state == SDL_THREAD_STATE_CLEANED)) { + return; /* already detached (you shouldn't call this twice!) */ + } else if (state == SDL_THREAD_STATE_ZOMBIE) { + SDL_WaitThread(thread, NULL); /* already done, clean it up. */ + } else { + SDL_assert(0 && "Unexpected thread state"); + } + } +} + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/SDL_thread_c.h b/jni/SDL2-2.0.1/src/thread/SDL_thread_c.h index c7b063e0..b6e0eebf 100644 --- a/jni/SDL2-2.0.1/src/thread/SDL_thread_c.h +++ b/jni/SDL2-2.0.1/src/thread/SDL_thread_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_thread_c_h #define _SDL_thread_c_h @@ -28,10 +28,6 @@ /* Need the definitions of SYS_ThreadHandle */ #if SDL_THREADS_DISABLED #include "generic/SDL_systhread_c.h" -#elif SDL_THREAD_BEOS -#include "beos/SDL_systhread_c.h" -#elif SDL_THREAD_EPOC -#include "epoc/SDL_systhread_c.h" #elif SDL_THREAD_PTHREAD #include "pthread/SDL_systhread_c.h" #elif SDL_THREAD_WINDOWS @@ -44,12 +40,21 @@ #endif #include "../SDL_error_c.h" +typedef enum SDL_ThreadState +{ + SDL_THREAD_STATE_ALIVE, + SDL_THREAD_STATE_DETACHED, + SDL_THREAD_STATE_ZOMBIE, + SDL_THREAD_STATE_CLEANED, +} SDL_ThreadState; + /* This is the system-independent thread info structure */ struct SDL_Thread { SDL_threadID threadid; SYS_ThreadHandle handle; int status; + SDL_atomic_t state; /* SDL_THREAD_STATE_* */ SDL_error errbuf; char *name; void *data; diff --git a/jni/SDL2-2.0.1/src/thread/beos/SDL_syssem.c b/jni/SDL2-2.0.1/src/thread/beos/SDL_syssem.c deleted file mode 100644 index 9661f901..00000000 --- a/jni/SDL2-2.0.1/src/thread/beos/SDL_syssem.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2013 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ -#include "SDL_config.h" - -#ifdef SDL_THREAD_BEOS - -/* Semaphores in the BeOS environment */ - -#include - -#include "SDL_thread.h" - - -struct SDL_semaphore -{ - sem_id id; -}; - -/* Create a counting semaphore */ -SDL_sem * -SDL_CreateSemaphore(Uint32 initial_value) -{ - SDL_sem *sem; - - sem = (SDL_sem *) SDL_malloc(sizeof(*sem)); - if (sem) { - sem->id = create_sem(initial_value, "SDL semaphore"); - if (sem->id < B_NO_ERROR) { - SDL_SetError("create_sem() failed"); - SDL_free(sem); - sem = NULL; - } - } else { - SDL_OutOfMemory(); - } - return (sem); -} - -/* Free the semaphore */ -void -SDL_DestroySemaphore(SDL_sem * sem) -{ - if (sem) { - if (sem->id >= B_NO_ERROR) { - delete_sem(sem->id); - } - SDL_free(sem); - } -} - -int -SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) -{ - int32 val; - int retval; - - if (!sem) { - return SDL_SetError("Passed a NULL semaphore"); - } - - tryagain: - if (timeout == SDL_MUTEX_MAXWAIT) { - val = acquire_sem(sem->id); - } else { - timeout *= 1000; /* BeOS uses a timeout in microseconds */ - val = acquire_sem_etc(sem->id, 1, B_RELATIVE_TIMEOUT, timeout); - } - switch (val) { - case B_INTERRUPTED: - goto tryagain; - case B_NO_ERROR: - retval = 0; - break; - case B_TIMED_OUT: - retval = SDL_MUTEX_TIMEDOUT; - break; - case B_WOULD_BLOCK: - retval = SDL_MUTEX_TIMEDOUT; - break; - default: - retval = SDL_SetError("acquire_sem() failed"); - break; - } - - return retval; -} - -int -SDL_SemTryWait(SDL_sem * sem) -{ - return SDL_SemWaitTimeout(sem, 0); -} - -int -SDL_SemWait(SDL_sem * sem) -{ - return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT); -} - -/* Returns the current count of the semaphore */ -Uint32 -SDL_SemValue(SDL_sem * sem) -{ - int32 count; - Uint32 value; - - value = 0; - if (sem) { - get_sem_count(sem->id, &count); - if (count > 0) { - value = (Uint32) count; - } - } - return value; -} - -/* Atomically increases the semaphore's count (not blocking) */ -int -SDL_SemPost(SDL_sem * sem) -{ - if (!sem) { - return SDL_SetError("Passed a NULL semaphore"); - } - - if (release_sem(sem->id) != B_NO_ERROR) { - return SDL_SetError("release_sem() failed"); - } - return 0; -} - -#endif /* SDL_THREAD_BEOS */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/beos/SDL_systhread.c b/jni/SDL2-2.0.1/src/thread/beos/SDL_systhread.c deleted file mode 100644 index 11646f97..00000000 --- a/jni/SDL2-2.0.1/src/thread/beos/SDL_systhread.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2013 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ -#include "SDL_config.h" - -#ifdef SDL_THREAD_BEOS - -/* BeOS thread management routines for SDL */ - -#include -#include -#include - -#include "SDL_mutex.h" -#include "SDL_thread.h" -#include "../SDL_thread_c.h" -#include "../SDL_systhread.h" - - -static int sig_list[] = { - SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGWINCH, 0 -}; - -void -SDL_MaskSignals(sigset_t * omask) -{ - sigset_t mask; - int i; - - sigemptyset(&mask); - for (i = 0; sig_list[i]; ++i) { - sigaddset(&mask, sig_list[i]); - } - sigprocmask(SIG_BLOCK, &mask, omask); -} - -void -SDL_UnmaskSignals(sigset_t * omask) -{ - sigprocmask(SIG_SETMASK, omask, NULL); -} - -static int32 -RunThread(void *data) -{ - SDL_RunThread(data); - return (0); -} - -int -SDL_SYS_CreateThread(SDL_Thread * thread, void *args) -{ - /* The docs say the thread name can't be longer than B_OS_NAME_LENGTH. */ - const char *threadname = thread->name ? thread->name : "SDL Thread"; - char name[B_OS_NAME_LENGTH]; - SDL_snprintf(name, sizeof (name), "%s", threadname); - name[sizeof (name) - 1] = '\0'; - - /* Create the thread and go! */ - thread->handle = spawn_thread(RunThread, name, B_NORMAL_PRIORITY, args); - if ((thread->handle == B_NO_MORE_THREADS) || - (thread->handle == B_NO_MEMORY)) { - return SDL_SetError("Not enough resources to create thread"); - } - resume_thread(thread->handle); - return (0); -} - -void -SDL_SYS_SetupThread(const char *name) -{ - /* We set the thread name during SDL_SYS_CreateThread(). */ - /* Mask asynchronous signals for this thread */ - SDL_MaskSignals(NULL); -} - -SDL_threadID -SDL_ThreadID(void) -{ - return ((SDL_threadID) find_thread(NULL)); -} - -int -SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) -{ - int32 value; - - if (priority == SDL_THREAD_PRIORITY_LOW) { - value = B_LOW_PRIORITY; - } else if (priority == SDL_THREAD_PRIORITY_HIGH) { - value = B_URGENT_DISPLAY_PRIORITY; - } else { - value = B_NORMAL_PRIORITY; - } - set_thread_priority(find_thread(NULL), value); - return 0; -} - -void -SDL_SYS_WaitThread(SDL_Thread * thread) -{ - status_t the_status; - - wait_for_thread(thread->handle, &the_status); -} - -#endif /* SDL_THREAD_BEOS */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/beos/SDL_systls.c b/jni/SDL2-2.0.1/src/thread/beos/SDL_systls.c deleted file mode 100644 index 8e941289..00000000 --- a/jni/SDL2-2.0.1/src/thread/beos/SDL_systls.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2013 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "SDL_config.h" -#include "SDL_thread.h" -#include "../SDL_thread_c.h" - -#if SDL_THREAD_BEOS - -#include - - -static int32 thread_local_storage = B_NO_MEMORY; -static SDL_bool generic_local_storage = SDL_FALSE; - -SDL_TLSData * -SDL_SYS_GetTLSData() -{ - if (thread_local_storage == B_NO_MEMORY && !generic_local_storage) { - static SDL_SpinLock lock; - SDL_AtomicLock(&lock); - if (thread_local_storage == B_NO_MEMORY && !generic_local_storage) { - int32 storage = tls_allocate(); - if (storage != B_NO_MEMORY) { - SDL_MemoryBarrierRelease(); - thread_local_storage = storage; - } else { - generic_local_storage = SDL_TRUE; - } - } - SDL_AtomicUnlock(&lock); - } - if (generic_local_storage) { - return SDL_Generic_GetTLSData(); - } - SDL_MemoryBarrierAcquire(); - return (SDL_TLSData *)tls_get(thread_local_storage); -} - -int -SDL_SYS_SetTLSData(SDL_TLSData *data) -{ - if (generic_local_storage) { - return SDL_Generic_SetTLSData(data); - } - tls_set(thread_local_storage, data); - return 0; -} - -#endif /* SDL_THREAD_BEOS */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/generic/SDL_syscond.c b/jni/SDL2-2.0.1/src/thread/generic/SDL_syscond.c index 5c8fe8bd..90fe4eac 100644 --- a/jni/SDL2-2.0.1/src/thread/generic/SDL_syscond.c +++ b/jni/SDL2-2.0.1/src/thread/generic/SDL_syscond.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* An implementation of condition variables using semaphores and mutexes */ /* diff --git a/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex.c b/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex.c index 3e3c1fea..f2a567c6 100644 --- a/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex.c +++ b/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* An implementation of mutexes using semaphores */ diff --git a/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex_c.h b/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex_c.h index 8d6dbdc2..6a3a8015 100644 --- a/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex_c.h +++ b/jni/SDL2-2.0.1/src/thread/generic/SDL_sysmutex_c.h @@ -18,5 +18,5 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/generic/SDL_syssem.c b/jni/SDL2-2.0.1/src/thread/generic/SDL_syssem.c index bfb011dd..71b191bb 100644 --- a/jni/SDL2-2.0.1/src/thread/generic/SDL_syssem.c +++ b/jni/SDL2-2.0.1/src/thread/generic/SDL_syssem.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* An implementation of semaphores using mutexes and condition variables */ diff --git a/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread.c b/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread.c index 139f8ac0..22b04d41 100644 --- a/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread.c +++ b/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* Thread management routines for SDL */ @@ -62,4 +62,10 @@ SDL_SYS_WaitThread(SDL_Thread * thread) return; } +void +SDL_SYS_DetachThread(SDL_Thread * thread) +{ + return; +} + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread_c.h b/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread_c.h index b6c99c90..afabbc79 100644 --- a/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread_c.h +++ b/jni/SDL2-2.0.1/src/thread/generic/SDL_systhread_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* Stub until we implement threads on this platform */ typedef int SYS_ThreadHandle; diff --git a/jni/SDL2-2.0.1/src/thread/generic/SDL_systls.c b/jni/SDL2-2.0.1/src/thread/generic/SDL_systls.c index bdb83dbf..60161389 100644 --- a/jni/SDL2-2.0.1/src/thread/generic/SDL_systls.c +++ b/jni/SDL2-2.0.1/src/thread/generic/SDL_systls.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "../SDL_thread_c.h" diff --git a/jni/SDL2-2.0.1/src/thread/psp/SDL_syscond.c b/jni/SDL2-2.0.1/src/thread/psp/SDL_syscond.c index f540cddb..3bdcc2fd 100644 --- a/jni/SDL2-2.0.1/src/thread/psp/SDL_syscond.c +++ b/jni/SDL2-2.0.1/src/thread/psp/SDL_syscond.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* An implementation of condition variables using semaphores and mutexes */ /* diff --git a/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex.c b/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex.c index 6bb68a23..731a2de6 100644 --- a/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex.c +++ b/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* An implementation of mutexes using semaphores */ diff --git a/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex_c.h b/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex_c.h index 8d6dbdc2..6a3a8015 100644 --- a/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex_c.h +++ b/jni/SDL2-2.0.1/src/thread/psp/SDL_sysmutex_c.h @@ -18,5 +18,5 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/psp/SDL_systhread.c b/jni/SDL2-2.0.1/src/thread/psp/SDL_systhread.c index 05a2341f..269defe4 100644 --- a/jni/SDL2-2.0.1/src/thread/psp/SDL_systhread.c +++ b/jni/SDL2-2.0.1/src/thread/psp/SDL_systhread.c @@ -77,6 +77,12 @@ void SDL_SYS_WaitThread(SDL_Thread *thread) sceKernelDeleteThread(thread->handle); } +void SDL_SYS_DetachThread(SDL_Thread *thread) +{ + /* !!! FIXME: is this correct? */ + sceKernelDeleteThread(thread->handle); +} + void SDL_SYS_KillThread(SDL_Thread *thread) { sceKernelTerminateDeleteThread(thread->handle); diff --git a/jni/SDL2-2.0.1/src/thread/pthread/SDL_syscond.c b/jni/SDL2-2.0.1/src/thread/pthread/SDL_syscond.c index 1eb4f29f..32342bf1 100644 --- a/jni/SDL2-2.0.1/src/thread/pthread/SDL_syscond.c +++ b/jni/SDL2-2.0.1/src/thread/pthread/SDL_syscond.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include #include diff --git a/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex.c b/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex.c index bd238da3..b18d8fc0 100644 --- a/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex.c +++ b/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #define _GNU_SOURCE #include diff --git a/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex_c.h b/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex_c.h index 2e2eae47..d99b0940 100644 --- a/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex_c.h +++ b/jni/SDL2-2.0.1/src/thread/pthread/SDL_sysmutex_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_mutex_c_h #define _SDL_mutex_c_h diff --git a/jni/SDL2-2.0.1/src/thread/pthread/SDL_syssem.c b/jni/SDL2-2.0.1/src/thread/pthread/SDL_syssem.c index e1613fc3..4194b966 100644 --- a/jni/SDL2-2.0.1/src/thread/pthread/SDL_syssem.c +++ b/jni/SDL2-2.0.1/src/thread/pthread/SDL_syssem.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include #include diff --git a/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread.c b/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread.c index c967ca7f..08bd182d 100644 --- a/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread.c +++ b/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include @@ -51,6 +51,10 @@ #include "../../core/android/SDL_android.h" #endif +#ifdef __HAIKU__ +#include +#endif + #include "SDL_assert.h" /* List of signals to mask in the subthreads */ @@ -59,7 +63,6 @@ static const int sig_list[] = { SIGVTALRM, SIGPROF, 0 }; - static void * RunThread(void *data) { @@ -129,6 +132,12 @@ SDL_SYS_SetupThread(const char *name) pthread_setname_np(pthread_self(), name); #elif HAVE_PTHREAD_SET_NAME_NP pthread_set_name_np(pthread_self(), name); + #elif defined(__HAIKU__) + /* The docs say the thread name can't be longer than B_OS_NAME_LENGTH. */ + char namebuf[B_OS_NAME_LENGTH]; + SDL_snprintf(namebuf, sizeof (namebuf), "%s", name); + namebuf[sizeof (namebuf) - 1] = '\0'; + rename_thread(find_thread(NULL), namebuf); #endif } @@ -204,4 +213,10 @@ SDL_SYS_WaitThread(SDL_Thread * thread) pthread_join(thread->handle, 0); } +void +SDL_SYS_DetachThread(SDL_Thread * thread) +{ + pthread_detach(thread->handle); +} + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread_c.h b/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread_c.h index f134b0b3..c5699c46 100644 --- a/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread_c.h +++ b/jni/SDL2-2.0.1/src/thread/pthread/SDL_systhread_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include diff --git a/jni/SDL2-2.0.1/src/thread/pthread/SDL_systls.c b/jni/SDL2-2.0.1/src/thread/pthread/SDL_systls.c index 9ef6e51a..cce8754c 100644 --- a/jni/SDL2-2.0.1/src/thread/pthread/SDL_systls.c +++ b/jni/SDL2-2.0.1/src/thread/pthread/SDL_systls.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_thread.h" #include "../SDL_thread_c.h" diff --git a/jni/SDL2-2.0.1/src/thread/windows/SDL_sysmutex.c b/jni/SDL2-2.0.1/src/thread/windows/SDL_sysmutex.c index 60e9c6c8..17e9257d 100644 --- a/jni/SDL2-2.0.1/src/thread/windows/SDL_sysmutex.c +++ b/jni/SDL2-2.0.1/src/thread/windows/SDL_sysmutex.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_THREAD_WINDOWS diff --git a/jni/SDL2-2.0.1/src/thread/windows/SDL_syssem.c b/jni/SDL2-2.0.1/src/thread/windows/SDL_syssem.c index 8dc72bcb..7f178b7b 100644 --- a/jni/SDL2-2.0.1/src/thread/windows/SDL_syssem.c +++ b/jni/SDL2-2.0.1/src/thread/windows/SDL_syssem.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_THREAD_WINDOWS diff --git a/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread.c b/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread.c index 06e23abd..3972ffdf 100644 --- a/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread.c +++ b/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_THREAD_WINDOWS @@ -234,6 +234,12 @@ SDL_SYS_WaitThread(SDL_Thread * thread) CloseHandle(thread->handle); } +void +SDL_SYS_DetachThread(SDL_Thread * thread) +{ + CloseHandle(thread->handle); +} + #endif /* SDL_THREAD_WINDOWS */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread_c.h b/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread_c.h index f9f013bb..e346f433 100644 --- a/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread_c.h +++ b/jni/SDL2-2.0.1/src/thread/windows/SDL_systhread_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_systhread_c_h #define _SDL_systhread_c_h diff --git a/jni/SDL2-2.0.1/src/thread/windows/SDL_systls.c b/jni/SDL2-2.0.1/src/thread/windows/SDL_systls.c index 90941ee6..6a82d2f8 100644 --- a/jni/SDL2-2.0.1/src/thread/windows/SDL_systls.c +++ b/jni/SDL2-2.0.1/src/thread/windows/SDL_systls.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_THREAD_WINDOWS diff --git a/jni/SDL2-2.0.1/src/timer/SDL_timer.c b/jni/SDL2-2.0.1/src/timer/SDL_timer.c index 2980f4dc..3996b360 100644 --- a/jni/SDL2-2.0.1/src/timer/SDL_timer.c +++ b/jni/SDL2-2.0.1/src/timer/SDL_timer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_timer.h" #include "SDL_timer_c.h" @@ -224,7 +224,11 @@ SDL_TimerInit(void) /* !!! FIXME: this is nasty. */ #if defined(__WIN32__) && !defined(HAVE_LIBC) #undef SDL_CreateThread +#if SDL_DYNAMIC_API + data->thread = SDL_CreateThread_REAL(SDL_TimerThread, name, data, NULL, NULL); +#else data->thread = SDL_CreateThread(SDL_TimerThread, name, data, NULL, NULL); +#endif #else data->thread = SDL_CreateThread(SDL_TimerThread, name, data); #endif diff --git a/jni/SDL2-2.0.1/src/timer/SDL_timer_c.h b/jni/SDL2-2.0.1/src/timer/SDL_timer_c.h index 15748531..6fe0679c 100644 --- a/jni/SDL2-2.0.1/src/timer/SDL_timer_c.h +++ b/jni/SDL2-2.0.1/src/timer/SDL_timer_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Useful functions and variables from SDL_timer.c */ #include "SDL_timer.h" diff --git a/jni/SDL2-2.0.1/src/timer/dummy/SDL_systimer.c b/jni/SDL2-2.0.1/src/timer/dummy/SDL_systimer.c index 387675db..828610a6 100644 --- a/jni/SDL2-2.0.1/src/timer/dummy/SDL_systimer.c +++ b/jni/SDL2-2.0.1/src/timer/dummy/SDL_systimer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED) diff --git a/jni/SDL2-2.0.1/src/timer/beos/SDL_systimer.c b/jni/SDL2-2.0.1/src/timer/haiku/SDL_systimer.c similarity index 93% rename from jni/SDL2-2.0.1/src/timer/beos/SDL_systimer.c rename to jni/SDL2-2.0.1/src/timer/haiku/SDL_systimer.c index fd22e441..213682b3 100644 --- a/jni/SDL2-2.0.1/src/timer/beos/SDL_systimer.c +++ b/jni/SDL2-2.0.1/src/timer/haiku/SDL_systimer.c @@ -18,11 +18,11 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#ifdef SDL_TIMER_BEOS +#ifdef SDL_TIMER_HAIKU -#include +#include #include "SDL_timer.h" @@ -69,6 +69,6 @@ SDL_Delay(Uint32 ms) snooze(ms * 1000); } -#endif /* SDL_TIMER_BEOS */ +#endif /* SDL_TIMER_HAIKU */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/timer/unix/SDL_systimer.c b/jni/SDL2-2.0.1/src/timer/unix/SDL_systimer.c index 88a40ba5..1d9636a6 100644 --- a/jni/SDL2-2.0.1/src/timer/unix/SDL_systimer.c +++ b/jni/SDL2-2.0.1/src/timer/unix/SDL_systimer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_TIMER_UNIX diff --git a/jni/SDL2-2.0.1/src/timer/windows/SDL_systimer.c b/jni/SDL2-2.0.1/src/timer/windows/SDL_systimer.c index c3b54f5d..ebe4272e 100644 --- a/jni/SDL2-2.0.1/src/timer/windows/SDL_systimer.c +++ b/jni/SDL2-2.0.1/src/timer/windows/SDL_systimer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifdef SDL_TIMER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/SDL_RLEaccel.c b/jni/SDL2-2.0.1/src/video/SDL_RLEaccel.c index 6db43b09..e8bfca71 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_RLEaccel.c +++ b/jni/SDL2-2.0.1/src/video/SDL_RLEaccel.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* * RLE encoding for software colorkey and alpha-channel acceleration diff --git a/jni/SDL2-2.0.1/src/video/SDL_RLEaccel_c.h b/jni/SDL2-2.0.1/src/video/SDL_RLEaccel_c.h index 986d1148..69bfa0d8 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_RLEaccel_c.h +++ b/jni/SDL2-2.0.1/src/video/SDL_RLEaccel_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Useful functions and variables from SDL_RLEaccel.c */ diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit.c b/jni/SDL2-2.0.1/src/video/SDL_blit.c index 7b4f9edc..00bb2e1a 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_sysvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit.h b/jni/SDL2-2.0.1/src/video/SDL_blit.h index 07d3af70..8eb47e17 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit.h +++ b/jni/SDL2-2.0.1/src/video/SDL_blit.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_blit_h #define _SDL_blit_h diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_0.c b/jni/SDL2-2.0.1/src/video/SDL_blit_0.c index ba709745..3f413446 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_0.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_0.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_blit.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_1.c b/jni/SDL2-2.0.1/src/video/SDL_blit_1.c index 67503e87..a129ca94 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_1.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_1.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_blit.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_A.c b/jni/SDL2-2.0.1/src/video/SDL_blit_A.c index 46d46136..bb1f3d55 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_A.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_A.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_blit.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_N.c b/jni/SDL2-2.0.1/src/video/SDL_blit_N.c index 84c96e2d..25610120 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_N.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_N.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_endian.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_auto.c b/jni/SDL2-2.0.1/src/video/SDL_blit_auto.c index 251c5fe8..1e6ff3cb 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_auto.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_auto.c @@ -19,7 +19,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* *INDENT-OFF* */ diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_auto.h b/jni/SDL2-2.0.1/src/video/SDL_blit_auto.h index ed0115e7..750c0a19 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_auto.h +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_auto.h @@ -19,7 +19,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* *INDENT-OFF* */ diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_copy.c b/jni/SDL2-2.0.1/src/video/SDL_blit_copy.c index 80519e09..556f9985 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_copy.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_copy.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_blit.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_slow.c b/jni/SDL2-2.0.1/src/video/SDL_blit_slow.c index 1f4bce2e..85de417a 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_slow.c +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_slow.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_blit.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_blit_slow.h b/jni/SDL2-2.0.1/src/video/SDL_blit_slow.h index 15b5c79a..1c1a4dd1 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_blit_slow.h +++ b/jni/SDL2-2.0.1/src/video/SDL_blit_slow.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" extern void SDL_Blit_Slow(SDL_BlitInfo * info); diff --git a/jni/SDL2-2.0.1/src/video/SDL_bmp.c b/jni/SDL2-2.0.1/src/video/SDL_bmp.c index 9244b28d..65345d28 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_bmp.c +++ b/jni/SDL2-2.0.1/src/video/SDL_bmp.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Code to load and save surfaces in Windows BMP format. @@ -150,6 +150,8 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) biBitCount = SDL_ReadLE16(src); biCompression = BI_RGB; } else { + const unsigned int headerSize = 40; + biWidth = SDL_ReadLE32(src); biHeight = SDL_ReadLE32(src); /* biPlanes = */ SDL_ReadLE16(src); @@ -160,6 +162,10 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) /* biYPelsPerMeter = */ SDL_ReadLE32(src); biClrUsed = SDL_ReadLE32(src); /* biClrImportant = */ SDL_ReadLE32(src); + + if (biSize > headerSize) { + SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR); + } } if (biHeight < 0) { topDown = SDL_TRUE; diff --git a/jni/SDL2-2.0.1/src/video/SDL_clipboard.c b/jni/SDL2-2.0.1/src/video/SDL_clipboard.c index 8c0626ef..99ab20fa 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_clipboard.c +++ b/jni/SDL2-2.0.1/src/video/SDL_clipboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_clipboard.h" #include "SDL_sysvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_egl.c b/jni/SDL2-2.0.1/src/video/SDL_egl.c index ccfb92e1..3731a6c1 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_egl.c +++ b/jni/SDL2-2.0.1/src/video/SDL_egl.c @@ -18,13 +18,14 @@ * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #if SDL_VIDEO_OPENGL_EGL #include "SDL_sysvideo.h" -#include "SDL_egl.h" - +#include "SDL_egl_c.h" +#include "SDL_loadso.h" +#include "SDL_hints.h" #if SDL_VIDEO_DRIVER_RPI /* Raspbian places the OpenGL ES/EGL binaries in a non standard path */ @@ -40,8 +41,16 @@ #define DEFAULT_OGL_ES_PVR "libGLES_CM.so" #define DEFAULT_OGL_ES "libGLESv1_CM.so" +#elif SDL_VIDEO_DRIVER_WINDOWS +/* EGL AND OpenGL ES support via ANGLE */ +#define DEFAULT_EGL "libEGL.dll" +#define DEFAULT_OGL_ES2 "libGLESv2.dll" +#define DEFAULT_OGL_ES_PVR "libGLES_CM.dll" +#define DEFAULT_OGL_ES "libGLESv1_CM.dll" + #else /* Desktop Linux */ +#define DEFAULT_OGL "libGL.so.1" #define DEFAULT_EGL "libEGL.so.1" #define DEFAULT_OGL_ES2 "libGLESv2.so.2" #define DEFAULT_OGL_ES_PVR "libGLES_CM.so.1" @@ -49,7 +58,7 @@ #endif /* SDL_VIDEO_DRIVER_RPI */ #define LOAD_FUNC(NAME) \ -*((void**)&_this->egl_data->NAME) = dlsym(dll_handle, #NAME); \ +*((void**)&_this->egl_data->NAME) = SDL_LoadFunction(_this->egl_data->dll_handle, #NAME); \ if (!_this->egl_data->NAME) \ { \ return SDL_SetError("Could not retrieve EGL function " #NAME); \ @@ -61,12 +70,10 @@ void * SDL_EGL_GetProcAddress(_THIS, const char *proc) { static char procname[1024]; - void *handle; void *retval; /* eglGetProcAddress is busted on Android http://code.google.com/p/android/issues/detail?id=7681 */ -#if !defined(SDL_VIDEO_DRIVER_ANDROID) - handle = _this->egl_data->egl_dll_handle; +#if !defined(SDL_VIDEO_DRIVER_ANDROID) if (_this->egl_data->eglGetProcAddress) { retval = _this->egl_data->eglGetProcAddress(proc); if (retval) { @@ -75,15 +82,11 @@ SDL_EGL_GetProcAddress(_THIS, const char *proc) } #endif - handle = _this->gl_config.dll_handle; - #if defined(__OpenBSD__) && !defined(__ELF__) - #undef dlsym(x,y); - #endif - retval = dlsym(handle, proc); - if (!retval && strlen(proc) <= 1022) { + retval = SDL_LoadFunction(_this->egl_data->egl_dll_handle, proc); + if (!retval && SDL_strlen(proc) <= 1022) { procname[0] = '_'; - strcpy(procname + 1, proc); - retval = dlsym(handle, procname); + SDL_strlcpy(procname + 1, proc, 1022); + retval = SDL_LoadFunction(_this->egl_data->egl_dll_handle, procname); } return retval; } @@ -97,12 +100,12 @@ SDL_EGL_UnloadLibrary(_THIS) _this->egl_data->egl_display = NULL; } - if (_this->gl_config.dll_handle) { - dlclose(_this->gl_config.dll_handle); - _this->gl_config.dll_handle = NULL; + if (_this->egl_data->dll_handle) { + SDL_UnloadObject(_this->egl_data->dll_handle); + _this->egl_data->dll_handle = NULL; } if (_this->egl_data->egl_dll_handle) { - dlclose(_this->egl_data->egl_dll_handle); + SDL_UnloadObject(_this->egl_data->egl_dll_handle); _this->egl_data->egl_dll_handle = NULL; } @@ -114,10 +117,12 @@ SDL_EGL_UnloadLibrary(_THIS) int SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_display) { - void *dll_handle, *egl_dll_handle; /* The naming is counter intuitive, but hey, I just work here -- Gabriel */ - char *path; - int dlopen_flags; - + void *dll_handle = NULL, *egl_dll_handle = NULL; /* The naming is counter intuitive, but hey, I just work here -- Gabriel */ + char *path = NULL; +#if SDL_VIDEO_DRIVER_WINDOWS + const char *d3dcompiler; +#endif + if (_this->egl_data) { return SDL_SetError("OpenGL ES context already created"); } @@ -127,50 +132,71 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa return SDL_OutOfMemory(); } -#ifdef RTLD_GLOBAL - dlopen_flags = RTLD_LAZY | RTLD_GLOBAL; -#else - dlopen_flags = RTLD_LAZY; +#if SDL_VIDEO_DRIVER_WINDOWS + d3dcompiler = SDL_GetHint(SDL_HINT_VIDEO_WIN_D3DCOMPILER); + if (!d3dcompiler) { + /* By default we load the Vista+ compatible compiler */ + d3dcompiler = "d3dcompiler_46.dll"; + } + if (SDL_strcasecmp(d3dcompiler, "none") != 0) { + SDL_LoadObject(d3dcompiler); + } #endif /* A funny thing, loading EGL.so first does not work on the Raspberry, so we load libGL* first */ - path = getenv("SDL_VIDEO_GL_DRIVER"); - egl_dll_handle = dlopen(path, dlopen_flags); - if ((path == NULL) | (egl_dll_handle == NULL)) { - if (_this->gl_config.major_version > 1) { - path = DEFAULT_OGL_ES2; - egl_dll_handle = dlopen(path, dlopen_flags); - } else { - path = DEFAULT_OGL_ES; - egl_dll_handle = dlopen(path, dlopen_flags); - if (egl_dll_handle == NULL) { - path = DEFAULT_OGL_ES_PVR; - egl_dll_handle = dlopen(path, dlopen_flags); + path = SDL_getenv("SDL_VIDEO_GL_DRIVER"); + if (path != NULL) { + egl_dll_handle = SDL_LoadObject(path); + } + + if (egl_dll_handle == NULL) { + if(_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { + if (_this->gl_config.major_version > 1) { + path = DEFAULT_OGL_ES2; + egl_dll_handle = SDL_LoadObject(path); + } + else { + path = DEFAULT_OGL_ES; + egl_dll_handle = SDL_LoadObject(path); + if (egl_dll_handle == NULL) { + path = DEFAULT_OGL_ES_PVR; + egl_dll_handle = SDL_LoadObject(path); + } } } +#ifdef DEFAULT_OGL + else { + path = DEFAULT_OGL; + egl_dll_handle = SDL_LoadObject(path); + } +#endif } _this->egl_data->egl_dll_handle = egl_dll_handle; if (egl_dll_handle == NULL) { - return SDL_SetError("Could not initialize OpenGL ES library: %s", dlerror()); + return SDL_SetError("Could not initialize OpenGL / GLES library"); } - + /* Loading libGL* in the previous step took care of loading libEGL.so, but we future proof by double checking */ - dll_handle = dlopen(egl_path, dlopen_flags); + if (egl_path != NULL) { + dll_handle = SDL_LoadObject(egl_path); + } /* Catch the case where the application isn't linked with EGL */ - if ((dlsym(dll_handle, "eglChooseConfig") == NULL) && (egl_path == NULL)) { - dlclose(dll_handle); - path = getenv("SDL_VIDEO_EGL_DRIVER"); + if ((SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) && (egl_path == NULL)) { + if (dll_handle != NULL) { + SDL_UnloadObject(dll_handle); + } + path = SDL_getenv("SDL_VIDEO_EGL_DRIVER"); if (path == NULL) { path = DEFAULT_EGL; } - dll_handle = dlopen(path, dlopen_flags); + dll_handle = SDL_LoadObject(path); + if (dll_handle == NULL) { + return SDL_SetError("Could not load EGL library"); + } } - _this->gl_config.dll_handle = dll_handle; - if (dll_handle == NULL) { - return SDL_SetError("Could not load EGL library: %s", dlerror()); - } + _this->egl_data->dll_handle = dll_handle; /* Load new function pointers */ LOAD_FUNC(eglGetDisplay); @@ -188,6 +214,7 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa LOAD_FUNC(eglSwapInterval); LOAD_FUNC(eglWaitNative); LOAD_FUNC(eglWaitGL); + LOAD_FUNC(eglBindAPI); _this->egl_data->egl_display = _this->egl_data->eglGetDisplay(native_display); if (!_this->egl_data->egl_display) { @@ -198,19 +225,16 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa return SDL_SetError("Could not initialize EGL"); } - _this->gl_config.dll_handle = dll_handle; + _this->egl_data->dll_handle = dll_handle; _this->egl_data->egl_dll_handle = egl_dll_handle; _this->gl_config.driver_loaded = 1; if (path) { - strncpy(_this->gl_config.driver_path, path, sizeof(_this->gl_config.driver_path) - 1); + SDL_strlcpy(_this->gl_config.driver_path, path, sizeof(_this->gl_config.driver_path) - 1); } else { - strcpy(_this->gl_config.driver_path, ""); + *_this->gl_config.driver_path = '\0'; } - /* We need to select a config here to satisfy some video backends such as X11 */ - SDL_EGL_ChooseConfig(_this); - return 0; } @@ -219,8 +243,10 @@ SDL_EGL_ChooseConfig(_THIS) { /* 64 seems nice. */ EGLint attribs[64]; - EGLint found_configs = 0; - int i; + EGLint found_configs = 0, value; + /* 128 seems even nicer here */ + EGLConfig configs[128]; + int i, j, best_bitdiff = -1, bitdiff; if (!_this->egl_data) { /* The EGL library wasn't loaded, SDL_GetError() should have info */ @@ -265,22 +291,60 @@ SDL_EGL_ChooseConfig(_THIS) } attribs[i++] = EGL_RENDERABLE_TYPE; - if (_this->gl_config.major_version == 2) { - attribs[i++] = EGL_OPENGL_ES2_BIT; - } else { - attribs[i++] = EGL_OPENGL_ES_BIT; + if(_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { + if (_this->gl_config.major_version == 2) { + attribs[i++] = EGL_OPENGL_ES2_BIT; + } else { + attribs[i++] = EGL_OPENGL_ES_BIT; + } + _this->egl_data->eglBindAPI(EGL_OPENGL_ES_API); + } + else { + attribs[i++] = EGL_OPENGL_BIT; + _this->egl_data->eglBindAPI(EGL_OPENGL_API); } attribs[i++] = EGL_NONE; - + if (_this->egl_data->eglChooseConfig(_this->egl_data->egl_display, attribs, - &_this->egl_data->egl_config, 1, + configs, SDL_arraysize(configs), &found_configs) == EGL_FALSE || found_configs == 0) { return SDL_SetError("Couldn't find matching EGL config"); } + /* eglChooseConfig returns a number of configurations that match or exceed the requested attribs. */ + /* From those, we select the one that matches our requirements more closely via a makeshift algorithm */ + + for ( i=0; iegl_data->eglGetConfigAttrib(_this->egl_data->egl_display, configs[i], attribs[j], &value); + bitdiff += value - attribs[j + 1]; /* value is always >= attrib */ + } + } + + if (bitdiff < best_bitdiff || best_bitdiff == -1) { + _this->egl_data->egl_config = configs[i]; + + best_bitdiff = bitdiff; + } + + if (bitdiff == 0) break; /* we found an exact match! */ + } + return 0; } @@ -293,21 +357,34 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface) EGL_NONE }; - EGLContext egl_context; + EGLContext egl_context, share_context = EGL_NO_CONTEXT; if (!_this->egl_data) { /* The EGL library wasn't loaded, SDL_GetError() should have info */ return NULL; } - if (_this->gl_config.major_version) { - context_attrib_list[1] = _this->gl_config.major_version; + if (_this->gl_config.share_with_current_context) { + share_context = (EGLContext)SDL_GL_GetCurrentContext(); } + + /* Bind the API */ + if(_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { + _this->egl_data->eglBindAPI(EGL_OPENGL_ES_API); + if (_this->gl_config.major_version) { + context_attrib_list[1] = _this->gl_config.major_version; + } - egl_context = - _this->egl_data->eglCreateContext(_this->egl_data->egl_display, - _this->egl_data->egl_config, - EGL_NO_CONTEXT, context_attrib_list); + egl_context = _this->egl_data->eglCreateContext(_this->egl_data->egl_display, + _this->egl_data->egl_config, + share_context, context_attrib_list); + } + else { + _this->egl_data->eglBindAPI(EGL_OPENGL_API); + egl_context = _this->egl_data->eglCreateContext(_this->egl_data->egl_display, + _this->egl_data->egl_config, + share_context, NULL); + } if (egl_context == EGL_NO_CONTEXT) { SDL_SetError("Could not create EGL context"); @@ -394,19 +471,20 @@ SDL_EGL_DeleteContext(_THIS, SDL_GLContext context) return; } - if (!egl_context && egl_context != EGL_NO_CONTEXT) { + if (egl_context != NULL && egl_context != EGL_NO_CONTEXT) { SDL_EGL_MakeCurrent(_this, NULL, NULL); _this->egl_data->eglDestroyContext(_this->egl_data->egl_display, egl_context); } - /* FIXME: This "crappy fix" comes from the X11 code, - * it's required so you can create a GLX context, destroy it and create a EGL one */ - SDL_EGL_UnloadLibrary(_this); } EGLSurface * SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) { + if (SDL_EGL_ChooseConfig(_this) != 0) { + return EGL_NO_SURFACE; + } + return _this->egl_data->eglCreateWindowSurface( _this->egl_data->egl_display, _this->egl_data->egl_config, diff --git a/jni/SDL2-2.0.1/src/video/SDL_egl.h b/jni/SDL2-2.0.1/src/video/SDL_egl_c.h similarity index 74% rename from jni/SDL2-2.0.1/src/video/SDL_egl.h rename to jni/SDL2-2.0.1/src/video/SDL_egl_c.h index d6139058..75e9fbd6 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_egl.h +++ b/jni/SDL2-2.0.1/src/video/SDL_egl_c.h @@ -18,69 +18,67 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_egl_h #define _SDL_egl_h #if SDL_VIDEO_OPENGL_EGL -#include - -#include -#if defined(__OpenBSD__) && !defined(__ELF__) -#define dlsym(x,y) dlsym(x, "_" y) -#endif +#include "SDL_egl.h" #include "SDL_sysvideo.h" typedef struct SDL_EGL_VideoData { - void *egl_dll_handle; + void *egl_dll_handle, *dll_handle; EGLDisplay egl_display; EGLConfig egl_config; int egl_swapinterval; - EGLDisplay(*eglGetDisplay) (NativeDisplayType display); - EGLBoolean(*eglInitialize) (EGLDisplay dpy, EGLint * major, + EGLDisplay(EGLAPIENTRY *eglGetDisplay) (NativeDisplayType display); + EGLBoolean(EGLAPIENTRY *eglInitialize) (EGLDisplay dpy, EGLint * major, EGLint * minor); - EGLBoolean(*eglTerminate) (EGLDisplay dpy); + EGLBoolean(EGLAPIENTRY *eglTerminate) (EGLDisplay dpy); - void *(*eglGetProcAddress) (const char * procName); + void *(EGLAPIENTRY *eglGetProcAddress) (const char * procName); - EGLBoolean(*eglChooseConfig) (EGLDisplay dpy, + EGLBoolean(EGLAPIENTRY *eglChooseConfig) (EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config); - EGLContext(*eglCreateContext) (EGLDisplay dpy, + EGLContext(EGLAPIENTRY *eglCreateContext) (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint * attrib_list); - EGLBoolean(*eglDestroyContext) (EGLDisplay dpy, EGLContext ctx); + EGLBoolean(EGLAPIENTRY *eglDestroyContext) (EGLDisplay dpy, EGLContext ctx); - EGLSurface(*eglCreateWindowSurface) (EGLDisplay dpy, + EGLSurface(EGLAPIENTRY *eglCreateWindowSurface) (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint * attrib_list); - EGLBoolean(*eglDestroySurface) (EGLDisplay dpy, EGLSurface surface); + EGLBoolean(EGLAPIENTRY *eglDestroySurface) (EGLDisplay dpy, EGLSurface surface); - EGLBoolean(*eglMakeCurrent) (EGLDisplay dpy, EGLSurface draw, + EGLBoolean(EGLAPIENTRY *eglMakeCurrent) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); - EGLBoolean(*eglSwapBuffers) (EGLDisplay dpy, EGLSurface draw); + EGLBoolean(EGLAPIENTRY *eglSwapBuffers) (EGLDisplay dpy, EGLSurface draw); - EGLBoolean(*eglSwapInterval) (EGLDisplay dpy, EGLint interval); + EGLBoolean(EGLAPIENTRY *eglSwapInterval) (EGLDisplay dpy, EGLint interval); - const char *(*eglQueryString) (EGLDisplay dpy, EGLint name); + const char *(EGLAPIENTRY *eglQueryString) (EGLDisplay dpy, EGLint name); - EGLBoolean(*eglGetConfigAttrib) (EGLDisplay dpy, EGLConfig config, + EGLBoolean(EGLAPIENTRY *eglGetConfigAttrib) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value); - EGLBoolean(*eglWaitNative) (EGLint engine); + EGLBoolean(EGLAPIENTRY *eglWaitNative) (EGLint engine); + + EGLBoolean(EGLAPIENTRY *eglWaitGL)(void); + + EGLBoolean(EGLAPIENTRY *eglBindAPI)(EGLenum); - EGLBoolean(*eglWaitGL)(void); } SDL_EGL_VideoData; /* OpenGLES functions */ diff --git a/jni/SDL2-2.0.1/src/video/SDL_fillrect.c b/jni/SDL2-2.0.1/src/video/SDL_fillrect.c index d891e4e9..d1ddc885 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_fillrect.c +++ b/jni/SDL2-2.0.1/src/video/SDL_fillrect.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_blit.h" @@ -132,105 +132,6 @@ DEFINE_SSE_FILLRECT(4, Uint32) /* *INDENT-ON* */ #endif /* __SSE__ */ -#ifdef __MMX__ -/* *INDENT-OFF* */ - -#define MMX_BEGIN \ - __m64 c64 = _mm_set_pi32(color, color) - -#define MMX_WORK \ - for (i = n / 64; i--;) { \ - _mm_stream_pi((__m64 *)(p+0), c64); \ - _mm_stream_pi((__m64 *)(p+8), c64); \ - _mm_stream_pi((__m64 *)(p+16), c64); \ - _mm_stream_pi((__m64 *)(p+24), c64); \ - _mm_stream_pi((__m64 *)(p+32), c64); \ - _mm_stream_pi((__m64 *)(p+40), c64); \ - _mm_stream_pi((__m64 *)(p+48), c64); \ - _mm_stream_pi((__m64 *)(p+56), c64); \ - p += 64; \ - } - -#define MMX_END \ - _mm_empty() - -#define DEFINE_MMX_FILLRECT(bpp, type) \ -static void \ -SDL_FillRect##bpp##MMX(Uint8 *pixels, int pitch, Uint32 color, int w, int h) \ -{ \ - int i, n; \ - Uint8 *p = NULL; \ - \ - MMX_BEGIN; \ - \ - while (h--) { \ - n = w * bpp; \ - p = pixels; \ - \ - if (n > 63) { \ - int adjust = 8 - ((uintptr_t)p & 7); \ - if (adjust < 8) { \ - n -= adjust; \ - adjust /= bpp; \ - while (adjust--) { \ - *((type *)p) = (type)color; \ - p += bpp; \ - } \ - } \ - MMX_WORK; \ - } \ - if (n & 63) { \ - int remainder = (n & 63); \ - remainder /= bpp; \ - while (remainder--) { \ - *((type *)p) = (type)color; \ - p += bpp; \ - } \ - } \ - pixels += pitch; \ - } \ - \ - MMX_END; \ -} - -static void -SDL_FillRect1MMX(Uint8 *pixels, int pitch, Uint32 color, int w, int h) -{ - int i, n; - Uint8 *p = NULL; - - MMX_BEGIN; - - while (h--) { - n = w; - p = pixels; - - if (n > 63) { - int adjust = 8 - ((uintptr_t)p & 7); - if (adjust) { - n -= adjust; - SDL_memset(p, color, adjust); - p += adjust; - } - MMX_WORK; - } - if (n & 63) { - int remainder = (n & 63); - SDL_memset(p, color, remainder); - p += remainder; - } - pixels += pitch; - } - - MMX_END; -} -/* DEFINE_MMX_FILLRECT(1, Uint8) */ -DEFINE_MMX_FILLRECT(2, Uint16) -DEFINE_MMX_FILLRECT(4, Uint32) - -/* *INDENT-ON* */ -#endif /* __MMX__ */ - static void SDL_FillRect1(Uint8 * pixels, int pitch, Uint32 color, int w, int h) { @@ -372,12 +273,6 @@ SDL_FillRect(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color) SDL_FillRect1SSE(pixels, dst->pitch, color, rect->w, rect->h); break; } -#endif -#ifdef __MMX__ - if (SDL_HasMMX()) { - SDL_FillRect1MMX(pixels, dst->pitch, color, rect->w, rect->h); - break; - } #endif SDL_FillRect1(pixels, dst->pitch, color, rect->w, rect->h); break; @@ -391,12 +286,6 @@ SDL_FillRect(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color) SDL_FillRect2SSE(pixels, dst->pitch, color, rect->w, rect->h); break; } -#endif -#ifdef __MMX__ - if (SDL_HasMMX()) { - SDL_FillRect2MMX(pixels, dst->pitch, color, rect->w, rect->h); - break; - } #endif SDL_FillRect2(pixels, dst->pitch, color, rect->w, rect->h); break; @@ -416,12 +305,6 @@ SDL_FillRect(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color) SDL_FillRect4SSE(pixels, dst->pitch, color, rect->w, rect->h); break; } -#endif -#ifdef __MMX__ - if (SDL_HasMMX()) { - SDL_FillRect4MMX(pixels, dst->pitch, color, rect->w, rect->h); - break; - } #endif SDL_FillRect4(pixels, dst->pitch, color, rect->w, rect->h); break; diff --git a/jni/SDL2-2.0.1/src/video/SDL_pixels.c b/jni/SDL2-2.0.1/src/video/SDL_pixels.c index 0300155f..3daa85f0 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_pixels.c +++ b/jni/SDL2-2.0.1/src/video/SDL_pixels.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* General (mostly internal) pixel/color manipulation routines for SDL */ diff --git a/jni/SDL2-2.0.1/src/video/SDL_pixels_c.h b/jni/SDL2-2.0.1/src/video/SDL_pixels_c.h index 0b5d9a00..94fe38c1 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_pixels_c.h +++ b/jni/SDL2-2.0.1/src/video/SDL_pixels_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* Useful functions and variables from SDL_pixel.c */ diff --git a/jni/SDL2-2.0.1/src/video/SDL_rect.c b/jni/SDL2-2.0.1/src/video/SDL_rect.c index b6393fb2..5c9997a4 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_rect.c +++ b/jni/SDL2-2.0.1/src/video/SDL_rect.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_rect.h" #include "SDL_rect_c.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_rect_c.h b/jni/SDL2-2.0.1/src/video/SDL_rect_c.h index a7fd49cf..1a76bac7 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_rect_c.h +++ b/jni/SDL2-2.0.1/src/video/SDL_rect_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" extern SDL_bool SDL_GetSpanEnclosingRect(int width, int height, int numrects, const SDL_Rect * rects, SDL_Rect *span); diff --git a/jni/SDL2-2.0.1/src/video/SDL_shape.c b/jni/SDL2-2.0.1/src/video/SDL_shape.c index 308fefce..4f9f1c1a 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_shape.c +++ b/jni/SDL2-2.0.1/src/video/SDL_shape.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL.h" #include "SDL_assert.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_shape_internals.h b/jni/SDL2-2.0.1/src/video/SDL_shape_internals.h index 27b51241..a74bd385 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_shape_internals.h +++ b/jni/SDL2-2.0.1/src/video/SDL_shape_internals.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_shape_internals_h #define _SDL_shape_internals_h diff --git a/jni/SDL2-2.0.1/src/video/SDL_stretch.c b/jni/SDL2-2.0.1/src/video/SDL_stretch.c index 3eafc205..8f5517d0 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_stretch.c +++ b/jni/SDL2-2.0.1/src/video/SDL_stretch.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* This a stretch blit implementation based on ideas given to me by Tomasz Cejner - thanks! :) diff --git a/jni/SDL2-2.0.1/src/video/SDL_surface.c b/jni/SDL2-2.0.1/src/video/SDL_surface.c index d4c852a1..8ccb6443 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_surface.c +++ b/jni/SDL2-2.0.1/src/video/SDL_surface.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #include "SDL_video.h" #include "SDL_sysvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/SDL_sysvideo.h b/jni/SDL2-2.0.1/src/video/SDL_sysvideo.h index 2d41234a..94ff9b32 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_sysvideo.h +++ b/jni/SDL2-2.0.1/src/video/SDL_sysvideo.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" #ifndef _SDL_sysvideo_h #define _SDL_sysvideo_h @@ -348,8 +348,8 @@ extern VideoBootStrap DirectFB_bootstrap; #if SDL_VIDEO_DRIVER_WINDOWS extern VideoBootStrap WINDOWS_bootstrap; #endif -#if SDL_VIDEO_DRIVER_BWINDOW -extern VideoBootStrap BWINDOW_bootstrap; +#if SDL_VIDEO_DRIVER_HAIKU +extern VideoBootStrap HAIKU_bootstrap; #endif #if SDL_VIDEO_DRIVER_PANDORA extern VideoBootStrap PND_bootstrap; @@ -369,6 +369,9 @@ extern VideoBootStrap RPI_bootstrap; #if SDL_VIDEO_DRIVER_DUMMY extern VideoBootStrap DUMMY_bootstrap; #endif +#if SDL_VIDEO_DRIVER_WAYLAND +extern VideoBootStrap Wayland_bootstrap; +#endif extern SDL_VideoDevice *SDL_GetVideoDevice(void); extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode); diff --git a/jni/SDL2-2.0.1/src/video/SDL_video.c b/jni/SDL2-2.0.1/src/video/SDL_video.c index 69f37a25..658ac8e1 100644 --- a/jni/SDL2-2.0.1/src/video/SDL_video.c +++ b/jni/SDL2-2.0.1/src/video/SDL_video.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* The high-level video driver subsystem */ @@ -65,8 +65,8 @@ static VideoBootStrap *bootstrap[] = { #if SDL_VIDEO_DRIVER_WINDOWS &WINDOWS_bootstrap, #endif -#if SDL_VIDEO_DRIVER_BWINDOW - &BWINDOW_bootstrap, +#if SDL_VIDEO_DRIVER_HAIKU + &HAIKU_bootstrap, #endif #if SDL_VIDEO_DRIVER_PANDORA &PND_bootstrap, @@ -85,6 +85,9 @@ static VideoBootStrap *bootstrap[] = { #endif #if SDL_VIDEO_DRIVER_DUMMY &DUMMY_bootstrap, +#endif +#if SDL_VIDEO_DRIVER_WAYLAND + &Wayland_bootstrap, #endif NULL }; @@ -112,6 +115,14 @@ static SDL_VideoDevice *_this = NULL; return retval; \ } + +#ifdef __MACOSX__ +/* Support for Mac OS X fullscreen spaces */ +extern SDL_bool Cocoa_IsWindowInFullscreenSpace(SDL_Window * window); +extern SDL_bool Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state); +#endif + + /* Support for framebuffer emulation using an accelerated renderer */ #define SDL_WINDOWTEXTUREDATA "_SDL_WindowTextureData" @@ -621,9 +632,9 @@ SDL_GetIndexOfDisplay(SDL_VideoDisplay *display) void * SDL_GetDisplayDriverData( int displayIndex ) { - CHECK_DISPLAY_INDEX( displayIndex, NULL ); + CHECK_DISPLAY_INDEX( displayIndex, NULL ); - return _this->displays[displayIndex].driverdata; + return _this->displays[displayIndex].driverdata; } const char * @@ -1080,9 +1091,17 @@ SDL_RestoreMousePosition(SDL_Window *window) static void SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) { - SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + SDL_VideoDisplay *display; SDL_Window *other; +#ifdef __MACOSX__ + if (Cocoa_SetWindowFullscreenSpace(window, fullscreen)) { + return; + } +#endif + + display = SDL_GetDisplayForWindow(window); + if (fullscreen) { /* Hide any other fullscreen windows */ if (display->fullscreen_window && @@ -1118,11 +1137,11 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) } /* only do the mode change if we want exclusive fullscreen */ - if ( ( window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP ) != SDL_WINDOW_FULLSCREEN_DESKTOP ) + if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) { SDL_SetDisplayModeForDisplay(display, &fullscreen_mode); - else + } else { SDL_SetDisplayModeForDisplay(display, NULL); - + } if (_this->SetWindowFullscreen) { _this->SetWindowFullscreen(_this, other, display, SDL_TRUE); @@ -1159,7 +1178,7 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) } #define CREATE_FLAGS \ - (SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE) + (SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI) static void SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags) @@ -1220,6 +1239,17 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) return NULL; } } + + /* Unless the user has specified the high-DPI disabling hint, respect the + * SDL_WINDOW_ALLOW_HIGHDPI flag. + */ + if (flags & SDL_WINDOW_ALLOW_HIGHDPI) { + hint = SDL_GetHint(SDL_HINT_VIDEO_HIGHDPI_DISABLED); + if (hint && SDL_atoi(hint) > 0) { + flags &= ~SDL_WINDOW_ALLOW_HIGHDPI; + } + } + window = (SDL_Window *)SDL_calloc(1, sizeof(*window)); if (!window) { SDL_OutOfMemory(); @@ -1250,16 +1280,6 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) window->brightness = 1.0f; window->next = _this->windows; - /* Unless the user has specified the high-DPI disabling hint, respect the - * SDL_WINDOW_ALLOW_HIGHDPI flag. - */ - hint = SDL_GetHint(SDL_HINT_VIDEO_HIGHDPI_DISABLED); - if (!hint || *hint != '1') { - if ((flags & SDL_WINDOW_ALLOW_HIGHDPI)) { - window->flags |= SDL_WINDOW_ALLOW_HIGHDPI; - } - } - if (_this->windows) { _this->windows->prev = window; } @@ -1627,8 +1647,29 @@ SDL_SetWindowSize(SDL_Window * window, int w, int h) return; } + /* Make sure we don't exceed any window size limits */ + if (window->min_w && w < window->min_w) + { + w = window->min_w; + } + if (window->max_w && w > window->max_w) + { + w = window->max_w; + } + if (window->min_h && h < window->min_h) + { + h = window->min_h; + } + if (window->max_h && h > window->max_h) + { + h = window->max_h; + } + /* FIXME: Should this change fullscreen modes? */ - if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { + if (window->flags & SDL_WINDOW_FULLSCREEN) { + window->windowed.w = w; + window->windowed.h = h; + } else { window->w = w; window->h = h; if (_this->SetWindowSize) { @@ -2014,8 +2055,8 @@ SDL_UpdateWindowGrab(SDL_Window * window) { if (_this->SetWindowGrab) { SDL_bool grabbed; - if ((window->flags & SDL_WINDOW_INPUT_GRABBED) && - (window->flags & SDL_WINDOW_INPUT_FOCUS)) { + if ((SDL_GetMouse()->relative_mode || (window->flags & SDL_WINDOW_INPUT_GRABBED)) && + (window->flags & SDL_WINDOW_INPUT_FOCUS)) { grabbed = SDL_TRUE; } else { grabbed = SDL_FALSE; @@ -2113,9 +2154,22 @@ SDL_OnWindowFocusGained(SDL_Window * window) SDL_UpdateWindowGrab(window); } -static SDL_bool ShouldMinimizeOnFocusLoss() +static SDL_bool +ShouldMinimizeOnFocusLoss(SDL_Window * window) { - const char *hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS); + const char *hint; + + if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { + return SDL_FALSE; + } + +#ifdef __MACOSX__ + if (Cocoa_IsWindowInFullscreenSpace(window)) { + return SDL_FALSE; + } +#endif + + hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS); if (hint) { if (*hint == '0') { return SDL_FALSE; @@ -2123,6 +2177,7 @@ static SDL_bool ShouldMinimizeOnFocusLoss() return SDL_TRUE; } } + return SDL_TRUE; } @@ -2135,8 +2190,7 @@ SDL_OnWindowFocusLost(SDL_Window * window) SDL_UpdateWindowGrab(window); - /* If we're fullscreen and lose focus, minimize unless the hint tells us otherwise */ - if ((window->flags & SDL_WINDOW_FULLSCREEN) && ShouldMinimizeOnFocusLoss()) { + if (ShouldMinimizeOnFocusLoss(window)) { SDL_MinimizeWindow(window); } } @@ -3189,12 +3243,6 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) X11_ShowMessageBox(messageboxdata, buttonid) == 0) { retval = 0; } -#endif -#if __ANDROID__ - if (retval == -1) { - SDL_Log ("SDL_ShowMessageBox[%s]: %s", messageboxdata->title, messageboxdata->message); - retval = 0; - } #endif if (retval == -1) { SDL_SetError("No message system available"); diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.c b/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.c index 19a70a30..17420338 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.c +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_ANDROID diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.h b/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.h index d1cdaf1c..9c599350 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.h +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidclipboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_androidclipboard_h #define _SDL_androidclipboard_h diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.c b/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.c index 9be49cf4..da102ccf 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.c +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_ANDROID @@ -66,8 +66,6 @@ Android_PumpEvents(_THIS) /* * Android_ResumeSem and Android_PauseSem are signaled from Java_org_libsdl_app_SDLActivity_nativePause and Java_org_libsdl_app_SDLActivity_nativeResume * When the pause semaphore is signaled, if SDL_ANDROID_BLOCK_ON_PAUSE is defined the event loop will block until the resume signal is emitted. - * When the resume semaphore is signaled, SDL_GL_CreateContext is called which in turn calls Java code - * SDLActivity::createGLContext -> SDLActivity:: initEGL -> SDLActivity::createEGLSurface -> SDLActivity::createEGLContext */ #if SDL_ANDROID_BLOCK_ON_PAUSE @@ -82,7 +80,9 @@ Android_PumpEvents(_THIS) isPaused = 0; /* Restore the GL Context from here, as this operation is thread dependent */ - android_egl_context_restore(); + if (!SDL_HasEvent(SDL_QUIT)) { + android_egl_context_restore(); + } } } else { diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.h b/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.h index 970131c7..bfab5055 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.h +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidevents.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_androidvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidgl.c b/jni/SDL2-2.0.1/src/video/android/SDL_androidgl.c index 691fbf7f..8f0d1aed 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidgl.c +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidgl.c @@ -18,14 +18,14 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_ANDROID /* Android SDL video driver implementation */ #include "SDL_video.h" -#include "../SDL_egl.h" +#include "../SDL_egl_c.h" #include "SDL_androidwindow.h" #include "SDL_androidvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.c b/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.c index 5381de64..034c3023 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.c +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_ANDROID @@ -262,6 +262,7 @@ static SDL_Scancode Android_Keycodes[] = { SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ASSIST */ SDL_SCANCODE_BRIGHTNESSDOWN, /* AKEYCODE_BRIGHTNESS_DOWN */ SDL_SCANCODE_BRIGHTNESSUP, /* AKEYCODE_BRIGHTNESS_UP */ + SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_AUDIO_TRACK */ }; static SDL_Scancode diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.h b/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.h index da8da9b7..4c1cef1a 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.h +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidkeyboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_androidvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.c b/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.c index 6ad26e2c..f6cc0d0d 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.c +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_ANDROID @@ -38,11 +38,8 @@ #define ACTION_MOVE 2 #define ACTION_CANCEL 3 #define ACTION_OUTSIDE 4 -/* The following two are deprecated but it seems they are still emitted (instead the corresponding ACTION_UP/DOWN) as of Android 3.2 */ -#define ACTION_POINTER_1_DOWN 5 -#define ACTION_POINTER_1_UP 6 - -static SDL_FingerID leftFingerDown = 0; +#define ACTION_POINTER_DOWN 5 +#define ACTION_POINTER_UP 6 static void Android_GetWindowCoordinates(float x, float y, int *window_x, int *window_y) @@ -72,6 +69,7 @@ void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int actio SDL_TouchID touchDeviceId = 0; SDL_FingerID fingerId = 0; int window_x, window_y; + static SDL_FingerID pointerFingerID = 0; if (!Android_Window) { return; @@ -85,22 +83,20 @@ void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int actio fingerId = (SDL_FingerID)pointer_finger_id_in; switch (action) { case ACTION_DOWN: - case ACTION_POINTER_1_DOWN: - if (!leftFingerDown) { - Android_GetWindowCoordinates(x, y, &window_x, &window_y); - - /* send moved event */ - SDL_SendMouseMotion(NULL, SDL_TOUCH_MOUSEID, 0, window_x, window_y); - - /* send mouse down event */ - SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT); - - leftFingerDown = fingerId; - } + /* Primary pointer down */ + Android_GetWindowCoordinates(x, y, &window_x, &window_y); + /* send moved event */ + SDL_SendMouseMotion(NULL, SDL_TOUCH_MOUSEID, 0, window_x, window_y); + /* send mouse down event */ + SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT); + pointerFingerID = fingerId; + case ACTION_POINTER_DOWN: + /* Non primary pointer down */ SDL_SendTouch(touchDeviceId, fingerId, SDL_TRUE, x, y, p); break; + case ACTION_MOVE: - if (!leftFingerDown) { + if (!pointerFingerID) { Android_GetWindowCoordinates(x, y, &window_x, &window_y); /* send moved event */ @@ -108,15 +104,17 @@ void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int actio } SDL_SendTouchMotion(touchDeviceId, fingerId, x, y, p); break; + case ACTION_UP: - case ACTION_POINTER_1_UP: - if (fingerId == leftFingerDown) { - /* send mouse up */ - SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT); - leftFingerDown = 0; - } + /* Primary pointer up */ + /* send mouse up */ + pointerFingerID = (SDL_FingerID) 0; + SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT); + case ACTION_POINTER_UP: + /* Non primary pointer up */ SDL_SendTouch(touchDeviceId, fingerId, SDL_FALSE, x, y, p); break; + default: break; } diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.h b/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.h index 346d73a6..0601bea6 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.h +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidtouch.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_androidvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.c b/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.c index fc766ece..91247dea 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.c +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_ANDROID @@ -45,7 +45,7 @@ static int Android_VideoInit(_THIS); static void Android_VideoQuit(_THIS); -#include "../SDL_egl.h" +#include "../SDL_egl_c.h" /* GL functions (SDL_androidgl.c) */ extern SDL_GLContext Android_GLES_CreateContext(_THIS, SDL_Window * window); extern int Android_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.h b/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.h index 3f509ab2..3762f3dd 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.h +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidvideo.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_androidvideo_h #define _SDL_androidvideo_h diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.c b/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.c index acc40dbe..673b9d98 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.c +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_ANDROID @@ -72,6 +72,7 @@ Android_CreateWindow(_THIS, SDL_Window * window) data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->native_window); if (data->egl_surface == EGL_NO_SURFACE) { + ANativeWindow_release(data->native_window); SDL_free(data); return SDL_SetError("Could not create GLES window surface"); } @@ -102,6 +103,9 @@ Android_DestroyWindow(_THIS, SDL_Window * window) if(window->driverdata) { data = (SDL_WindowData *) window->driverdata; + if (data->egl_surface != EGL_NO_SURFACE) { + SDL_EGL_DestroySurface(_this, data->egl_surface); + } if(data->native_window) { ANativeWindow_release(data->native_window); } diff --git a/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.h b/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.h index 4365cd41..88c1bc32 100644 --- a/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.h +++ b/jni/SDL2-2.0.1/src/video/android/SDL_androidwindow.h @@ -18,13 +18,13 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_androidwindow_h #define _SDL_androidwindow_h #include "../../core/android/SDL_android.h" -#include "../SDL_egl.h" +#include "../SDL_egl_c.h" extern int Android_CreateWindow(_THIS, SDL_Window * window); extern void Android_SetWindowTitle(_THIS, SDL_Window * window); diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.h index 74515dd9..03ac3cb3 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoaclipboard_h #define _SDL_cocoaclipboard_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.m index 62c34b53..0b7d39f7 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaclipboard.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.h index 4057748b..f9ca15dc 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoaevents_h #define _SDL_cocoaevents_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.m index e6b292b0..c0231e0a 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaevents.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA #include "SDL_timer.h" @@ -147,6 +147,7 @@ CreateApplicationMenus(void) NSMenu *appleMenu; NSMenu *serviceMenu; NSMenu *windowMenu; + NSMenu *viewMenu; NSMenuItem *menuItem; if (NSApp == nil) { @@ -220,6 +221,25 @@ CreateApplicationMenus(void) /* Tell the application object that this is now the window menu */ [NSApp setWindowsMenu:windowMenu]; [windowMenu release]; + + + /* Add the fullscreen view toggle menu option, if supported */ + if ([NSApp respondsToSelector:@selector(setPresentationOptions:)]) { + /* Create the view menu */ + viewMenu = [[NSMenu alloc] initWithTitle:@"View"]; + + /* Add menu items */ + menuItem = [viewMenu addItemWithTitle:@"Toggle Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f"]; + [menuItem setKeyEquivalentModifierMask:NSControlKeyMask | NSCommandKeyMask]; + + /* Put menu into the menubar */ + menuItem = [[NSMenuItem alloc] initWithTitle:@"View" action:nil keyEquivalent:@""]; + [menuItem setSubmenu:viewMenu]; + [[NSApp mainMenu] addItem:menuItem]; + [menuItem release]; + + [viewMenu release]; + } } void diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.h index 4343b9c3..2bef1607 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoakeyboard_h #define _SDL_cocoakeyboard_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.m index 8a6b8742..406de234 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoakeyboard.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA @@ -198,45 +198,6 @@ @end -/* This is the original behavior, before support was added for - * differentiating between left and right versions of the keys. - */ -static void -DoUnsidedModifiers(unsigned short scancode, - unsigned int oldMods, unsigned int newMods) -{ - const int mapping[] = { - SDL_SCANCODE_CAPSLOCK, - SDL_SCANCODE_LSHIFT, - SDL_SCANCODE_LCTRL, - SDL_SCANCODE_LALT, - SDL_SCANCODE_LGUI - }; - unsigned int i, bit; - - /* Iterate through the bits, testing each against the current modifiers */ - for (i = 0, bit = NSAlphaShiftKeyMask; bit <= NSCommandKeyMask; bit <<= 1, ++i) { - unsigned int oldMask, newMask; - - oldMask = oldMods & bit; - newMask = newMods & bit; - - if (oldMask && oldMask != newMask) { /* modifier up event */ - /* If this was Caps Lock, we need some additional voodoo to make SDL happy */ - if (bit == NSAlphaShiftKeyMask) { - SDL_SendKeyboardKey(SDL_PRESSED, mapping[i]); - } - SDL_SendKeyboardKey(SDL_RELEASED, mapping[i]); - } else if (newMask && oldMask != newMask) { /* modifier down event */ - SDL_SendKeyboardKey(SDL_PRESSED, mapping[i]); - /* If this was Caps Lock, we need some additional voodoo to make SDL happy */ - if (bit == NSAlphaShiftKeyMask) { - SDL_SendKeyboardKey(SDL_RELEASED, mapping[i]); - } - } - } -} - /* This is a helper function for HandleModifierSide. This * function reverts back to behavior before the distinction between * sides was made. @@ -458,15 +419,7 @@ HandleModifiers(_THIS, unsigned short scancode, unsigned int modifierFlags) return; } - /* - * Starting with Panther (10.3.0), the ability to distinguish between - * left side and right side modifiers is available. - */ - if (data->osversion >= 0x1030) { - DoSidedModifiers(scancode, data->modifierFlags, modifierFlags); - } else { - DoUnsidedModifiers(scancode, data->modifierFlags, modifierFlags); - } + DoSidedModifiers(scancode, data->modifierFlags, modifierFlags); data->modifierFlags = modifierFlags; } diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.h index e1890b27..0d329a46 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.m index 78b80ae6..f371096f 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamessagebox.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.h index 06ed9315..2eb79e12 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoamodes_h #define _SDL_cocoamodes_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.m index 501684fc..3eb6f05a 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamodes.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.h index eb6f5891..a49e5cb8 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoamouse_h #define _SDL_cocoamouse_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.m index e8344234..e38a4f44 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamouse.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.h index a13d97bb..a656020c 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoamousetap_h #define _SDL_cocoamousetap_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.m index 5879d49b..f0f617df 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoamousetap.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA @@ -60,9 +60,10 @@ static const CGEventMask allGrabbedEventsMask = static CGEventRef Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) { - SDL_MouseData *driverdata = (SDL_MouseData*)refcon; + SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)refcon; SDL_Mouse *mouse = SDL_GetMouse(); SDL_Window *window = SDL_GetKeyboardFocus(); + NSWindow *nswindow; NSRect windowRect; CGPoint eventLocation; @@ -71,7 +72,7 @@ Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event case kCGEventTapDisabledByTimeout: case kCGEventTapDisabledByUserInput: { - CGEventTapEnable(((SDL_MouseEventTapData*)(driverdata->tapdata))->tap, true); + CGEventTapEnable(tapdata->tap, true); return NULL; } default: @@ -92,8 +93,9 @@ Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event } /* This is the same coordinate system as Cocoa uses. */ + nswindow = ((SDL_WindowData *) window->driverdata)->nswindow; eventLocation = CGEventGetUnflippedLocation(event); - windowRect = [((SDL_WindowData *) window->driverdata)->nswindow frame]; + windowRect = [nswindow contentRectForFrameRect:[nswindow frame]]; if (!NSPointInRect(NSPointFromCGPoint(eventLocation), windowRect)) { diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.h index e7ef1f66..ab635e8a 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoaopengl_h #define _SDL_cocoaopengl_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.m index 13c7777b..54aae973 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoaopengl.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" /* NSOpenGL implementation of SDL OpenGL support */ @@ -35,27 +35,17 @@ #define DEFAULT_OPENGL "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib" -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 -/* New methods for converting to and from backing store pixels, taken from - * AppKite/NSView.h in 10.8 SDK. */ -@interface NSView (Backing) -- (NSPoint)convertPointToBacking:(NSPoint)aPoint; -- (NSPoint)convertPointFromBacking:(NSPoint)aPoint; -- (NSSize)convertSizeToBacking:(NSSize)aSize; -- (NSSize)convertSizeFromBacking:(NSSize)aSize; -- (NSRect)convertRectToBacking:(NSRect)aRect; -- (NSRect)convertRectFromBacking:(NSRect)aRect; -@end -#endif - #ifndef kCGLPFAOpenGLProfile #define kCGLPFAOpenGLProfile 99 #endif #ifndef kCGLOGLPVersion_Legacy #define kCGLOGLPVersion_Legacy 0x1000 #endif -#ifndef kCGLOGLPVersion_3_2_Core -#define kCGLOGLPVersion_3_2_Core 0x3200 +#ifndef kCGLOGLPVersion_GL3_Core +#define kCGLOGLPVersion_GL3_Core 0x3200 +#endif +#ifndef kCGLOGLPVersion_GL4_Core +#define kCGLOGLPVersion_GL4_Core 0x4100 #endif @implementation SDLOpenGLContext : NSOpenGLContext @@ -179,14 +169,14 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) int i = 0; if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { - SDL_SetError ("OpenGL ES not supported on this platform"); + SDL_SetError ("OpenGL ES is not supported on this platform"); return NULL; } /* Sadly, we'll have to update this as life progresses, since we need to set an enum for context profiles, not a context version number */ - if (wantver > 0x0302) { - SDL_SetError ("OpenGL > 3.2 is not supported on this platform"); + if (wantver > 0x0401) { + SDL_SetError ("OpenGL > 4.1 is not supported on this platform"); return NULL; } @@ -197,7 +187,13 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) NSOpenGLPixelFormatAttribute profile = kCGLOGLPVersion_Legacy; if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_CORE) { if (wantver == 0x0302) { - profile = kCGLOGLPVersion_3_2_Core; + profile = kCGLOGLPVersion_GL3_Core; + } else if ((wantver == 0x0401) && (data->osversion >= 0x1090)) { + profile = kCGLOGLPVersion_GL4_Core; + } else { + SDL_SetError("Requested GL version is not supported on this platform"); + [pool release]; + return NULL; } } attr[i++] = kCGLPFAOpenGLProfile; diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.h index 3b656c1a..f415444f 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoashape_h #define _SDL_cocoashape_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.m index ae8df8d1..a6ea8795 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoashape.m @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA @@ -92,7 +92,7 @@ Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShape pool = [[NSAutoreleasePool alloc] init]; closure.view = [windata->nswindow contentView]; - closure.path = [[NSBezierPath bezierPath] autorelease]; + closure.path = [[NSBezierPath bezierPath] init]; closure.window = shaper->window; SDL_TraverseShapeTree(data->shape,&ConvertRects,&closure); [closure.path addClip]; diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.h index 5f8be531..00ea4955 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoavideo_h #define _SDL_cocoavideo_h diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.m index d1b95876..18408e94 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoavideo.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.h b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.h index c08c55c1..1a7178c5 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.h +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_cocoawindow_h #define _SDL_cocoawindow_h @@ -27,16 +27,31 @@ typedef struct SDL_WindowData SDL_WindowData; +typedef enum +{ + PENDING_OPERATION_NONE, + PENDING_OPERATION_ENTER_FULLSCREEN, + PENDING_OPERATION_LEAVE_FULLSCREEN, + PENDING_OPERATION_MINIMIZE +} PendingWindowOperation; + @interface Cocoa_WindowListener : NSResponder { SDL_WindowData *_data; BOOL observingVisible; BOOL wasCtrlLeft; BOOL wasVisible; + BOOL isFullscreenSpace; + BOOL inFullscreenTransition; + PendingWindowOperation pendingWindowOperation; } -(void) listen:(SDL_WindowData *) data; -(void) pauseVisibleObservation; -(void) resumeVisibleObservation; +-(BOOL) setFullscreenSpace:(BOOL) state; +-(BOOL) isInFullscreenSpace; +-(BOOL) isInFullscreenSpaceTransition; +-(void) addPendingWindowOperation:(PendingWindowOperation) operation; -(void) close; /* Window delegate functionality */ @@ -48,6 +63,10 @@ typedef struct SDL_WindowData SDL_WindowData; -(void) windowDidDeminiaturize:(NSNotification *) aNotification; -(void) windowDidBecomeKey:(NSNotification *) aNotification; -(void) windowDidResignKey:(NSNotification *) aNotification; +-(void) windowWillEnterFullScreen:(NSNotification *) aNotification; +-(void) windowDidEnterFullScreen:(NSNotification *) aNotification; +-(void) windowWillExitFullScreen:(NSNotification *) aNotification; +-(void) windowDidExitFullScreen:(NSNotification *) aNotification; /* Window event handling */ -(void) mouseDown:(NSEvent *) theEvent; diff --git a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.m b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.m index 55299830..f025b7c2 100644 --- a/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.m +++ b/jni/SDL2-2.0.1/src/video/cocoa/SDL_cocoawindow.m @@ -18,12 +18,17 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 +# error SDL for Mac OS X must be built with a 10.7 SDK or above. +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1070 */ + #include "SDL_syswm.h" #include "SDL_timer.h" /* For SDL_GetTicks() */ +#include "SDL_hints.h" #include "../SDL_sysvideo.h" #include "../../events/SDL_keyboard_c.h" #include "../../events/SDL_mouse_c.h" @@ -34,14 +39,6 @@ #include "SDL_cocoamouse.h" #include "SDL_cocoaopengl.h" -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 -/* Taken from AppKit/NSOpenGLView.h in 10.8 SDK. */ -@interface NSView (NSOpenGLSurfaceResolution) -- (BOOL)wantsBestResolutionOpenGLSurface; -- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; -@end -#endif - static Uint32 s_moveHack; static void ConvertNSRect(NSRect *r) @@ -49,7 +46,8 @@ static void ConvertNSRect(NSRect *r) r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height; } -static void ScheduleContextUpdates(SDL_WindowData *data) +static void +ScheduleContextUpdates(SDL_WindowData *data) { NSMutableArray *contexts = data->nscontexts; @synchronized (contexts) { @@ -59,6 +57,59 @@ static void ScheduleContextUpdates(SDL_WindowData *data) } } +static int +GetHintCtrlClickEmulateRightClick() +{ + const char *hint = SDL_GetHint( SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK ); + return hint != NULL && *hint != '0'; +} + +static unsigned int +GetWindowStyle(SDL_Window * window) +{ + unsigned int style; + + if (window->flags & SDL_WINDOW_FULLSCREEN) { + style = NSBorderlessWindowMask; + } else { + if (window->flags & SDL_WINDOW_BORDERLESS) { + style = NSBorderlessWindowMask; + } else { + style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask); + } + if (window->flags & SDL_WINDOW_RESIZABLE) { + style |= NSResizableWindowMask; + } + } + return style; +} + +static SDL_bool +SetWindowStyle(SDL_Window * window, unsigned int style) +{ + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + NSWindow *nswindow = data->nswindow; + + if (![nswindow respondsToSelector: @selector(setStyleMask:)]) { + return SDL_FALSE; + } + + /* The view responder chain gets messed with during setStyleMask */ + if ([[nswindow contentView] nextResponder] == data->listener) { + [[nswindow contentView] setNextResponder:nil]; + } + + [nswindow performSelector: @selector(setStyleMask:) withObject: (id)(uintptr_t)style]; + + /* The view responder chain gets messed with during setStyleMask */ + if ([[nswindow contentView] nextResponder] != data->listener) { + [[nswindow contentView] setNextResponder:data->listener]; + } + + return SDL_TRUE; +} + + @implementation Cocoa_WindowListener - (void)listen:(SDL_WindowData *)data @@ -71,6 +122,9 @@ static void ScheduleContextUpdates(SDL_WindowData *data) observingVisible = YES; wasCtrlLeft = NO; wasVisible = [window isVisible]; + isFullscreenSpace = NO; + inFullscreenTransition = NO; + pendingWindowOperation = PENDING_OPERATION_NONE; center = [NSNotificationCenter defaultCenter]; @@ -82,6 +136,10 @@ static void ScheduleContextUpdates(SDL_WindowData *data) [center addObserver:self selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:window]; [center addObserver:self selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification object:window]; [center addObserver:self selector:@selector(windowDidResignKey:) name:NSWindowDidResignKeyNotification object:window]; + [center addObserver:self selector:@selector(windowWillEnterFullScreen:) name:NSWindowWillEnterFullScreenNotification object:window]; + [center addObserver:self selector:@selector(windowDidEnterFullScreen:) name:NSWindowDidEnterFullScreenNotification object:window]; + [center addObserver:self selector:@selector(windowWillExitFullScreen:) name:NSWindowWillExitFullScreenNotification object:window]; + [center addObserver:self selector:@selector(windowDidExitFullScreen:) name:NSWindowDidExitFullScreenNotification object:window]; } else { [window setDelegate:self]; } @@ -145,6 +203,58 @@ static void ScheduleContextUpdates(SDL_WindowData *data) } } +-(BOOL) setFullscreenSpace:(BOOL) state; +{ + SDL_Window *window = _data->window; + NSWindow *nswindow = _data->nswindow; + + if (![nswindow respondsToSelector: @selector(collectionBehavior)]) { + return NO; + } + if ([nswindow collectionBehavior] != NSWindowCollectionBehaviorFullScreenPrimary) { + return NO; + } + + if (state == isFullscreenSpace) { + return YES; + } + + if (inFullscreenTransition) { + if (state) { + [self addPendingWindowOperation:PENDING_OPERATION_ENTER_FULLSCREEN]; + } else { + [self addPendingWindowOperation:PENDING_OPERATION_LEAVE_FULLSCREEN]; + } + return YES; + } + inFullscreenTransition = YES; + + /* Update the flags here so the state change is available immediately */ + if (state) { + window->flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; + } else { + window->flags &= ~SDL_WINDOW_FULLSCREEN_DESKTOP; + } + + [nswindow performSelectorOnMainThread: @selector(toggleFullScreen:) withObject:nswindow waitUntilDone:NO]; + return YES; +} + +-(BOOL) isInFullscreenSpace +{ + return isFullscreenSpace; +} + +-(BOOL) isInFullscreenSpaceTransition +{ + return inFullscreenTransition; +} + +-(void) addPendingWindowOperation:(PendingWindowOperation) operation +{ + pendingWindowOperation = operation; +} + - (void)close { NSNotificationCenter *center; @@ -162,12 +272,15 @@ static void ScheduleContextUpdates(SDL_WindowData *data) [center removeObserver:self name:NSWindowDidDeminiaturizeNotification object:window]; [center removeObserver:self name:NSWindowDidBecomeKeyNotification object:window]; [center removeObserver:self name:NSWindowDidResignKeyNotification object:window]; + [center removeObserver:self name:NSWindowWillEnterFullScreenNotification object:window]; + [center removeObserver:self name:NSWindowDidEnterFullScreenNotification object:window]; + [center removeObserver:self name:NSWindowWillExitFullScreenNotification object:window]; + [center removeObserver:self name:NSWindowDidExitFullScreenNotification object:window]; } else { [window setDelegate:nil]; } - [window removeObserver:self - forKeyPath:@"visible"]; + [window removeObserver:self forKeyPath:@"visible"]; if ([window nextResponder] == self) { [window setNextResponder:nil]; @@ -236,28 +349,37 @@ static void ScheduleContextUpdates(SDL_WindowData *data) - (void)windowDidResize:(NSNotification *)aNotification { + SDL_Window *window = _data->window; + NSWindow *nswindow = _data->nswindow; int x, y, w, h; - NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]]; + NSRect rect = [nswindow contentRectForFrameRect:[nswindow frame]]; ConvertNSRect(&rect); x = (int)rect.origin.x; y = (int)rect.origin.y; w = (int)rect.size.width; h = (int)rect.size.height; - if (SDL_IsShapedWindow(_data->window)) - Cocoa_ResizeWindowShape(_data->window); + + if (inFullscreenTransition) { + /* We'll take care of this at the end of the transition */ + return; + } + + if (SDL_IsShapedWindow(window)) { + Cocoa_ResizeWindowShape(window); + } ScheduleContextUpdates(_data); /* The window can move during a resize event, such as when maximizing or resizing from a corner */ - SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MOVED, x, y); - SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, w, h); - const BOOL zoomed = [_data->nswindow isZoomed]; + const BOOL zoomed = [nswindow isZoomed]; if (!zoomed) { - SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESTORED, 0, 0); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0); } else if (zoomed) { - SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0); } } @@ -310,6 +432,72 @@ static void ScheduleContextUpdates(SDL_WindowData *data) } } +- (void)windowWillEnterFullScreen:(NSNotification *)aNotification +{ + SDL_Window *window = _data->window; + + window->flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; + SetWindowStyle(window, (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask)); + + isFullscreenSpace = YES; + inFullscreenTransition = YES; +} + +- (void)windowDidEnterFullScreen:(NSNotification *)aNotification +{ + SDL_Window *window = _data->window; + + inFullscreenTransition = NO; + + if (pendingWindowOperation == PENDING_OPERATION_LEAVE_FULLSCREEN) { + pendingWindowOperation = PENDING_OPERATION_NONE; + [self setFullscreenSpace:NO]; + } else { + pendingWindowOperation = PENDING_OPERATION_NONE; + /* Force the size change event in case it was delivered earlier + while the window was still animating into place. + */ + window->w = 0; + window->h = 0; + [self windowDidResize:aNotification]; + } +} + +- (void)windowWillExitFullScreen:(NSNotification *)aNotification +{ + SDL_Window *window = _data->window; + + window->flags &= ~SDL_WINDOW_FULLSCREEN_DESKTOP; + SetWindowStyle(window, GetWindowStyle(window)); + + isFullscreenSpace = NO; + inFullscreenTransition = YES; +} + +- (void)windowDidExitFullScreen:(NSNotification *)aNotification +{ + SDL_Window *window = _data->window; + NSWindow *nswindow = _data->nswindow; + + inFullscreenTransition = NO; + + if (pendingWindowOperation == PENDING_OPERATION_ENTER_FULLSCREEN) { + pendingWindowOperation = PENDING_OPERATION_NONE; + [self setFullscreenSpace:YES]; + } else if (pendingWindowOperation == PENDING_OPERATION_MINIMIZE) { + pendingWindowOperation = PENDING_OPERATION_NONE; + [nswindow miniaturize:nil]; + } else { + pendingWindowOperation = PENDING_OPERATION_NONE; + /* Force the size change event in case it was delivered earlier + while the window was still animating into place. + */ + window->w = 0; + window->h = 0; + [self windowDidResize:aNotification]; + } +} + /* We'll respond to key events by doing nothing so we don't beep. * We could handle key messages here, but we lose some in the NSApp dispatch, * where they get converted to action messages, etc. @@ -341,7 +529,8 @@ static void ScheduleContextUpdates(SDL_WindowData *data) switch ([theEvent buttonNumber]) { case 0: - if ([theEvent modifierFlags] & NSControlKeyMask) { + if (([theEvent modifierFlags] & NSControlKeyMask) && + GetHintCtrlClickEmulateRightClick()) { wasCtrlLeft = YES; button = SDL_BUTTON_RIGHT; } else { @@ -598,26 +787,6 @@ static void ScheduleContextUpdates(SDL_WindowData *data) } @end -static unsigned int -GetWindowStyle(SDL_Window * window) -{ - unsigned int style; - - if (window->flags & SDL_WINDOW_FULLSCREEN) { - style = NSBorderlessWindowMask; - } else { - if (window->flags & SDL_WINDOW_BORDERLESS) { - style = NSBorderlessWindowMask; - } else { - style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask); - } - if (window->flags & SDL_WINDOW_RESIZABLE) { - style |= NSResizableWindowMask; - } - } - return style; -} - static int SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created) { @@ -740,14 +909,28 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window) rect.origin.y -= screenRect.origin.y; } } - nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen]; + + @try { + nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen]; + } + @catch (NSException *e) { + SDL_SetError("%s", [[e reason] UTF8String]); + [pool release]; + return -1; + } [nswindow setBackgroundColor:[NSColor blackColor]]; + if ([nswindow respondsToSelector:@selector(setCollectionBehavior:)]) { + const char *hint = SDL_GetHint(SDL_HINT_VIDEO_FULLSCREEN_SPACES); + if (hint && SDL_atoi(hint) > 0) { + [nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + } + } /* Create a default view for this window */ rect = [nswindow contentRectForFrameRect:[nswindow frame]]; NSView *contentView = [[SDLView alloc] initWithFrame:rect]; - if ((window->flags & SDL_WINDOW_ALLOW_HIGHDPI) > 0) { + if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) { if ([contentView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) { [contentView setWantsBestResolutionOpenGLSurface:YES]; } @@ -950,9 +1133,14 @@ void Cocoa_MinimizeWindow(_THIS, SDL_Window * window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow; + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + NSWindow *nswindow = data->nswindow; - [nswindow miniaturize:nil]; + if ([data->listener isInFullscreenSpaceTransition]) { + [data->listener addPendingWindowOperation:PENDING_OPERATION_MINIMIZE]; + } else { + [nswindow miniaturize:nil]; + } [pool release]; } @@ -994,9 +1182,7 @@ void Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow; - if ([nswindow respondsToSelector:@selector(setStyleMask:)]) { - [nswindow setStyleMask:GetWindowStyle(window)]; + if (SetWindowStyle(window, GetWindowStyle(window))) { if (bordered) { Cocoa_SetWindowTitle(_this, window); /* this got blanked out. */ } @@ -1004,6 +1190,7 @@ Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) [pool release]; } + void Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen) { @@ -1202,6 +1389,34 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) } } +SDL_bool +Cocoa_IsWindowInFullscreenSpace(SDL_Window * window) +{ + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + + if ([data->listener isInFullscreenSpace]) { + return SDL_TRUE; + } else { + return SDL_FALSE; + } +} + +SDL_bool +Cocoa_SetWindowFullscreenSpace(SDL_Window * window, SDL_bool state) +{ + SDL_bool succeeded = SDL_FALSE; + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + + if ([data->listener setFullscreenSpace:(state ? YES : NO)]) { + succeeded = SDL_TRUE; + } + + [pool release]; + + return succeeded; +} + #endif /* SDL_VIDEO_DRIVER_COCOA */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_WM.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_WM.c index 83912bde..202e7b02 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_WM.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_WM.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_dyn.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_dyn.c index cbbfa175..8b7fa808 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_dyn.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_dyn.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_events.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_events.c index cb669bce..f5cd6ef3 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_events.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_events.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_modes.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_modes.c index c6d1bb49..0b54acd1 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_modes.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_modes.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_mouse.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_mouse.c index fb5ed4e7..7c630456 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_mouse.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_mouse.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_opengl.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_opengl.c index fac05e6f..16b3bb14 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_opengl.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_opengl.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_render.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_render.c index 219f5207..c719e487 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_render.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_render.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB #include "SDL_DirectFB_window.h" diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_shape.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_shape.c index 358078f1..75ca63b6 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_shape.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_shape.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.c index 4e5eae4e..f701d7f1 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB @@ -35,7 +35,7 @@ #include "SDL_DirectFB_WM.h" -#include "SDL_config.h" +#include "../../SDL_internal.h" /* DirectFB video driver implementation. */ diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.h b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.h index b40bac0d..77f6d72d 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.h +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_video.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_DirectFB_video_h #define _SDL_DirectFB_video_h diff --git a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_window.c b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_window.c index e373d4be..4913f7cf 100644 --- a/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_window.c +++ b/jni/SDL2-2.0.1/src/video/directfb/SDL_DirectFB_window.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DIRECTFB diff --git a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents.c b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents.c index 8315609a..2271a48c 100644 --- a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents.c +++ b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DUMMY diff --git a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents_c.h b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents_c.h index 1a8294cb..e18bab9a 100644 --- a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents_c.h +++ b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullevents_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL_nullvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer.c b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer.c index f18ceea2..93fafe48 100644 --- a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer.c +++ b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DUMMY diff --git a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer_c.h b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer_c.h index 57dd2adb..ddd331d7 100644 --- a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer_c.h +++ b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullframebuffer_c.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int SDL_DUMMY_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); extern int SDL_DUMMY_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); diff --git a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.c b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.c index 9d6ea678..48cbd2d1 100644 --- a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.c +++ b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_DUMMY diff --git a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.h b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.h index 7d0a8259..94497c38 100644 --- a/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.h +++ b/jni/SDL2-2.0.1/src/video/dummy/SDL_nullvideo.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_nullvideo_h #define _SDL_nullvideo_h diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_BWin.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_BWin.h similarity index 99% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_BWin.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_BWin.h index 6b6a71e4..5aca508c 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_BWin.h +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_BWin.h @@ -26,7 +26,7 @@ extern "C" { #endif -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "SDL.h" #include "SDL_syswm.h" #include "SDL_bframebuffer.h" @@ -43,7 +43,7 @@ extern "C" { #include #endif #include "SDL_events.h" -#include "../../main/beos/SDL_BApp.h" +#include "../../main/haiku/SDL_BApp.h" enum WinCommands { @@ -83,6 +83,8 @@ class SDL_BWin:public BDirectWindow _trash_window_buffer = false; _buffer_locker = new BLocker(); _bitmap = NULL; + _clips = NULL; + #ifdef DRAWTHREAD _draw_thread_id = spawn_thread(BE_DrawThread, "drawing_thread", B_NORMAL_PRIORITY, (void*) this); @@ -349,7 +351,7 @@ class SDL_BWin:public BDirectWindow default: /* move it after switch{} so it's always handled - that way we keep BeOS feautures like: + that way we keep Haiku features like: - CTRL+Q to close window (and other shortcuts) - PrintScreen to make screenshot into /boot/home - etc.. */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bclipboard.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bclipboard.cc similarity index 96% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bclipboard.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bclipboard.cc index 2ec80c6b..b75655f3 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bclipboard.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bclipboard.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU /* BWindow based framebuffer implementation */ @@ -92,4 +92,4 @@ SDL_bool BE_HasClipboardText(_THIS) { } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bclipboard.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bclipboard.h similarity index 97% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bclipboard.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bclipboard.h index 9ffbf9e7..2a572ffe 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bclipboard.h +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bclipboard.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef SDL_BCLIPBOARD_H #define SDL_BCLIPBOARD_H diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bevents.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bevents.cc similarity index 92% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bevents.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bevents.cc index e01e8b27..0fe93057 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bevents.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bevents.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU #include "SDL_bevents.h" @@ -36,4 +36,4 @@ void BE_PumpEvents(_THIS) { } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bevents.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bevents.h similarity index 100% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bevents.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bevents.h diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bframebuffer.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bframebuffer.cc similarity index 97% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bframebuffer.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bframebuffer.cc index 69f4a43a..4ca28ab6 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bframebuffer.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bframebuffer.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU #include "SDL_bframebuffer.h" @@ -29,7 +29,7 @@ #include "SDL_bmodes.h" #include "SDL_BWin.h" -#include "../../main/beos/SDL_BApp.h" +#include "../../main/haiku/SDL_BApp.h" #ifdef __cplusplus extern "C" { @@ -251,4 +251,4 @@ int32 BE_UpdateOnce(SDL_Window *window) { } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bframebuffer.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bframebuffer.h similarity index 100% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bframebuffer.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bframebuffer.h diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bkeyboard.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bkeyboard.cc similarity index 98% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bkeyboard.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bkeyboard.cc index 41eb6cad..c6ba1614 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bkeyboard.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bkeyboard.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU #include #include @@ -185,4 +185,4 @@ void BE_SetKeyState(int32 bkey, int8 state) { } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bkeyboard.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bkeyboard.h similarity index 100% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bkeyboard.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bkeyboard.h diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bmodes.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bmodes.cc similarity index 98% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bmodes.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bmodes.cc index 44e19dc7..cf358d7f 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bmodes.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bmodes.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU #include #include @@ -31,7 +31,7 @@ #include "SDL_bopengl.h" #endif -#include "../../main/beos/SDL_BApp.h" +#include "../../main/haiku/SDL_BApp.h" #ifdef __cplusplus extern "C" { @@ -328,4 +328,4 @@ int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){ } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bmodes.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bmodes.h similarity index 100% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bmodes.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bmodes.h diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bopengl.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bopengl.cc similarity index 97% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bopengl.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bopengl.cc index 13b90ad9..22bc087d 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bopengl.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bopengl.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU #include "SDL_bopengl.h" @@ -28,7 +28,7 @@ #include #include #include "SDL_BWin.h" -#include "../../main/beos/SDL_BApp.h" +#include "../../main/haiku/SDL_BApp.h" #ifdef __cplusplus extern "C" { @@ -216,4 +216,4 @@ void BE_GL_RebootContexts(_THIS) { } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bopengl.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bopengl.h similarity index 100% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bopengl.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bopengl.h diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bvideo.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bvideo.cc similarity index 96% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bvideo.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bvideo.cc index 19c03eed..812291a4 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bvideo.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bvideo.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU #ifdef __cplusplus @@ -119,8 +119,8 @@ BE_CreateDevice(int devindex) return device; } -VideoBootStrap BWINDOW_bootstrap = { - "bwindow", "BDirectWindow graphics", +VideoBootStrap HAIKU_bootstrap = { + "haiku", "Haiku graphics", BE_Available, BE_CreateDevice }; @@ -171,4 +171,4 @@ void BE_VideoQuit(_THIS) } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bvideo.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bvideo.h similarity index 96% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bvideo.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bvideo.h index e0e8e07d..7f0266a7 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bvideo.h +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bvideo.h @@ -26,7 +26,7 @@ extern "C" { #endif -#include "../../main/beos/SDL_BeApp.h" +#include "../../main/haiku/SDL_BeApp.h" #include "../SDL_sysvideo.h" diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bwindow.cc b/jni/SDL2-2.0.1/src/video/haiku/SDL_bwindow.cc similarity index 96% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bwindow.cc rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bwindow.cc index c898be6b..b3c309d1 100644 --- a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bwindow.cc +++ b/jni/SDL2-2.0.1/src/video/haiku/SDL_bwindow.cc @@ -18,9 +18,9 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" -#if SDL_VIDEO_DRIVER_BWINDOW +#if SDL_VIDEO_DRIVER_HAIKU #include "../SDL_sysvideo.h" #include "SDL_BWin.h" @@ -122,7 +122,7 @@ void BE_SetWindowTitle(_THIS, SDL_Window * window) { } void BE_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) { - /* FIXME: Icons not supported by BeOs/Haiku */ + /* FIXME: Icons not supported by Haiku */ } void BE_SetWindowPosition(_THIS, SDL_Window * window) { @@ -185,12 +185,12 @@ void BE_SetWindowFullscreen(_THIS, SDL_Window * window, } int BE_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) { - /* FIXME: Not BeOs/Haiku supported */ + /* FIXME: Not Haiku supported */ return -1; } int BE_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) { - /* FIXME: Not BeOs/Haiku supported */ + /* FIXME: Not Haiku supported */ return -1; } @@ -220,4 +220,4 @@ SDL_bool BE_GetWindowWMInfo(_THIS, SDL_Window * window, } #endif -#endif /* SDL_VIDEO_DRIVER_BWINDOW */ +#endif /* SDL_VIDEO_DRIVER_HAIKU */ diff --git a/jni/SDL2-2.0.1/src/video/bwindow/SDL_bwindow.h b/jni/SDL2-2.0.1/src/video/haiku/SDL_bwindow.h similarity index 100% rename from jni/SDL2-2.0.1/src/video/bwindow/SDL_bwindow.h rename to jni/SDL2-2.0.1/src/video/haiku/SDL_bwindow.h diff --git a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.c b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.c index 1ebf8295..2e182bb1 100644 --- a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.c +++ b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_PANDORA diff --git a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.h b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.h index 05aafda2..a5edcd41 100644 --- a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.h +++ b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora.h @@ -24,7 +24,7 @@ #include -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "../SDL_sysvideo.h" typedef struct SDL_VideoData diff --git a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.c b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.c index de035190..32592821 100644 --- a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.c +++ b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_PANDORA diff --git a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.h b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.h index 9aee7247..aefe6f74 100644 --- a/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.h +++ b/jni/SDL2-2.0.1/src/video/pandora/SDL_pandora_events.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern void PND_PumpEvents(_THIS); diff --git a/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.c b/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.c index 64b48eb5..bc68a660 100644 --- a/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.c +++ b/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_PSP diff --git a/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.h b/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.h index 5b6435f5..0ade001a 100644 --- a/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.h +++ b/jni/SDL2-2.0.1/src/video/psp/SDL_pspvideo.h @@ -24,7 +24,7 @@ #include -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "../SDL_sysvideo.h" typedef struct SDL_VideoData diff --git a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpievents.c b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpievents.c index 8c420fe7..7e8559c7 100644 --- a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpievents.c +++ b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpievents.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_RPI @@ -30,7 +30,7 @@ #include "SDL_rpievents_c.h" #ifdef SDL_INPUT_LINUXEV -#include "../../input/evdev/SDL_evdev.h" +#include "../../core/linux/SDL_evdev.h" #endif void RPI_PumpEvents(_THIS) diff --git a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpimouse.c b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpimouse.c index 429214b9..6d222d3d 100644 --- a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpimouse.c +++ b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpimouse.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_RPI diff --git a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.c b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.c index 23c89fe0..46d7e029 100644 --- a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.c +++ b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_RPI && SDL_VIDEO_OPENGL_EGL diff --git a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.h b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.h index deb4b2f3..e1afa701 100644 --- a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.h +++ b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpiopengles.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_rpiopengles_h #define _SDL_rpiopengles_h @@ -26,7 +26,7 @@ #if SDL_VIDEO_DRIVER_RPI && SDL_VIDEO_OPENGL_EGL #include "../SDL_sysvideo.h" -#include "../SDL_egl.h" +#include "../SDL_egl_c.h" /* OpenGLES functions */ #define RPI_GLES_GetAttribute SDL_EGL_GetAttribute diff --git a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.c b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.c index dfad9ba7..f9922b5f 100644 --- a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.c +++ b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_RPI @@ -40,7 +40,7 @@ #include "../../events/SDL_keyboard_c.h" #ifdef SDL_INPUT_LINUXEV -#include "../../input/evdev/SDL_evdev.h" +#include "../../core/linux/SDL_evdev.h" #endif /* RPI declarations */ @@ -281,6 +281,22 @@ RPI_CreateWindow(_THIS, SDL_Window * window) return 0; } +void +RPI_DestroyWindow(_THIS, SDL_Window * window) +{ + SDL_WindowData *data; + + if(window->driverdata) { + data = (SDL_WindowData *) window->driverdata; + if (data->egl_surface != EGL_NO_SURFACE) { + SDL_EGL_DestroySurface(_this, data->egl_surface); + data->egl_surface = EGL_NO_SURFACE; + } + SDL_free(window->driverdata); + window->driverdata = NULL; + } +} + int RPI_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) { @@ -331,10 +347,6 @@ void RPI_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { -} -void -RPI_DestroyWindow(_THIS, SDL_Window * window) -{ } /*****************************************************************************/ diff --git a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.h b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.h index 6359badc..14be2e42 100644 --- a/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.h +++ b/jni/SDL2-2.0.1/src/video/raspberry/SDL_rpivideo.h @@ -22,7 +22,7 @@ #ifndef __SDL_RPIVIDEO_H__ #define __SDL_RPIVIDEO_H__ -#include "SDL_config.h" +#include "../../SDL_internal.h" #include "../SDL_sysvideo.h" #include "bcm_host.h" diff --git a/jni/SDL2-2.0.1/src/video/sdlgenblit.pl b/jni/SDL2-2.0.1/src/video/sdlgenblit.pl index 1097488f..fb87f750 100755 --- a/jni/SDL2-2.0.1/src/video/sdlgenblit.pl +++ b/jni/SDL2-2.0.1/src/video/sdlgenblit.pl @@ -100,7 +100,7 @@ sub open_file { misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../SDL_internal.h" /* *INDENT-OFF* */ diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitappdelegate.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitappdelegate.m index 4a323200..7078ac5d 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitappdelegate.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitappdelegate.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitevents.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitevents.m index 16c120d7..c94bff4b 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitevents.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitevents.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.h b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.h index 7bee1ec1..f5817579 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.h +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.m index 5ec7e8b4..c01f9bc8 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmessagebox.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.h b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.h index 249bda16..edc4ca2e 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.h +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_uikitmodes_h #define _SDL_uikitmodes_h diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.m index f093a81c..54c27736 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitmodes.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopengles.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopengles.m index d1cb2074..f782ffd1 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopengles.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopengles.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopenglview.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopenglview.m index b43f3455..4a9a69e8 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopenglview.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitopenglview.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitvideo.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitvideo.m index 74b24b8d..c19c637f 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitvideo.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitvideo.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT @@ -89,6 +89,7 @@ UIKit_CreateDevice(int devindex) device->ShowScreenKeyboard = UIKit_ShowScreenKeyboard; device->HideScreenKeyboard = UIKit_HideScreenKeyboard; device->IsScreenKeyboardShown = UIKit_IsScreenKeyboardShown; + device->SetTextInputRect = UIKit_SetTextInputRect; #endif /* OpenGL (ES) functions */ diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.h b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.h index ff8a7d2c..3921be13 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.h +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.h @@ -45,6 +45,8 @@ #if SDL_IPHONE_KEYBOARD UITextField *textField; BOOL keyboardVisible; + SDL_Rect textInputRect; + int keyboardHeight; #endif @public @@ -60,11 +62,14 @@ - (void)hideKeyboard; - (void)initializeKeyboard; @property (readonly) BOOL keyboardVisible; +@property (nonatomic,assign) SDL_Rect textInputRect; +@property (nonatomic,assign) int keyboardHeight; SDL_bool UIKit_HasScreenKeyboardSupport(_THIS); void UIKit_ShowScreenKeyboard(_THIS, SDL_Window *window); void UIKit_HideScreenKeyboard(_THIS, SDL_Window *window); SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window); +void UIKit_SetTextInputRect(_THIS, SDL_Rect *rect); #endif diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.m index 66129be2..841ebbb3 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitview.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT @@ -35,6 +35,8 @@ #include "SDL_uikitmodes.h" #include "SDL_uikitwindow.h" +void _uikit_keyboard_init() ; + @implementation SDL_uikitview - (void)dealloc @@ -197,6 +199,9 @@ */ #if SDL_IPHONE_KEYBOARD +@synthesize textInputRect = textInputRect; +@synthesize keyboardHeight = keyboardHeight; + /* Is the iPhone virtual keyboard visible onscreen? */ - (BOOL)keyboardVisible { @@ -225,6 +230,8 @@ /* add the UITextField (hidden) to our view */ [self addSubview: textField]; [textField release]; + + _uikit_keyboard_init(); } /* reveal onscreen virtual keyboard */ @@ -352,6 +359,103 @@ SDL_bool UIKit_IsScreenKeyboardShown(_THIS, SDL_Window *window) return view.keyboardVisible; } + +void _uikit_keyboard_update() { + SDL_Window *window = SDL_GetFocusWindow(); + if (!window) { return; } + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + if (!data) { return; } + SDL_uikitview *view = data->view; + if (!view) { return; } + + SDL_Rect r = view.textInputRect; + int height = view.keyboardHeight; + int offsetx = 0; + int offsety = 0; + if (height) { + int sw,sh; + SDL_GetWindowSize(window,&sw,&sh); + int bottom = (r.y + r.h); + int kbottom = sh - height; + if (kbottom < bottom) { + offsety = kbottom-bottom; + } + } + UIInterfaceOrientation ui_orient = [[UIApplication sharedApplication] statusBarOrientation]; + if (ui_orient == UIInterfaceOrientationLandscapeLeft) { + int tmp = offsetx; offsetx = offsety; offsety = tmp; + } + if (ui_orient == UIInterfaceOrientationLandscapeRight) { + offsety = -offsety; + int tmp = offsetx; offsetx = offsety; offsety = tmp; + } + if (ui_orient == UIInterfaceOrientationPortraitUpsideDown) { + offsety = -offsety; + } + if ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)]) { + float scale = [UIScreen mainScreen].scale; + offsetx /= scale; + offsety /= scale; + } + view.frame = CGRectMake(offsetx,offsety,view.frame.size.width,view.frame.size.height); +} + +void _uikit_keyboard_set_height(int height) { + SDL_uikitview *view = getWindowView(SDL_GetFocusWindow()); + if (view == nil) { + return ; + } + + view.keyboardHeight = height; + _uikit_keyboard_update(); +} + +void _uikit_keyboard_init() { + NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; + NSOperationQueue *queue = [NSOperationQueue mainQueue]; + [center addObserverForName:UIKeyboardWillShowNotification + object:nil + queue:queue + usingBlock:^(NSNotification *notification) { + int height = 0; + CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; + height = keyboardSize.height; + UIInterfaceOrientation ui_orient = [[UIApplication sharedApplication] statusBarOrientation]; + if (ui_orient == UIInterfaceOrientationLandscapeRight || ui_orient == UIInterfaceOrientationLandscapeLeft) { + height = keyboardSize.width; + } + if ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)]) { + height *= [UIScreen mainScreen].scale; + } + _uikit_keyboard_set_height(height); + } + ]; + [center addObserverForName:UIKeyboardDidHideNotification + object:nil + queue:queue + usingBlock:^(NSNotification *notification) { + _uikit_keyboard_set_height(0); + } + ]; +} + +void +UIKit_SetTextInputRect(_THIS, SDL_Rect *rect) +{ + if (!rect) { + SDL_InvalidParamError("rect"); + return; + } + + SDL_uikitview *view = getWindowView(SDL_GetFocusWindow()); + if (view == nil) { + return ; + } + + view.textInputRect = *rect; +} + + #endif /* SDL_IPHONE_KEYBOARD */ #endif /* SDL_VIDEO_DRIVER_UIKIT */ diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitviewcontroller.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitviewcontroller.m index 077c160d..df7b90e6 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitviewcontroller.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitviewcontroller.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitwindow.m b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitwindow.m index a8b8e677..08b91949 100644 --- a/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitwindow.m +++ b/jni/SDL2-2.0.1/src/video/uikit/SDL_uikitwindow.m @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_UIKIT diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents.c b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents.c new file mode 100644 index 00000000..b002a050 --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents.c @@ -0,0 +1,381 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" + +#include "SDL_stdinc.h" +#include "SDL_assert.h" + +#include "../../events/SDL_sysevents.h" +#include "../../events/SDL_events_c.h" +#include "../../events/scancodes_xfree86.h" + +#include "SDL_waylandvideo.h" +#include "SDL_waylandevents_c.h" +#include "SDL_waylandwindow.h" + +#include +#include +#include +#include +#include +#include +#include + +struct SDL_WaylandInput { + SDL_VideoData *display; + struct wl_seat *seat; + struct wl_pointer *pointer; + struct wl_keyboard *keyboard; + SDL_WindowData *pointer_focus; + SDL_WindowData *keyboard_focus; + + struct { + struct xkb_keymap *keymap; + struct xkb_state *state; + } xkb; +}; + +void +Wayland_PumpEvents(_THIS) +{ + SDL_VideoData *d = _this->driverdata; + struct pollfd pfd[1]; + + pfd[0].fd = wl_display_get_fd(d->display); + pfd[0].events = POLLIN; + poll(pfd, 1, 0); + + if (pfd[0].revents & POLLIN) + wl_display_dispatch(d->display); + else + wl_display_dispatch_pending(d->display); +} + +static void +pointer_handle_enter(void *data, struct wl_pointer *pointer, + uint32_t serial, struct wl_surface *surface, + wl_fixed_t sx_w, wl_fixed_t sy_w) +{ + struct SDL_WaylandInput *input = data; + SDL_WindowData *window; + + if (!surface) { + /* enter event for a window we've just destroyed */ + return; + } + + input->pointer_focus = wl_surface_get_user_data(surface); + window = input->pointer_focus; + SDL_SetMouseFocus(window->sdlwindow); +} + +static void +pointer_handle_leave(void *data, struct wl_pointer *pointer, + uint32_t serial, struct wl_surface *surface) +{ + struct SDL_WaylandInput *input = data; + + SDL_SetMouseFocus(NULL); + input->pointer_focus = NULL; +} + +static void +pointer_handle_motion(void *data, struct wl_pointer *pointer, + uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w) +{ + struct SDL_WaylandInput *input = data; + SDL_WindowData *window = input->pointer_focus; + int sx = wl_fixed_to_int(sx_w); + int sy = wl_fixed_to_int(sy_w); + + SDL_SendMouseMotion(window->sdlwindow, 0, 0, sx, sy); +} + +static void +pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial, + uint32_t time, uint32_t button, uint32_t state_w) +{ + struct SDL_WaylandInput *input = data; + SDL_WindowData *window = input->pointer_focus; + enum wl_pointer_button_state state = state_w; + uint32_t sdl_button; + + switch (button) { + case BTN_LEFT: + sdl_button = SDL_BUTTON_LEFT; + break; + case BTN_MIDDLE: + sdl_button = SDL_BUTTON_MIDDLE; + break; + case BTN_RIGHT: + sdl_button = SDL_BUTTON_RIGHT; + break; + case BTN_SIDE: + sdl_button = SDL_BUTTON_X1; + break; + case BTN_EXTRA: + sdl_button = SDL_BUTTON_X2; + break; + default: + return; + } + + SDL_SendMouseButton(window->sdlwindow, 0, + state ? SDL_PRESSED : SDL_RELEASED, sdl_button); +} + +static void +pointer_handle_axis(void *data, struct wl_pointer *pointer, + uint32_t time, uint32_t axis, wl_fixed_t value) +{ + struct SDL_WaylandInput *input = data; + SDL_WindowData *window = input->pointer_focus; + enum wl_pointer_axis a = axis; + int x, y; + + switch (a) { + case WL_POINTER_AXIS_VERTICAL_SCROLL: + x = 0; + y = wl_fixed_to_int(value); + break; + case WL_POINTER_AXIS_HORIZONTAL_SCROLL: + x = wl_fixed_to_int(value); + y = 0; + break; + default: + return; + } + + SDL_SendMouseWheel(window->sdlwindow, 0, x, y); +} + +static const struct wl_pointer_listener pointer_listener = { + pointer_handle_enter, + pointer_handle_leave, + pointer_handle_motion, + pointer_handle_button, + pointer_handle_axis, +}; + +static void +keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, + uint32_t format, int fd, uint32_t size) +{ + struct SDL_WaylandInput *input = data; + char *map_str; + + if (!data) { + close(fd); + return; + } + + if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { + close(fd); + return; + } + + map_str = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); + if (map_str == MAP_FAILED) { + close(fd); + return; + } + + input->xkb.keymap = xkb_map_new_from_string(input->display->xkb_context, + map_str, + XKB_KEYMAP_FORMAT_TEXT_V1, + 0); + munmap(map_str, size); + close(fd); + + if (!input->xkb.keymap) { + fprintf(stderr, "failed to compile keymap\n"); + return; + } + + input->xkb.state = xkb_state_new(input->xkb.keymap); + if (!input->xkb.state) { + fprintf(stderr, "failed to create XKB state\n"); + xkb_map_unref(input->xkb.keymap); + input->xkb.keymap = NULL; + return; + } +} + +static void +keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, + uint32_t serial, struct wl_surface *surface, + struct wl_array *keys) +{ + struct SDL_WaylandInput *input = data; + SDL_WindowData *window = wl_surface_get_user_data(surface); + + input->keyboard_focus = window; + window->keyboard_device = input; + SDL_SetKeyboardFocus(window->sdlwindow); +} + +static void +keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, + uint32_t serial, struct wl_surface *surface) +{ + SDL_SetKeyboardFocus(NULL); +} + +static void +keyboard_handle_key(void *data, struct wl_keyboard *keyboard, + uint32_t serial, uint32_t time, uint32_t key, + uint32_t state_w) +{ + struct SDL_WaylandInput *input = data; + SDL_WindowData *window = input->keyboard_focus; + enum wl_keyboard_key_state state = state_w; + const xkb_keysym_t *syms; + uint32_t scancode; + char text[8]; + int size; + + if (key < SDL_arraysize(xfree86_scancode_table2)) { + scancode = xfree86_scancode_table2[key]; + + // TODO when do we get WL_KEYBOARD_KEY_STATE_REPEAT? + if (scancode != SDL_SCANCODE_UNKNOWN) + SDL_SendKeyboardKey(state == WL_KEYBOARD_KEY_STATE_PRESSED ? + SDL_PRESSED : SDL_RELEASED, scancode); + } + + if (!window || window->keyboard_device != input || !input->xkb.state) + return; + + // TODO can this happen? + if (xkb_key_get_syms(input->xkb.state, key + 8, &syms) != 1) + return; + + if (state) { + size = xkb_keysym_to_utf8(syms[0], text, sizeof text); + + if (size > 0) { + text[size] = 0; + SDL_SendKeyboardText(text); + } + } +} + +static void +keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, + uint32_t serial, uint32_t mods_depressed, + uint32_t mods_latched, uint32_t mods_locked, + uint32_t group) +{ + struct SDL_WaylandInput *input = data; + + xkb_state_update_mask(input->xkb.state, mods_depressed, mods_latched, + mods_locked, 0, 0, group); +} + +static const struct wl_keyboard_listener keyboard_listener = { + keyboard_handle_keymap, + keyboard_handle_enter, + keyboard_handle_leave, + keyboard_handle_key, + keyboard_handle_modifiers, +}; + +static void +seat_handle_capabilities(void *data, struct wl_seat *seat, + enum wl_seat_capability caps) +{ + struct SDL_WaylandInput *input = data; + + if ((caps & WL_SEAT_CAPABILITY_POINTER) && !input->pointer) { + input->pointer = wl_seat_get_pointer(seat); + input->display->pointer = input->pointer; + wl_pointer_set_user_data(input->pointer, input); + wl_pointer_add_listener(input->pointer, &pointer_listener, + input); + } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && input->pointer) { + wl_pointer_destroy(input->pointer); + input->pointer = NULL; + } + + if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !input->keyboard) { + input->keyboard = wl_seat_get_keyboard(seat); + wl_keyboard_set_user_data(input->keyboard, input); + wl_keyboard_add_listener(input->keyboard, &keyboard_listener, + input); + } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && input->keyboard) { + wl_keyboard_destroy(input->keyboard); + input->keyboard = NULL; + } +} + +static const struct wl_seat_listener seat_listener = { + seat_handle_capabilities, +}; + +void +Wayland_display_add_input(SDL_VideoData *d, uint32_t id) +{ + struct SDL_WaylandInput *input; + + input = malloc(sizeof *input); + if (input == NULL) + return; + + memset(input, 0, sizeof *input); + input->display = d; + input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface, 1); + + d->input = input; + + wl_seat_add_listener(input->seat, &seat_listener, input); + wl_seat_set_user_data(input->seat, input); + + wayland_schedule_write(d); +} + +void Wayland_display_destroy_input(SDL_VideoData *d) +{ + struct SDL_WaylandInput *input = d->input; + + if (!input) + return; + + if (input->keyboard) + wl_keyboard_destroy(input->keyboard); + + if (input->pointer) + wl_pointer_destroy(input->pointer); + + if (input->seat) + wl_seat_destroy(input->seat); + + if (input->xkb.state) + xkb_state_unref(input->xkb.state); + + if (input->xkb.keymap) + xkb_map_unref(input->xkb.keymap); + + free(input); + d->input = NULL; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents_c.h b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents_c.h new file mode 100644 index 00000000..ed5ff7cc --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandevents_c.h @@ -0,0 +1,37 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" + +#ifndef _SDL_waylandevents_h +#define _SDL_waylandevents_h + +#include "SDL_waylandvideo.h" +#include "SDL_waylandwindow.h" + +extern void Wayland_PumpEvents(_THIS); + +extern void Wayland_display_add_input(SDL_VideoData *d, uint32_t id); +extern void Wayland_display_destroy_input(SDL_VideoData *d); + +#endif /* _SDL_waylandevents_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandmouse.c b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandmouse.c new file mode 100644 index 00000000..62c65e94 --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandmouse.c @@ -0,0 +1,407 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include "../SDL_sysvideo.h" + +#include "SDL_config.h" +#include "SDL_mouse.h" +#include "../../events/SDL_mouse_c.h" +#include "SDL_waylandvideo.h" +#include "SDL_waylandevents_c.h" + +#include "SDL_assert.h" + +#if SDL_VIDEO_DRIVER_WAYLAND + +typedef struct { + struct wl_buffer *buffer; + struct wl_surface *surface; + + int hot_x, hot_y; + + /* Either a preloaded cursor, or one we created ourselves */ + struct wl_cursor *cursor; + void *shm_data; +} Wayland_CursorData; + +static int +wayland_create_tmp_file(off_t size) +{ + static const char template[] = "/sdl-shared-XXXXXX"; + char *xdg_path; + char tmp_path[PATH_MAX]; + int fd; + + xdg_path = SDL_getenv("XDG_RUNTIME_DIR"); + if (!xdg_path) { + errno = ENOENT; + return -1; + } + + SDL_strlcpy(tmp_path, xdg_path, PATH_MAX); + SDL_strlcat(tmp_path, template, PATH_MAX); + + fd = mkostemp(tmp_path, O_CLOEXEC); + if (fd < 0) + return -1; + + if (ftruncate(fd, size) < 0) { + close(fd); + return -1; + } + + return fd; +} + +static void +mouse_buffer_release(void *data, struct wl_buffer *buffer) +{ +} + +static const struct wl_buffer_listener mouse_buffer_listener = { + mouse_buffer_release +}; + +static int +create_buffer_from_shm(Wayland_CursorData *d, + int width, + int height, + uint32_t format) +{ + SDL_VideoDevice *vd = SDL_GetVideoDevice(); + SDL_VideoData *data = (SDL_VideoData *) vd->driverdata; + + int stride = width * 4; + int size = stride * height; + + int shm_fd; + + shm_fd = wayland_create_tmp_file(size); + if (shm_fd < 0) + { + fprintf(stderr, "creating mouse cursor buffer failed!\n"); + return -1; + } + + d->shm_data = mmap(NULL, + size, + PROT_READ | PROT_WRITE, + MAP_SHARED, + shm_fd, + 0); + if (data == MAP_FAILED) { + d->shm_data = NULL; + fprintf (stderr, "mmap () failed\n"); + close (shm_fd); + } + + struct wl_shm_pool *shm_pool = wl_shm_create_pool(data->shm, + shm_fd, + size); + d->buffer = wl_shm_pool_create_buffer(shm_pool, + 0, + width, + height, + stride, + format); + wl_buffer_add_listener(d->buffer, + &mouse_buffer_listener, + d); + + wl_shm_pool_destroy (shm_pool); + close (shm_fd); + + return 0; +} + +static SDL_Cursor * +Wayland_CreateCursor(SDL_Surface *surface, int hot_x, int hot_y) +{ + SDL_Cursor *cursor; + + cursor = calloc(1, sizeof (*cursor)); + if (cursor) { + SDL_VideoDevice *vd = SDL_GetVideoDevice (); + SDL_VideoData *wd = (SDL_VideoData *) vd->driverdata; + Wayland_CursorData *data = calloc (1, sizeof (Wayland_CursorData)); + cursor->driverdata = (void *) data; + + /* Assume ARGB8888 */ + SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888); + SDL_assert(surface->pitch == surface->w * 4); + + /* Allocate shared memory buffer for this cursor */ + if (create_buffer_from_shm (data, + surface->w, + surface->h, + WL_SHM_FORMAT_XRGB8888) < 0) + { + free (cursor->driverdata); + free (cursor); + return NULL; + } + + SDL_memcpy(data->shm_data, + surface->pixels, + surface->h * surface->pitch); + + data->surface = wl_compositor_create_surface(wd->compositor); + wl_surface_attach(data->surface, + data->buffer, + 0, + 0); + wl_surface_damage(data->surface, + 0, + 0, + surface->w, + surface->h); + wl_surface_commit(data->surface); + + data->hot_x = hot_x; + data->hot_y = hot_y; + } + + return cursor; +} + +static SDL_Cursor * +CreateCursorFromWlCursor(SDL_VideoData *d, struct wl_cursor *wlcursor) +{ + SDL_Cursor *cursor; + + cursor = calloc(1, sizeof (*cursor)); + if (cursor) { + Wayland_CursorData *data = calloc (1, sizeof (Wayland_CursorData)); + cursor->driverdata = (void *) data; + + /* The wl_buffer here will be destroyed from wl_cursor_theme_destroy + * if we are fetching this from a wl_cursor_theme, so don't store a + * reference to it here */ + data->buffer = NULL; + data->surface = wl_compositor_create_surface(d->compositor); + wl_surface_attach(data->surface, + wl_cursor_image_get_buffer(wlcursor->images[0]), + 0, + 0); + wl_surface_damage(data->surface, + 0, + 0, + wlcursor->images[0]->width, + wlcursor->images[0]->height); + wl_surface_commit(data->surface); + data->hot_x = wlcursor->images[0]->hotspot_x; + data->hot_y = wlcursor->images[0]->hotspot_y; + data->cursor= wlcursor; + } else { + SDL_OutOfMemory (); + } + + return cursor; +} + +static SDL_Cursor * +Wayland_CreateDefaultCursor() +{ + SDL_VideoDevice *device = SDL_GetVideoDevice(); + SDL_VideoData *data = device->driverdata; + + return CreateCursorFromWlCursor (data, + wl_cursor_theme_get_cursor(data->cursor_theme, + "left_ptr")); +} + +static SDL_Cursor * +Wayland_CreateSystemCursor(SDL_SystemCursor id) +{ + SDL_VideoDevice *vd = SDL_GetVideoDevice(); + SDL_VideoData *d = vd->driverdata; + + struct wl_cursor *cursor = NULL; + + switch(id) + { + default: + SDL_assert(0); + return NULL; + case SDL_SYSTEM_CURSOR_ARROW: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "left_ptr"); + break; + case SDL_SYSTEM_CURSOR_IBEAM: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "xterm"); + break; + case SDL_SYSTEM_CURSOR_WAIT: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "wait"); + break; + case SDL_SYSTEM_CURSOR_CROSSHAIR: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1"); + break; + case SDL_SYSTEM_CURSOR_WAITARROW: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "wait"); + break; + case SDL_SYSTEM_CURSOR_SIZENWSE: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1"); + break; + case SDL_SYSTEM_CURSOR_SIZENESW: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1"); + break; + case SDL_SYSTEM_CURSOR_SIZEWE: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1"); + break; + case SDL_SYSTEM_CURSOR_SIZENS: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1"); + break; + case SDL_SYSTEM_CURSOR_SIZEALL: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1"); + break; + case SDL_SYSTEM_CURSOR_NO: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "xterm"); + break; + case SDL_SYSTEM_CURSOR_HAND: + cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "hand1"); + break; + } + + SDL_Cursor *sdl_cursor = CreateCursorFromWlCursor (d, cursor); + + return sdl_cursor; +} + +static void +Wayland_FreeCursor(SDL_Cursor *cursor) +{ + if (!cursor) + return; + + Wayland_CursorData *d = cursor->driverdata; + + /* Probably not a cursor we own */ + if (!d) + return; + + if (d->buffer) + wl_buffer_destroy(d->buffer); + + if (d->surface) + wl_surface_destroy(d->surface); + + /* Not sure what's meant to happen to shm_data */ + free (cursor->driverdata); + SDL_free(cursor); +} + +static int +Wayland_ShowCursor(SDL_Cursor *cursor) +{ + SDL_VideoDevice *vd = SDL_GetVideoDevice(); + SDL_VideoData *d = vd->driverdata; + + struct wl_pointer *pointer = d->pointer; + + if (!pointer) + return -1; + + if (cursor) + { + Wayland_CursorData *data = cursor->driverdata; + + wl_pointer_set_cursor (pointer, 0, + data->surface, + data->hot_x, + data->hot_y); + } + else + { + wl_pointer_set_cursor (pointer, 0, + NULL, + 0, + 0); + } + + return 0; +} + +static void +Wayland_WarpMouse(SDL_Window *window, int x, int y) +{ + SDL_Unsupported(); + return; +} + +static int +Wayland_SetRelativeMouseMode(SDL_bool enabled) +{ + SDL_Unsupported(); + return -1; +} + +void +Wayland_InitMouse(void) +{ + SDL_Mouse *mouse = SDL_GetMouse(); + + mouse->CreateCursor = Wayland_CreateCursor; + mouse->CreateSystemCursor = Wayland_CreateSystemCursor; + mouse->ShowCursor = Wayland_ShowCursor; + mouse->FreeCursor = Wayland_FreeCursor; + mouse->WarpMouse = Wayland_WarpMouse; + mouse->SetRelativeMouseMode = Wayland_SetRelativeMouseMode; + + SDL_SetDefaultCursor(Wayland_CreateDefaultCursor()); +} + +void +Wayland_FiniMouse(void) +{ + /* This effectively assumes that nobody else + * touches SDL_Mouse which is effectively + * a singleton */ + + SDL_Mouse *mouse = SDL_GetMouse(); + + /* Free the current cursor if not the same pointer as + * the default cursor */ + if (mouse->def_cursor != mouse->cur_cursor) + Wayland_FreeCursor (mouse->cur_cursor); + + Wayland_FreeCursor (mouse->def_cursor); + mouse->def_cursor = NULL; + mouse->cur_cursor = NULL; + + mouse->CreateCursor = NULL; + mouse->CreateSystemCursor = NULL; + mouse->ShowCursor = NULL; + mouse->FreeCursor = NULL; + mouse->WarpMouse = NULL; + mouse->SetRelativeMouseMode = NULL; +} +#endif diff --git a/jni/SDL2-2.0.1/src/thread/beos/SDL_systhread_c.h b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandmouse.h similarity index 76% rename from jni/SDL2-2.0.1/src/thread/beos/SDL_systhread_c.h rename to jni/SDL2-2.0.1/src/video/wayland/SDL_waylandmouse.h index a350ab59..f434b9d8 100644 --- a/jni/SDL2-2.0.1/src/thread/beos/SDL_systhread_c.h +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandmouse.h @@ -18,15 +18,14 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ + #include "SDL_config.h" +#include "SDL_mouse.h" +#include "SDL_waylandvideo.h" -#include -#include +#if SDL_VIDEO_DRIVER_WAYLAND -typedef thread_id SYS_ThreadHandle; +extern void Wayland_InitMouse(void); +extern void Wayland_FiniMouse(void); -/* Functions needed to work with system threads in other portions of SDL */ -extern void SDL_MaskSignals(sigset_t * omask); -extern void SDL_UnmaskSignals(sigset_t * omask); - -/* vi: set ts=4 sw=4 expandtab: */ +#endif diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.c b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.c new file mode 100644 index 00000000..7a138398 --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.c @@ -0,0 +1,90 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ +#include "SDL_config.h" + +#if SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL + +#include "SDL_waylandvideo.h" +#include "SDL_waylandopengles.h" +#include "SDL_waylandwindow.h" +#include "SDL_waylandevents_c.h" + +/* EGL implementation of SDL OpenGL ES support */ + +int +Wayland_GLES_LoadLibrary(_THIS, const char *path) { + int ret; + SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + + ret = SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) data->display); + + Wayland_PumpEvents(_this); + wayland_schedule_write(data); + + return ret; +} + + +SDL_GLContext +Wayland_GLES_CreateContext(_THIS, SDL_Window * window) +{ + SDL_GLContext context; + context = SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); + wayland_schedule_write(_this->driverdata); + + return context; +} + +void +Wayland_GLES_SwapWindow(_THIS, SDL_Window *window) +{ + SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface); + wayland_schedule_write(_this->driverdata); +} + + +int +Wayland_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) +{ + int ret; + + if (window && context) { + ret = SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context); + } + else { + ret = SDL_EGL_MakeCurrent(_this, NULL, NULL); + } + + wayland_schedule_write(_this->driverdata); + + return ret; +} + +void +Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context) +{ + SDL_EGL_DeleteContext(_this, context); + wayland_schedule_write(_this->driverdata); +} + +#endif /* SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL */ + +/* vi: set ts=4 sw=4 expandtab: */ \ No newline at end of file diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.h b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.h new file mode 100644 index 00000000..2deed0c1 --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandopengles.h @@ -0,0 +1,46 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ +#include "SDL_config.h" + +#ifndef _SDL_waylandopengles_h +#define _SDL_waylandopengles_h + +#include "../SDL_sysvideo.h" +#include "../SDL_egl_c.h" + +typedef struct SDL_PrivateGLESData +{ +} SDL_PrivateGLESData; + +/* OpenGLES functions */ +#define Wayland_GLES_GetAttribute SDL_EGL_GetAttribute +#define Wayland_GLES_GetProcAddress SDL_EGL_GetProcAddress +#define Wayland_GLES_UnloadLibrary SDL_EGL_UnloadLibrary +#define Wayland_GLES_SetSwapInterval SDL_EGL_SetSwapInterval +#define Wayland_GLES_GetSwapInterval SDL_EGL_GetSwapInterval + +extern int Wayland_GLES_LoadLibrary(_THIS, const char *path); +extern SDL_GLContext Wayland_GLES_CreateContext(_THIS, SDL_Window * window); +extern void Wayland_GLES_SwapWindow(_THIS, SDL_Window * window); +extern int Wayland_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +extern void Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context); + +#endif /* _SDL_waylandopengles_h */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.c b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.c new file mode 100644 index 00000000..9edf2e7e --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.c @@ -0,0 +1,253 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* Contributed by Thomas Perl */ + +#include "SDL_config.h" + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + +#include "SDL_waylandtouch.h" +#include "SDL_log.h" +#include "../../events/SDL_touch_c.h" + +struct SDL_WaylandTouch { + struct qt_touch_extension *touch_extension; +}; + + +/** + * Qt TouchPointState + * adapted from qtbase/src/corelib/global/qnamespace.h + **/ +enum QtWaylandTouchPointState { + QtWaylandTouchPointPressed = 0x01, + QtWaylandTouchPointMoved = 0x02, + /* + Never sent by the server: + QtWaylandTouchPointStationary = 0x04, + */ + QtWaylandTouchPointReleased = 0x08, +}; + +static void +touch_handle_touch(void *data, + struct qt_touch_extension *qt_touch_extension, + uint32_t time, + uint32_t id, + uint32_t state, + int32_t x, + int32_t y, + int32_t normalized_x, + int32_t normalized_y, + int32_t width, + int32_t height, + uint32_t pressure, + int32_t velocity_x, + int32_t velocity_y, + uint32_t flags, + struct wl_array *rawdata) +{ + /** + * Event is assembled in QtWayland in TouchExtensionGlobal::postTouchEvent + * (src/compositor/wayland_wrapper/qwltouch.cpp) + **/ + + float FIXED_TO_FLOAT = 1. / 10000.; + float xf = FIXED_TO_FLOAT * x; + float yf = FIXED_TO_FLOAT * y; + + float PRESSURE_TO_FLOAT = 1. / 255.; + float pressuref = PRESSURE_TO_FLOAT * pressure; + + uint32_t touchState = state & 0xFFFF; + /* + Other fields that are sent by the server (qwltouch.cpp), + but not used at the moment can be decoded in this way: + + uint32_t sentPointCount = state >> 16; + uint32_t touchFlags = flags & 0xFFFF; + uint32_t capabilities = flags >> 16; + */ + + SDL_TouchID deviceId = 0; + if (!SDL_GetTouch(deviceId)) { + if (SDL_AddTouch(deviceId, "qt_touch_extension") < 0) { + SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__); + } + } + + switch (touchState) { + case QtWaylandTouchPointPressed: + case QtWaylandTouchPointReleased: + SDL_SendTouch(deviceId, (SDL_FingerID)id, + (touchState == QtWaylandTouchPointPressed) ? SDL_TRUE : SDL_FALSE, + xf, yf, pressuref); + break; + case QtWaylandTouchPointMoved: + SDL_SendTouchMotion(deviceId, (SDL_FingerID)id, xf, yf, pressuref); + break; + default: + /* Should not happen */ + break; + } +} + +static void +touch_handle_configure(void *data, + struct qt_touch_extension *qt_touch_extension, + uint32_t flags) +{ +} + +/* wayland-qt-touch-extension.c BEGINS */ + +static const struct qt_touch_extension_listener touch_listener = { + touch_handle_touch, + touch_handle_configure, +}; + +static const struct wl_interface *qt_touch_extension_types[] = { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +}; + +static const struct wl_message qt_touch_extension_requests[] = { + { "dummy", "", qt_touch_extension_types + 0 }, +}; + +static const struct wl_message qt_touch_extension_events[] = { + { "touch", "uuuiiiiiiuiiua", qt_touch_extension_types + 0 }, + { "configure", "u", qt_touch_extension_types + 0 }, +}; + +WL_EXPORT const struct wl_interface qt_touch_extension_interface = { + "qt_touch_extension", 1, + 1, qt_touch_extension_requests, + 2, qt_touch_extension_events, +}; + +/* wayland-qt-touch-extension.c ENDS */ + +/* wayland-qt-windowmanager.c BEGINS */ +static const struct wl_interface *qt_windowmanager_types[] = { + NULL, + NULL, +}; + +static const struct wl_message qt_windowmanager_requests[] = { + { "open_url", "us", qt_windowmanager_types + 0 }, +}; + +static const struct wl_message qt_windowmanager_events[] = { + { "hints", "i", qt_windowmanager_types + 0 }, + { "quit", "", qt_windowmanager_types + 0 }, +}; + +WL_EXPORT const struct wl_interface qt_windowmanager_interface = { + "qt_windowmanager", 1, + 1, qt_windowmanager_requests, + 2, qt_windowmanager_events, +}; +/* wayland-qt-windowmanager.c ENDS */ + +/* wayland-qt-surface-extension.c BEGINS */ +extern const struct wl_interface qt_extended_surface_interface; +extern const struct wl_interface wl_surface_interface; + +static const struct wl_interface *qt_surface_extension_types[] = { + NULL, + NULL, + &qt_extended_surface_interface, + &wl_surface_interface, +}; + +static const struct wl_message qt_surface_extension_requests[] = { + { "get_extended_surface", "no", qt_surface_extension_types + 2 }, +}; + +WL_EXPORT const struct wl_interface qt_surface_extension_interface = { + "qt_surface_extension", 1, + 1, qt_surface_extension_requests, + 0, NULL, +}; + +static const struct wl_message qt_extended_surface_requests[] = { + { "update_generic_property", "sa", qt_surface_extension_types + 0 }, + { "set_content_orientation", "i", qt_surface_extension_types + 0 }, + { "set_window_flags", "i", qt_surface_extension_types + 0 }, +}; + +static const struct wl_message qt_extended_surface_events[] = { + { "onscreen_visibility", "i", qt_surface_extension_types + 0 }, + { "set_generic_property", "sa", qt_surface_extension_types + 0 }, + { "close", "", qt_surface_extension_types + 0 }, +}; + +WL_EXPORT const struct wl_interface qt_extended_surface_interface = { + "qt_extended_surface", 1, + 3, qt_extended_surface_requests, + 3, qt_extended_surface_events, +}; + +/* wayland-qt-surface-extension.c ENDS */ + +void +Wayland_touch_create(SDL_VideoData *data, uint32_t id) +{ + if (data->touch) { + Wayland_touch_destroy(data); + } + + data->touch = malloc(sizeof(struct SDL_WaylandTouch)); + + struct SDL_WaylandTouch *touch = data->touch; + touch->touch_extension = wl_registry_bind(data->registry, id, &qt_touch_extension_interface, 1); + qt_touch_extension_add_listener(touch->touch_extension, &touch_listener, data); +} + +void +Wayland_touch_destroy(SDL_VideoData *data) +{ + if (data->touch) { + struct SDL_WaylandTouch *touch = data->touch; + if (touch->touch_extension) { + qt_touch_extension_destroy(touch->touch_extension); + } + + free(data->touch); + data->touch = NULL; + } +} + +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.h b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.h new file mode 100644 index 00000000..ccb645bd --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandtouch.h @@ -0,0 +1,351 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + +#ifndef _SDL_waylandtouch_h +#define _SDL_waylandtouch_h + +#include "SDL_waylandvideo.h" +#include +#include +#include "wayland-client.h" +#include "wayland-util.h" + +void Wayland_touch_create(SDL_VideoData *data, uint32_t id); +void Wayland_touch_destroy(SDL_VideoData *data); + +struct qt_touch_extension; + +/* Autogenerated QT headers */ + +/* + Support for Wayland with QmlCompositor as Server +================================================ + +The Wayland video driver has support for some additional features when +using QtWayland's "qmlcompositor" as Wayland server. This is needed for touch +input when running SDL applications under a qmlcompositor Wayland server. + +The files following headers have been +generated from the Wayland XML Protocol Definition in QtWayland as follows: + +Clone QtWayland from Git: + http://qt.gitorious.org/qt/qtwayland/ + +Generate headers and glue code: + for extension in touch-extension surface-extension windowmanager; do + wayland-scanner client-header < src/extensions/$extension.xml > wayland-qt-$extension.h + wayland-scanner code < src/extensions/$extension.xml > wayland-qt-$extension.c + done + +*/ + +/* wayland-qt-surface-extension.h */ + +struct wl_client; +struct wl_resource; + +struct qt_surface_extension; +struct qt_extended_surface; + +extern const struct wl_interface qt_surface_extension_interface; +extern const struct wl_interface qt_extended_surface_interface; + +#define QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE 0 + +static inline void +qt_surface_extension_set_user_data(struct qt_surface_extension *qt_surface_extension, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) qt_surface_extension, user_data); +} + +static inline void * +qt_surface_extension_get_user_data(struct qt_surface_extension *qt_surface_extension) +{ + return wl_proxy_get_user_data((struct wl_proxy *) qt_surface_extension); +} + +static inline void +qt_surface_extension_destroy(struct qt_surface_extension *qt_surface_extension) +{ + wl_proxy_destroy((struct wl_proxy *) qt_surface_extension); +} + +static inline struct qt_extended_surface * +qt_surface_extension_get_extended_surface(struct qt_surface_extension *qt_surface_extension, struct wl_surface *surface) +{ + struct wl_proxy *id; + + id = wl_proxy_create((struct wl_proxy *) qt_surface_extension, + &qt_extended_surface_interface); + if (!id) + return NULL; + + wl_proxy_marshal((struct wl_proxy *) qt_surface_extension, + QT_SURFACE_EXTENSION_GET_EXTENDED_SURFACE, id, surface); + + return (struct qt_extended_surface *) id; +} + +#ifndef QT_EXTENDED_SURFACE_ORIENTATION_ENUM +#define QT_EXTENDED_SURFACE_ORIENTATION_ENUM +enum qt_extended_surface_orientation { + QT_EXTENDED_SURFACE_ORIENTATION_PRIMARYORIENTATION = 0, + QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION = 1, + QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION = 2, + QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION = 4, + QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION = 8, +}; +#endif /* QT_EXTENDED_SURFACE_ORIENTATION_ENUM */ + +#ifndef QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM +#define QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM +enum qt_extended_surface_windowflag { + QT_EXTENDED_SURFACE_WINDOWFLAG_OVERRIDESSYSTEMGESTURES = 1, + QT_EXTENDED_SURFACE_WINDOWFLAG_STAYSONTOP = 2, +}; +#endif /* QT_EXTENDED_SURFACE_WINDOWFLAG_ENUM */ + +struct qt_extended_surface_listener { + /** + * onscreen_visibility - (none) + * @visible: (none) + */ + void (*onscreen_visibility)(void *data, + struct qt_extended_surface *qt_extended_surface, + int32_t visible); + /** + * set_generic_property - (none) + * @name: (none) + * @value: (none) + */ + void (*set_generic_property)(void *data, + struct qt_extended_surface *qt_extended_surface, + const char *name, + struct wl_array *value); + /** + * close - (none) + */ + void (*close)(void *data, + struct qt_extended_surface *qt_extended_surface); +}; + +static inline int +qt_extended_surface_add_listener(struct qt_extended_surface *qt_extended_surface, + const struct qt_extended_surface_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) qt_extended_surface, + (void (**)(void)) listener, data); +} + +#define QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY 0 +#define QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION 1 +#define QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS 2 + +static inline void +qt_extended_surface_set_user_data(struct qt_extended_surface *qt_extended_surface, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) qt_extended_surface, user_data); +} + +static inline void * +qt_extended_surface_get_user_data(struct qt_extended_surface *qt_extended_surface) +{ + return wl_proxy_get_user_data((struct wl_proxy *) qt_extended_surface); +} + +static inline void +qt_extended_surface_destroy(struct qt_extended_surface *qt_extended_surface) +{ + wl_proxy_destroy((struct wl_proxy *) qt_extended_surface); +} + +static inline void +qt_extended_surface_update_generic_property(struct qt_extended_surface *qt_extended_surface, const char *name, struct wl_array *value) +{ + wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, + QT_EXTENDED_SURFACE_UPDATE_GENERIC_PROPERTY, name, value); +} + +static inline void +qt_extended_surface_set_content_orientation(struct qt_extended_surface *qt_extended_surface, int32_t orientation) +{ + wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, + QT_EXTENDED_SURFACE_SET_CONTENT_ORIENTATION, orientation); +} + +static inline void +qt_extended_surface_set_window_flags(struct qt_extended_surface *qt_extended_surface, int32_t flags) +{ + wl_proxy_marshal((struct wl_proxy *) qt_extended_surface, + QT_EXTENDED_SURFACE_SET_WINDOW_FLAGS, flags); +} + +/* wayland-qt-touch-extension.h */ + +extern const struct wl_interface qt_touch_extension_interface; + +#ifndef QT_TOUCH_EXTENSION_FLAGS_ENUM +#define QT_TOUCH_EXTENSION_FLAGS_ENUM +enum qt_touch_extension_flags { + QT_TOUCH_EXTENSION_FLAGS_MOUSE_FROM_TOUCH = 0x1, +}; +#endif /* QT_TOUCH_EXTENSION_FLAGS_ENUM */ + +struct qt_touch_extension_listener { + /** + * touch - (none) + * @time: (none) + * @id: (none) + * @state: (none) + * @x: (none) + * @y: (none) + * @normalized_x: (none) + * @normalized_y: (none) + * @width: (none) + * @height: (none) + * @pressure: (none) + * @velocity_x: (none) + * @velocity_y: (none) + * @flags: (none) + * @rawdata: (none) + */ + void (*touch)(void *data, + struct qt_touch_extension *qt_touch_extension, + uint32_t time, + uint32_t id, + uint32_t state, + int32_t x, + int32_t y, + int32_t normalized_x, + int32_t normalized_y, + int32_t width, + int32_t height, + uint32_t pressure, + int32_t velocity_x, + int32_t velocity_y, + uint32_t flags, + struct wl_array *rawdata); + /** + * configure - (none) + * @flags: (none) + */ + void (*configure)(void *data, + struct qt_touch_extension *qt_touch_extension, + uint32_t flags); +}; + +static inline int +qt_touch_extension_add_listener(struct qt_touch_extension *qt_touch_extension, + const struct qt_touch_extension_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) qt_touch_extension, + (void (**)(void)) listener, data); +} + +#define QT_TOUCH_EXTENSION_DUMMY 0 + +static inline void +qt_touch_extension_set_user_data(struct qt_touch_extension *qt_touch_extension, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) qt_touch_extension, user_data); +} + +static inline void * +qt_touch_extension_get_user_data(struct qt_touch_extension *qt_touch_extension) +{ + return wl_proxy_get_user_data((struct wl_proxy *) qt_touch_extension); +} + +static inline void +qt_touch_extension_destroy(struct qt_touch_extension *qt_touch_extension) +{ + wl_proxy_destroy((struct wl_proxy *) qt_touch_extension); +} + +static inline void +qt_touch_extension_dummy(struct qt_touch_extension *qt_touch_extension) +{ + wl_proxy_marshal((struct wl_proxy *) qt_touch_extension, + QT_TOUCH_EXTENSION_DUMMY); +} + + +/* wayland-qt-windowmanager.h */ + +extern const struct wl_interface qt_windowmanager_interface; + +struct qt_windowmanager_listener { + /** + * hints - (none) + * @show_is_fullscreen: (none) + */ + void (*hints)(void *data, + struct qt_windowmanager *qt_windowmanager, + int32_t show_is_fullscreen); + /** + * quit - (none) + */ + void (*quit)(void *data, + struct qt_windowmanager *qt_windowmanager); +}; + +static inline int +qt_windowmanager_add_listener(struct qt_windowmanager *qt_windowmanager, + const struct qt_windowmanager_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) qt_windowmanager, + (void (**)(void)) listener, data); +} + +#define QT_WINDOWMANAGER_OPEN_URL 0 + +static inline void +qt_windowmanager_set_user_data(struct qt_windowmanager *qt_windowmanager, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) qt_windowmanager, user_data); +} + +static inline void * +qt_windowmanager_get_user_data(struct qt_windowmanager *qt_windowmanager) +{ + return wl_proxy_get_user_data((struct wl_proxy *) qt_windowmanager); +} + +static inline void +qt_windowmanager_destroy(struct qt_windowmanager *qt_windowmanager) +{ + wl_proxy_destroy((struct wl_proxy *) qt_windowmanager); +} + +static inline void +qt_windowmanager_open_url(struct qt_windowmanager *qt_windowmanager, uint32_t remaining, const char *url) +{ + wl_proxy_marshal((struct wl_proxy *) qt_windowmanager, + QT_WINDOWMANAGER_OPEN_URL, remaining, url); +} + +#endif /* _SDL_waylandtouch_h */ + +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.c b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.c new file mode 100644 index 00000000..5c845ac4 --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.c @@ -0,0 +1,406 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" + +#include "SDL_video.h" +#include "SDL_mouse.h" +#include "../../events/SDL_events_c.h" + +#include "SDL_waylandvideo.h" +#include "SDL_waylandevents_c.h" +#include "SDL_waylandwindow.h" +#include "SDL_waylandopengles.h" +#include "SDL_waylandmouse.h" +#include "SDL_waylandtouch.h" + +#include +#include + +#define WAYLANDVID_DRIVER_NAME "wayland" + +struct wayland_mode { + SDL_DisplayMode mode; + struct wl_list link; +}; + +/* Initialization/Query functions */ +static int +Wayland_VideoInit(_THIS); + +static void +Wayland_GetDisplayModes(_THIS, SDL_VideoDisplay *sdl_display); +static int +Wayland_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode); + +static void +Wayland_VideoQuit(_THIS); + +/* Wayland driver bootstrap functions */ +static int +Wayland_Available(void) +{ + struct wl_display *display = NULL; + + display = wl_display_connect(NULL); + if (display != NULL) { + wl_display_disconnect(display); + } + + return (display != NULL); +} + +static void +Wayland_DeleteDevice(SDL_VideoDevice *device) +{ + SDL_free(device); +} + +static SDL_VideoDevice * +Wayland_CreateDevice(int devindex) +{ + SDL_VideoDevice *device; + + /* Initialize all variables that we clean on shutdown */ + device = SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (!device) { + SDL_OutOfMemory(); + return NULL; + } + + /* Set the function pointers */ + device->VideoInit = Wayland_VideoInit; + device->VideoQuit = Wayland_VideoQuit; + device->SetDisplayMode = Wayland_SetDisplayMode; + device->GetDisplayModes = Wayland_GetDisplayModes; + device->GetWindowWMInfo = Wayland_GetWindowWMInfo; + + device->PumpEvents = Wayland_PumpEvents; + + device->GL_SwapWindow = Wayland_GLES_SwapWindow; + device->GL_GetSwapInterval = Wayland_GLES_GetSwapInterval; + device->GL_SetSwapInterval = Wayland_GLES_SetSwapInterval; + device->GL_MakeCurrent = Wayland_GLES_MakeCurrent; + device->GL_CreateContext = Wayland_GLES_CreateContext; + device->GL_LoadLibrary = Wayland_GLES_LoadLibrary; + device->GL_UnloadLibrary = Wayland_GLES_UnloadLibrary; + device->GL_GetProcAddress = Wayland_GLES_GetProcAddress; + device->GL_DeleteContext = Wayland_GLES_DeleteContext; + + device->CreateWindow = Wayland_CreateWindow; + device->ShowWindow = Wayland_ShowWindow; + device->SetWindowFullscreen = Wayland_SetWindowFullscreen; + device->SetWindowSize = Wayland_SetWindowSize; + device->DestroyWindow = Wayland_DestroyWindow; + + device->free = Wayland_DeleteDevice; + + return device; +} + +VideoBootStrap Wayland_bootstrap = { + WAYLANDVID_DRIVER_NAME, "SDL Wayland video driver", + Wayland_Available, Wayland_CreateDevice +}; + +static void +wayland_add_mode(SDL_VideoData *d, SDL_DisplayMode m) +{ + struct wayland_mode *mode; + + /* Check for duplicate mode */ + wl_list_for_each(mode, &d->modes_list, link) + if (mode->mode.w == m.w && mode->mode.h == m.h && + mode->mode.refresh_rate == m.refresh_rate) + return; + + /* Add new mode to the list */ + mode = SDL_calloc(1, sizeof *mode); + + if (!mode) + return; + + mode->mode = m; + wl_list_insert(&d->modes_list, &mode->link); +} + +static void +display_handle_geometry(void *data, + struct wl_output *output, + int x, int y, + int physical_width, + int physical_height, + int subpixel, + const char *make, + const char *model, + int transform) + +{ + SDL_VideoData *d = data; + + d->screen_allocation.x = x; + d->screen_allocation.y = y; +} + +static void +display_handle_mode(void *data, + struct wl_output *wl_output, + uint32_t flags, + int width, + int height, + int refresh) +{ + SDL_VideoData *d = data; + SDL_DisplayMode mode; + + SDL_zero(mode); + mode.w = width; + mode.h = height; + mode.refresh_rate = refresh / 1000; + + wayland_add_mode(d, mode); + + if (flags & WL_OUTPUT_MODE_CURRENT) { + d->screen_allocation.width = width; + d->screen_allocation.height = height; + } +} + +static const struct wl_output_listener output_listener = { + display_handle_geometry, + display_handle_mode +}; + +static void +shm_handle_format(void *data, + struct wl_shm *shm, + uint32_t format) +{ + SDL_VideoData *d = data; + + d->shm_formats |= (1 << format); +} + +static const struct wl_shm_listener shm_listener = { + shm_handle_format +}; + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH +static void +windowmanager_hints(void *data, struct qt_windowmanager *qt_windowmanager, + int32_t show_is_fullscreen) +{ +} + +static void +windowmanager_quit(void *data, struct qt_windowmanager *qt_windowmanager) +{ + SDL_SendQuit(); +} + +static const struct qt_windowmanager_listener windowmanager_listener = { + windowmanager_hints, + windowmanager_quit, +}; +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + +static void +display_handle_global(void *data, struct wl_registry *registry, uint32_t id, + const char *interface, uint32_t version) +{ + SDL_VideoData *d = data; + + if (strcmp(interface, "wl_compositor") == 0) { + d->compositor = wl_registry_bind(d->registry, id, &wl_compositor_interface, 1); + } else if (strcmp(interface, "wl_output") == 0) { + d->output = wl_registry_bind(d->registry, id, &wl_output_interface, 1); + wl_output_add_listener(d->output, &output_listener, d); + } else if (strcmp(interface, "wl_seat") == 0) { + Wayland_display_add_input(d, id); + } else if (strcmp(interface, "wl_shell") == 0) { + d->shell = wl_registry_bind(d->registry, id, &wl_shell_interface, 1); + } else if (strcmp(interface, "wl_shm") == 0) { + d->shm = wl_registry_bind(registry, id, &wl_shm_interface, 1); + d->cursor_theme = wl_cursor_theme_load(NULL, 32, d->shm); + d->default_cursor = wl_cursor_theme_get_cursor(d->cursor_theme, "left_ptr"); + wl_shm_add_listener(d->shm, &shm_listener, d); + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + } else if (strcmp(interface, "qt_touch_extension") == 0) { + Wayland_touch_create(d, id); + } else if (strcmp(interface, "qt_surface_extension") == 0) { + d->surface_extension = wl_registry_bind(registry, id, + &qt_surface_extension_interface, 1); + } else if (strcmp(interface, "qt_windowmanager") == 0) { + d->windowmanager = wl_registry_bind(registry, id, + &qt_windowmanager_interface, 1); + qt_windowmanager_add_listener(d->windowmanager, &windowmanager_listener, d); +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + } +} + +static const struct wl_registry_listener registry_listener = { + display_handle_global +}; + +int +Wayland_VideoInit(_THIS) +{ + SDL_VideoData *data; + + data = malloc(sizeof *data); + if (data == NULL) + return 0; + memset(data, 0, sizeof *data); + + _this->driverdata = data; + + wl_list_init(&data->modes_list); + + data->display = wl_display_connect(NULL); + if (data->display == NULL) { + SDL_SetError("Failed to connect to a Wayland display"); + return 0; + } + + data->registry = wl_display_get_registry(data->display); + wl_registry_add_listener(data->registry, ®istry_listener, data); + + while (data->screen_allocation.width == 0) + wl_display_dispatch(data->display); + + data->xkb_context = xkb_context_new(0); + if (!data->xkb_context) { + SDL_SetError("Failed to create XKB context"); + return 0; + } + + SDL_VideoDisplay display; + SDL_DisplayMode mode; + + /* Use a fake 32-bpp desktop mode */ + mode.format = SDL_PIXELFORMAT_RGB888; + mode.w = data->screen_allocation.width; + mode.h = data->screen_allocation.height; + mode.refresh_rate = 0; + mode.driverdata = NULL; + wayland_add_mode(data, mode); + SDL_zero(display); + display.desktop_mode = mode; + display.current_mode = mode; + display.driverdata = NULL; + SDL_AddVideoDisplay(&display); + + Wayland_InitMouse (); + + wayland_schedule_write(data); + + return 0; +} + +static void +Wayland_GetDisplayModes(_THIS, SDL_VideoDisplay *sdl_display) +{ + SDL_VideoData *data = _this->driverdata; + SDL_DisplayMode mode; + struct wayland_mode *m; + + Wayland_PumpEvents(_this); + + wl_list_for_each(m, &data->modes_list, link) { + m->mode.format = SDL_PIXELFORMAT_RGB888; + SDL_AddDisplayMode(sdl_display, &m->mode); + m->mode.format = SDL_PIXELFORMAT_RGBA8888; + SDL_AddDisplayMode(sdl_display, &m->mode); + } + + mode.w = data->screen_allocation.width; + mode.h = data->screen_allocation.height; + mode.refresh_rate = 0; + mode.driverdata = NULL; + + mode.format = SDL_PIXELFORMAT_RGB888; + SDL_AddDisplayMode(sdl_display, &mode); + mode.format = SDL_PIXELFORMAT_RGBA8888; + SDL_AddDisplayMode(sdl_display, &mode); +} + +static int +Wayland_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) +{ + return 0; +} + +void +Wayland_VideoQuit(_THIS) +{ + SDL_VideoData *data = _this->driverdata; + struct wayland_mode *t, *m; + + Wayland_FiniMouse (); + + if (data->output) + wl_output_destroy(data->output); + + Wayland_display_destroy_input(data); + + if (data->xkb_context) { + xkb_context_unref(data->xkb_context); + data->xkb_context = NULL; + } +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + if (data->windowmanager) + qt_windowmanager_destroy(data->windowmanager); + + if (data->surface_extension) + qt_surface_extension_destroy(data->surface_extension); + + Wayland_touch_destroy(data); +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + + if (data->shm) + wl_shm_destroy(data->shm); + + if (data->cursor_theme) + wl_cursor_theme_destroy(data->cursor_theme); + + if (data->shell) + wl_shell_destroy(data->shell); + + if (data->compositor) + wl_compositor_destroy(data->compositor); + + if (data->display) { + wl_display_flush(data->display); + wl_display_disconnect(data->display); + } + + wl_list_for_each_safe(m, t, &data->modes_list, link) { + wl_list_remove(&m->link); + free(m); + } + + + free(data); + _this->driverdata = NULL; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.h b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.h new file mode 100644 index 00000000..c44a2641 --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandvideo.h @@ -0,0 +1,83 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" + +#ifndef _SDL_waylandvideo_h +#define _SDL_waylandvideo_h + +#include +#include +#include + +#include + +struct xkb_context; +struct SDL_WaylandInput; + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH +struct SDL_WaylandTouch; +struct qt_surface_extension; +struct qt_windowmanager; +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + +typedef struct { + struct wl_display *display; + struct wl_registry *registry; + struct wl_compositor *compositor; + struct wl_output *output; + struct wl_shm *shm; + struct wl_cursor_theme *cursor_theme; + struct wl_cursor *default_cursor; + struct wl_pointer *pointer; + struct wl_shell *shell; + + struct { + int32_t x, y, width, height; + } screen_allocation; + + struct wl_list modes_list; + + EGLDisplay edpy; + EGLContext context; + EGLConfig econf; + + struct xkb_context *xkb_context; + struct SDL_WaylandInput *input; + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + struct SDL_WaylandTouch *touch; + struct qt_surface_extension *surface_extension; + struct qt_windowmanager *windowmanager; +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + + uint32_t shm_formats; +} SDL_VideoData; + +static inline void +wayland_schedule_write(SDL_VideoData *data) +{ + wl_display_flush(data->display); +} + +#endif /* _SDL_nullvideo_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.c b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.c new file mode 100644 index 00000000..f864520c --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.c @@ -0,0 +1,239 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" + +#include "../SDL_sysvideo.h" +#include "../../events/SDL_windowevents_c.h" +#include "../SDL_egl_c.h" +#include "SDL_waylandwindow.h" +#include "SDL_waylandvideo.h" +#include "SDL_waylandtouch.h" + +static void +handle_ping(void *data, struct wl_shell_surface *shell_surface, + uint32_t serial) +{ + wl_shell_surface_pong(shell_surface, serial); +} + +static void +handle_configure(void *data, struct wl_shell_surface *shell_surface, + uint32_t edges, int32_t width, int32_t height) +{ +} + +static void +handle_popup_done(void *data, struct wl_shell_surface *shell_surface) +{ +} + +static const struct wl_shell_surface_listener shell_surface_listener = { + handle_ping, + handle_configure, + handle_popup_done +}; + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH +static void +handle_onscreen_visibility(void *data, + struct qt_extended_surface *qt_extended_surface, int32_t visible) +{ +} + +static void +handle_set_generic_property(void *data, + struct qt_extended_surface *qt_extended_surface, const char *name, + struct wl_array *value) +{ +} + +static void +handle_close(void *data, struct qt_extended_surface *qt_extended_surface) +{ + SDL_WindowData *window = (SDL_WindowData *)data; + SDL_SendWindowEvent(window->sdlwindow, SDL_WINDOWEVENT_CLOSE, 0, 0); +} + +static const struct qt_extended_surface_listener extended_surface_listener = { + handle_onscreen_visibility, + handle_set_generic_property, + handle_close, +}; +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + +SDL_bool +Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) +{ + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + + info->info.wl.display = data->waylandData->display; + info->info.wl.surface = data->surface; + info->info.wl.shell_surface = data->shell_surface; + info->subsystem = SDL_SYSWM_WAYLAND; + + return SDL_TRUE; +} + +void Wayland_ShowWindow(_THIS, SDL_Window *window) +{ + SDL_WindowData *wind = window->driverdata; + + if (window->flags & SDL_WINDOW_FULLSCREEN) + wl_shell_surface_set_fullscreen(wind->shell_surface, + WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, + 0, NULL); + else + wl_shell_surface_set_toplevel(wind->shell_surface); + + wayland_schedule_write(_this->driverdata); +} + +void +Wayland_SetWindowFullscreen(_THIS, SDL_Window * window, + SDL_VideoDisplay * _display, SDL_bool fullscreen) +{ + SDL_WindowData *wind = window->driverdata; + + if (fullscreen) + wl_shell_surface_set_fullscreen(wind->shell_surface, + WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE, + 0, NULL); + else + wl_shell_surface_set_toplevel(wind->shell_surface); + + wayland_schedule_write(_this->driverdata); +} + +int Wayland_CreateWindow(_THIS, SDL_Window *window) +{ + SDL_WindowData *data; + SDL_VideoData *c; + struct wl_region *region; + + data = calloc(1, sizeof *data); + if (data == NULL) + return 0; + + c = _this->driverdata; + window->driverdata = data; + + if (!(window->flags & SDL_WINDOW_OPENGL)) { + SDL_GL_LoadLibrary(NULL); + window->flags |= SDL_WINDOW_OPENGL; + } + + if (window->x == SDL_WINDOWPOS_UNDEFINED) { + window->x = 0; + } + if (window->y == SDL_WINDOWPOS_UNDEFINED) { + window->y = 0; + } + + data->waylandData = c; + data->sdlwindow = window; + + data->surface = + wl_compositor_create_surface(c->compositor); + wl_surface_set_user_data(data->surface, data); + data->shell_surface = wl_shell_get_shell_surface(c->shell, + data->surface); +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + if (c->surface_extension) { + data->extended_surface = qt_surface_extension_get_extended_surface( + c->surface_extension, data->surface); + } +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + data->egl_window = wl_egl_window_create(data->surface, + window->w, window->h); + + /* Create the GLES window surface */ + data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window); + + if (data->egl_surface == EGL_NO_SURFACE) { + SDL_SetError("failed to create a window surface"); + return -1; + } + + if (data->shell_surface) { + wl_shell_surface_set_user_data(data->shell_surface, data); + wl_shell_surface_add_listener(data->shell_surface, + &shell_surface_listener, data); + } + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + if (data->extended_surface) { + qt_extended_surface_set_user_data(data->extended_surface, data); + qt_extended_surface_add_listener(data->extended_surface, + &extended_surface_listener, data); + } +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + + region = wl_compositor_create_region(c->compositor); + wl_region_add(region, 0, 0, window->w, window->h); + wl_surface_set_opaque_region(data->surface, region); + wl_region_destroy(region); + + wayland_schedule_write(c); + + return 0; +} + +void Wayland_SetWindowSize(_THIS, SDL_Window * window) +{ + SDL_VideoData *data = _this->driverdata; + SDL_WindowData *wind = window->driverdata; + struct wl_region *region; + + wl_egl_window_resize(wind->egl_window, window->w, window->h, 0, 0); + + region = wl_compositor_create_region(data->compositor); + wl_region_add(region, 0, 0, window->w, window->h); + wl_surface_set_opaque_region(wind->surface, region); + wl_region_destroy(region); +} + +void Wayland_DestroyWindow(_THIS, SDL_Window *window) +{ + SDL_VideoData *data = _this->driverdata; + SDL_WindowData *wind = window->driverdata; + + window->driverdata = NULL; + + if (data) { + SDL_EGL_DestroySurface(_this, wind->egl_surface); + wl_egl_window_destroy(wind->egl_window); + + if (wind->shell_surface) + wl_shell_surface_destroy(wind->shell_surface); + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + if (wind->extended_surface) + qt_extended_surface_destroy(wind->extended_surface); +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ + wl_surface_destroy(wind->surface); + + SDL_free(wind); + wayland_schedule_write(data); + } +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.h b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.h new file mode 100644 index 00000000..f65dc8fe --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/wayland/SDL_waylandwindow.h @@ -0,0 +1,61 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "SDL_config.h" + +#ifndef _SDL_waylandwindow_h +#define _SDL_waylandwindow_h + +#include "../SDL_sysvideo.h" +#include "SDL_syswm.h" + +#include "SDL_waylandvideo.h" + +struct SDL_WaylandInput; + +typedef struct { + SDL_Window *sdlwindow; + SDL_VideoData *waylandData; + struct wl_surface *surface; + struct wl_shell_surface *shell_surface; + struct wl_egl_window *egl_window; + struct SDL_WaylandInput *keyboard_device; + EGLSurface egl_surface; + +#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH + struct qt_extended_surface *extended_surface; +#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */ +} SDL_WindowData; + +extern void Wayland_ShowWindow(_THIS, SDL_Window *window); +extern void Wayland_SetWindowFullscreen(_THIS, SDL_Window * window, + SDL_VideoDisplay * _display, + SDL_bool fullscreen); +extern int Wayland_CreateWindow(_THIS, SDL_Window *window); +extern void Wayland_SetWindowSize(_THIS, SDL_Window * window); +extern void Wayland_DestroyWindow(_THIS, SDL_Window *window); + +extern SDL_bool +Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info); + +#endif /* _SDL_waylandwindow_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.c index 15eea1aa..2af05706 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.h index 410e757a..53f5d729 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsclipboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowsclipboard_h #define _SDL_windowsclipboard_h diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.c index 1826258c..49ea4c75 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS @@ -67,6 +67,9 @@ #ifndef WM_TOUCH #define WM_TOUCH 0x0240 #endif +#ifndef WM_MOUSEHWHEEL +#define WM_MOUSEHWHEEL 0x020E +#endif static SDL_Scancode WindowsScanCodeToSDLScanCode( LPARAM lParam, WPARAM wParam ) @@ -309,15 +312,15 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } #ifdef WMMSG_DEBUG - { - char message[1024]; - if (msg > MAX_WMMSG) { - SDL_snprintf(message, sizeof(message), "Received windows message: %p UNKNOWN (%d) -- 0x%X, 0x%X\n", hwnd, msg, wParam, lParam); - } else { - SDL_snprintf(message, sizeof(message), "Received windows message: %p %s -- 0x%X, 0x%X\n", hwnd, wmtab[msg], wParam, lParam); - } - OutputDebugStringA(message); - } + { + char message[1024]; + if (msg > MAX_WMMSG) { + SDL_snprintf(message, sizeof(message), "Received windows message: %p UNKNOWN (%d) -- 0x%X, 0x%X\n", hwnd, msg, wParam, lParam); + } else { + SDL_snprintf(message, sizeof(message), "Received windows message: %p %s -- 0x%X, 0x%X\n", hwnd, wmtab[msg], wParam, lParam); + } + OutputDebugStringA(message); + } #endif /* WMMSG_DEBUG */ if (IME_HandleMessage(hwnd, msg, wParam, &lParam, data->videodata)) @@ -345,12 +348,6 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SHORT keyState; SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_SHOWN, 0, 0); - SDL_SendWindowEvent(data->window, - SDL_WINDOWEVENT_RESTORED, 0, 0); - if (IsZoomed(hwnd)) { - SDL_SendWindowEvent(data->window, - SDL_WINDOWEVENT_MAXIMIZED, 0, 0); - } if (SDL_GetKeyboardFocus() != data->window) { SDL_SetKeyboardFocus(data->window); } @@ -372,22 +369,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); data->mouse_button_flags = 0; - if(SDL_GetMouse()->relative_mode) { - LONG cx, cy; - RECT rect; - GetWindowRect(hwnd, &rect); - - cx = (rect.left + rect.right) / 2; - cy = (rect.top + rect.bottom) / 2; - - /* Make an absurdly small clip rect */ - rect.left = cx-1; - rect.right = cx+1; - rect.top = cy-1; - rect.bottom = cy+1; - - ClipCursor(&rect); - } + WIN_UpdateClipCursor(data->window); /* * FIXME: Update keyboard state @@ -397,18 +379,20 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (SDL_GetKeyboardFocus() == data->window) { SDL_SetKeyboardFocus(NULL); } - if (minimized) { - SDL_SendWindowEvent(data->window, - SDL_WINDOWEVENT_MINIMIZED, 0, 0); - } + + ClipCursor(NULL); } } returnCode = 0; break; case WM_MOUSEMOVE: - if( !SDL_GetMouse()->relative_mode ) - SDL_SendMouseMotion(data->window, 0, 0, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); + { + SDL_Mouse *mouse = SDL_GetMouse(); + if (!mouse->relative_mode || mouse->relative_mode_warp) { + SDL_SendMouseMotion(data->window, 0, 0, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); + } + } /* don't break here, fall through to check the wParam like the button presses */ case WM_LBUTTONUP: case WM_RBUTTONUP: @@ -418,49 +402,50 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_RBUTTONDOWN: case WM_MBUTTONDOWN: case WM_XBUTTONDOWN: - if( !SDL_GetMouse()->relative_mode ) - WIN_CheckWParamMouseButtons( wParam, data ); + { + SDL_Mouse *mouse = SDL_GetMouse(); + if (!mouse->relative_mode || mouse->relative_mode_warp) { + WIN_CheckWParamMouseButtons(wParam, data); + } + } break; case WM_INPUT: - { - HRAWINPUT hRawInput = (HRAWINPUT)lParam; - RAWINPUT inp; - UINT size = sizeof(inp); - - if(!SDL_GetMouse()->relative_mode) - break; - - GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER)); - - /* Mouse data */ - if(inp.header.dwType == RIM_TYPEMOUSE) { - RAWMOUSE* mouse = &inp.data.mouse; + SDL_Mouse *mouse = SDL_GetMouse(); + HRAWINPUT hRawInput = (HRAWINPUT)lParam; + RAWINPUT inp; + UINT size = sizeof(inp); - if((mouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) - { - SDL_SendMouseMotion(data->window, 0, 1, (int)mouse->lLastX, (int)mouse->lLastY); + if (!mouse->relative_mode || mouse->relative_mode_warp || mouse->focus != data->window) { + break; } - else - { - /* synthesize relative moves from the abs position */ - static SDL_Point initialMousePoint; - if ( initialMousePoint.x == 0 && initialMousePoint.y == 0 ) - { + + GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER)); + + /* Mouse data */ + if (inp.header.dwType == RIM_TYPEMOUSE) { + RAWMOUSE* mouse = &inp.data.mouse; + + if ((mouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) { + SDL_SendMouseMotion(data->window, 0, 1, (int)mouse->lLastX, (int)mouse->lLastY); + } else { + /* synthesize relative moves from the abs position */ + static SDL_Point initialMousePoint; + if (initialMousePoint.x == 0 && initialMousePoint.y == 0) { + initialMousePoint.x = mouse->lLastX; + initialMousePoint.y = mouse->lLastY; + } + + SDL_SendMouseMotion(data->window, 0, 1, (int)(mouse->lLastX-initialMousePoint.x), (int)(mouse->lLastY-initialMousePoint.y) ); + initialMousePoint.x = mouse->lLastX; initialMousePoint.y = mouse->lLastY; } - - SDL_SendMouseMotion(data->window, 0, 1, (int)(mouse->lLastX-initialMousePoint.x), (int)(mouse->lLastY-initialMousePoint.y) ); - - initialMousePoint.x = mouse->lLastX; - initialMousePoint.y = mouse->lLastY; + WIN_CheckRawMouseButtons( mouse->usButtonFlags, data ); } - WIN_CheckRawMouseButtons( mouse->usButtonFlags, data ); } break; - } case WM_MOUSEWHEEL: { @@ -478,16 +463,37 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) s_AccumulatedMotion += WHEEL_DELTA; } } - break; } + break; + + case WM_MOUSEHWHEEL: + { + static short s_AccumulatedMotion; + + s_AccumulatedMotion += GET_WHEEL_DELTA_WPARAM(wParam); + if (s_AccumulatedMotion > 0) { + while (s_AccumulatedMotion >= WHEEL_DELTA) { + SDL_SendMouseWheel(data->window, 0, 1, 0); + s_AccumulatedMotion -= WHEEL_DELTA; + } + } else { + while (s_AccumulatedMotion <= -WHEEL_DELTA) { + SDL_SendMouseWheel(data->window, 0, -1, 0); + s_AccumulatedMotion += WHEEL_DELTA; + } + } + } + break; #ifdef WM_MOUSELEAVE case WM_MOUSELEAVE: if (SDL_GetMouseFocus() == data->window && !SDL_GetMouse()->relative_mode) { - POINT cursorPos; - GetCursorPos(&cursorPos); - ScreenToClient(hwnd, &cursorPos); - SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y); + if (!IsIconic(hwnd)) { + POINT cursorPos; + GetCursorPos(&cursorPos); + ScreenToClient(hwnd, &cursorPos); + SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y); + } SDL_SetMouseFocus(NULL); } returnCode = 0; @@ -509,8 +515,8 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) GetKeyboardState(keyboardState); if (ToUnicode(wParam, (lParam >> 16) & 0xff, keyboardState, (LPWSTR)&utf32, 1, 0) > 0) { - WORD repitition; - for (repitition = lParam & 0xffff; repitition > 0; repitition--) { + WORD repetition; + for (repetition = lParam & 0xffff; repetition > 0; repetition--) { WIN_ConvertUTF32toUTF8(utf32, text); SDL_SendKeyboardText(text); } @@ -523,9 +529,19 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_KEYUP: { SDL_Scancode code = WindowsScanCodeToSDLScanCode( lParam, wParam ); + const Uint8 *keyboardState = SDL_GetKeyboardState(NULL); + + /* Detect relevant keyboard shortcuts */ + if (keyboardState[SDL_SCANCODE_LALT] == SDL_PRESSED || keyboardState[SDL_SCANCODE_RALT] == SDL_PRESSED ) { + /* ALT+F4: Close window */ + if (code == SDL_SCANCODE_F4) { + SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0); + } + } + if ( code != SDL_SCANCODE_UNKNOWN ) { if (code == SDL_SCANCODE_PRINTSCREEN && - SDL_GetKeyboardState(NULL)[code] == SDL_RELEASED) { + keyboardState[code] == SDL_RELEASED) { SDL_SendKeyboardKey(SDL_PRESSED, code); } SDL_SendKeyboardKey(SDL_RELEASED, code); @@ -561,6 +577,22 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) break; #endif /* WM_INPUTLANGCHANGE */ + case WM_ENTERSIZEMOVE: + case WM_ENTERMENULOOP: + { + data->in_modal_loop = SDL_TRUE; + WIN_UpdateClipCursor(data->window); + } + break; + + case WM_EXITSIZEMOVE: + case WM_EXITMENULOOP: + { + data->in_modal_loop = SDL_FALSE; + WIN_UpdateClipCursor(data->window); + } + break; + #ifdef WM_GETMINMAXINFO case WM_GETMINMAXINFO: { @@ -574,10 +606,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) BOOL menu; BOOL constrain_max_size; - /* If we allow resizing, let the resize happen naturally */ if (SDL_IsShapedWindow(data->window)) Win32_ResizeWindowShape(data->window); + /* If this is an expected size change, allow it */ + if (data->expected_resize) { + break; + } + /* Get the current position of our window */ GetWindowRect(hwnd, &size); x = size.left; @@ -645,20 +681,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) RECT rect; int x, y; int w, h; - Uint32 window_flags; - if (!GetClientRect(hwnd, &rect) || - (rect.right == rect.left && rect.bottom == rect.top)) { + if (!GetClientRect(hwnd, &rect) || IsRectEmpty(&rect)) { break; } ClientToScreen(hwnd, (LPPOINT) & rect); ClientToScreen(hwnd, (LPPOINT) & rect + 1); - window_flags = SDL_GetWindowFlags(data->window); - if ((window_flags & SDL_WINDOW_INPUT_GRABBED) && - (window_flags & SDL_WINDOW_INPUT_FOCUS)) { - ClipCursor(&rect); - } + WIN_UpdateClipCursor(data->window); x = rect.left; y = rect.top; @@ -671,6 +701,26 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } break; + case WM_SIZE: + { + switch (wParam) + { + case SIZE_MAXIMIZED: + SDL_SendWindowEvent(data->window, + SDL_WINDOWEVENT_MAXIMIZED, 0, 0); + break; + case SIZE_MINIMIZED: + SDL_SendWindowEvent(data->window, + SDL_WINDOWEVENT_MINIMIZED, 0, 0); + break; + default: + SDL_SendWindowEvent(data->window, + SDL_WINDOWEVENT_RESTORED, 0, 0); + break; + } + } + break; + case WM_SETCURSOR: { Uint16 hittest; diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.h index 4fc146e7..ccf7aa00 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsevents.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowsevents_h #define _SDL_windowsevents_h diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.c index 93af4c5e..29923bef 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.h index 4d7a2ba0..c59d28e0 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsframebuffer.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); extern int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.c index 17d4eed4..86c0074e 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.h index c79d1d0f..cd5ee70e 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowskeyboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowskeyboard_h #define _SDL_windowskeyboard_h diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.c index 06937adb..a9fcfda6 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.h index 8780a2e8..1f79b161 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmessagebox.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.c index 73cae8f3..43d0c977 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS @@ -50,6 +50,8 @@ WIN_GetDisplayMode(LPCTSTR deviceName, DWORD index, SDL_DisplayMode * mode) data->DeviceMode.dmFields = (DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY | DM_DISPLAYFLAGS); + data->ScaleX = 1.0f; + data->ScaleY = 1.0f; /* Fill in the mode information */ mode->format = SDL_PIXELFORMAT_UNKNOWN; @@ -63,6 +65,13 @@ WIN_GetDisplayMode(LPCTSTR deviceName, DWORD index, SDL_DisplayMode * mode) char bmi_data[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)]; LPBITMAPINFO bmi; HBITMAP hbm; + int logical_width = GetDeviceCaps( hdc, HORZRES ); + int logical_height = GetDeviceCaps( hdc, VERTRES ); + + data->ScaleX = (float)logical_width / devmode.dmPelsWidth; + data->ScaleY = (float)logical_height / devmode.dmPelsHeight; + mode->w = logical_width; + mode->h = logical_height; SDL_zero(bmi_data); bmi = (LPBITMAPINFO) bmi_data; @@ -93,7 +102,7 @@ WIN_GetDisplayMode(LPCTSTR deviceName, DWORD index, SDL_DisplayMode * mode) } else if (bmi->bmiHeader.biBitCount == 4) { mode->format = SDL_PIXELFORMAT_INDEX4LSB; } - } else { + } else { /* FIXME: Can we tell what this will be? */ if ((devmode.dmFields & DM_BITSPERPEL) == DM_BITSPERPEL) { switch (devmode.dmBitsPerPel) { @@ -224,10 +233,10 @@ WIN_GetDisplayBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect) { SDL_DisplayModeData *data = (SDL_DisplayModeData *) display->current_mode.driverdata; - rect->x = (int)data->DeviceMode.dmPosition.x; - rect->y = (int)data->DeviceMode.dmPosition.y; - rect->w = data->DeviceMode.dmPelsWidth; - rect->h = data->DeviceMode.dmPelsHeight; + rect->x = (int)SDL_ceil(data->DeviceMode.dmPosition.x * data->ScaleX); + rect->y = (int)SDL_ceil(data->DeviceMode.dmPosition.y * data->ScaleY); + rect->w = (int)SDL_ceil(data->DeviceMode.dmPelsWidth * data->ScaleX); + rect->h = (int)SDL_ceil(data->DeviceMode.dmPelsHeight * data->ScaleY); return 0; } @@ -252,8 +261,7 @@ WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display) if (!SDL_AddDisplayMode(display, &mode)) { SDL_free(mode.driverdata); } - } - else { + } else { SDL_free(mode.driverdata); } } diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.h index fd622d56..e1926b15 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmodes.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowsmodes_h #define _SDL_windowsmodes_h @@ -31,6 +31,8 @@ typedef struct typedef struct { DEVMODE DeviceMode; + float ScaleX; + float ScaleY; } SDL_DisplayModeData; extern int WIN_InitModes(_THIS); diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.c index f50a8724..967e400d 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS @@ -207,7 +207,7 @@ WIN_SetRelativeMouseMode(SDL_bool enabled) /* (Un)register raw input for mice */ - if(RegisterRawInputDevices(&rawMouse, 1, sizeof(RAWINPUTDEVICE)) == FALSE) { + if (RegisterRawInputDevices(&rawMouse, 1, sizeof(RAWINPUTDEVICE)) == FALSE) { /* Only return an error when registering. If we unregister and fail, then it's probably that we unregistered twice. That's OK. */ @@ -216,7 +216,7 @@ WIN_SetRelativeMouseMode(SDL_bool enabled) } } - if(enabled) { + if (enabled) { LONG cx, cy; RECT rect; GetWindowRect(hWnd, &rect); @@ -231,10 +231,9 @@ WIN_SetRelativeMouseMode(SDL_bool enabled) rect.bottom = cy+1; ClipCursor(&rect); - } - else + } else { ClipCursor(NULL); - + } return 0; } @@ -251,6 +250,8 @@ WIN_InitMouse(_THIS) mouse->SetRelativeMouseMode = WIN_SetRelativeMouseMode; SDL_SetDefaultCursor(WIN_CreateDefaultCursor()); + + SDL_SetDoubleClickTime(GetDoubleClickTime()); } void diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.h index c63eee69..5e88184e 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsmouse.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowsmouse_h #define _SDL_windowsmouse_h diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.c index 20d9913d..247976b8 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.c @@ -18,13 +18,14 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS #include "SDL_assert.h" #include "SDL_loadso.h" #include "SDL_windowsvideo.h" +#include "SDL_windowsopengles.h" /* WGL implementation of SDL OpenGL support */ @@ -323,11 +324,35 @@ HasExtension(const char *extension, const char *extensions) return SDL_FALSE; } -static void -WIN_GL_InitExtensions(_THIS, HDC hdc) +void +WIN_GL_InitExtensions(_THIS) { const char *(WINAPI * wglGetExtensionsStringARB) (HDC) = 0; const char *extensions; + HWND hwnd; + HDC hdc; + HGLRC hglrc; + PIXELFORMATDESCRIPTOR pfd; + + hwnd = + CreateWindow(SDL_Appname, SDL_Appname, (WS_POPUP | WS_DISABLED), 0, 0, + 10, 10, NULL, NULL, SDL_Instance, NULL); + if (!hwnd) { + return; + } + WIN_PumpEvents(_this); + + hdc = GetDC(hwnd); + + WIN_GL_SetupPixelFormat(_this, &pfd); + + SetPixelFormat(hdc, ChoosePixelFormat(hdc, &pfd), &pfd); + + hglrc = _this->gl_data->wglCreateContext(hdc); + if (!hglrc) { + return; + } + _this->gl_data->wglMakeCurrent(hdc, hglrc); wglGetExtensionsStringARB = (const char *(WINAPI *) (HDC)) _this->gl_data->wglGetProcAddress("wglGetExtensionsStringARB"); @@ -369,6 +394,18 @@ WIN_GL_InitExtensions(_THIS, HDC hdc) _this->gl_data->wglSwapIntervalEXT = NULL; _this->gl_data->wglGetSwapIntervalEXT = NULL; } + + /* Check for WGL_EXT_create_context_es2_profile */ + _this->gl_data->HAS_WGL_EXT_create_context_es2_profile = SDL_FALSE; + if (HasExtension("WGL_EXT_create_context_es2_profile", extensions)) { + _this->gl_data->HAS_WGL_EXT_create_context_es2_profile = SDL_TRUE; + } + + _this->gl_data->wglMakeCurrent(hdc, NULL); + _this->gl_data->wglDeleteContext(hglrc); + ReleaseDC(hwnd, hdc); + DestroyWindow(hwnd); + WIN_PumpEvents(_this); } static int @@ -396,8 +433,6 @@ WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs) if (hglrc) { _this->gl_data->wglMakeCurrent(hdc, hglrc); - WIN_GL_InitExtensions(_this, hdc); - if (_this->gl_data->HAS_WGL_ARB_pixel_format) { _this->gl_data->wglChoosePixelFormatARB(hdc, iAttribs, fAttribs, 1, &pixel_format, @@ -548,6 +583,32 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) HDC hdc = ((SDL_WindowData *) window->driverdata)->hdc; HGLRC context, share_context; + if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES && + !_this->gl_data->HAS_WGL_EXT_create_context_es2_profile) { +#if SDL_VIDEO_OPENGL_EGL + /* Switch to EGL based functions */ + WIN_GL_UnloadLibrary(_this); + _this->GL_LoadLibrary = WIN_GLES_LoadLibrary; + _this->GL_GetProcAddress = WIN_GLES_GetProcAddress; + _this->GL_UnloadLibrary = WIN_GLES_UnloadLibrary; + _this->GL_CreateContext = WIN_GLES_CreateContext; + _this->GL_MakeCurrent = WIN_GLES_MakeCurrent; + _this->GL_SetSwapInterval = WIN_GLES_SetSwapInterval; + _this->GL_GetSwapInterval = WIN_GLES_GetSwapInterval; + _this->GL_SwapWindow = WIN_GLES_SwapWindow; + _this->GL_DeleteContext = WIN_GLES_DeleteContext; + + if (WIN_GLES_LoadLibrary(_this, NULL) != 0) { + return NULL; + } + + return WIN_GLES_CreateContext(_this, window); +#else + SDL_SetError("SDL not configured with EGL support"); + return NULL; +#endif + } + if (_this->gl_config.share_with_current_context) { share_context = (HGLRC)SDL_GL_GetCurrentContext(); } else { @@ -622,8 +683,6 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) return NULL; } - WIN_GL_InitExtensions(_this, hdc); - return context; } diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.h index 36da7ba8..f8934b06 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengl.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowsopengl_h #define _SDL_windowsopengl_h @@ -29,6 +29,7 @@ struct SDL_GLDriverData { SDL_bool HAS_WGL_ARB_pixel_format; SDL_bool HAS_WGL_EXT_swap_control_tear; + SDL_bool HAS_WGL_EXT_create_context_es2_profile; void *(WINAPI * wglGetProcAddress) (const char *proc); HGLRC(WINAPI * wglCreateContext) (HDC hdc); @@ -62,6 +63,7 @@ extern int WIN_GL_SetSwapInterval(_THIS, int interval); extern int WIN_GL_GetSwapInterval(_THIS); extern void WIN_GL_SwapWindow(_THIS, SDL_Window * window); extern void WIN_GL_DeleteContext(_THIS, SDL_GLContext context); +extern void WIN_GL_InitExtensions(_THIS); #ifndef WGL_ARB_pixel_format #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.c new file mode 100644 index 00000000..79d3cc6a --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.c @@ -0,0 +1,141 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ +#include "../../SDL_internal.h" + +#if SDL_VIDEO_DRIVER_WINDOWS && SDL_VIDEO_OPENGL_EGL + +#include "SDL_windowsvideo.h" +#include "SDL_windowsopengles.h" +#include "SDL_windowsopengl.h" +#include "SDL_log.h" + +/* EGL implementation of SDL OpenGL support */ + +int +WIN_GLES_LoadLibrary(_THIS, const char *path) { + + SDL_VideoData *data = (SDL_VideoData *)_this->driverdata; + + /* If the profile requested is not GL ES, switch over to WIN_GL functions */ + if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) { +#if SDL_VIDEO_OPENGL_WGL + WIN_GLES_UnloadLibrary(_this); + _this->GL_LoadLibrary = WIN_GL_LoadLibrary; + _this->GL_GetProcAddress = WIN_GL_GetProcAddress; + _this->GL_UnloadLibrary = WIN_GL_UnloadLibrary; + _this->GL_CreateContext = WIN_GL_CreateContext; + _this->GL_MakeCurrent = WIN_GL_MakeCurrent; + _this->GL_SetSwapInterval = WIN_GL_SetSwapInterval; + _this->GL_GetSwapInterval = WIN_GL_GetSwapInterval; + _this->GL_SwapWindow = WIN_GL_SwapWindow; + _this->GL_DeleteContext = WIN_GL_DeleteContext; + return WIN_GL_LoadLibrary(_this, path); +#else + return SDL_SetError("SDL not configured with OpenGL/WGL support"); +#endif + } + + if (_this->egl_data == NULL) { + return SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY); + } + + return 0; +} + +SDL_GLContext +WIN_GLES_CreateContext(_THIS, SDL_Window * window) +{ + SDL_GLContext context; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + + if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) { + /* Switch to WGL based functions */ + WIN_GLES_UnloadLibrary(_this); + _this->GL_LoadLibrary = WIN_GL_LoadLibrary; + _this->GL_GetProcAddress = WIN_GL_GetProcAddress; + _this->GL_UnloadLibrary = WIN_GL_UnloadLibrary; + _this->GL_CreateContext = WIN_GL_CreateContext; + _this->GL_MakeCurrent = WIN_GL_MakeCurrent; + _this->GL_SetSwapInterval = WIN_GL_SetSwapInterval; + _this->GL_GetSwapInterval = WIN_GL_GetSwapInterval; + _this->GL_SwapWindow = WIN_GL_SwapWindow; + _this->GL_DeleteContext = WIN_GL_DeleteContext; + + if (WIN_GL_LoadLibrary(_this, NULL) != 0) { + return NULL; + } + + return WIN_GL_CreateContext(_this, window); + } + + context = SDL_EGL_CreateContext(_this, data->egl_surface); + return context; +} + +void +WIN_GLES_DeleteContext(_THIS, SDL_GLContext context) +{ + SDL_EGL_DeleteContext(_this, context); + WIN_GLES_UnloadLibrary(_this); +} + +SDL_EGL_SwapWindow_impl(WIN) +SDL_EGL_MakeCurrent_impl(WIN) + +int +WIN_GLES_SetupWindow(_THIS, SDL_Window * window) +{ + /* The current context is lost in here; save it and reset it. */ + SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata; + SDL_Window *current_win = SDL_GL_GetCurrentWindow(); + SDL_GLContext current_ctx = SDL_GL_GetCurrentContext(); + + + if (_this->egl_data == NULL) { + if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY) < 0) { + return -1; + } + } + + /* Create the GLES window surface */ + windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType)windowdata->hwnd); + + if (windowdata->egl_surface == EGL_NO_SURFACE) { + return SDL_SetError("Could not create GLES window surface"); + } + + return WIN_GLES_MakeCurrent(_this, current_win, current_ctx); +} + +int +WIN_GLES_SetSwapInterval(_THIS, int interval) +{ + /* FIXME: This should call SDL_EGL_SetSwapInterval, but ANGLE has a bug that prevents this + * from working if we do (the window contents freeze and don't swap properly). So, we ignore + * the request for now. + */ + SDL_Log("WARNING: Ignoring SDL_GL_SetSwapInterval call due to ANGLE bug"); + return 0; +} + +#endif /* SDL_VIDEO_DRIVER_WINDOWS && SDL_VIDEO_OPENGL_EGL */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.h new file mode 100644 index 00000000..c94fe52e --- /dev/null +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsopengles.h @@ -0,0 +1,51 @@ +/* + Simple DirectMedia Layer + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ +#include "../../SDL_internal.h" + +#ifndef _SDL_winopengles_h +#define _SDL_winopengles_h + +#if SDL_VIDEO_OPENGL_EGL + +#include "../SDL_sysvideo.h" +#include "../SDL_egl_c.h" + +/* OpenGLES functions */ +#define WIN_GLES_GetAttribute SDL_EGL_GetAttribute +#define WIN_GLES_GetProcAddress SDL_EGL_GetProcAddress +#define WIN_GLES_UnloadLibrary SDL_EGL_UnloadLibrary +#define WIN_GLES_GetSwapInterval SDL_EGL_GetSwapInterval +/* See the WIN_GLES_GetSwapInterval implementation to see why this is commented out */ +/*#define WIN_GLES_SetSwapInterval SDL_EGL_SetSwapInterval*/ +extern int WIN_GLES_SetSwapInterval(_THIS, int interval); + +extern int WIN_GLES_LoadLibrary(_THIS, const char *path); +extern SDL_GLContext WIN_GLES_CreateContext(_THIS, SDL_Window * window); +extern void WIN_GLES_SwapWindow(_THIS, SDL_Window * window); +extern int WIN_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); +extern void WIN_GLES_DeleteContext(_THIS, SDL_GLContext context); +extern int WIN_GLES_SetupWindow(_THIS, SDL_Window * window); + +#endif /* SDL_VIDEO_OPENGL_EGL */ + +#endif /* _SDL_winopengles_h */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.c index fdbcdfc7..07b50560 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.h index 06aaea11..4be4b51b 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsshape.h @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowsshape_h #define _SDL_windowsshape_h diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.c index 8f708cf0..b2cfcbe8 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.h index ff2b4a2a..bf6613de 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowsvideo.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowsvideo_h #define _SDL_windowsvideo_h @@ -44,6 +44,7 @@ #include "SDL_windowsmodes.h" #include "SDL_windowsmouse.h" #include "SDL_windowsopengl.h" +#include "SDL_windowsopengles.h" #include "SDL_windowswindow.h" #include "SDL_events.h" #include "SDL_loadso.h" diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.c b/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.c index cd53975d..5cba9ff2 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.c +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_WINDOWS @@ -28,6 +28,7 @@ #include "../SDL_sysvideo.h" #include "../SDL_pixels_c.h" #include "../../events/SDL_keyboard_c.h" +#include "../../events/SDL_mouse_c.h" #include "SDL_windowsvideo.h" #include "SDL_windowswindow.h" @@ -79,7 +80,8 @@ GetWindowStyle(SDL_Window * window) static void WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + HWND hwnd = data->hwnd; RECT rect; DWORD style; HWND top; @@ -105,7 +107,9 @@ WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags) x = window->x + rect.left; y = window->y + rect.top; + data->expected_resize = TRUE; SetWindowPos(hwnd, top, x, y, w, h, flags); + data->expected_resize = FALSE; } static int @@ -270,6 +274,32 @@ WIN_CreateWindow(_THIS, SDL_Window * window) DestroyWindow(hwnd); return -1; } + +#if SDL_VIDEO_OPENGL_WGL + /* We need to initialize the extensions before deciding how to create ES profiles */ + if (window->flags & SDL_WINDOW_OPENGL) { + WIN_GL_InitExtensions(_this); + } +#endif + +#if SDL_VIDEO_OPENGL_ES2 + if ((window->flags & SDL_WINDOW_OPENGL) && + _this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES +#if SDL_VIDEO_OPENGL_WGL + && (!_this->gl_data || !_this->gl_data->HAS_WGL_EXT_create_context_es2_profile) +#endif + ) { +#if SDL_VIDEO_OPENGL_EGL + if (WIN_GLES_SetupWindow(_this, window) < 0) { + WIN_DestroyWindow(_this, window); + return -1; + } +#else + return SDL_SetError("Could not create GLES window surface (no EGL support available)"); +#endif /* SDL_VIDEO_OPENGL_EGL */ + } else +#endif /* SDL_VIDEO_OPENGL_ES2 */ + #if SDL_VIDEO_OPENGL_WGL if (window->flags & SDL_WINDOW_OPENGL) { if (WIN_GL_SetupWindow(_this, window) < 0) { @@ -278,6 +308,7 @@ WIN_CreateWindow(_THIS, SDL_Window * window) } } #endif + return 0; } @@ -405,16 +436,16 @@ void WIN_RaiseWindow(_THIS, SDL_Window * window) { WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE); - - /* Raising the window while alt-tabbed can cause it to be minimized for some reason? */ - WIN_RestoreWindow(_this, window); } void WIN_MaximizeWindow(_THIS, SDL_Window * window) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + HWND hwnd = data->hwnd; + data->expected_resize = TRUE; ShowWindow(hwnd, SW_MAXIMIZE); + data->expected_resize = FALSE; } void @@ -445,9 +476,11 @@ WIN_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) void WIN_RestoreWindow(_THIS, SDL_Window * window) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; - + SDL_WindowData *data = (SDL_WindowData *)window->driverdata; + HWND hwnd = data->hwnd; + data->expected_resize = TRUE; ShowWindow(hwnd, SW_RESTORE); + data->expected_resize = FALSE; } void @@ -493,7 +526,9 @@ WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, y = window->windowed.y + rect.top; } SetWindowLong(hwnd, GWL_STYLE, style); + data->expected_resize = TRUE; SetWindowPos(hwnd, top, x, y, w, h, SWP_NOCOPYBITS); + data->expected_resize = FALSE; } int @@ -537,17 +572,7 @@ WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) void WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) { - HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; - - if (grabbed) { - RECT rect; - GetClientRect(hwnd, &rect); - ClientToScreen(hwnd, (LPPOINT) & rect); - ClientToScreen(hwnd, (LPPOINT) & rect + 1); - ClipCursor(&rect); - } else { - ClipCursor(NULL); - } + WIN_UpdateClipCursor(window); if (window->flags & SDL_WINDOW_FULLSCREEN) { UINT flags = SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE; @@ -688,6 +713,48 @@ void WIN_OnWindowEnter(_THIS, SDL_Window * window) #endif /* WM_MOUSELEAVE */ } +void +WIN_UpdateClipCursor(SDL_Window *window) +{ + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + SDL_Mouse *mouse = SDL_GetMouse(); + + /* Don't clip the cursor while we're in the modal resize or move loop */ + if (data->in_modal_loop) { + ClipCursor(NULL); + return; + } + + if ((mouse->relative_mode || (window->flags & SDL_WINDOW_INPUT_GRABBED)) && + (window->flags & SDL_WINDOW_INPUT_FOCUS)) { + if (mouse->relative_mode && !mouse->relative_mode_warp) { + LONG cx, cy; + RECT rect; + GetWindowRect(data->hwnd, &rect); + + cx = (rect.left + rect.right) / 2; + cy = (rect.top + rect.bottom) / 2; + + /* Make an absurdly small clip rect */ + rect.left = cx - 1; + rect.right = cx + 1; + rect.top = cy - 1; + rect.bottom = cy + 1; + + ClipCursor(&rect); + } else { + RECT rect; + if (GetClientRect(data->hwnd, &rect) && !IsRectEmpty(&rect)) { + ClientToScreen(data->hwnd, (LPPOINT) & rect); + ClientToScreen(data->hwnd, (LPPOINT) & rect + 1); + ClipCursor(&rect); + } + } + } else { + ClipCursor(NULL); + } +} + #endif /* SDL_VIDEO_DRIVER_WINDOWS */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.h b/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.h index e85c2018..743c322f 100644 --- a/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.h +++ b/jni/SDL2-2.0.1/src/video/windows/SDL_windowswindow.h @@ -18,11 +18,15 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_windowswindow_h #define _SDL_windowswindow_h +#if SDL_VIDEO_OPENGL_EGL +#include "../SDL_egl_c.h" +#endif + typedef struct { SDL_Window *window; @@ -33,7 +37,12 @@ typedef struct WNDPROC wndproc; SDL_bool created; WPARAM mouse_button_flags; + BOOL expected_resize; + SDL_bool in_modal_loop; struct SDL_VideoData *videodata; +#if SDL_VIDEO_OPENGL_EGL + EGLSurface egl_surface; +#endif } SDL_WindowData; extern int WIN_CreateWindow(_THIS, SDL_Window * window); @@ -57,6 +66,7 @@ extern void WIN_DestroyWindow(_THIS, SDL_Window * window); extern SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info); extern void WIN_OnWindowEnter(_THIS, SDL_Window * window); +extern void WIN_UpdateClipCursor(SDL_Window *window); #endif /* _SDL_windowswindow_h */ diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c index e6ca86bc..b2adde8d 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.h index 999d163f..2c6c5516 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11clipboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11clipboard_h #define _SDL_x11clipboard_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.c index 24caea49..fa7b3ab3 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h index 168c07e2..f06fc60f 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11dyn.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11dyn_h #define _SDL_x11dyn_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.c index d9dcc2dd..1bf42199 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 @@ -245,7 +245,13 @@ X11_DispatchFocusOut(SDL_WindowData *data) #ifdef DEBUG_XEVENTS printf("window %p: Dispatching FocusOut\n", data); #endif - SDL_SetKeyboardFocus(NULL); + /* If another window has already processed a focus in, then don't try to + * remove focus here. Doing so will incorrectly remove focus from that + * window, and the focus lost event for this window will have already + * been dispatched anyway. */ + if (data->window == SDL_GetKeyboardFocus()) { + SDL_SetKeyboardFocus(NULL); + } #ifdef X_HAVE_UTF8_STRING if (data->ic) { X11_XUnsetICFocus(data->ic); @@ -274,19 +280,39 @@ X11_DispatchEvent(_THIS) Display *display = videodata->display; SDL_WindowData *data; XEvent xevent; - int i; + int orig_event_type; + KeyCode orig_keycode; XClientMessageEvent m; + int i; SDL_zero(xevent); /* valgrind fix. --ryan. */ X11_XNextEvent(display, &xevent); - /* filter events catchs XIM events and sends them to the correct - handler */ + /* Save the original keycode for dead keys, which are filtered out by + the XFilterEvent() call below. + */ + orig_event_type = xevent.type; + if (orig_event_type == KeyPress || orig_event_type == KeyRelease) { + orig_keycode = xevent.xkey.keycode; + } else { + orig_keycode = 0; + } + + /* filter events catchs XIM events and sends them to the correct handler */ if (X11_XFilterEvent(&xevent, None) == True) { #if 0 printf("Filtered event type = %d display = %d window = %d\n", xevent.type, xevent.xany.display, xevent.xany.window); #endif + if (orig_keycode) { + /* Make sure dead key press/release events are sent */ + SDL_Scancode scancode = videodata->key_layout[orig_keycode]; + if (orig_event_type == KeyPress) { + SDL_SendKeyboardKey(SDL_PRESSED, scancode); + } else { + SDL_SendKeyboardKey(SDL_RELEASED, scancode); + } + } return; } @@ -373,6 +399,14 @@ X11_DispatchEvent(_THIS) /* Gaining input focus? */ case FocusIn:{ + if (xevent.xfocus.mode == NotifyGrab || xevent.xfocus.mode == NotifyUngrab) { + /* Someone is handling a global hotkey, ignore it */ +#ifdef DEBUG_XEVENTS + printf("window %p: FocusIn (NotifyGrab/NotifyUngrab, ignoring)\n", data); +#endif + break; + } + if (xevent.xfocus.detail == NotifyInferior) { #ifdef DEBUG_XEVENTS printf("window %p: FocusIn (NotifierInferior, ignoring)\n", data); @@ -402,6 +436,13 @@ X11_DispatchEvent(_THIS) /* Losing input focus? */ case FocusOut:{ + if (xevent.xfocus.mode == NotifyGrab || xevent.xfocus.mode == NotifyUngrab) { + /* Someone is handling a global hotkey, ignore it */ +#ifdef DEBUG_XEVENTS + printf("window %p: FocusOut (NotifyGrab/NotifyUngrab, ignoring)\n", data); +#endif + break; + } if (xevent.xfocus.detail == NotifyInferior) { /* We still have focus if a child gets focus */ #ifdef DEBUG_XEVENTS @@ -657,7 +698,7 @@ X11_DispatchEvent(_THIS) case MotionNotify:{ SDL_Mouse *mouse = SDL_GetMouse(); - if(!mouse->relative_mode) { + if(!mouse->relative_mode || mouse->relative_mode_warp) { #ifdef DEBUG_MOTION printf("window %p: X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y); #endif diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.h index 3b611755..0af685cb 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11events.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11events_h #define _SDL_x11events_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.c index af39147f..2bfc0ef4 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.h index 8e4c21ae..f5fd4f3f 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11framebuffer.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" extern int X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.c index f3b83c96..6b8c4df7 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.h index 5a023115..5cab9a59 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11keyboard.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11keyboard_h #define _SDL_x11keyboard_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11messagebox.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11messagebox.c index 81c14800..a3dcc654 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11messagebox.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11messagebox.c @@ -19,7 +19,7 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 @@ -48,7 +48,7 @@ #define MIN_DIALOG_HEIGHT 100 /* Minimum dialog height */ static const char g_MessageBoxFontLatin1[] = "-*-*-medium-r-normal--0-120-*-*-p-0-iso8859-1"; -static const char g_MessageBoxFont[] = "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"; +static const char g_MessageBoxFont[] = "-*-*-*-*-*-*-*-120-*-*-*-*-*-*"; static const SDL_MessageBoxColor g_default_colors[ SDL_MESSAGEBOX_COLOR_MAX ] = { { 56, 54, 53 }, /* SDL_MESSAGEBOX_COLOR_BACKGROUND, */ diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.c index a4c242cd..c5a1d799 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 @@ -552,7 +552,8 @@ X11_InitModes(_THIS) in all cases. Anybody want to give this some love? */ crtc = X11_XRRGetCrtcInfo(data->display, res, output_info->crtc); - if (!crtc || crtc->x != displaydata->x || crtc->y != displaydata->y) { + if (!crtc || crtc->x != displaydata->x || crtc->y != displaydata->y || + crtc->width != mode.w || crtc->height != mode.h) { X11_XRRFreeOutputInfo(output_info); X11_XRRFreeCrtcInfo(crtc); continue; diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.h index 5d9789c9..7103d721 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11modes.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11modes_h #define _SDL_x11modes_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.c index 4bcd9d6c..ea0f32da 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.h index ee7a14af..d50bc324 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11mouse.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11mouse_h #define _SDL_x11mouse_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.c index a41033a7..73a65571 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.h index 27d7f9a2..fcf7fe24 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengl.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11opengl_h #define _SDL_x11opengl_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.c index f972ceee..a6cdeebc 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 && SDL_VIDEO_OPENGL_EGL @@ -36,6 +36,7 @@ X11_GLES_LoadLibrary(_THIS, const char *path) { /* If the profile requested is not GL ES, switch over to X11_GL functions */ if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) { #if SDL_VIDEO_OPENGL_GLX + X11_GLES_UnloadLibrary(_this); _this->GL_LoadLibrary = X11_GL_LoadLibrary; _this->GL_GetProcAddress = X11_GL_GetProcAddress; _this->GL_UnloadLibrary = X11_GL_UnloadLibrary; diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.h index 978f91f3..16480c39 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11opengles.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11opengles_h #define _SDL_x11opengles_h @@ -26,7 +26,7 @@ #if SDL_VIDEO_OPENGL_EGL #include "../SDL_sysvideo.h" -#include "../SDL_egl.h" +#include "../SDL_egl_c.h" typedef struct SDL_PrivateGLESData { diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.c index af89851e..1d5ae764 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.h index 96b4a8b0..3a3663d8 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11shape.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11shape_h #define _SDL_x11shape_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.c index a6ce9816..0e83d6c2 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.h index ac451a85..71263d15 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11touch.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11touch_h #define _SDL_x11touch_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.c index c84d4ec6..065211db 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 @@ -440,8 +440,8 @@ X11_CheckWindowManager(_THIS) Atom _NET_SUPPORTING_WM_CHECK; int status, real_format; Atom real_type; - unsigned long items_read, items_left; - unsigned char *propdata; + unsigned long items_read = 0, items_left = 0; + unsigned char *propdata = NULL; Window wm_window = 0; #ifdef DEBUG_WINDOW_MANAGER char *wm_name; @@ -453,11 +453,14 @@ X11_CheckWindowManager(_THIS) _NET_SUPPORTING_WM_CHECK = X11_XInternAtom(display, "_NET_SUPPORTING_WM_CHECK", False); status = X11_XGetWindowProperty(display, DefaultRootWindow(display), _NET_SUPPORTING_WM_CHECK, 0L, 1L, False, XA_WINDOW, &real_type, &real_format, &items_read, &items_left, &propdata); - if (status == Success && items_read) { - wm_window = ((Window*)propdata)[0]; - } - if (propdata) { - X11_XFree(propdata); + if (status == Success) { + if (items_read) { + wm_window = ((Window*)propdata)[0]; + } + if (propdata) { + X11_XFree(propdata); + propdata = NULL; + } } if (wm_window) { @@ -465,8 +468,9 @@ X11_CheckWindowManager(_THIS) if (status != Success || !items_read || wm_window != ((Window*)propdata)[0]) { wm_window = None; } - if (propdata) { + if (status == Success && propdata) { X11_XFree(propdata); + propdata = NULL; } } diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.h index 68a04132..005ca5d6 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11video.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11video_h #define _SDL_x11video_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.c index 62a7e730..fe2596d5 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 @@ -563,6 +563,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) && ( !_this->gl_data || ! _this->gl_data->HAS_GLX_EXT_create_context_es2_profile ) #endif ) { +#if SDL_VIDEO_OPENGL_EGL if (!_this->egl_data) { X11_XDestroyWindow(display, w); return -1; @@ -575,6 +576,9 @@ X11_CreateWindow(_THIS, SDL_Window * window) X11_XDestroyWindow(display, w); return SDL_SetError("Could not create GLES window surface"); } +#else + return SDL_SetError("Could not create GLES window surface (no EGL support available)"); +#endif /* SDL_VIDEO_OPENGL_EGL */ } #endif diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.h index b0eff5cf..b8eda772 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11window.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11window_h #define _SDL_x11window_h diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.c b/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.c index 719d2e35..967ddeb7 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.c +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.c @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 @@ -59,6 +59,18 @@ static void parse_valuators(const double *input_values,unsigned char *mask,int m z++; } } + +static SDL_bool +xinput2_version_okay(Display *display, const int major, const int minor) +{ + int outmajor = major; + int outminor = minor; + if (X11_XIQueryVersion(display, &outmajor, &outminor) != Success) { + return SDL_FALSE; + } + + return ( ((outmajor * 1000) + outminor) >= ((major * 1000) + minor) ); +} #endif /* SDL_VIDEO_DRIVER_X11_XINPUT2 */ void @@ -70,11 +82,6 @@ X11_InitXinput2(_THIS) XIEventMask eventmask; unsigned char mask[3] = { 0,0,0 }; int event, err; - int major = 2, minor = 0; - int outmajor,outminor; -#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH - minor = 2; -#endif /* * Initialize XInput 2 * According to http://who-t.blogspot.com/2009/05/xi2-recipes-part-1.html its better @@ -86,24 +93,17 @@ X11_InitXinput2(_THIS) */ if (!SDL_X11_HAVE_XINPUT2 || !X11_XQueryExtension(data->display, "XInputExtension", &xinput2_opcode, &event, &err)) { - return; + return; /* X server does not have XInput at all */ } - outmajor = major; - outminor = minor; - if (X11_XIQueryVersion(data->display, &outmajor, &outminor) != Success) { - return; + if (!xinput2_version_okay(data->display, 2, 0)) { + return; /* X server does not support the version we want */ } - /* Check supported version */ - if(outmajor * 1000 + outminor < major * 1000 + minor) { - /* X server does not support the version we want */ - return; - } xinput2_initialized = 1; + #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH - /* XInput 2.2 */ - if(outmajor * 1000 + outminor >= major * 1000 + minor) { + if (xinput2_version_okay(data->display, 2, 2)) { /* Multitouch needs XInput 2.2 */ xinput2_multitouch_supported = 1; } #endif @@ -134,7 +134,7 @@ X11_HandleXinput2Event(SDL_VideoData *videodata,XGenericEventCookie *cookie) SDL_Mouse *mouse = SDL_GetMouse(); double relative_cords[2]; - if (!mouse->relative_mode) { + if (!mouse->relative_mode || mouse->relative_mode_warp) { return 0; } diff --git a/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.h b/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.h index 920c1709..ee0e2763 100644 --- a/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.h +++ b/jni/SDL2-2.0.1/src/video/x11/SDL_x11xinput2.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #ifndef _SDL_x11xinput2_h #define _SDL_x11xinput2_h diff --git a/jni/SDL2-2.0.1/src/video/x11/imKStoUCS.c b/jni/SDL2-2.0.1/src/video/x11/imKStoUCS.c index 5dd6b1dd..e4f08646 100644 --- a/jni/SDL2-2.0.1/src/video/x11/imKStoUCS.c +++ b/jni/SDL2-2.0.1/src/video/x11/imKStoUCS.c @@ -22,7 +22,7 @@ be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from the XFree86 Project. */ -#include "SDL_config.h" +#include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_X11 diff --git a/jni/SDL2-2.0.1/test/Makefile.in b/jni/SDL2-2.0.1/test/Makefile.in index f57c4602..8a8c2b8f 100644 --- a/jni/SDL2-2.0.1/test/Makefile.in +++ b/jni/SDL2-2.0.1/test/Makefile.in @@ -21,6 +21,7 @@ TARGETS = \ testgesture$(EXE) \ testgl2$(EXE) \ testgles$(EXE) \ + testgles2$(EXE) \ testhaptic$(EXE) \ testrumble$(EXE) \ testthread$(EXE) \ @@ -49,11 +50,13 @@ TARGETS = \ teststreaming$(EXE) \ testtimer$(EXE) \ testver$(EXE) \ + testviewport$(EXE) \ testwm2$(EXE) \ torturethread$(EXE) \ testrendercopyex$(EXE) \ testmessage$(EXE) \ - + controllermap$(EXE) \ + all: Makefile $(TARGETS) Makefile: $(srcdir)/Makefile.in @@ -125,11 +128,14 @@ testgesture$(EXE): $(srcdir)/testgesture.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@ testgl2$(EXE): $(srcdir)/testgl2.c - $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@ + $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@ testgles$(EXE): $(srcdir)/testgles.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@ +testgles2$(EXE): $(srcdir)/testgles2.c + $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@ + testhaptic$(EXE): $(srcdir)/testhaptic.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @@ -218,6 +224,9 @@ testtimer$(EXE): $(srcdir)/testtimer.c testver$(EXE): $(srcdir)/testver.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) +testviewport$(EXE): $(srcdir)/testviewport.c + $(CC) -o $@ $^ $(CFLAGS) $(LIBS) + testwm2$(EXE): $(srcdir)/testwm2.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @@ -230,6 +239,10 @@ testrendercopyex$(EXE): $(srcdir)/testrendercopyex.c testmessage$(EXE): $(srcdir)/testmessage.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) +controllermap$(EXE): $(srcdir)/controllermap.c + $(CC) -o $@ $^ $(CFLAGS) $(LIBS) + + clean: rm -f $(TARGETS) diff --git a/jni/SDL2-2.0.1/test/README b/jni/SDL2-2.0.1/test/README index a2ff7942..b820a88d 100644 --- a/jni/SDL2-2.0.1/test/README +++ b/jni/SDL2-2.0.1/test/README @@ -25,3 +25,6 @@ These are test programs for the SDL library: testver Check the version and dynamic loading and endianness testwm2 Test window manager -- title, icon, events torturethread Simple test for thread creation/destruction + controllermap Useful to generate Game Controller API compatible maps + + diff --git a/jni/SDL2-2.0.1/test/axis.bmp b/jni/SDL2-2.0.1/test/axis.bmp new file mode 100644 index 0000000000000000000000000000000000000000..c7addd3ed9372e59d11d874dace91bb64840e066 GIT binary patch literal 3746 zcmd6pWmH>R6NcZqP^GT4rL>d?1PK8Ov`ABTcc*U9LX?Dr1d9>^Az1N3-GI7KcXxMp zZ*T4nRG^oBUwePuv(`ClubKUvnb~L0d$v!%^m-_{xK)8UWaRkuu7sK;cH7!OBa6}- zm57PlKJ3APCC)#1RIXrdrAn1hxpHMxsZs@1t5!v|YSmD^dUe#OQ3Ew=)eZ`<`t|FhL4yWp*sviiEiKWgQ6n^N+!#%oG(pp*P0_4bGc<4B z94%V3K+Bdb(W+G|v~JxRZQ8U!+qP|CWo3nS?b@Mz`}XM2p#!X~t(&k3yLX3=j}Lr(ec|Wl2Y-Km z^ytw8Y&IJ`d-g=HUcJz}cW?CR(+7R~_C>#b{m{REe+(Ef00RdO#GpZgFnI7_3>h*6 zLx&E7PM~=j(QKK+=^k|G3GX`VFj>Wif<1l{wcubfu0TU-q#H2}+ zFnRK1OqntTQ>RYFv}w~Yefo3+1O#Blj2W0Yb0%iZnuXc3XJgKsIhZ?lF6Pafhxzm8 zW5I$2Sh#Q@7A;zYz`#HR1qEU8;>B39WC? z&`^j(B8bIegoTAcB9TBUl_ESm95R^C&Z0PftfiMg}r7Gm({*h3xEX-R23sF>5giV_^Ve{tA*s^5{ zwr<^uZQHhC`}XbFv112z?%au8yLMss?%gOZF2J9Z4mj~~a06DM%;^pFhWo7ccPg7beTY%gei4Hy>{%&HDdgRH{9L;mCAjF`b>5?w;OWzI{EZZT=@k zr_$*T&JOJx*RDqNvt~mp2X}X$p00LXeo4`&Br%6BmbIGDM{qT9k#l`o*KJ_q?C$UF zLi+_ol+WJ5rhX$fH*;;SL8XYxSXY!d&EBHDv$wAYwL*v>4)n%#*-AyYfHXf}AmH-_ z5r*vOHuY#-{a6*PAVKJqI?boZXD;URh-h#)Tn?8f4CQKec~`Y%vE3;Dh(x7Q=+yew z<7NhMc|3tgEDj@rA` zgX-9J^kY z6^BW~WimO@HG+x7LQyDJ#M$Fq-^I_hZP`Gi7+MQEml<4sXjr&R9uXNuWG^aGE|Z!w z6p-KrjXS!r%T`38P#HGXCQ}GcD3;12qhl0Gl}f2p#6-%&%@E(j(FN6EdV7?q$c{>5 zT9F3i2*lEe=opnoqb1U*)u!!;xU$Q9SqjC;o|sL%P&1;|#OmXTyvFNw z8YO|mBC**yz|zgr`FlZRq0L5lD&P!vLeHYhZDT=3zUmP1VVD86AA@9 zPGEq4%Qj=DbSKD9VMwGct1~uf4}VeH2{sn!g&`cG@=F32PVZ}D>8=X*v!|9{fUjBZ zT(hiDx90iTiR|go>A7h}jU;HaTkGcCRQr{lEc}JB!34ggJ%0Hpu~P~Tb^;%*23%rRb*J;^igbAdsk=LcOm>0 sdT7V`oUF{Wc%^v8aJH|H2jibhToHP@xFE-<6wRMFnC(=N|37W}8=w12r~m)} literal 0 HcmV?d00001 diff --git a/jni/SDL2-2.0.1/test/button.bmp b/jni/SDL2-2.0.1/test/button.bmp new file mode 100644 index 0000000000000000000000000000000000000000..1593ccea49037934f387f73ea40c96ea32c18d41 GIT binary patch literal 3746 zcmd6pcUY5G8^&*~S`{bYLJ$$7j0^%HEFs8fth??#s)CCu0z&pA2_ut`5EAwt?g8#y zt=c+jt+v`}wYApKR&8so---HBZ1o%e^<3A<^Wp?B}z=+mbU`u6P$S65fKxw*mJ z-5ve<^+W&u{V`y`01O;B5Q7E{f`^9(1`i$#Pft&Hd3j;TkRkB)_QuemL*e7&gJHvl z!PnOp!-o$Cg+jrI5hE~iVOxR8$m3jT(jM=xD^m#DK%$AT~A@qeqWM zTwEODNcTW?{?lqr}xbteZ`}l9GaV-gyUW)~vzWwQG@@nu>Mn)*&q|4e9CW$jHdR`t|FPnVE^KtSs<&Jn;E^ z2m}HMg+ho#B8bIeNF)+SrBcXbGRWm}C=?1Pl}co1XG5h@L9JFpqtPHICkMH?xyZ}Q zLwS<2mMz%2bt|@Q+lKAiw`0eS9oV^ZCt6xs(AwIHUAuN+ z_wL=;vu6+X?%j)h`}Se~{{1*`-~bLDJcvVw4&m_O!#Hx}2#y{-ietx);oW!N#qs0E zapJ@Yy!YOFIC=6UPMtc1)2C14{rBI;2OoTZGiT1=?Afz8ckUd{pFfWeKl~6EE?mGz zAAN+27cb)Dk3YtxOP6r@@@0JT$tU>q(@$~b$`xF_dKI62_8C6^{BwNq#TWSU%P;ZO zS6|`lufN8%YuE72H{am;_3OBC;|9L{_FH`S-FLWo^CrIk{(IcIbqhcI@B?n&zKuI~ z?%?j-ySR7n9)A4sNBs2DPx$%gpK<^GeLQ&Z01qEN#4o@6f?t3A6~F!V8y-D+gx`Pv z9giPB#vgzDfhSL%yu=Ou(Mx3O)5&&c(y4&~|5Kn;8Y4KA9Uc`E!-m3vs88;>@!2gvLjY&sQ zmhg>-Ii38%xe>D1o7^H(JE1p<*&CX*9Gk&1Hhp;Rc93L+&HOQiy- zsBuvjI*0RObR-$(5RZ_Ab$qczCRb*wRBGaD1e3|cQVCzmJI3lAnh-Xmy%0%;HYgx; zIbSG|XRFkjoLpjixjAZ;(ix$Mh_|>8kKne?C@_%9r1(;%X9>hIr8*}sU#rvWbvkW+ zjyl^32}L|}dJi@ys$E6_R2tiR7<(O0BvWeg^7TfeiCCw}Xwc?qoREYs;XAzj!?^9f zY+zsrgW^3qQy_6724jK6O6=8YF&lLRl1XJEzQ{DmH6ohTmJlg)RNzS3N+P4m)foy3 zi)?mc!FHR~38@uMA)z9pdq{X>TeAkx7}2a@v8hBRC*NSQ6xkhR#HPzi>{hcuOQItg z@puMz-|#=1A%Mn;<#Nt>f0j36yD+9fo&jR|3n;*IrM$P>$Rbf&^0M_FZUL-VFh zP4zY94y#$8OM;W|)0W1#1T)(hb|}X(!*dbQ$<>)Gwr9-7XN=8k$kQlfgqa)GGbE^u ziH_nnr+Or1isU(ZQ=yZosc&j-Zmg>=cN9Hk(}? zos3E;6Y-Wt3?9rP_oU}z*3^`>cOuuwvc!r!XBXHBM2_3a@-jzJq0w14i6Cl$4SqyR6h41rXYM@nZcvK8Cy zwjzt!q}LJ|5kDisXK*kr@J|_7jk=m6hkfb_o$ZrnFqsQ2kTu@(dl_JReMQ}lN7GjA zCO#-tY4Wvt1G)ETo!gY;pSd#FJA@JPq72Yd-(o&uO@NjYhv=!~?!|`p6EvEAq6IZr61erqOqjCkYH{zp0UfNvhz__tdB(lF+_JIuz zyKLufE{thv(PdcmhcGr+t5ka+2VOPiOniO7py{U^6)M^odj4f@)v_a9t8vv=3g zOSd0hYg`q_pwr0x|5fA2p{-?G4sX=y>JFT}bos*3dgbE8AS#pQ_bTA&`pNx`_D%a* zYm4+b^0cJc+%N|5nl>YR6?*F6_PUzta;r|Zd + #include + #else + #include + #include + #endif +],[ +],[ +have_opengles2=yes +]) +AC_MSG_RESULT($have_opengles2) + GLLIB="" GLESLIB="" +GLES2LIB="" if test x$have_opengles = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGLES" GLESLIB="$XPATH -lGLESv1_CM" fi +if test x$have_opengles2 = xyes; then + CFLAGS="$CFLAGS -DHAVE_OPENGLES2" + #GLES2LIB="$XPATH -lGLESv2" +fi if test x$have_opengl = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGL" GLLIB="$XPATH $SYS_GL_LIBS" @@ -148,6 +170,7 @@ fi AC_SUBST(GLLIB) AC_SUBST(GLESLIB) +AC_SUBST(GLES2LIB) AC_SUBST(XLIB) dnl Check for SDL_ttf diff --git a/jni/SDL2-2.0.1/test/controllermap.bmp b/jni/SDL2-2.0.1/test/controllermap.bmp new file mode 100644 index 0000000000000000000000000000000000000000..df167f677804eec5746a33f048b564d19db9ab8f GIT binary patch literal 163450 zcmeEP1zc3i_n(DbV5z0qrAv|SP;AA*0=vb;RvJ5K?4}gs+1-MT$`-9YA1b<_V!ZC( z?*;$4cYF8V-Mh;o{@?q}N7$`w6wH43pt02><{U~6j&?Ck7-y}dnfaBu*Qj*h^|$q6_+I|CON7vSpZ3f$b>K&MWf zKkIt+{D8l|KL`j20D*ylASfsZ z1P2F$kdP1%8X5}1!oom!csS_VwJYe>ts97lhydNYcLzOs^Z-43_5{6p^#Z+n_Xd6X z^Z|YQ_67a=^#lF;_Xm-Ykzl}p0bt<3fnd;}L16IU!C=UcAs{L$3Je`O6bu_S3=AJW z9E=z-0*o9v5=2KwgP52YFly8&FnaW8FlNjcFm~)%FmBv9Fn;`aFk!+3Fmd8UFlo{x zFnRK1FlEXVFm>uwFm2j2Fn#)T5E~l{X3UrYX3m@mX3d%fX3w4t=FFJ`=FXi9;^N}K zym|A${Q2|2f&~k}!i5XLqD70q;>C->k|j&P(xpqmvSrIae0)4eNJs#QiHRU7DG4Me zCxeuf6p)&l3ewWj!1CqG!HN|tz{-^?!KziO!0Oej!J0K|z}mHI!Mb(p!20#;!G;YR zKze#Q$jHb5nVFd&D=Q0RXJ><)oE(swn+x*t^1#N88^NYco51GHo57YXTfo+>Tfw$% z+raki+rf?`0!!y#TQ?IBS(&aqeqW|W5RXW)2B~^GiT0#vuDqObLY;1^XJcl3l}bcix)3~OP4Nz%a<>MD_5?7t5>grYuB!U z>({S?($Z2;R#paX+_(X5-n44y`0A^#Ktn?Vc=qfWc>er3c=6%|Xl!f*FJHa{uU@?ZJRT1; zH8p|e=4SBv^=t6v%^UFc?OV{&(gNPSdk5aXe-A!<_y9hB{0P4O`fKpbH{XD7zx@_` z_uY5k`|rO8Km70m`0>Xd!B0Q^1b+VcXYk7}zkpwV{T2N7+i&3a-+u@H`OkmAfB*Ym z@W&s2fIt8I6a4kpU*PY*{|2qCt;qlXx&QTmiaqe=+UEJgdIfm;28MO*8XV{u6glT` zi;89ZFS+_X&{#OVZ-7rwSa5JikgrEjpHT_BAO56%aVq3|b~!I5$g}78)SYMUKYmnK z3*}#JU48wv9W%SRPd?VDLP`His$LH~Es1gIIWPalqk5$GYisKt)!aCeyCgc?z1!5i zciyR2D3M&hzdJsd)+z32T@{B3helb)s$wQN&^N#TgGgEbOQTi~{HJ-9vHQB}O3eP} zR#)yC%P^Y$;OjrtDqL|UR!`kQhweR)MO`Lbes+lN?C%wq^uMQS_Q0DM%Ghi7WqMpT zc>ivmpZ?4bYF2@ht!apR@^L06+so9?pQRb zRo&{O^8K~j=Clem^Bch7##zmH)*j=KRNMX)f&V@oZIe{R#^yEr*s65n`x@w<_a^E1 zbtroB@a{0`ZVfcx-(ExpdGb9){fz&N86DbY4qWGbRRzf}-4@QR?Vf#V|Lyp->HY6@ z^UuGlGV2RrU>&l&+otOO7#6Ft=oeOw{4(nfLV51|LCzd6A-~F<`-9W!4@klobV7mls;C`*$L#)>|iArd(^Y zW=Oe@+vB~|fN{y!!E zqts{sOVfOZz_zfjO5N~I|8je@qN0LzBf&INrKbFw60b5{eOogsw=Ao&c6L&sBkx<> zY9IJvv)B*Tc+CIb@{l|l-_7yZz|`chFGU0F5*xzH0T?iUa@UM<} zJk@*mBTaX-WO>YM`c1@o_=2~l^$*E*pnmpc$L_EHBG#OLL8`x+g1VHpkKmW=dSgQK zuj*dy-x6q+xHX)viRGz(0(IOp8GEzc##;#jct9u6TfgdR%<3aiHHNqHN?hl?1RC^D zPqNi@{dyvg4CYj+xp7-a=@wftRJK72Yd8qDQna}^m(ko z{)ZSn(vDHg5Uo;MqSAWBgZo7U#dY?o)QLu&%5{_>F39<<9-2qrb3G6%|#79Vh&IJ|KHD z#`W+gm$UrNuJurW|KF6GVn{x%p4w_m^cP$dy zl7#hMO%pn3N-Ez#xIA3D*{jD5F~}e5%eKZ2^0RSr_x6KFefj%%xH@#|K5=8&mmNE2 z{Q0X}+olJb3C>d^>CvoR9Q_AO+f-WjUew3GmiPDASo>LsetuWibr!Wv!sC4b3y6-3 zV{&He#PA?L{qbT3#W-^9>52#CR}XB@P0!f8>*TGwXA5 z4=&F&3rIIfxVd+hmobIn(rsw$($rNe5*Cc><8KD2R*~y&*Kuwf8)hE+wFDu58t)(R z)*)TU+5lMeou8GvY3tT)TQ}!rEgftJk8U*XbFrFr=VAhFX_(2(%lAJs^r3Whknf|l zr#`!8LVBqBYL7>lmBWzK-DmFC)mB$k!t?jI+{&uzn!2j%2Xkfwnz}^qdd%H9(j)Ct zlE8nn0*8k>0AN3E`R@J21@M4Ffh#E5U$|zf2LR3sI4m}E?UAa_X4IG9F3#M?vIOwA z)#nF4n|*MWHDlQBs`@H;1S6K?)O>k4(a)f3PU%-0{QBMaTlTHmCtN<-Yw2noVBT*_ zi3IdQ5`e$^3rE@lka+L&(Dx;P7kV$c%l6E{SmCqJ=J$5Iw#mvGt_1Gz5KfU3N3*Lh z^d|cqzt0{|-QNC(&isBvFS2463D8#TlR#X~Ta;r*0vkW^@;+hcIJUBjZ9O{J^efx+ z%0h-&`W-e~3^S|h=44A7=PrTWqoyxTNXJKj!Ipb> ztboC~y>gJtMr@)3o4c~_^?8JuU+j?Xm-oFst8uD+sd>K=E=LG{)uZyAaeWwm(~=V7 zmo8p7Z+7g|38NyrSg(F6CV}c3D~&_X*6nazDE(#{4Xty`X4k?ax~J#M3jY1;(u!mW zpm+%x#CNc@ACKNlrTb<2X1s)-KAy?Wp!L68Edal==ET||=5SsWo|Ov^r53xa+?6!5 zk?Ch@Dg`OokC$8aJlwF_{*v^&X)ILkvaq^>I}+G$mPJ3mV2E!-&th2u$lvP?qCR~G z5~;EO4XJLiZ{II|h_pzUhIz!;pCyp{><1U7LFh?(CUnOvG4w)T4h=q}%)4A6946}W zsNJqtMfD>5sgqPEC=UENI{=Q6<&GfYfE>>G`<$+v(vcGY`T2z-fs3*e8-*|aNq;ZR zmVDa}(>@#V&+&9D6*4q;8e(0c#jIVIZ9h>6y5#RNU<@fhOLtMNkOCeifQZTqdUqt> zP9y$rO?E+mnC4)f9P=aOkN~t7V?I~`Oh3^F6)MqBm78R*3_GGy=JrcmldQE-pz+rp z34+!Y+bOA88R_Zp@&QTQh5mG~Y{hgpNCJA{7i;)b!!7MYUdZZ|RNM5U8xYd9_kdwjkoi$% z0GNr5GA2#%BMZ_&@Mj}k#UypEyBPmxlRgXEFY^pFjj#4`ulNC=+ifG{e7^JQgE9PP zW@e8x&VdOsa{B87D(HSqAUe36K?0M-W^CZK+2c6kunQukvL$djP!NsGAUbtH4@8vc3QqYfTl*2f1?r{f@?8F9O(y4NRA6RO)i3kyfZY_zTD)3k?7KQ~-+5SiWOpTfx&nexI1f2>k3a zJ3U~!N;L4J=w|c_&ymJm6te0eAtyFi0b^?L9sVG4f!1lJCb{l5uvN(9iXIjZ17|hR zM;a}HGeo!s(7)sNeR2Y)^38ac;Edi?8vXS2Oq1Cnz-2r=?GOb}=(59ro`t~!J^@@M z#SYTomZshyPZ7k5pKa9|_L(iPR4|Y36ASdV4VnX8BZQamBc?iGX_xTARpBN*~jRqL7JiM>SMuR zmIR(Edv}95pWAMLho*c5U}1+3|EsMYq44j~HUYh|r0_%o^9=EZ|I9qYG1BQXhXWlO zaF9O)tP9K@sR12;b76oJ1+;dpOylA<>lZE~&+ zV6{Wm&H3m6pt&(py*6GZ9YV+J^IFy5&DwB{tVeH8J>V$aCXwZVk=(<{6sNM^t?Y%=A@02>zGXYhZ-LET2#$cen|v`&ITcHUjhHpv>AZ zl7XxIA*8U;bA+q_NKXW0hS6Nq5X4zNk!`8I?S-9hTHFNh?&f)c90Be{i(|JECV}lv zdxwofQy;K&gylTz7X3NcTKUMZgODRQXYC_|Q+p-K2is6i-J@*@JhCDF@b-Ch{=Z@U zx;3j3dXY!t>VAAlkmVS$R@Pt;rln5@MQFKftMl8Zs!QR_1&&`q)EXL^0oW!0yZ;Xi)}?3V=H=#OW56vRmAhnExNj$0OGlqR;})&ol$Vng zW2DQ_pN`^R6;|@ZS-nx$IG=}N*3eJ~z#ak5Zwv8QsDdh3BuKljvkSkhXY~OIpUI}s zV==9*KiPC-W6tSEpj>(pFvvO^V@%_v_jt-fjT4iVlecm6rj_%@_4RRNIClw)(IQ*W z_4spuBi79`)VR!qdD-al3jzEH{yT&+e_x5vr^@esr%uAcUiO^Tk$oVgYJ>G3p_2o4PNLFY^`F{iqlB70E|sm`yS4T05{<5sN|moPkZ)svT57KYy0#WW zXT3^5D@vT}WCX0~;08JZ9PoU-X0p<@$R;qX7U9*Z*tRBBXifoVz3$-s(^lMuQu8L^P^n>MFc;b2U;Fd ztwHU94tx4{t%*0_X1@uvE2H7<W}@X+=zRG$T9x(py{>$-j{vV1!IoB5c4;c0Etj;& zz~9n?J4_6*JJ(sETRx%f&tNDyi9yWRBaJg&XvKKPg@De`dx8ppwD_hMhJ@!i%s!ii zAn|`60fwdC3eA_;S+d+`^z!yYmRQL<*ReUgDS zotlc`|H$DR-obdH3b)lYDVQ1>78^3COKfLqsk!|>KYuT2Ib8?he@?34=betJh?l05 z7tLxl=qMq?UVd-XDg>R%UX~2XE-<}^IymFyNuFn$;A%}b8I0mzWBx7gLr;PxfGY!E zO2O3dY#5E9vvi)-VoNngfa1PAOy&RvU8`8S;QDT#^!6Wl>M5Djarjq7GzRQK(5bSw zveDlKCJe#DQl0o^i|J{>mUIhG6#pu>N4yqyV)tuS`EjICYIxSul%caM)pMfTMD=U{ z%S;wIuOTt$lwHy#KkIT-9+OWQb6|YO;a_e1%Jn#cPBpN$G28>D4N?bZoIKg%)>veB zx1d`&p!jn`ukxCMiCH?%T1kThZ8Z_549c>k#grVa<=EppjNP+(3*P)-yY5nQ(kg8R zU1x_((Wi%W>^i`KaUF+$sYR3BB?O&H1pmFD#6pAfzihp|#zoyM=+<^9{+!;&c)ao3 ziLe%H{vjEV8lDX>LGVwWVb!9~>8#iTa++-a@2J?UrWWv{tK* z(*L*25a18xKZCNrOTZz=6`Gm>Zer|n_do1pO}Dn^;~%-7$2&5NNI#wrkXZK-z?Ds9 zP!}g9C8Ziqp9yj>Q7#O2w!vH>-f12++Y08LsSWl2+cNk!ocAKqrglqHG^f>}qwrsy z*<^naL8sctiUEpdg9W>2V`nW{k(q~V@|KXdD;P8Yr3T~ia)2HCVrj8!-{RrEM%pI6gX31M-H@p|5oBeoTfMLk zof5dA*bA)N1MNR%-BA3wA=h}kS|0*^%?fxZ#76x4Mwembl?p*jT0&m7Mmq{;48R!v z zed_w6{GD5pM|e`GL31_{wg_kEZd^Ml%#>u?f9cje`_}i@>qahK2k|$IMe(n4eZu24 zbRnQ@bKTy_V${&^vNPQpq#!6JEzz5p?QOgba}1Ej--Wh%tN{vtGR>N9u|#T75vk|J zy5k*509!V<4(_P4UlyL=ja`AD!`TYge=G~e`em`&o6#t||TmLQ7N!<&SQb56hp;{w0hd3-l^CiROAKfeRq;+O7fkw5P0LVSiI;Er5 zf0vc;HjYEr|L*BCtSCG8=^?xS(=#9|r!N>0z_9n5n6=A#in2*z_B`_uiQ5luT`_x* zpOcka@2M*{z*A99m4^qQvKsV`&C;-r{3^!S} zF-&XpHcT}@C(Nu4&J>W z^w5WgMhu2_Ug7W_l3)L1X6H;a?|sl~s1gYfXHl}mpQdf-6P*b6eG9$-$QbKcaKMm3 zXV~(;0k{$Ij>qHr6A-o6rpxJQ5VUvZ42I5fKK@C`ag;&n8D5~*roA{qpdf$CD3a}( z^ugM*1w@lTvZ9*}#3=f{YX`0YF_XEic^&mRN>&2zJO27F%hr-^5?Qnztdk@F#2;%? zIJ}=i39z1CY&LS;x((7fbI67H%i)CEauA>Y6O)>Fyi2_a@X@ISl6y3S{Q7KzAzf#% z0RN<wu11KE#6wdNRM*s;ZGnUY{_8O-^3(TT!vzaIN{a;4c-US6g zaKV+5j+W2ra)ig@?VU&f|AUG0(|-t84WL`oR*K+ESr|$kke9o3kdcmK|AiY5A1v7q zUCDt%+vA728tC?1n6-7VVc>ke$_R6%>RHpx-6UWac{v6hxDS*&y0!J;)(#qg&N%a$ z7A-~bsnTK4wHN2_F_i!QGu2>+M~4$`RKH+VkiUZX zFI`Che{BA5XiPI^=!w}GBDyTt(0^9$wzZQYT#U8!%ZC&oh&08|l5)x82Y}vdiZ++U_0J7zn<${49O&?FPp_>knSyko}!F{(5l>gNc zt*!54JE#FQ&W*f}R6c{|X+d6HoSz@xfM7foFsFC6rRy1)#Q711K+ki~w56-k)7LDUKFCWC zP{S7_N>B;(CNoUo>s3i`z1Z8K`hP7v0qX0h4jO>C6Q1$jB;}w4P)ldf&20AP7k3R2 zeZwmh1)0`9cnZKKXOrc^WTM~fC?}|cji*BPXYkJhexOwk#s7!ES_1r!J^zPzz36UC zHwaIYMiye5x@_*W(Y-@`Jv@Cv`;3}4cUh`v)EA^p4$y~7zq_#X%7%t>i#kgD!p^9N z2S9x9+d1c}zo;L)n}4=nSpNPtX+w^>nRgwI%k81{dZ4!*hq*D1j`*&#qyAjpPO z#v;oQ42-EiQYvpq2aUey`AyG8;`ZEJhMy_yV8+GM9x`F2t{B zF=?{IJa7(Jh>d@;dAKD0nR9ev(K8xtq2-?r&hm@p8ec`&|FtneF~^EKD#BaN^X#~u z1;bc(I;Ns0M*^v_`bG@8k%L?@qKG%{kK3hZ2^Ko%2*f|3fM9CPCtDs5k*U<>+vqtd z&|+t%gMMRCY-hV(1Z^5=BsTtojOK_ErKhiRH%5Jblq5{thCfX{^cRnm}C24Z5Voj z!Jl;vG$8PQ=udc?8`oFz;13a0LeGz9qHcN=ZZG4ao~a2Fi?nUNi( z({CI4aZa%-oJi2AeTBEd*<44If8OoR#72LF%+C!}z_D=3cATLHr8>nYZUrXWBazGF ze02@!3~SJ%0%zifl2ctbA|}apVLhZ!4*v?M(H&#}f-QJphFE4^0rWcn7VD9>G2|_< z6un5Za8J1Iz(ly0BgfNzHHHN+d+1begg!E|lcT5syZL!G(x9!4ZrB68ON7O$88#6? zpZB)=G2*@W(CWI7*|C3l^9&%kG{6`hCui(SN=iwK8*U4X84N2O+uc~3iA04y^E^Sk zRqc?n3YveQBl=xjJG6k6p4|-Lxn#~?r-1|jhX5-Og-UWb6BwgIpR*>*D~l4nX6?H5 z8#ch{K0F*0o(#Hn&AOg`GlxL<*DiF@9?CyrH@_eaK+T^{3l$W{THyy5exQ5UTNN6= z(Lo$1!JgbcfaWrD&#Hkwj@D*I z6cR~Wo1|y%=o#8;WuejP%osD!HFu9-8%}YkmK7ZP$)orae-`@`^(6}bD>Ic20A=>d z6N7~9d-f=w3d|XFYYRhNimsu9XF!m@r=yWBS=Z3Qn$BPt1COg;DjNA=u`f*t>m=>d z`*jmh{`VyIU1Ynofq8N$GCO}aw|-khu&qcLqT*J`Cm;W_VO zJRROPWMjjywlp&}F)=YUx3p%!pcxtX=H6>kf<8P_d|A76De*$ju0`?h(NQ}9(Uu19 zLlm?(!^iR0>R6mDMo@3I);3QP-M3Jh(X&X+yXnsimdzkU5i2~`*WR~B)dGq%D_PsG? z;tdr44Qn)ystP3*cS2M^9&dDzV9v&3Z6jGgEKNx!>8MsOBm%tOg8U#Yc-9A;I%pO0 zjehV@nd5-VhrfC5Y!zA~NczzJlr*m^2|Yuck~C6}zcN3F+p5YVBaO%;=*VVMFQ}rp z;+Ba0AmA~I|G8M~$Db&clRO2P1oB#vt%VYRQ#Kk{L3TC+X8m_a@;L?t6z`wz1dI^9 z&jQT4E9Cx~G{Y*s@aGluB)0G){kjj$FG?K&Ck0;H1Fs@-aF$)USGrMqrfl7F>eT5Y zJGZ2S>-0RQPWz?b20LW+4T}HE0mN-1*ahLmvN&9LiFQ>bm#wG_TqdsDUyQxczNlnlTnNxIg`~nT)9QUun485N=7Z7{oLaE$R5|!j z{3c~Kav$rq9d=;}O))dDdxUv&h*{i;lSf4E)QMS)h_kAxui}?b=zBmz;cspAZ-?Sp ztUH%Z<;)!(5#%4zYt-WHr?1?@B?6Yk1#}2#s@6{t%5PTXX%BsKDAO4hIsk+%&EB%7 zu&@9+Xc~mBurPmn?&={XKntGo3Dre2{lKdNy$`uV)?qS#-p^~Q(;;^1hkQ?+H>^-e zq6@Jl@cVrDC~WR$9U+f9Ey7;lIhmxjM80`#kGTg=|3+P)#!n$)U7um1MIr%sjl0m1 zv>a3JV-tNvrRhCH06;rk6#u*iJ{8;>gIZD`zUEXCNsHz+X!4@8wd+^L&xj6Yz~Xh_ zH6Mg8a&R__T z$DQc{{QGL`l2o+T`l2v11a(Hll%!SbHf&hGc4gwku9ip?eee}bTDxQWkUv^CA0sUi z*lrOd?-ch2I+iwwe7CkVH#MT_QpjYA4%LumZV88c7;R%g27?cji+G>KDYYH=gs)M; zwI$nA1UdpI3A4;<7v8=dbx;@PdD>|M_KHh+7c(sMVchZgrkeju`#k^pzt-0I3T7fW zeS;g#zQ2SHf%X`kR$Njnnw{qt?mJMBJklLL@!n94Aq8$&UVDS`Y}2ceHU*-I0JPw< zvqv}rT@z~t1EB(eLy(6CcA5@w8NH=aXzhg*!{JUgFM+#C_+>TNv~6n3^qH^FfG)3nY+?@zjdIco`@VgX z7ywYVK9HvXw#gwr0r1}3Wkj44^E1S>t}=VDvn5SWpN5!OpffY2QK>Xbm*JahYlU+L zMDla)XOib2_C(Y*Kh!_3V*6#2*N*b8B4`L8NCPi+8{yoyb(Rd);=vCkz}O&cs*!Cn z;V>s!c>nvQ8H6(_Nw@(rc$nf-GPnBzpm$8Z9FAA2V8X_0Dm4fc?A=6A zKK@5eI}zN#Cf~K#F$k7lsP+x&q)d^Gv-=M=)mw zqdRpVa!rk=T)} zW|Qhni}f0zfS31!B5z2(utfhcv-DD^7Zu`vGGqr%W{GlC@Ln|+z~9yUPuRVmNwQUt)Mx=}P( zzx(;`gu@49{O=B<@JG2>RDr!I!<$EyG8h~ZS&-^oCZ9xPDLx2;yqsmc|mZGGYI0ne94Um4u`~R z9IOjYlLV$a6wRil`rEVVWQ&+hHy_njLqjqOJ{#JVYwGI0Nbol#_1wXI)-1vLJl^|U z5&rjaW~2m) z;U{5RgRajTXgd8 z-ha@rp#%DcdfA!UdB&_f`0(93fuUc>{9hmM6j!0Bs|ml9bi%6BBWxBtRSWLSLt*;FK$8QSjT-lu^zw&_Vv53zkkoUcC={M*6sNv=k7H8@a>1U zQe=XpYkGSjEc}kbt|t0U^65C-1@!*=YhJ0cD$w}qTD(iwqsk1dRhF~j=PDcjkHi8E z?$oRE6661^y;uUvzqisDR#%d@I(On0*@CqYf9T%DfkcUFDkta{HOPT00yu@e!BJqJLxEV2Z{D}iwXp8y))QrX zrmK~RU3GceRBxNmIeRPKy=i(S^?}FpM&9d|XJ=Orc6I5!<}i~>kQ}+4M#snZ>wZ)r z0eqqBxJa!AV`f^*-~7oR1m>$RSU3l)$P=-3KjlPF90Sst1q8smXEQ`%Dp*lb$z13d zl5wNuovbb(EeM+4etfvIpY6D7VjU9mg*6(R z%=qy=1Kb?C#%{jxNEKa;IWQzXKGgts`3I$o-HvYYntO?fcf{j=YgrCKLY1rk;XFXL zQcwCLc%v>$OD&>rhm!e=57}F#ofW}y=e9Q0O*&Su99k%Sm^LKCGynfw`y4P>s zw!FT&rax7uNBV6UqLDA+^N*33c!M6nqaP)ln>watb~5=$vxzqU zyK99gD|k2!M2qone7iv#?>u5A2ipAV>#I3Tc2(V@y4tF?A;v9NfJPF zShT8bQ6+tKiN6ln$tNf@6v1BTV93wi2)L}0+L542xou9%4zOR25Ws9FVBO{N=Q z_=QVhFQkExuplS0;R3u(>TL#CSpk*dmdl_H5T6q3O$nNuS$O{3xpPOe=7wu~%}S0> z?P{bfzbelk+DgOU8l>6;fY~z$fxq#9zLuKee^16%K9L-vl5W0~B7p0l&Fj(FeZe|r z4IIM-cte&C^7r-e@$m}`772qePd$)_ow@yEt4D%~&%S-XQCfCW@#FF#AI@6;)D=Gi)EVL(88sEl)?X%yIfOnBW{5c0-##FCyht(-`8zP zvX4qzK=$nyobXaKyq5tbMTk8A_k-0Q+}hQ9z??$zLq&YBjm^5J@Z$jtS9`6SkvA#> zLJb-1q=Hl+XOb&qW@i1N;r0|V-P1qN+d)^0F`&3sVS07?J?4-zB*cA~9_ zSzEd+?ajv@ewD4#@GnkW96nZ`K@zV5qJ_6;seEROqCVinP*C{8$@GWVyf35z&L$9u z$_aD3dPOCw@vQQCl(D{(XTSda`+K<f4ogaAS*OH}Am=}wXh zu@BOzy<-sQ#cp(0o#ky}aAwuT9W%qtD0+taI>uqk4l;=n>^6Dv-`cvXfKX#rc6u*H z>eZsbq_*1s@@Sm_gF&eimx}n_Se%sWM4SjzQ1bs^rzi*R2>hWs7bRg<;2-3Qqz?cm zFw0|B+_`n@<_*N%Bxo#TE(D<{=wk3sgd$JS5+>nYm zpG+)OnG;7v;nyls0J+qo+Rpw+4mWd*Stzr1fv#JR{=>$M9zA+Ye{%3S0>fsV4;Uhi zydV@kKp&ID2t=~>8EOF^M41q|KEb-6vR7VZNTl;5Cp zL9TY$2=)orc|ZL2gM|C*VZdmaRICx^2$%t#s%1b{5abqFAu52Ul?*$vi){A)`Qwig z75?z+`(DvXL_kl_7YBYAJ;+I&A>g5>p^dRX@(Zy?fBPBXoGm2LEB;R~@ox=LM#vSc zoX*k{^*8OTN$Ct7Jf|2$Js>!acOU)%Q!^@z;tWPE3k=oQ0C$mAF~%j$rqHe2W%>WSl6_$8iDiiJ|6PQF*kgZ2++!@h<U&ckVLD+ zUBUO2nc=|S+8QmJRwi5vWR&#A<~bH1%V(0hw%?-Yz$L~jk|x0MAKgwQNnO=8inpYc z1BCs5mcl_0xHenN0Ou))Aa|T02e6We$9izs2z8XWpo<&x0jn}Jj*e?QOSIA&jtRRc zats)y04^B_kRTKIc>tWzpHBxQsS!}B2+k1)J?fv7-%4uLzq<i?^%06y9#zfz@>eAZM$u@=?(X}BE5{Vs*%#(sFAuPim{ra&W1yCJV6X1-4KDvr!ZTLX8V8e=jQ^vwEiX!Aq&Re& z?4^wV`-cOu+>$D-+E)Smt$&y*G67xg{7x36MqZE^ys&M~Mt3)9a0Q{R31?{-$ATeG zi|oB~Bdn3z5@%Bx=2p_?e^^f)L$UsM(F=F{|0`Vd8XPke|1PTIzuHL#f9}}#xcKAh ze>Joq^C%IkV|sefEL6h(7R2A3A;M^e~Eo4N0;DH+_z$a6E%dXzczjkc~t2o+^>{a*w%_5Cf2}wnR6U zliy%d+)qBIWMCHsxsE~pB)ruhR2+;j45olkT$G ze`DjY1Q8QUG(y75vBcKLex8{lR(@EimWcV6dO;3gB@wluU12^?Qwe@x7EHpl|NgQf zRw9)|3!#_U)5G7xeiWwQM_7I4l)x?b_=zFR7iu?JvaE`jxpM1GKm731h#0x1i6hpV z`um&u;^H42W)t8tR|%zyOGA9jMKC8kRDyp^1a4a%l5fhR z1it}^rqLOsxpP3zO_{T`JMYDw2#Cp{aHj)#Ue-oOlVvFS$^OQ4vmUa>|Hj4!-LulK zEgxc~+x;wy$1nBfYouPBNk!)IK_05wf47^#Y~kb+Qr*Eyv}=*p0e<{r8*Q&tg);4| z)(i9xp!wqvKy(-_Ajnv%4w?KIL6(-Ex3{%I3qT~rHUUE>-KYMp1pn49BGZ{{&G)tM zVd3A%gaW|aEOnuo&8qBm13|#*gZLy+a4^LS49m!yujiA9!k;u#n?VQHM6arV}mD-?gi%_`5rLd;9A4krenc z{_a#p8V3HCCns!)|rpcO>8yjEk86dgzhS#Q=Ja?~&Nh{Lg=f};SF|E7p zs5^30vq}#c0NjVFw*LFj6dgAFa{Z9o=%Y$@aaUB_q4@dx2Uyt* zl%s&?NOMM@f1s|)r~2&F@$vTVq@!R2u(dPYEl*XP>2H+c|5SR(TjKp6Xy3-fzwx;d zyslGwW>WHE1KougnYjyXN#^4=?bsvnNkBoto*jA7MkL4h+{_JQfju<(qAuBuMz^4f zHwgQfPAp=qIK2(}k0V3hC0&P$j@m>4KSw}LHtAf1C(z4 zm!O9;CdjP8#T|DrBw9O6$DCmm2yyoJHq-GP6ODWT5FH&8?XP3z10w@mhsq2wL`pse zApYL=rg##-#KA)s;~=g4aUzuQJqIP1yd@jMvO0qS6dF|sRRBxs;-sYHq!If1UDGyY z<>akiG%YIB-Ok$5+TJ~U==8;F^0IR_&G!Lz6NJp4lsb^aumS5atO_p+-BjiZ$+k-R z@AALsG0h;Z0+dscEu*1evt&7H`zxc&Q343`b+xoGHMO*a|E*m8khnkxKXr=bBpbjH zz{k!&g5|~D$j&A{_Fd%5<&1fc54-5euf8~TH&)NR7)YV`H^(D7AQhd@uN?0R%m&A; z$;-*k%E`^!xN&1%ZcbKqZeH4q?mD_YbC(O5KPhzp-1x6O4ITn7=iYbTr!oB5Ybb~S z2-iL#!QcwLHC;Ur_-z6dTcG887$>HFykP(`20(TX3Xplv4)-DfUC&tpt&dLv5m5El8z8@?0L#2$poUb$>HP|(8Tv(6h{0Wj zsEZzQ`q?1_<3mzuSq`suB%ZTf-vh;8>Q8`={z5r*RZ%e#&$v$3kN~{B4UA@_DIY9W!m`;t9kk&ICh!__ z_*b{nfCbA0Gd@1}Ny*mwbOw14rbyupog`UtTm5$^2tSAT>)jDytiZzwc0>mMAh1hg zBB-L`UWAS>pXY@n5a4I%c3u59W4oK81mJ0)=P%@ZwXBDj5XO!=KbKR1>KBEs)*y!>6XN zfWkSo%DuK5pdSDR=&r3)06hOug**EBUpNJ41x@A3`57utj?psrhJqh)fkA$Bt;mB! zX1KW3-5;il2mo&%ce=ijjbCU)M2Ig#pK6c9k+L!Rug+f)=n~I*VGs|}43_C-fw;%| zX)dIgG8i=NAz}&;!!6@WS?mM%4VZ&X@^(M8=swdi+K<~4${(=f0b&IV2?3XsD1o(G z%)1~7!}LQ%dkB=5PbdYKy&HPZTFH1nQym@sE(6mq;C&~4)0yIq5CH0Y(BS}jZM5?+OSgNe z2z1G3Za9KztGB$NPJ}-6yhsG5&?=^@GfJTh@B=hD-2zONKK4&sP?ICh1=$MwR`Ekt zCO~z7kRUV0B^*;Ar>Z>A8$mxLkQAiBv0rh^u%0pxGR)GxeEtHu=g;|VeengR@{ou;qEqJgv(gDiARtr->| zpd5SXZ)|*dL|5@PRIDCT8pqs6vPO^o3-zJvrAI1{HX)wCb#6# zM`B*>@os}njG1~_7GwqCrWl;64(Kb<0QgY8ddWHpuXrXIm|8MyY#7LYD^o*g2pVvp z;)VQHFG>7s!RdDFa`yQ_K)(y#`Op4lz-d3W_SBATk}CR&(TP{s_`iHvAl}w4m4`^6 zo{;TVND}|m!MkhTT<$v^N$@26FWxPQ&mNM8ptV`DQr?|ze46_vkzqfC4})y=`M zToQRhf@vx*&tm`+XaBBY=tPgt_n~3oL7lAtC8nerU&s=ypiRlXpp3>t|K-c3S>x4i z-SI&}Yzh6&&&PR<^CZR6TY>@*FT4%!{fCbqKfG^wE&J)HOiF(6rOyZ)$%E4#HKLhy zXT~_g{|K*3^^UBM>Ou-y=jS%j_ zM1SF)z#TN55RjPYDvfL&?19;QjYl#$H&+g@qEN`%+GH}tD15<5MY@y5tH&v@T+cIC z0sJptGS!_KSGft1CHU)sCuvyP=as^!Zi1$vxYgqHSR105EcU~Dw{P9LeeZ#i6M5TE ziAq_ylVVNZD#X8OPB9)XifcM9ech9CB3OZY7}Q3LZ#C2fTsj|bw2Q>o7K&f!pZN5& z)`eNJ6Mq?UXt2YZ-z)BrQ0eP_l;i(fFy1&^JuX0*5+@BS(a_6SN1Trq6~Eg*FM z;_;<|_hX*iDub@_;GucA1>V!&pm_p#>llt(;lJZSR@hA%QwDCi;A?=fuTxq7aQ)vY z2V5q_&(`>ckZZc@6&rDgihNNzUb$YZ8icLv#s6PD@3-uR4o41fnTWSwn(8lgohAb= zk>E%?6A-Nb3^`Y$1n_nfSc5;_sQ$wLA9Jue6_lA($iOWZYz}f!d2NchselOJGHL2( zDzJuJqhxAO349u9jI-kW{}D(v+sv`NRM!2b9N;n$&HWrz{wAS1SO!``!Cy%@i-73+ z-8LK|aSpslj;rH&b(1I}B^;K4TQ2w}G-{u!?Y|UA2yod%6OJgV z=s}omttLdk%a{GZu7CT`k90K0;&SQram{jwOGkX@zi_D{Sg@YW`a%|3LgDX6DIAjP z7J;p}-vbbp125lh)E?Xp7jGk<=y9RrU+`C1iTJr3_}SiPV(P`hJ$mf;iIb<#oIQWx(q*B$c;WonGpA3T zJaOX0@#DvY?l??%=KQ7Wr8jQfgLlV3;%Uc$sz*v`>BQC2>@F9wE=e6L``Svv7v?Af z8t3`4QOckh3s$y)0A8|O$lH}Pp73KPi*qSy3|$KVt8Oz=HyyiC)5PO7i5w3G>MO3F zJ-91(eOf}?_+kCK2m81?*(0u#o12@Le@Ku1gGNl4I&;SSC5xBwuispl$J3kT?_R{G-oaszjdruR6S^21JRiL?X@a%(E9zJ^c@oTu;{O(=LTY1;g((>-z zyZ6w2_yAX>WgUz}9P(V~knqQkUw{4a^@}I96*n&(NEj7pX5bv2diY6=%JVQ$w_$sj zhIdQLmW`BzTh`w^W$&#ayRft4#IiO6WjNzL?-mxTga9h4Hrd#2Z&6tYyndPEWR%2K zRyxi*Nknt2_s#Zp=(^-+{V(5t#KK&j3fdCW^5L8Be|~-EK;odzE`hUll+|fabFB*B zRa$!6?;5@e(0JecdbzD?Ro((QxcDl2P!JWeMA;BfQM=6wY_4urVJ^UXaXS_`Y-#)V zHSD`3BaA#UUj6uWTQF5C?}u-HuHV$v+-Bmzs~VtUK0)ubC@n3$Kw`^sy*O-ht@MJq zN^*zW2jCs|uMGXx*1t_!LX}DYc)-E6&cO4Qv~*VxdKyP2O~N-WOE9-G?;tSjQTy|} zBKl}y#*(RtN_j-ti}0UUI~A3cmR==QivgGN@w%-oEgd(8SYd)xYpe~F6@l|9p0&JhsX6Fty0oV4 zZ&Xonk$e$KfYX-wm_xwp&Z##_%k@;Ul-{M!D#Jxr`GaScE#JftA%F^2&FN*nz035qZ7)o}FY9d0f4n8Is)0S`=~* z83IB^HOo=J>r#u1Tcu?aCaN<0b8U{Ov-Be-3|iIOk1;U>mGr8*?ZX^&fYYqM)@#5K6kE)qBFCI*dvH(WzQwkqd5iCoxTjczl{Z8GUd=&NnXW(i1wa6jjxI%lG z+*@Eoa6(4kf&_4T88z>*)J~wLiph3Y%Sy|RU?1y>Q4|uzTs(Kz2r-yy_-@Yl`fba! zZp3Mh$>x?U>SjiU^KhXfX;WOH*IeOfY~K9P-=6oGu)YN8y<^#Ww0Zklt@}8LKcs-U zU|j99M*i^M_>9?0e-Bg*N-t`i#eo_#`mFJHo&Ku^>f$Van^(Vm`+lW^;;R^>D`z4* zEAQUCe)Y=b%U7;mFS}LF)TGswJHhb!=Z8K@2zPCRq`N|mP*^x30ZPlR>>Exq=`t@p zBepY*G5u&M0)MGdt|}$o)%~hyxEM>dd~q{BynXxa7IRIAZB^Qim$vdSJ>~6Z3jf=d zZ;C8th^`*Ndj-YutjYFAZX#Hh-nw^s=lbQ#Gj^T3i$;`{=&vK7i;IeXi z6Ty|gJo9FpmfgzRxA;<^?B?C0y-5AbRO|jbpy7SK)>~{)Rf#op=D*v^(8(%U9+khQ ziYczsmubq}0~dl2hrSqG5`xP?$Rf`-5)Ll;z?C4(RU`?hvAypf4-8ceEV-UwKiE6L z!KhQ$sPQBF1=t#eXI@otZh6O;)$$yKsRA@k+AY2Ub^GIpej2gb%DpV12u_aKWnyOj zmUkaMe*Mk2-+lkxyH{V;S61A)arGkH67a==eT92>?bwPONSeiW$l;{9>sKT$nlp9$ zn3$2nheZk8kRiik#!s8IAZcyhj-tb-uRW-J{{H*#zWMl`p!oS_qv7_pnu9pC>_ZzC z&zQe_`=v)Jm&NujX!#fyM)1Ht9OU`YJcfyY?cS}jP-F8sA#{}{dJyHKMDK%ZyKi~V zpVU>A7Oq(^J~F_OrlmtQG^Te7>=8L~TNW0%V7g z5Jt#gWI?`{ge32gm-n)OB)xwm_ucXCIp=roz2~0$-hHyv@*zP8&rhSWYhZyCzugRa z_ON~ph{$T0Ich_Aljs>AG1raZ=hmIOXYDT|2pe!wRN=0y9NMX!-Gpy;oqd#%nFXAO zg3B)`#N!F_fHxpW?@*YJ%l(v@aBb)8&)Rn$zB-avRgN+iTYzep##!2PyJP#$iV)AYtP+zlSQIY$iRtd z24Ia+l}Mt{$k^9+&VDz;#s5Mz(uBlJabB3GKhFl#%vcb@q%*FEO+m(0+gx$a+x~zP zNFLa`2He(V6>0z*imJ(P{1+(OSJ0vOuOywDJaqL#dNCOVIU{G2i^?8{x&=j+AZ$a_ zY;ZKSxpjYj`AQ*gIwPs)o{z0Lu%+DWdRfEN&nQh< z+I<6&YGiD+z8y9H+a6mpG#dkDDLunc;WBoCyARdS#VL^vpEx;cpFda%#(Z^5Z_oR1Je;WmOv-52d#9s1K)Uln;CDcUEf{ zq39LQdv9q)w@GrG%_S-PZ0Ex37tmnUI{(oUyz5J_@VPez2VO({@|CtAYcBU`tHX2H z&Q(s@;2KUP!Qs*RX(Y;z9_#Zp7y^vaMWdg!mc^8_$NGs>Ud+Wu@eW4t{V6oWg+_6P znqbxc4C#L^u4Va3edIEa16DgloQeO@<}|(af!5q2{gUnGPf!Udh^3c5?DAu)IL=c3 zcAil!Yc?^UG<+Y5|ffL%PSqvS`%AM-GDv?pfL(bH>Iw?}jT>Bdq_gu@ z*m@m*0{iVv9hF#7JSBdY)d{$berDQ~@njS1`^qt+B*Ok61$GQzFu$^iXo=THQ<87a z>9wv>WqhRC72`{_{nn2XVdRL&IvY>i^S!DOWrvhT${0Jl{AbI1r1K&a&}#Gl@kskH zIP~cy>ur-w8GWf5P%gK-0TGVsqGF=;bz{j$A;*u2+uIHK2*#z#AqS6tIu{vFopVo} zA>fJQE~uD+#>(iqHv&4ig=ZQ(%cbOe)A>gNTo+>fW_?H5(M&f&$O-Qe1-~)C#C_X! zXSVTXfsCXzJqF(_fb2>$-2Nos3A564Mi`}nCj*Zsd%T6h4!$a56+hfD+;Qg7*T9~; zo*^yg?0Dy6WUx9bny5^0TUTJ}onNk%q|DXsFXRg`1@(&ms+`?+fsxrpST|?nT%7Od zeIl)y=c#Lj1RYuP3jYHrd&QI>o-fr8~eVHE`3UR(D2+OgMNH_{;v8RkV{nojXq2`Z(_02W>2#I|$E3kZr)M$3P_eHg~dZR;6q zW_p?yY5=@gm6dw@Tif>iLZ9HMun#6yuoo_p^^$kGp7yOmS#vD*8yRy&J$ya)5;!o* z2UY-S95^eXIzRFDxvjx|E>3+0jh+xV=bMnNdk=;Gv~Nr3(m8?ShdJ3gdrVz%GU{y} z3*m8^>gB_pna|L#(f~sKwn2~Jd>C>;G0IsLnU61So$2oA=reQ8FBk4-=H-6M!eX)V z)2e{8tAKcRP982k>eRN`WBc0=4cdPrfeL@jMH%nye?JTC3m9p5Jk7I8GmQG@^eB+t zJY}hbacrdDNh}M_MsKbI(rac_HLsTa>FtB)h{Jogt_uwb4c)Z+V8pFQA4s(|92Ux{ z9Tian4$8QaHg0Btlo>ETOT)g9LQ>2sP95pRwcSgDyj=SC|7?`6_t^1Mr+*HFDFHs- zK5hg0_xA``u=&DMLLIkCgUFdxaXUr?-4ToW$pjSVu0O~KHUGFJ9fO~(<8nAP{BwOr z-h*AGDflwZf7z$eK_;@xr$?m6Wvw2q@~G#px!UToRYp01W}5;(Yh9$?)r3b>{R; zsSJ^Eq?hPTq*7sIhkxK#0(!~>T8+VqvUQCE6h#&s@&T?3TBiF;B%#s306?5wCvS^W zQ=hum>5Dvt+ZjriF|Mkf+Wl%?RzIB15p!0K#2Z5#>i1yOKKAuIUnuMPQc$=yrN9Hv zt8ePx$B}C~yv5_oCJ37F2mWfse+BrQBDKgUP)1ndmuLR)11dqeKk%~gMZ~C1+2yw2 zLjz9*2X`odf6_Q)5Dmy>e@4ZZjuWdIl&XN>`(BF^iV&wLb_qB)!W3e;8qgbe=>P2M0K@vr3Wvs<0SX)?pXN>Cg|{%B_qzG#)1 zPQ+OhaFfcoFn_bl-8qQHZYA!UkuktPW?`WyY(%EP3xTp~!nrA9ey*%n${iHp zzBpGpz5)$G!}9l@UHuBwBsj`#`1D23k*8CN(B6zgQ~+k)cAIFLg<&sahnU*?3?l0& znPug)U%O2YF57)rTd4z&>@GE;I`W&sci;2_>x!4$i6Yl z+I3d~kEQEez$gzI{s?ce@Z<5M_uex~bzLe|uq&dM*bfYOn$N0j^7DWNE{_W+JB~(r zdR&EI)gl)+9sL6@FvQT62b3V5K%8}L?IfR>dv52|RHHcf75YtQ=dZN#zol(oGS6~^ zxUX%OrEA#bR!X8NQdY@fCtV2j^`5r(9;LBfBlf@={PO78e_i|C>VGYQIP|8O{*tON z=kez<*qXIbst!DXq$F~&>wxK7qF!NXm566&Fv=@)VkY$s=O=iXC$8F3O$ov`oE$Lm zI<^AINCFNpsURdhKDE@xZq&xudL-z9MSoq+KBvtMjeI`89R~_k%Un4L`Fw%+v0ul~ zd=|9d!(4HBwH3ERo!j>cI`EuKD=ulSZtwkDT<y($$qDabE`_fOudrJTmt24c)mFJ>^ z&vVI4ZVgZKfUgj5UG?&wC+Q-A6cE1XdW*V#lnO$0mAA*|izT@cGlp%;Z9u0KpqN)D z5ZBSLukK#?Eqr%a*!JCfe?A-eAhCce=Bs=e3HvO{?bl2zNe2>@qT(N|6# z4*&6o13#a>9Q`;kzg#ThBhRY}>^Zd!SG{N67s>lRfPbCtANf{ds#7HBg-E7wvLA`$ znzz@D626iwZ6aKrEWi{k>TNMj|7O@rFH5~(M@udcU}S-m#N(%KcmA$Iq5`6ETWeT< zGDYbln*o$f3nagG{v21KD+{pf)z~J%$jwrcur5Xs5{FwJV>kL!gAxI0BzBrko!F4V z)&Jo_n&u1YN)GoJ_eO+nuE2s0O5~mV%TmCG;p5nD5UYAe>+{Ch-K|ng!g3@8>8&;T zOBDxaoduc#WE6-cX-5OR!fB1Fxm+&>tG~2J=dVl|NE3_ok_osHpS^eRrc?>A1_KAl zl|gle^k`k{vOG>VS)Cv%gp%?TzP{TY;P`wb4r!O zqqD&?=Wi_}sa+A^+)nKZB9tN!iAK1Kyn*+t^)Zlmbwc9rK~~+C+$rbOLuY-dxFy%R z?l;OguPSJ@j3r_Qos_5(B+~)0L`+NgW0kj)|ISx+5`hkUkB>z_12v08Ev7T`UPOkk zT{PX_+uLW-s%zLX2H;hrQK`V$pd_LcPEa7ql7LiMAdyI9GKET|6&05PZ?z|%U*3pa{>Uo9_f<}o1dts$tz|0+26U)JF9)wA6cpNIoY6Xa7YH=y<-Q9CP zg?>JM?6~EnUQS(3ZlY1$m4!>auauS_Zl@3fQAd@TT_ z5^xhrvXA;%4_tI64NvC)eodG;0dR{q1=o*i@M=yVk_s}D;-6pIwZNbjAWtM5xw15Ys6oP^q`!_>7wqk5KX}yiFPE+S zcDC0b$9dbM6y1UAsND`=QGS@a*Kg^ihJD`-o+%wtS-9xAgT9U{)oK)=PZTOfISzlo z5c|O%p6;##?fSa<2Cx1p>TOzKS)HUo1T)R6NmTN%|J*kee69mQ2U=UC=%3>O*6Gnc zlU`_}0dht}(yl6E;y%9o=h2h*Il$Yhu_u)H+sfWEM;-uZ*$2FXBU|JxSAB%^WVQRI zH^t~GP&!_uz@Pi_nnYYqCXz}y@^MS74eWC92_=7c%ufWwls?et$Gqsy{@sz%En8}$ zyZeV)?RjXX(TQKF@GnEg9#1TMI)BJH-3e{c8qaWTR_z=>l(Ag3L&S;*3U8UXPuab^HL zL(uqiZtozZ@t;WfuWd}LJmsW^6#0oGCT1gTUsFPD$6l|O*#PD35KMciU|=mkN!oC? z=v=v$#q={7IglOS%g1aI?d%x8OLe-dfav-?9;evLXH66l0e))Q*S>f30H*b-#0SrO zjIe(}rTw#W;us>J>cDGsAobTKDv;0*4w(^CA~!P#k;7_Rk1e#8*!J(_3IH5FlC!Y) z*Y8IZk|@V^$H84Mk4+Zuo07O4>Z1>>u=kq7Vk$KQ*OmHHSl54(mJDBqEWd z_~8`$oyCef6Qe!aoKr9X!X7CqUWu6tFymkGU`H@b3<{icf8C?H1xyUL(hdi1(q!X; z;eLn@F%mDHso~@wMj8LXf~sX-b?UT-s_Gns>&E-IhjHXsYyT8v{1Ed#9Cq(H^-qzc zK?~22lvTm0TLX~3<5RMtUxq0dyIM($CPTA0+NaUr-EAvd&8?&bYb9e~9H5rM7_=fK0gh}ge4USvmo}DP`@r6tmmA?0iIx)4N%<< z+O0@S_ZmV~OV-`6t@#vQGF86J5eS5Qc2x;A{`j_alid6F>t{c7-29E3b{@Zz$HG`; zXXk0!MkBxLw?oj9G`HZr`4_DtA#-|fc4dPT!=rUIz25r+dHZ%ZUZ%LmH87jd*W2JY! zH_!~EsV%E>jtxD_)HDkKtlqRVwGHe`5Md&TwD^2`3^F|Dd4}??YQQ4%qZt!pG!({KqCYf%x`ca0jD)? z%u`j$>6>lpjK3WWQdd0w;1Mu0aB<06Oy?36i;5UAaD~~d_faqrZ}){^5MY$l1#=Hh zB;YiOx5}B6-@}+6bwi-q)7^6Rh{f2|6mu z*(BV!mgmCQ0mXns7niQShN%;IJSK%Onxa3f?*~=i{ab3`!1F8Y!Aol=}N_X~)FrmlV zj4w{?7_V1Nz97OLfbA7%PXQ4Fi@x+E8K00=x#QX4q0iWkY?v`0oYa6Bvn3jbr&6y3 zkG^D9R*pVG%vkHW`C}eXQp7b(oMu>?N4pf%yUSe|%)v>b5oX95 zlw{UglqcQAKa@ag{ClpJz5#;`6L0i3dtvarP}aDjYlUXdq@D~+{seI(=a%My?>; zk{%~IS%7JL6J?Prc=sG6l7Cfn1d3@Sw5c$Ec@!K+b^r+B| zd%JqPe2TtzHl=#rDER-6YD(0$CN0yl)G-IAlx%BFYFetTG06Cfzc=@n{PY&w{3I~i zYH>m4Exm7TLKSBq&vN2T|JwbZWynio(PfGW!KgPWYhJ2pHaMYSIYaMTn|a0cPr!mu zi#M*dh<))hzpHTuPH33VG;z@)o;E)*e5Ao~3aI3`|0xiJFp&v>|qST}T zPLTAph=-zhvk)CXl0j{JhP{5+8KYLj1u)!d@v1(S@e2Gf#05aL6>!$szcXMrBR>C| zJ>D|JvVftc+NuP>y`z@Fr9NDYK*dUqtC^N!wz4yW4ewW}%LK>OX&gW$~|!Ke4(B_l8`2uNsRIN5fg0Z`Xjs z+POBLr}Hg}NBx))y!~wOSwfr^5lertM7SwQkdTS?sYP&Q%Z}3?96A6Ar}A5g G;r|0kJ7VYn literal 0 HcmV?d00001 diff --git a/jni/SDL2-2.0.1/test/controllermap.c b/jni/SDL2-2.0.1/test/controllermap.c new file mode 100644 index 00000000..df4c892c --- /dev/null +++ b/jni/SDL2-2.0.1/test/controllermap.c @@ -0,0 +1,443 @@ +/* + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Game controller mapping generator */ +/* Gabriel Jacobo */ + +#include +#include +#include + +#include "SDL.h" + +#ifndef SDL_JOYSTICK_DISABLED + +#ifdef __IPHONEOS__ +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 480 +#else +#define SCREEN_WIDTH 512 +#define SCREEN_HEIGHT 317 +#endif + +#define MAP_WIDTH 512 +#define MAP_HEIGHT 317 + +#define MARKER_BUTTON 1 +#define MARKER_AXIS 2 + +typedef struct MappingStep +{ + int x, y; + double angle; + int marker; + char *field; + int axis, button, hat, hat_value; + char mapping[4096]; +}MappingStep; + + +SDL_Texture * +LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) +{ + SDL_Surface *temp; + SDL_Texture *texture; + + /* Load the sprite image */ + temp = SDL_LoadBMP(file); + if (temp == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError()); + return NULL; + } + + /* Set transparent pixel as the pixel at (0,0) */ + if (transparent) { + if (temp->format->palette) { + SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *) temp->pixels); + } else { + switch (temp->format->BitsPerPixel) { + case 15: + SDL_SetColorKey(temp, SDL_TRUE, + (*(Uint16 *) temp->pixels) & 0x00007FFF); + break; + case 16: + SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *) temp->pixels); + break; + case 24: + SDL_SetColorKey(temp, SDL_TRUE, + (*(Uint32 *) temp->pixels) & 0x00FFFFFF); + break; + case 32: + SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *) temp->pixels); + break; + } + } + } + + /* Create textures from the image */ + texture = SDL_CreateTextureFromSurface(renderer, temp); + if (!texture) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); + SDL_FreeSurface(temp); + return NULL; + } + SDL_FreeSurface(temp); + + /* We're ready to roll. :) */ + return texture; +} + +static void +DrawRect(SDL_Renderer *r, const int x, const int y, const int w, const int h) +{ + const SDL_Rect area = { x, y, w, h }; + SDL_RenderFillRect(r, &area); +} + +static SDL_bool +WatchJoystick(SDL_Joystick * joystick) +{ + SDL_Window *window = NULL; + SDL_Renderer *screen = NULL; + SDL_Texture *target, *background, *button, *axis, *marker; + const char *name = NULL; + SDL_bool retval = SDL_FALSE; + SDL_bool done = SDL_FALSE, next=SDL_FALSE; + SDL_Event event; + SDL_Rect dst; + int s, _s; + Uint8 alpha=200, alpha_step = -1; + Uint32 alpha_ticks; + char mapping[4096], temp[4096]; + MappingStep *step; + MappingStep steps[] = { + {342, 132, 0.0, MARKER_BUTTON, "x", -1, -1, -1, -1, ""}, + {387, 167, 0.0, MARKER_BUTTON, "a", -1, -1, -1, -1, ""}, + {431, 132, 0.0, MARKER_BUTTON, "b", -1, -1, -1, -1, ""}, + {389, 101, 0.0, MARKER_BUTTON, "y", -1, -1, -1, -1, ""}, + {174, 132, 0.0, MARKER_BUTTON, "back", -1, -1, -1, -1, ""}, + {233, 132, 0.0, MARKER_BUTTON, "guide", -1, -1, -1, -1, ""}, + {289, 132, 0.0, MARKER_BUTTON, "start", -1, -1, -1, -1, ""}, + {116, 217, 0.0, MARKER_BUTTON, "dpleft", -1, -1, -1, -1, ""}, + {154, 249, 0.0, MARKER_BUTTON, "dpdown", -1, -1, -1, -1, ""}, + {186, 217, 0.0, MARKER_BUTTON, "dpright", -1, -1, -1, -1, ""}, + {154, 188, 0.0, MARKER_BUTTON, "dpup", -1, -1, -1, -1, ""}, + {77, 40, 0.0, MARKER_BUTTON, "leftshoulder", -1, -1, -1, -1, ""}, + {91, 0, 0.0, MARKER_BUTTON, "lefttrigger", -1, -1, -1, -1, ""}, + {396, 36, 0.0, MARKER_BUTTON, "rightshoulder", -1, -1, -1, -1, ""}, + {375, 0, 0.0, MARKER_BUTTON, "righttrigger", -1, -1, -1, -1, ""}, + {75, 154, 0.0, MARKER_BUTTON, "leftstick", -1, -1, -1, -1, ""}, + {305, 230, 0.0, MARKER_BUTTON, "rightstick", -1, -1, -1, -1, ""}, + {75, 154, 0.0, MARKER_AXIS, "leftx", -1, -1, -1, -1, ""}, + {75, 154, 90.0, MARKER_AXIS, "lefty", -1, -1, -1, -1, ""}, + {305, 230, 0.0, MARKER_AXIS, "rightx", -1, -1, -1, -1, ""}, + {305, 230, 90.0, MARKER_AXIS, "righty", -1, -1, -1, -1, ""}, + }; + + /* Create a window to display joystick axis position */ + window = SDL_CreateWindow("Game Controller Map", SDL_WINDOWPOS_CENTERED, + SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH, + SCREEN_HEIGHT, 0); + if (window == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); + return SDL_FALSE; + } + + screen = SDL_CreateRenderer(window, -1, 0); + if (screen == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); + SDL_DestroyWindow(window); + return SDL_FALSE; + } + + target = SDL_CreateTexture(screen, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_TARGET, MAP_WIDTH, MAP_HEIGHT); + background = LoadTexture(screen, "controllermap.bmp", SDL_FALSE); + button = LoadTexture(screen, "button.bmp", SDL_TRUE); + axis = LoadTexture(screen, "axis.bmp", SDL_TRUE); + SDL_RaiseWindow(window); + + /* Print info about the joystick we are watching */ + name = SDL_JoystickName(joystick); + SDL_Log("Watching joystick %d: (%s)\n", SDL_JoystickInstanceID(joystick), + name ? name : "Unknown Joystick"); + SDL_Log("Joystick has %d axes, %d hats, %d balls, and %d buttons\n", + SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick), + SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick)); + + SDL_Log("\n\n\ + ====================================================================================\n\ + Press the buttons on your controller when indicated\n\ + (Your controller may look different than the picture)\n\ + If you want to correct a mistake, press backspace or the back button on your device\n\ + To skip a button, press SPACE or click/touch the screen\n\ + To exit, press ESC\n\ + ====================================================================================\n"); + + /* Initialize mapping with GUID and name */ + SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick), temp, SDL_arraysize(temp)); + SDL_snprintf(mapping, SDL_arraysize(mapping), "%s,%s,platform:%s,", + temp, name ? name : "Unknown Joystick", SDL_GetPlatform()); + + /* Loop, getting joystick events! */ + for(s=0; smapping, mapping, SDL_arraysize(step->mapping)); + step->axis = -1; + step->button = -1; + step->hat = -1; + step->hat_value = -1; + SDL_SetClipboardText("TESTING TESTING 123"); + + switch(step->marker) { + case MARKER_AXIS: + marker = axis; + break; + case MARKER_BUTTON: + marker = button; + break; + default: + break; + } + + dst.x = step->x; + dst.y = step->y; + SDL_QueryTexture(marker, NULL, NULL, &dst.w, &dst.h); + next=SDL_FALSE; + + while (!done && !next) { + if (SDL_GetTicks() - alpha_ticks > 5) { + alpha_ticks = SDL_GetTicks(); + alpha += alpha_step; + if (alpha == 255) { + alpha_step = -1; + } + if (alpha < 128) { + alpha_step = 1; + } + } + + SDL_SetRenderTarget(screen, target); + SDL_RenderCopy(screen, background, NULL, NULL); + SDL_SetTextureAlphaMod(marker, alpha); + SDL_SetTextureColorMod(marker, 10, 255, 21); + SDL_RenderCopyEx(screen, marker, NULL, &dst, step->angle, NULL, 0); + SDL_SetRenderTarget(screen, NULL); + SDL_RenderCopy(screen, target, NULL, NULL); + SDL_RenderPresent(screen); + + if (SDL_PollEvent(&event)) { + switch (event.type) { + case SDL_JOYAXISMOTION: + if (event.jaxis.value > 20000 || event.jaxis.value < -20000) { + for (_s = 0; _s < s; _s++) { + if (steps[_s].axis == event.jaxis.axis) { + break; + } + } + if (_s == s) { + step->axis = event.jaxis.axis; + SDL_strlcat(mapping, step->field, SDL_arraysize(mapping)); + SDL_snprintf(temp, SDL_arraysize(temp), ":a%u,", event.jaxis.axis); + SDL_strlcat(mapping, temp, SDL_arraysize(mapping)); + s++; + next=SDL_TRUE; + } + } + + break; + case SDL_JOYHATMOTION: + for (_s = 0; _s < s; _s++) { + if (steps[_s].hat == event.jhat.hat && steps[_s].hat_value == event.jhat.value) { + break; + } + } + if (_s == s) { + step->hat = event.jhat.hat; + step->hat_value = event.jhat.value; + SDL_strlcat(mapping, step->field, SDL_arraysize(mapping)); + SDL_snprintf(temp, SDL_arraysize(temp), ":h%u.%u,", event.jhat.hat, event.jhat.value ); + SDL_strlcat(mapping, temp, SDL_arraysize(mapping)); + s++; + next=SDL_TRUE; + } + break; + case SDL_JOYBALLMOTION: + break; + case SDL_JOYBUTTONUP: + for (_s = 0; _s < s; _s++) { + if (steps[_s].button == event.jbutton.button) { + break; + } + } + if (_s == s) { + step->button = event.jbutton.button; + SDL_strlcat(mapping, step->field, SDL_arraysize(mapping)); + SDL_snprintf(temp, SDL_arraysize(temp), ":b%u,", event.jbutton.button); + SDL_strlcat(mapping, temp, SDL_arraysize(mapping)); + s++; + next=SDL_TRUE; + } + break; + case SDL_FINGERDOWN: + case SDL_MOUSEBUTTONDOWN: + /* Skip this step */ + s++; + next=SDL_TRUE; + break; + case SDL_KEYDOWN: + if (event.key.keysym.sym == SDLK_BACKSPACE || event.key.keysym.sym == SDLK_AC_BACK) { + /* Undo! */ + if (s > 0) { + SDL_strlcpy(mapping, step->mapping, SDL_arraysize(step->mapping)); + s--; + next = SDL_TRUE; + } + break; + } + if (event.key.keysym.sym == SDLK_SPACE) { + /* Skip this step */ + s++; + next=SDL_TRUE; + break; + } + + if ((event.key.keysym.sym != SDLK_ESCAPE)) { + break; + } + /* Fall through to signal quit */ + case SDL_QUIT: + done = SDL_TRUE; + break; + default: + break; + } + } + } + + } + + if (s == SDL_arraysize(steps) ) { + SDL_Log("Mapping:\n\n%s\n\n", mapping); + /* Print to stdout as well so the user can cat the output somewhere */ + printf("%s\n", mapping); + } + + while(SDL_PollEvent(&event)) {}; + + SDL_DestroyRenderer(screen); + SDL_DestroyWindow(window); + return retval; +} + +int +main(int argc, char *argv[]) +{ + const char *name; + int i; + SDL_Joystick *joystick; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize SDL (Note: video is required to start event loop) */ + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + exit(1); + } + + /* Print information about the joysticks */ + SDL_Log("There are %d joysticks attached\n", SDL_NumJoysticks()); + for (i = 0; i < SDL_NumJoysticks(); ++i) { + name = SDL_JoystickNameForIndex(i); + SDL_Log("Joystick %d: %s\n", i, name ? name : "Unknown Joystick"); + joystick = SDL_JoystickOpen(i); + if (joystick == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_JoystickOpen(%d) failed: %s\n", i, + SDL_GetError()); + } else { + char guid[64]; + SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick), + guid, sizeof (guid)); + SDL_Log(" axes: %d\n", SDL_JoystickNumAxes(joystick)); + SDL_Log(" balls: %d\n", SDL_JoystickNumBalls(joystick)); + SDL_Log(" hats: %d\n", SDL_JoystickNumHats(joystick)); + SDL_Log(" buttons: %d\n", SDL_JoystickNumButtons(joystick)); + SDL_Log("instance id: %d\n", SDL_JoystickInstanceID(joystick)); + SDL_Log(" guid: %s\n", guid); + SDL_JoystickClose(joystick); + } + } + +#ifdef ANDROID + if (SDL_NumJoysticks() > 0) { +#else + if (argv[1]) { +#endif + SDL_bool reportederror = SDL_FALSE; + SDL_bool keepGoing = SDL_TRUE; + SDL_Event event; + int device; +#ifdef ANDROID + device = 0; +#else + device = atoi(argv[1]); +#endif + joystick = SDL_JoystickOpen(device); + + while ( keepGoing ) { + if (joystick == NULL) { + if ( !reportederror ) { + SDL_Log("Couldn't open joystick %d: %s\n", device, SDL_GetError()); + keepGoing = SDL_FALSE; + reportederror = SDL_TRUE; + } + } else { + reportederror = SDL_FALSE; + keepGoing = WatchJoystick(joystick); + SDL_JoystickClose(joystick); + } + + joystick = NULL; + if (keepGoing) { + SDL_Log("Waiting for attach\n"); + } + while (keepGoing) { + SDL_WaitEvent(&event); + if ((event.type == SDL_QUIT) || (event.type == SDL_FINGERDOWN) + || (event.type == SDL_MOUSEBUTTONDOWN)) { + keepGoing = SDL_FALSE; + } else if (event.type == SDL_JOYDEVICEADDED) { + joystick = SDL_JoystickOpen(device); + break; + } + } + } + } + else { + SDL_Log("\n\nUsage: ./controllermap number\nFor example: ./controllermap 0\nOr: ./controllermap 0 >> gamecontrollerdb.txt"); + } + SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); + + return 0; +} + +#else + +int +main(int argc, char *argv[]) +{ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Joystick support.\n"); + exit(1); +} + +#endif diff --git a/jni/SDL2-2.0.1/test/testdrawchessboard.c b/jni/SDL2-2.0.1/test/testdrawchessboard.c index 567d3fb8..bb30bd8d 100644 --- a/jni/SDL2-2.0.1/test/testdrawchessboard.c +++ b/jni/SDL2-2.0.1/test/testdrawchessboard.c @@ -1,110 +1,110 @@ -/* - Copyright (C) 1997-2013 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely. - - This file is created by : Nitin Jain (nitin.j4@samsung.com) -*/ - -/* Sample program: Draw a Chess Board by using SDL_CreateSoftwareRenderer API */ - -#include -#include - -#include "SDL.h" - -void -DrawChessBoard(SDL_Renderer * renderer) -{ - int row = 0,coloum = 0,x = 0; - SDL_Rect rect, darea; - - /* Get the Size of drawing surface */ - SDL_RenderGetViewport(renderer, &darea); - - for(row; row < 8; row++) - { - coloum = row%2; - x = x + coloum; - for(coloum; coloum < 4+(row%2); coloum++) - { - SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0); - - rect.w = darea.w/8; - rect.h = darea.h/8; - rect.x = x * rect.w; - rect.y = row * rect.h; - x = x + 2; - SDL_RenderFillRect(renderer, &rect); - } - x=0; - } -} - -int -main(int argc, char *argv[]) -{ - SDL_Window *window; - SDL_Surface *surface; - SDL_Renderer *renderer; - +/* + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. + + This file is created by : Nitin Jain (nitin.j4@samsung.com) +*/ + +/* Sample program: Draw a Chess Board by using SDL_CreateSoftwareRenderer API */ + +#include +#include + +#include "SDL.h" + +void +DrawChessBoard(SDL_Renderer * renderer) +{ + int row = 0,coloum = 0,x = 0; + SDL_Rect rect, darea; + + /* Get the Size of drawing surface */ + SDL_RenderGetViewport(renderer, &darea); + + for(row; row < 8; row++) + { + coloum = row%2; + x = x + coloum; + for(coloum; coloum < 4+(row%2); coloum++) + { + SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF); + + rect.w = darea.w/8; + rect.h = darea.h/8; + rect.x = x * rect.w; + rect.y = row * rect.h; + x = x + 2; + SDL_RenderFillRect(renderer, &rect); + } + x=0; + } +} + +int +main(int argc, char *argv[]) +{ + SDL_Window *window; + SDL_Surface *surface; + SDL_Renderer *renderer; + /* Enable standard application logging */ - SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); - - /* Initialize SDL */ - if(SDL_Init(SDL_INIT_VIDEO) != 0) - { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init fail : %s\n", SDL_GetError()); - return 1; - } - - - /* Create window and renderer for given surface */ - window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN); - if(!window) - { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n",SDL_GetError()); - return 1; - } - surface = SDL_GetWindowSurface(window); - renderer = SDL_CreateSoftwareRenderer(surface); - if(!renderer) - { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError()); - return 1; - } - - /* Clear the rendering surface with the specified color */ - SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0); - SDL_RenderClear(renderer); - - - /* Draw the Image on rendering surface */ - while(1) - { - SDL_Event e; - if (SDL_PollEvent(&e)) { - if (e.type == SDL_QUIT) - break; - - if(e.key.keysym.sym == SDLK_ESCAPE) - break; - } - - DrawChessBoard(renderer); - - /* Got everything on rendering surface, - now Update the drawing image on window screen */ - SDL_UpdateWindowSurface(window); - - } - - return 0; -} - + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize SDL */ + if(SDL_Init(SDL_INIT_VIDEO) != 0) + { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init fail : %s\n", SDL_GetError()); + return 1; + } + + + /* Create window and renderer for given surface */ + window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN); + if(!window) + { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n",SDL_GetError()); + return 1; + } + surface = SDL_GetWindowSurface(window); + renderer = SDL_CreateSoftwareRenderer(surface); + if(!renderer) + { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError()); + return 1; + } + + /* Clear the rendering surface with the specified color */ + SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); + SDL_RenderClear(renderer); + + + /* Draw the Image on rendering surface */ + while(1) + { + SDL_Event e; + if (SDL_PollEvent(&e)) { + if (e.type == SDL_QUIT) + break; + + if(e.key.keysym.sym == SDLK_ESCAPE) + break; + } + + DrawChessBoard(renderer); + + /* Got everything on rendering surface, + now Update the drawing image on window screen */ + SDL_UpdateWindowSurface(window); + + } + + return 0; +} + diff --git a/jni/SDL2-2.0.1/test/testgamecontroller.c b/jni/SDL2-2.0.1/test/testgamecontroller.c index cbdf8c3b..77d63f2d 100644 --- a/jni/SDL2-2.0.1/test/testgamecontroller.c +++ b/jni/SDL2-2.0.1/test/testgamecontroller.c @@ -31,8 +31,6 @@ #define MAX_NUM_AXES 6 #define MAX_NUM_HATS 2 -static SDL_bool s_ForceQuit = SDL_FALSE; - static void DrawRect(SDL_Renderer *r, const int x, const int y, const int w, const int h) { @@ -85,7 +83,7 @@ ControllerButtonName(const SDL_GameControllerButton button) } } -void +SDL_bool WatchGameController(SDL_GameController * gamecontroller) { const char *name = SDL_GameControllerName(gamecontroller); @@ -94,7 +92,8 @@ WatchGameController(SDL_GameController * gamecontroller) char *title = (char *)SDL_malloc(titlelen); SDL_Window *window = NULL; SDL_Renderer *screen = NULL; - int done = 0; + SDL_bool retval = SDL_FALSE; + SDL_bool done = SDL_FALSE; SDL_Event event; int i; @@ -108,14 +107,14 @@ WatchGameController(SDL_GameController * gamecontroller) SCREEN_HEIGHT, 0); if (window == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); - return; + return SDL_FALSE; } screen = SDL_CreateRenderer(window, -1, 0); if (screen == NULL) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); SDL_DestroyWindow(window); - return; + return SDL_FALSE; } SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0x00, SDL_ALPHA_OPAQUE); @@ -157,8 +156,7 @@ WatchGameController(SDL_GameController * gamecontroller) } /* Fall through to signal quit */ case SDL_QUIT: - done = 1; - s_ForceQuit = SDL_TRUE; + done = SDL_TRUE; break; default: break; @@ -200,12 +198,15 @@ WatchGameController(SDL_GameController * gamecontroller) SDL_RenderPresent(screen); - if ( !done ) - done = SDL_GameControllerGetAttached( gamecontroller ) == 0; + if (!SDL_GameControllerGetAttached(gamecontroller)) { + done = SDL_TRUE; + retval = SDL_TRUE; /* keep going, wait for reattach. */ + } } SDL_DestroyRenderer(screen); SDL_DestroyWindow(window); + return retval; } int @@ -225,6 +226,8 @@ main(int argc, char *argv[]) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); return 1; } + + SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); /* Print information about the controller */ for (i = 0; i < SDL_NumJoysticks(); ++i) { @@ -248,6 +251,9 @@ main(int argc, char *argv[]) SDL_Log("There are %d game controller(s) attached (%d joystick(s))\n", nController, SDL_NumJoysticks()); if (argv[1]) { + SDL_bool reportederror = SDL_FALSE; + SDL_bool keepGoing = SDL_TRUE; + SDL_Event event; int device = atoi(argv[1]); if (device >= SDL_NumJoysticks()) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%i is an invalid joystick index.\n", device); @@ -257,12 +263,36 @@ main(int argc, char *argv[]) guid, sizeof (guid)); SDL_Log("Attempting to open device %i, guid %s\n", device, guid); gamecontroller = SDL_GameControllerOpen(device); - if (gamecontroller == NULL) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open joystick %d: %s\n", device, SDL_GetError()); - retcode = 1; - } else { - WatchGameController(gamecontroller); - SDL_GameControllerClose(gamecontroller); + while (keepGoing) { + if (gamecontroller == NULL) { + if (!reportederror) { + if (gamecontroller == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open gamecontroller %d: %s\n", device, SDL_GetError()); + retcode = 1; + } + keepGoing = SDL_FALSE; + reportederror = SDL_TRUE; + } + } else { + reportederror = SDL_FALSE; + keepGoing = WatchGameController(gamecontroller); + SDL_GameControllerClose(gamecontroller); + } + + gamecontroller = NULL; + if (keepGoing) { + SDL_Log("Waiting for attach\n"); + } + while (keepGoing) { + SDL_WaitEvent(&event); + if ((event.type == SDL_QUIT) || (event.type == SDL_FINGERDOWN) + || (event.type == SDL_MOUSEBUTTONDOWN)) { + keepGoing = SDL_FALSE; + } else if (event.type == SDL_CONTROLLERDEVICEADDED) { + gamecontroller = SDL_GameControllerOpen(event.cdevice.which); + break; + } + } } } } diff --git a/jni/SDL2-2.0.1/test/testgesture.c b/jni/SDL2-2.0.1/test/testgesture.c index 016506e1..89008fb3 100644 --- a/jni/SDL2-2.0.1/test/testgesture.c +++ b/jni/SDL2-2.0.1/test/testgesture.c @@ -205,7 +205,7 @@ int main(int argc, char* argv[]) SDL_Surface *screen; SDL_Event event; SDL_bool quitting = SDL_FALSE; - SDL_RWops *src; + SDL_RWops *stream; /* Enable standard application logging */ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); @@ -241,14 +241,14 @@ int main(int argc, char* argv[]) SDL_RecordGesture(-1); break; case SDLK_s: - src = SDL_RWFromFile("gestureSave","w"); - SDL_Log("Wrote %i templates",SDL_SaveAllDollarTemplates(src)); - SDL_RWclose(src); + stream = SDL_RWFromFile("gestureSave", "w"); + SDL_Log("Wrote %i templates", SDL_SaveAllDollarTemplates(stream)); + SDL_RWclose(stream); break; case SDLK_l: - src = SDL_RWFromFile("gestureSave","r"); - SDL_Log("Loaded: %i",SDL_LoadDollarTemplates(-1,src)); - SDL_RWclose(src); + stream = SDL_RWFromFile("gestureSave", "r"); + SDL_Log("Loaded: %i", SDL_LoadDollarTemplates(-1, stream)); + SDL_RWclose(stream); break; case SDLK_ESCAPE: quitting = SDL_TRUE; diff --git a/jni/SDL2-2.0.1/test/testgl2.c b/jni/SDL2-2.0.1/test/testgl2.c index 19685eae..f51efe90 100644 --- a/jni/SDL2-2.0.1/test/testgl2.c +++ b/jni/SDL2-2.0.1/test/testgl2.c @@ -24,11 +24,48 @@ #include "SDL_opengl.h" +typedef struct GL_Context +{ +#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#include "../src/render/opengl/SDL_glfuncs.h" +#undef SDL_PROC +} GL_Context; + + /* Undefine this if you want a flat cube instead of a rainbow cube */ #define SHADED_CUBE static SDLTest_CommonState *state; static SDL_GLContext context; +static GL_Context ctx; + +static int LoadContext(GL_Context * data) +{ +#if SDL_VIDEO_DRIVER_UIKIT +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_ANDROID +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_PANDORA +#define __SDL_NOGETPROCADDR__ +#endif + +#if defined __SDL_NOGETPROCADDR__ +#define SDL_PROC(ret,func,params) data->func=func; +#else +#define SDL_PROC(ret,func,params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if ( ! data->func ) { \ + return SDL_SetError("Couldn't load GL function %s: %s\n", #func, SDL_GetError()); \ + } \ + } while ( 0 ); +#endif /* _SDL_NOGETPROCADDR_ */ + +#include "../src/render/opengl/SDL_glfuncs.h" +#undef SDL_PROC + return 0; +} + /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void @@ -67,107 +104,107 @@ Render() }; /* Do our drawing, too. */ - glClearColor(0.0, 0.0, 0.0, 1.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + ctx.glClearColor(0.0, 0.0, 0.0, 1.0); + ctx.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glBegin(GL_QUADS); + ctx.glBegin(GL_QUADS); #ifdef SHADED_CUBE - glColor3fv(color[0]); - glVertex3fv(cube[0]); - glColor3fv(color[1]); - glVertex3fv(cube[1]); - glColor3fv(color[2]); - glVertex3fv(cube[2]); - glColor3fv(color[3]); - glVertex3fv(cube[3]); + ctx.glColor3fv(color[0]); + ctx.glVertex3fv(cube[0]); + ctx.glColor3fv(color[1]); + ctx.glVertex3fv(cube[1]); + ctx.glColor3fv(color[2]); + ctx.glVertex3fv(cube[2]); + ctx.glColor3fv(color[3]); + ctx.glVertex3fv(cube[3]); - glColor3fv(color[3]); - glVertex3fv(cube[3]); - glColor3fv(color[4]); - glVertex3fv(cube[4]); - glColor3fv(color[7]); - glVertex3fv(cube[7]); - glColor3fv(color[2]); - glVertex3fv(cube[2]); + ctx.glColor3fv(color[3]); + ctx.glVertex3fv(cube[3]); + ctx.glColor3fv(color[4]); + ctx.glVertex3fv(cube[4]); + ctx.glColor3fv(color[7]); + ctx.glVertex3fv(cube[7]); + ctx.glColor3fv(color[2]); + ctx.glVertex3fv(cube[2]); - glColor3fv(color[0]); - glVertex3fv(cube[0]); - glColor3fv(color[5]); - glVertex3fv(cube[5]); - glColor3fv(color[6]); - glVertex3fv(cube[6]); - glColor3fv(color[1]); - glVertex3fv(cube[1]); + ctx.glColor3fv(color[0]); + ctx.glVertex3fv(cube[0]); + ctx.glColor3fv(color[5]); + ctx.glVertex3fv(cube[5]); + ctx.glColor3fv(color[6]); + ctx.glVertex3fv(cube[6]); + ctx.glColor3fv(color[1]); + ctx.glVertex3fv(cube[1]); - glColor3fv(color[5]); - glVertex3fv(cube[5]); - glColor3fv(color[4]); - glVertex3fv(cube[4]); - glColor3fv(color[7]); - glVertex3fv(cube[7]); - glColor3fv(color[6]); - glVertex3fv(cube[6]); + ctx.glColor3fv(color[5]); + ctx.glVertex3fv(cube[5]); + ctx.glColor3fv(color[4]); + ctx.glVertex3fv(cube[4]); + ctx.glColor3fv(color[7]); + ctx.glVertex3fv(cube[7]); + ctx.glColor3fv(color[6]); + ctx.glVertex3fv(cube[6]); - glColor3fv(color[5]); - glVertex3fv(cube[5]); - glColor3fv(color[0]); - glVertex3fv(cube[0]); - glColor3fv(color[3]); - glVertex3fv(cube[3]); - glColor3fv(color[4]); - glVertex3fv(cube[4]); + ctx.glColor3fv(color[5]); + ctx.glVertex3fv(cube[5]); + ctx.glColor3fv(color[0]); + ctx.glVertex3fv(cube[0]); + ctx.glColor3fv(color[3]); + ctx.glVertex3fv(cube[3]); + ctx.glColor3fv(color[4]); + ctx.glVertex3fv(cube[4]); - glColor3fv(color[6]); - glVertex3fv(cube[6]); - glColor3fv(color[1]); - glVertex3fv(cube[1]); - glColor3fv(color[2]); - glVertex3fv(cube[2]); - glColor3fv(color[7]); - glVertex3fv(cube[7]); + ctx.glColor3fv(color[6]); + ctx.glVertex3fv(cube[6]); + ctx.glColor3fv(color[1]); + ctx.glVertex3fv(cube[1]); + ctx.glColor3fv(color[2]); + ctx.glVertex3fv(cube[2]); + ctx.glColor3fv(color[7]); + ctx.glVertex3fv(cube[7]); #else /* flat cube */ - glColor3f(1.0, 0.0, 0.0); - glVertex3fv(cube[0]); - glVertex3fv(cube[1]); - glVertex3fv(cube[2]); - glVertex3fv(cube[3]); + ctx.glColor3f(1.0, 0.0, 0.0); + ctx.glVertex3fv(cube[0]); + ctx.glVertex3fv(cube[1]); + ctx.glVertex3fv(cube[2]); + ctx.glVertex3fv(cube[3]); - glColor3f(0.0, 1.0, 0.0); - glVertex3fv(cube[3]); - glVertex3fv(cube[4]); - glVertex3fv(cube[7]); - glVertex3fv(cube[2]); + ctx.glColor3f(0.0, 1.0, 0.0); + ctx.glVertex3fv(cube[3]); + ctx.glVertex3fv(cube[4]); + ctx.glVertex3fv(cube[7]); + ctx.glVertex3fv(cube[2]); - glColor3f(0.0, 0.0, 1.0); - glVertex3fv(cube[0]); - glVertex3fv(cube[5]); - glVertex3fv(cube[6]); - glVertex3fv(cube[1]); + ctx.glColor3f(0.0, 0.0, 1.0); + ctx.glVertex3fv(cube[0]); + ctx.glVertex3fv(cube[5]); + ctx.glVertex3fv(cube[6]); + ctx.glVertex3fv(cube[1]); - glColor3f(0.0, 1.0, 1.0); - glVertex3fv(cube[5]); - glVertex3fv(cube[4]); - glVertex3fv(cube[7]); - glVertex3fv(cube[6]); + ctx.glColor3f(0.0, 1.0, 1.0); + ctx.glVertex3fv(cube[5]); + ctx.glVertex3fv(cube[4]); + ctx.glVertex3fv(cube[7]); + ctx.glVertex3fv(cube[6]); - glColor3f(1.0, 1.0, 0.0); - glVertex3fv(cube[5]); - glVertex3fv(cube[0]); - glVertex3fv(cube[3]); - glVertex3fv(cube[4]); + ctx.glColor3f(1.0, 1.0, 0.0); + ctx.glVertex3fv(cube[5]); + ctx.glVertex3fv(cube[0]); + ctx.glVertex3fv(cube[3]); + ctx.glVertex3fv(cube[4]); - glColor3f(1.0, 0.0, 1.0); - glVertex3fv(cube[6]); - glVertex3fv(cube[1]); - glVertex3fv(cube[2]); - glVertex3fv(cube[7]); + ctx.glColor3f(1.0, 0.0, 1.0); + ctx.glVertex3fv(cube[6]); + ctx.glVertex3fv(cube[1]); + ctx.glVertex3fv(cube[2]); + ctx.glVertex3fv(cube[7]); #endif /* SHADED_CUBE */ - glEnd(); + ctx.glEnd(); - glMatrixMode(GL_MODELVIEW); - glRotatef(5.0, 1.0, 1.0, 1.0); + ctx.glMatrixMode(GL_MODELVIEW); + ctx.glRotatef(5.0, 1.0, 1.0, 1.0); } int @@ -242,6 +279,13 @@ main(int argc, char *argv[]) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_GL_CreateContext(): %s\n", SDL_GetError()); quit(2); } + + /* Important: call this *after* creating the context */ + if (LoadContext(&ctx) < 0) { + SDL_Log("Could not load GL functions\n"); + quit(2); + return 0; + } if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) { /* try late-swap-tearing first. If not supported, try normal vsync. */ @@ -260,10 +304,10 @@ main(int argc, char *argv[]) SDL_GL_GetDrawableSize(state->windows[0], &dw, &dh); SDL_Log("Draw Size : %d,%d\n", dw, dh); SDL_Log("\n"); - SDL_Log("Vendor : %s\n", glGetString(GL_VENDOR)); - SDL_Log("Renderer : %s\n", glGetString(GL_RENDERER)); - SDL_Log("Version : %s\n", glGetString(GL_VERSION)); - SDL_Log("Extensions : %s\n", glGetString(GL_EXTENSIONS)); + SDL_Log("Vendor : %s\n", ctx.glGetString(GL_VENDOR)); + SDL_Log("Renderer : %s\n", ctx.glGetString(GL_RENDERER)); + SDL_Log("Version : %s\n", ctx.glGetString(GL_VERSION)); + SDL_Log("Extensions : %s\n", ctx.glGetString(GL_EXTENSIONS)); SDL_Log("\n"); status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); @@ -319,14 +363,14 @@ main(int argc, char *argv[]) } /* Set rendering settings */ - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-2.0, 2.0, -2.0, 2.0, -20.0, 20.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - glShadeModel(GL_SMOOTH); + ctx.glMatrixMode(GL_PROJECTION); + ctx.glLoadIdentity(); + ctx.glOrtho(-2.0, 2.0, -2.0, 2.0, -20.0, 20.0); + ctx.glMatrixMode(GL_MODELVIEW); + ctx.glLoadIdentity(); + ctx.glEnable(GL_DEPTH_TEST); + ctx.glDepthFunc(GL_LESS); + ctx.glShadeModel(GL_SMOOTH); /* Main render loop */ frames = 0; @@ -344,7 +388,7 @@ main(int argc, char *argv[]) continue; SDL_GL_MakeCurrent(state->windows[i], context); SDL_GL_GetDrawableSize(state->windows[i], &w, &h); - glViewport(0, 0, w, h); + ctx.glViewport(0, 0, w, h); Render(); SDL_GL_SwapWindow(state->windows[i]); } diff --git a/jni/SDL2-2.0.1/test/testgles.c b/jni/SDL2-2.0.1/test/testgles.c index 4e1bc074..314ec7cd 100644 --- a/jni/SDL2-2.0.1/test/testgles.c +++ b/jni/SDL2-2.0.1/test/testgles.c @@ -335,7 +335,9 @@ main(int argc, char *argv[]) SDL_Log("%2.2f frames per second\n", ((double) frames * 1000) / (now - then)); } +#if !defined(__ANDROID__) quit(0); +#endif return 0; } diff --git a/jni/SDL2-2.0.1/test/testgles2.c b/jni/SDL2-2.0.1/test/testgles2.c new file mode 100644 index 00000000..32b19df4 --- /dev/null +++ b/jni/SDL2-2.0.1/test/testgles2.c @@ -0,0 +1,693 @@ +/* + Copyright (r) 1997-2011 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +#include +#include +#include +#include + +#include "SDL_test_common.h" + +#if defined(__IPHONEOS__) || defined(__ANDROID__) +#define HAVE_OPENGLES2 +#endif + +#ifdef HAVE_OPENGLES2 + +#include "SDL_opengles2.h" + +typedef struct GLES2_Context +{ +#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#include "../src/render/opengles2/SDL_gles2funcs.h" +#undef SDL_PROC +} GLES2_Context; + + +static SDLTest_CommonState *state; +static SDL_GLContext *context = NULL; +static int depth = 16; +static GLES2_Context ctx; + +static int LoadContext(GLES2_Context * data) +{ +#if SDL_VIDEO_DRIVER_UIKIT +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_ANDROID +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_PANDORA +#define __SDL_NOGETPROCADDR__ +#endif + +#if defined __SDL_NOGETPROCADDR__ +#define SDL_PROC(ret,func,params) data->func=func; +#else +#define SDL_PROC(ret,func,params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if ( ! data->func ) { \ + return SDL_SetError("Couldn't load GLES2 function %s: %s\n", #func, SDL_GetError()); \ + } \ + } while ( 0 ); +#endif /* _SDL_NOGETPROCADDR_ */ + +#include "../src/render/opengles2/SDL_gles2funcs.h" +#undef SDL_PROC + return 0; +} + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + int i; + + if (context != NULL) { + for (i = 0; i < state->num_windows; i++) { + if (context[i]) { + SDL_GL_DeleteContext(context[i]); + } + } + + SDL_free(context); + } + + SDLTest_CommonQuit(state); + exit(rc); +} + +#define GL_CHECK(x) \ + x; \ + { \ + GLenum glError = ctx.glGetError(); \ + if(glError != GL_NO_ERROR) { \ + SDL_Log("glGetError() = %i (0x%.8x) at line %i\n", glError, glError, __LINE__); \ + quit(1); \ + } \ + } + +/* + * Simulates desktop's glRotatef. The matrix is returned in column-major + * order. + */ +static void +rotate_matrix(double angle, double x, double y, double z, float *r) +{ + double radians, c, s, c1, u[3], length; + int i, j; + + radians = (angle * M_PI) / 180.0; + + c = cos(radians); + s = sin(radians); + + c1 = 1.0 - cos(radians); + + length = sqrt(x * x + y * y + z * z); + + u[0] = x / length; + u[1] = y / length; + u[2] = z / length; + + for (i = 0; i < 16; i++) { + r[i] = 0.0; + } + + r[15] = 1.0; + + for (i = 0; i < 3; i++) { + r[i * 4 + (i + 1) % 3] = u[(i + 2) % 3] * s; + r[i * 4 + (i + 2) % 3] = -u[(i + 1) % 3] * s; + } + + for (i = 0; i < 3; i++) { + for (j = 0; j < 3; j++) { + r[i * 4 + j] += c1 * u[i] * u[j] + (i == j ? c : 0.0); + } + } +} + +/* + * Simulates gluPerspectiveMatrix + */ +static void +perspective_matrix(double fovy, double aspect, double znear, double zfar, float *r) +{ + int i; + double f; + + f = 1.0/tan(fovy * 0.5); + + for (i = 0; i < 16; i++) { + r[i] = 0.0; + } + + r[0] = f / aspect; + r[5] = f; + r[10] = (znear + zfar) / (znear - zfar); + r[11] = -1.0; + r[14] = (2.0 * znear * zfar) / (znear - zfar); + r[15] = 0.0; +} + +/* + * Multiplies lhs by rhs and writes out to r. All matrices are 4x4 and column + * major. In-place multiplication is supported. + */ +static void +multiply_matrix(float *lhs, float *rhs, float *r) +{ + int i, j, k; + float tmp[16]; + + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + tmp[j * 4 + i] = 0.0; + + for (k = 0; k < 4; k++) { + tmp[j * 4 + i] += lhs[k * 4 + i] * rhs[j * 4 + k]; + } + } + } + + for (i = 0; i < 16; i++) { + r[i] = tmp[i]; + } +} + +/* + * Create shader, load in source, compile, dump debug as necessary. + * + * shader: Pointer to return created shader ID. + * source: Passed-in shader source code. + * shader_type: Passed to GL, e.g. GL_VERTEX_SHADER. + */ +void +process_shader(GLuint *shader, const char * source, GLint shader_type) +{ + GLint status = GL_FALSE; + const char *shaders[1] = { NULL }; + + /* Create shader and load into GL. */ + *shader = GL_CHECK(ctx.glCreateShader(shader_type)); + + shaders[0] = source; + + GL_CHECK(ctx.glShaderSource(*shader, 1, shaders, NULL)); + + /* Clean up shader source. */ + shaders[0] = NULL; + + /* Try compiling the shader. */ + GL_CHECK(ctx.glCompileShader(*shader)); + GL_CHECK(ctx.glGetShaderiv(*shader, GL_COMPILE_STATUS, &status)); + + // Dump debug info (source and log) if compilation failed. + if(status != GL_TRUE) { + SDL_Log("Shader compilation failed"); + quit(-1); + } +} + +/* 3D data. Vertex range -0.5..0.5 in all axes. +* Z -0.5 is near, 0.5 is far. */ +const float _vertices[] = +{ + /* Front face. */ + /* Bottom left */ + -0.5, 0.5, -0.5, + 0.5, -0.5, -0.5, + -0.5, -0.5, -0.5, + /* Top right */ + -0.5, 0.5, -0.5, + 0.5, 0.5, -0.5, + 0.5, -0.5, -0.5, + /* Left face */ + /* Bottom left */ + -0.5, 0.5, 0.5, + -0.5, -0.5, -0.5, + -0.5, -0.5, 0.5, + /* Top right */ + -0.5, 0.5, 0.5, + -0.5, 0.5, -0.5, + -0.5, -0.5, -0.5, + /* Top face */ + /* Bottom left */ + -0.5, 0.5, 0.5, + 0.5, 0.5, -0.5, + -0.5, 0.5, -0.5, + /* Top right */ + -0.5, 0.5, 0.5, + 0.5, 0.5, 0.5, + 0.5, 0.5, -0.5, + /* Right face */ + /* Bottom left */ + 0.5, 0.5, -0.5, + 0.5, -0.5, 0.5, + 0.5, -0.5, -0.5, + /* Top right */ + 0.5, 0.5, -0.5, + 0.5, 0.5, 0.5, + 0.5, -0.5, 0.5, + /* Back face */ + /* Bottom left */ + 0.5, 0.5, 0.5, + -0.5, -0.5, 0.5, + 0.5, -0.5, 0.5, + /* Top right */ + 0.5, 0.5, 0.5, + -0.5, 0.5, 0.5, + -0.5, -0.5, 0.5, + /* Bottom face */ + /* Bottom left */ + -0.5, -0.5, -0.5, + 0.5, -0.5, 0.5, + -0.5, -0.5, 0.5, + /* Top right */ + -0.5, -0.5, -0.5, + 0.5, -0.5, -0.5, + 0.5, -0.5, 0.5, +}; + +const float _colors[] = +{ + /* Front face */ + /* Bottom left */ + 1.0, 0.0, 0.0, /* red */ + 0.0, 0.0, 1.0, /* blue */ + 0.0, 1.0, 0.0, /* green */ + /* Top right */ + 1.0, 0.0, 0.0, /* red */ + 1.0, 1.0, 0.0, /* yellow */ + 0.0, 0.0, 1.0, /* blue */ + /* Left face */ + /* Bottom left */ + 1.0, 1.0, 1.0, /* white */ + 0.0, 1.0, 0.0, /* green */ + 0.0, 1.0, 1.0, /* cyan */ + /* Top right */ + 1.0, 1.0, 1.0, /* white */ + 1.0, 0.0, 0.0, /* red */ + 0.0, 1.0, 0.0, /* green */ + /* Top face */ + /* Bottom left */ + 1.0, 1.0, 1.0, /* white */ + 1.0, 1.0, 0.0, /* yellow */ + 1.0, 0.0, 0.0, /* red */ + /* Top right */ + 1.0, 1.0, 1.0, /* white */ + 0.0, 0.0, 0.0, /* black */ + 1.0, 1.0, 0.0, /* yellow */ + /* Right face */ + /* Bottom left */ + 1.0, 1.0, 0.0, /* yellow */ + 1.0, 0.0, 1.0, /* magenta */ + 0.0, 0.0, 1.0, /* blue */ + /* Top right */ + 1.0, 1.0, 0.0, /* yellow */ + 0.0, 0.0, 0.0, /* black */ + 1.0, 0.0, 1.0, /* magenta */ + /* Back face */ + /* Bottom left */ + 0.0, 0.0, 0.0, /* black */ + 0.0, 1.0, 1.0, /* cyan */ + 1.0, 0.0, 1.0, /* magenta */ + /* Top right */ + 0.0, 0.0, 0.0, /* black */ + 1.0, 1.0, 1.0, /* white */ + 0.0, 1.0, 1.0, /* cyan */ + /* Bottom face */ + /* Bottom left */ + 0.0, 1.0, 0.0, /* green */ + 1.0, 0.0, 1.0, /* magenta */ + 0.0, 1.0, 1.0, /* cyan */ + /* Top right */ + 0.0, 1.0, 0.0, /* green */ + 0.0, 0.0, 1.0, /* blue */ + 1.0, 0.0, 1.0, /* magenta */ +}; + +const char* _shader_vert_src = +" attribute vec4 av4position; " +" attribute vec3 av3color; " +" uniform mat4 mvp; " +" varying vec3 vv3color; " +" void main() { " +" vv3color = av3color; " +" gl_Position = mvp * av4position; " +" } "; + +const char* _shader_frag_src = +" precision lowp float; " +" varying vec3 vv3color; " +" void main() { " +" gl_FragColor = vec4(vv3color, 1.0); " +" } "; + +typedef struct shader_data +{ + GLuint shader_program, shader_frag, shader_vert; + + GLint attr_position; + GLint attr_color, attr_mvp; + + int angle_x, angle_y, angle_z; + +} shader_data; + +static void +Render(unsigned int width, unsigned int height, shader_data* data) +{ + float matrix_rotate[16], matrix_modelview[16], matrix_perspective[16], matrix_mvp[16]; + + /* + * Do some rotation with Euler angles. It is not a fixed axis as + * quaterions would be, but the effect is cool. + */ + rotate_matrix(data->angle_x, 1.0, 0.0, 0.0, matrix_modelview); + rotate_matrix(data->angle_y, 0.0, 1.0, 0.0, matrix_rotate); + + multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview); + + rotate_matrix(data->angle_z, 0.0, 1.0, 0.0, matrix_rotate); + + multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview); + + /* Pull the camera back from the cube */ + matrix_modelview[14] -= 2.5; + + perspective_matrix(45.0, (double)width/(double)height, 0.01, 100.0, matrix_perspective); + multiply_matrix(matrix_perspective, matrix_modelview, matrix_mvp); + + GL_CHECK(ctx.glUniformMatrix4fv(data->attr_mvp, 1, GL_FALSE, matrix_mvp)); + + data->angle_x += 3; + data->angle_y += 2; + data->angle_z += 1; + + if(data->angle_x >= 360) data->angle_x -= 360; + if(data->angle_x < 0) data->angle_x += 360; + if(data->angle_y >= 360) data->angle_y -= 360; + if(data->angle_y < 0) data->angle_y += 360; + if(data->angle_z >= 360) data->angle_z -= 360; + if(data->angle_z < 0) data->angle_z += 360; + + GL_CHECK(ctx.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)); + GL_CHECK(ctx.glDrawArrays(GL_TRIANGLES, 0, 36)); +} + +int +main(int argc, char *argv[]) +{ + int fsaa, accel; + int value; + int i, done; + SDL_DisplayMode mode; + SDL_Event event; + Uint32 then, now, frames; + int status; + shader_data *datas, *data; + + /* Initialize parameters */ + fsaa = 0; + accel = 0; + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + if (consumed == 0) { + if (SDL_strcasecmp(argv[i], "--fsaa") == 0) { + ++fsaa; + consumed = 1; + } else if (SDL_strcasecmp(argv[i], "--accel") == 0) { + ++accel; + consumed = 1; + } else if (SDL_strcasecmp(argv[i], "--zdepth") == 0) { + i++; + if (!argv[i]) { + consumed = -1; + } else { + depth = SDL_atoi(argv[i]); + consumed = 1; + } + } else { + consumed = -1; + } + } + if (consumed < 0) { + SDL_Log ("Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0], + SDLTest_CommonUsage(state)); + quit(1); + } + i += consumed; + } + + /* Set OpenGL parameters */ + state->window_flags |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS; + state->gl_red_size = 5; + state->gl_green_size = 5; + state->gl_blue_size = 5; + state->gl_depth_size = depth; + state->gl_major_version = 2; + state->gl_minor_version = 0; + state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES; + + if (fsaa) { + state->gl_multisamplebuffers=1; + state->gl_multisamplesamples=fsaa; + } + if (accel) { + state->gl_accelerated=1; + } + if (!SDLTest_CommonInit(state)) { + quit(2); + return 0; + } + + context = SDL_calloc(state->num_windows, sizeof(context)); + if (context == NULL) { + SDL_Log("Out of memory!\n"); + quit(2); + } + + /* Create OpenGL ES contexts */ + for (i = 0; i < state->num_windows; i++) { + context[i] = SDL_GL_CreateContext(state->windows[i]); + if (!context[i]) { + SDL_Log("SDL_GL_CreateContext(): %s\n", SDL_GetError()); + quit(2); + } + } + + /* Important: call this *after* creating the context */ + if (LoadContext(&ctx) < 0) { + SDL_Log("Could not load GLES2 functions\n"); + quit(2); + return 0; + } + + + + if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) { + SDL_GL_SetSwapInterval(1); + } else { + SDL_GL_SetSwapInterval(0); + } + + SDL_GetCurrentDisplayMode(0, &mode); + SDL_Log("Screen bpp: %d\n", SDL_BITSPERPIXEL(mode.format)); + SDL_Log("\n"); + SDL_Log("Vendor : %s\n", ctx.glGetString(GL_VENDOR)); + SDL_Log("Renderer : %s\n", ctx.glGetString(GL_RENDERER)); + SDL_Log("Version : %s\n", ctx.glGetString(GL_VERSION)); + SDL_Log("Extensions : %s\n", ctx.glGetString(GL_EXTENSIONS)); + SDL_Log("\n"); + + status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_Log( "Failed to get SDL_GL_RED_SIZE: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_Log( "Failed to get SDL_GL_GREEN_SIZE: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_Log( "Failed to get SDL_GL_BLUE_SIZE: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value); + } else { + SDL_Log( "Failed to get SDL_GL_DEPTH_SIZE: %s\n", + SDL_GetError()); + } + if (fsaa) { + status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value); + if (!status) { + SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); + } else { + SDL_Log( "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); + if (!status) { + SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, + value); + } else { + SDL_Log( "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", + SDL_GetError()); + } + } + if (accel) { + status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value); + if (!status) { + SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); + } else { + SDL_Log( "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", + SDL_GetError()); + } + } + + datas = SDL_calloc(state->num_windows, sizeof(shader_data)); + + /* Set rendering settings for each context */ + for (i = 0; i < state->num_windows; ++i) { + + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + + /* Continue for next window */ + continue; + } + ctx.glViewport(0, 0, state->window_w, state->window_h); + + data = &datas[i]; + data->angle_x = 0; data->angle_y = 0; data->angle_z = 0; + + /* Shader Initialization */ + process_shader(&data->shader_vert, _shader_vert_src, GL_VERTEX_SHADER); + process_shader(&data->shader_frag, _shader_frag_src, GL_FRAGMENT_SHADER); + + /* Create shader_program (ready to attach shaders) */ + data->shader_program = GL_CHECK(ctx.glCreateProgram()); + + /* Attach shaders and link shader_program */ + GL_CHECK(ctx.glAttachShader(data->shader_program, data->shader_vert)); + GL_CHECK(ctx.glAttachShader(data->shader_program, data->shader_frag)); + GL_CHECK(ctx.glLinkProgram(data->shader_program)); + + /* Get attribute locations of non-fixed attributes like color and texture coordinates. */ + data->attr_position = GL_CHECK(ctx.glGetAttribLocation(data->shader_program, "av4position")); + data->attr_color = GL_CHECK(ctx.glGetAttribLocation(data->shader_program, "av3color")); + + /* Get uniform locations */ + data->attr_mvp = GL_CHECK(ctx.glGetUniformLocation(data->shader_program, "mvp")); + + GL_CHECK(ctx.glUseProgram(data->shader_program)); + + /* Enable attributes for position, color and texture coordinates etc. */ + GL_CHECK(ctx.glEnableVertexAttribArray(data->attr_position)); + GL_CHECK(ctx.glEnableVertexAttribArray(data->attr_color)); + + /* Populate attributes for position, color and texture coordinates etc. */ + GL_CHECK(ctx.glVertexAttribPointer(data->attr_position, 3, GL_FLOAT, GL_FALSE, 0, _vertices)); + GL_CHECK(ctx.glVertexAttribPointer(data->attr_color, 3, GL_FLOAT, GL_FALSE, 0, _colors)); + + GL_CHECK(ctx.glEnable(GL_CULL_FACE)); + GL_CHECK(ctx.glEnable(GL_DEPTH_TEST)); + } + + /* Main render loop */ + frames = 0; + then = SDL_GetTicks(); + done = 0; + while (!done) { + /* Check for events */ + ++frames; + while (SDL_PollEvent(&event)) { + switch (event.type) { + case SDL_WINDOWEVENT: + switch (event.window.event) { + case SDL_WINDOWEVENT_RESIZED: + for (i = 0; i < state->num_windows; ++i) { + if (event.window.windowID == SDL_GetWindowID(state->windows[i])) { + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + break; + } + /* Change view port to the new window dimensions */ + ctx.glViewport(0, 0, event.window.data1, event.window.data2); + /* Update window content */ + Render(event.window.data1, event.window.data2, &datas[i]); + SDL_GL_SwapWindow(state->windows[i]); + break; + } + } + break; + } + } + SDLTest_CommonEvent(state, &event, &done); + } + for (i = 0; i < state->num_windows; ++i) { + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + + /* Continue for next window */ + continue; + } + Render(state->window_w, state->window_h, &datas[i]); + SDL_GL_SwapWindow(state->windows[i]); + } + } + + /* Print out some timing information */ + now = SDL_GetTicks(); + if (now > then) { + SDL_Log("%2.2f frames per second\n", + ((double) frames * 1000) / (now - then)); + } +#if !defined(__ANDROID__) + quit(0); +#endif + return 0; +} + +#else /* HAVE_OPENGLES2 */ + +int +main(int argc, char *argv[]) +{ + SDL_Log("No OpenGL ES support on this system\n"); + return 1; +} + +#endif /* HAVE_OPENGLES2 */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/SDL2-2.0.1/test/testjoystick.c b/jni/SDL2-2.0.1/test/testjoystick.c index 7d3c573d..2984145d 100644 --- a/jni/SDL2-2.0.1/test/testjoystick.c +++ b/jni/SDL2-2.0.1/test/testjoystick.c @@ -251,15 +251,18 @@ main(int argc, char *argv[]) SDL_bool reportederror = SDL_FALSE; SDL_bool keepGoing = SDL_TRUE; SDL_Event event; + int device; #ifdef ANDROID - joystick = SDL_JoystickOpen(0); + device = 0; #else - joystick = SDL_JoystickOpen(atoi(argv[1])); + device = atoi(argv[1]); #endif + joystick = SDL_JoystickOpen(device); + while ( keepGoing ) { if (joystick == NULL) { if ( !reportederror ) { - SDL_Log("Couldn't open joystick %d: %s\n", atoi(argv[1]), SDL_GetError()); + SDL_Log("Couldn't open joystick %d: %s\n", device, SDL_GetError()); keepGoing = SDL_FALSE; reportederror = SDL_TRUE; } @@ -279,7 +282,7 @@ main(int argc, char *argv[]) || (event.type == SDL_MOUSEBUTTONDOWN)) { keepGoing = SDL_FALSE; } else if (event.type == SDL_JOYDEVICEADDED) { - joystick = SDL_JoystickOpen(atoi(argv[1])); + joystick = SDL_JoystickOpen(device); break; } } @@ -287,11 +290,7 @@ main(int argc, char *argv[]) } SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); -#ifdef ANDROID - exit(0); -#else return 0; -#endif } #else diff --git a/jni/SDL2-2.0.1/test/testshader.c b/jni/SDL2-2.0.1/test/testshader.c index 04467709..ced43fd9 100644 --- a/jni/SDL2-2.0.1/test/testshader.c +++ b/jni/SDL2-2.0.1/test/testshader.c @@ -187,7 +187,7 @@ static SDL_bool CompileShaderProgram(ShaderData *data) } glUseProgramObjectARB(0); - return (glGetError() == GL_NO_ERROR); + return (glGetError() == GL_NO_ERROR) ? SDL_TRUE : SDL_FALSE; } static void DestroyShaderProgram(ShaderData *data) diff --git a/jni/SDL2-2.0.1/test/testshape.c b/jni/SDL2-2.0.1/test/testshape.c index c202d8ec..bffa540e 100644 --- a/jni/SDL2-2.0.1/test/testshape.c +++ b/jni/SDL2-2.0.1/test/testshape.c @@ -19,12 +19,11 @@ #define SHAPED_WINDOW_Y 150 #define SHAPED_WINDOW_DIMENSION 640 -#define TICK_INTERVAL 1000/10 - typedef struct LoadedPicture { SDL_Surface *surface; SDL_Texture *texture; SDL_WindowShapeMode mode; + const char* name; } LoadedPicture; void render(SDL_Renderer *renderer,SDL_Texture *texture,SDL_Rect texture_dimensions) @@ -39,17 +38,6 @@ void render(SDL_Renderer *renderer,SDL_Texture *texture,SDL_Rect texture_dimensi SDL_RenderPresent(renderer); } -static Uint32 next_time; - -Uint32 time_left() -{ - Uint32 now = SDL_GetTicks(); - if(next_time <= now) - return 0; - else - return next_time - now; -} - int main(int argc,char** argv) { Uint8 num_pictures; @@ -87,18 +75,19 @@ int main(int argc,char** argv) pictures[i].surface = NULL; for(i=0;iformat; - if(format->Amask != 0) { + if(SDL_ISPIXELFORMAT_ALPHA(format->format)) { pictures[i].mode.mode = ShapeModeBinarizeAlpha; pictures[i].mode.parameters.binarizationCutoff = 255; } @@ -108,7 +97,11 @@ int main(int argc,char** argv) } } - window = SDL_CreateShapedWindow("SDL_Shape test",SHAPED_WINDOW_X,SHAPED_WINDOW_Y,SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION,SDL_WINDOW_RESIZABLE); + window = SDL_CreateShapedWindow("SDL_Shape test", + SHAPED_WINDOW_X, SHAPED_WINDOW_Y, + SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION, + 0); + SDL_SetWindowPosition(window, SHAPED_WINDOW_X, SHAPED_WINDOW_Y); if(window == NULL) { for(i=0;i= num_pictures) current_picture = 0; + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Changing to shaped bmp: %s", pictures[current_picture].name); SDL_QueryTexture(pictures[current_picture].texture,(Uint32 *)&pixelFormat,(int *)&access,&texture_dimensions.w,&texture_dimensions.h); SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h); SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode); @@ -183,8 +179,7 @@ int main(int argc,char** argv) event_pending = 0; } render(renderer,pictures[current_picture].texture,texture_dimensions); - SDL_Delay(time_left()); - next_time += TICK_INTERVAL; + SDL_Delay(10); } /* Free the textures. */ diff --git a/jni/SDL2-2.0.1/test/testsprite2.c b/jni/SDL2-2.0.1/test/testsprite2.c index e0e1cf49..e6108103 100644 --- a/jni/SDL2-2.0.1/test/testsprite2.c +++ b/jni/SDL2-2.0.1/test/testsprite2.c @@ -248,8 +248,6 @@ main(int argc, char *argv[]) return 1; } - state->window_flags |= SDL_WINDOW_RESIZABLE; - for (i = 1; i < argc;) { int consumed; diff --git a/jni/SDL2-2.0.1/test/testviewport.c b/jni/SDL2-2.0.1/test/testviewport.c new file mode 100644 index 00000000..022d9880 --- /dev/null +++ b/jni/SDL2-2.0.1/test/testviewport.c @@ -0,0 +1,184 @@ +/* + Copyright (C) 1997-2013 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +/* Simple program: Check viewports */ + +#include +#include +#include + +#include "SDL_test.h" +#include "SDL_test_common.h" + + +static SDLTest_CommonState *state; + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDLTest_CommonQuit(state); + exit(rc); +} + +void +DrawOnViewport(SDL_Renderer * renderer, SDL_Rect viewport) +{ + SDL_Rect rect; + + /* Set the viewport */ + SDL_RenderSetViewport(renderer, &viewport); + + /* Draw a gray background */ + SDL_SetRenderDrawColor(renderer, 0x80, 0x80, 0x80, 0xFF); + SDL_RenderClear(renderer); + + /* Test inside points */ + SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xF, 0xFF); + SDL_RenderDrawPoint(renderer, viewport.h/2 + 10, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 - 10, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 - 10); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 + 10); + + /* Test horizontal and vertical lines */ + SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); + SDL_RenderDrawLine(renderer, 1, 0, viewport.w-2, 0); + SDL_RenderDrawLine(renderer, 1, viewport.h-1, viewport.w-2, viewport.h-1); + SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h-2); + SDL_RenderDrawLine(renderer, viewport.w-1, 1, viewport.w-1, viewport.h-2); + + /* Test diagonal lines */ + SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0xFF, 0xFF); + SDL_RenderDrawLine(renderer, 0, 0, + viewport.w-1, viewport.h-1); + SDL_RenderDrawLine(renderer, viewport.w-1, 0, + 0, viewport.h-1); + + /* Test outside points */ + SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xF, 0xFF); + SDL_RenderDrawPoint(renderer, viewport.h/2 + viewport.h, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 - viewport.h, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 - viewport.w); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 + viewport.w); + + /* Add a box at the top */ + rect.w = 8; + rect.h = 8; + rect.x = (viewport.w - rect.w) / 2; + rect.y = 0; + SDL_RenderFillRect(renderer, &rect); +} + +int +main(int argc, char *argv[]) +{ + int i, j, done; + SDL_Event event; + Uint32 then, now, frames; + SDL_Rect viewport; + SDL_bool use_target = SDL_FALSE; + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + if (consumed == 0) { + consumed = -1; + if (SDL_strcasecmp(argv[i], "--target") == 0) { + use_target = SDL_TRUE; + consumed = 1; + } + } + if (consumed < 0) { + SDL_Log("Usage: %s %s [--target]\n", + argv[0], SDLTest_CommonUsage(state)); + quit(1); + } + i += consumed; + } + if (!SDLTest_CommonInit(state)) { + quit(2); + } + + if (use_target) { + int w, h; + + for (i = 0; i < state->num_windows; ++i) { + SDL_GetWindowSize(state->windows[i], &w, &h); + state->targets[i] = SDL_CreateTexture(state->renderers[i], SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h); + SDL_SetRenderTarget(state->renderers[i], state->targets[i]); + } + } + + for (i = 0; i < state->num_windows; ++i) { + SDL_Renderer *renderer = state->renderers[i]; + SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); + SDL_RenderClear(renderer); + } + + /* Main render loop */ + frames = 0; + then = SDL_GetTicks(); + done = 0; + j = 0; + while (!done) { + /* Check for events */ + ++frames; + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + + /* Move a viewport box in steps around the screen */ + viewport.x = j * 100; + viewport.y = viewport.x; + viewport.w = 100 + j * 50; + viewport.h = 100 + j * 50; + j = (j + 1) % 4; + SDL_Log("Current Viewport x=%i y=%i w=%i h=%i", viewport.x, viewport.y, viewport.w, viewport.h); + + for (i = 0; i < state->num_windows; ++i) { + if (state->windows[i] == NULL) + continue; + + /* Draw using viewport */ + DrawOnViewport(state->renderers[i], viewport); + + /* Update the screen! */ + if (use_target) { + SDL_SetRenderTarget(state->renderers[i], NULL); + SDL_RenderCopy(state->renderers[i], state->targets[i], NULL, NULL); + SDL_RenderPresent(state->renderers[i]); + SDL_SetRenderTarget(state->renderers[i], state->targets[i]); + } else { + SDL_RenderPresent(state->renderers[i]); + } + } + + SDL_Delay(1000); + } + + /* Print out some timing information */ + now = SDL_GetTicks(); + if (now > then) { + double fps = ((double) frames * 1000) / (now - then); + SDL_Log("%2.2f frames per second\n", fps); + } + quit(0); + return 0; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/jni/love/src/love.cpp b/jni/love/src/love.cpp index 27c03a73..ff2ec581 100644 --- a/jni/love/src/love.cpp +++ b/jni/love/src/love.cpp @@ -248,10 +248,6 @@ int main(int argc, char **argv) #endif // LOVE_LEGENDARY_UTF8_ARGV_HACK || LOVE_LEGENDARY_APP_ARGV_HACK SDL_Quit(); -#ifdef __ANDROID__ - exit(retval); -#endif - return retval; } diff --git a/project.properties b/project.properties index b7c2081d..0f507e53 100644 --- a/project.properties +++ b/project.properties @@ -11,4 +11,4 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-10 +target=android-12 diff --git a/src/org/libsdl/app/SDLActivity.java b/src/org/libsdl/app/SDLActivity.java index aa84a3a5..f9ede7dd 100644 --- a/src/org/libsdl/app/SDLActivity.java +++ b/src/org/libsdl/app/SDLActivity.java @@ -1,12 +1,10 @@ package org.libsdl.app; +import java.util.ArrayList; import java.util.Arrays; import android.app.*; import android.content.*; -import android.content.pm.ApplicationInfo; -import android.content.pm.PackageManager; -import android.content.pm.PackageManager.NameNotFoundException; import android.view.*; import android.view.inputmethod.BaseInputConnection; import android.view.inputmethod.EditorInfo; @@ -28,16 +26,18 @@ public class SDLActivity extends Activity { // Keep track of the paused state public static boolean mIsPaused = false, mIsSurfaceReady = false, mHasFocus = true; + public static boolean mExitCalledFromJava; // Main components protected static SDLActivity mSingleton; protected static SDLSurface mSurface; protected static View mTextEdit; protected static ViewGroup mLayout; + protected static SDLJoystickHandler mJoystickHandler; // This is what SDL runs in. It invokes SDL_main(), eventually protected static Thread mSDLThread; - + // Audio protected static Thread mAudioThread; protected static AudioTrack mAudioTrack; @@ -64,6 +64,16 @@ public class SDLActivity extends Activity { // Set up the surface mSurface = new SDLSurface(getApplication()); + + // Make sure this variable is initialized here! + mExitCalledFromJava = false; + + if(Build.VERSION.SDK_INT >= 12) { + mJoystickHandler = new SDLJoystickHandler_API12(); + } + else { + mJoystickHandler = new SDLJoystickHandler(); + } mLayout = new AbsoluteLayout(this); mLayout.addView(mSurface); @@ -109,23 +119,24 @@ public class SDLActivity extends Activity { protected void onDestroy() { super.onDestroy(); Log.v("SDL", "onDestroy()"); - + if (!isFinishing()) { Log.v("SDL", "Not quitting native app as isFinishing() is false"); - return; + return; } // Send a quit message to the application + SDLActivity.mExitCalledFromJava = true; SDLActivity.nativeQuit(); // Now wait for the SDL thread to quit - if (mSDLThread != null) { + if (SDLActivity.mSDLThread != null) { try { - mSDLThread.join(); + SDLActivity.mSDLThread.join(); } catch(Exception e) { Log.v("SDL", "Problem stopping thread: " + e); } - mSDLThread = null; + SDLActivity.mSDLThread = null; //Log.v("SDL", "Finished waiting for SDL thread"); } @@ -169,6 +180,12 @@ public class SDLActivity extends Activity { mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true); } } + + /* The native thread has finished */ + public static void handleNativeExit() { + SDLActivity.mSDLThread = null; + mSingleton.finish(); + } // Messages from the SDLMain thread @@ -240,12 +257,16 @@ public class SDLActivity extends Activity { } // C functions we call - public static native void nativeInit(String apkPath); + public static native void nativeInit(); public static native void nativeLowMemory(); public static native void nativeQuit(); public static native void nativePause(); public static native void nativeResume(); public static native void onNativeResize(int x, int y, int format); + public static native int onNativePadDown(int device_id, int keycode); + public static native int onNativePadUp(int device_id, int keycode); + public static native void onNativeJoy(int device_id, int axis, + float value); public static native void onNativeKeyDown(int keycode); public static native void onNativeKeyUp(int keycode); public static native void onNativeKeyboardFocusLost(); @@ -256,6 +277,10 @@ public class SDLActivity extends Activity { public static native void onNativeSurfaceChanged(); public static native void onNativeSurfaceDestroyed(); public static native void nativeFlipBuffers(); + public static native int nativeAddJoystick(int device_id, String name, + int is_accelerometer, int nbuttons, + int naxes, int nhats, int nballs); + public static native int nativeRemoveJoystick(int device_id); public static void flipBuffers() { SDLActivity.nativeFlipBuffers(); @@ -274,6 +299,34 @@ public class SDLActivity extends Activity { return mSingleton; } + /** + * @return result of getSystemService(name) but executed on UI thread. + */ + public Object getSystemServiceFromUiThread(final String name) { + final Object lock = new Object(); + final Object[] results = new Object[2]; // array for writable variables + synchronized (lock) { + runOnUiThread(new Runnable() { + @Override + public void run() { + synchronized (lock) { + results[0] = getSystemService(name); + results[1] = Boolean.TRUE; + lock.notify(); + } + } + }); + if (results[1] == null) { + try { + lock.wait(); + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + } + } + return results[0]; + } + static class ShowTextInputTask implements Runnable { /* * This is used to regulate the pan&scan method to have some offset from @@ -416,25 +469,30 @@ public class SDLActivity extends Activity { } return Arrays.copyOf(filtered, used); } + + // Joystick glue code, just a series of stubs that redirect to the SDLJoystickHandler instance + public static boolean handleJoystickMotionEvent(MotionEvent event) { + return mJoystickHandler.handleMotionEvent(event); + } + + public static void pollInputDevices() { + if (SDLActivity.mSDLThread != null) { + mJoystickHandler.pollInputDevices(); + } + } + } /** Simple nativeInit() runnable */ class SDLMain implements Runnable { - public String path; - - public SDLMain () { - this.path = ""; - } - public SDLMain (String path) { - this.path = path; - } - @Override public void run() { // Runs SDL_main() - SDLActivity.nativeInit(this.path); + SDLActivity.nativeInit(); + + //Log.v("SDL", "SDL thread terminated"); } } @@ -468,6 +526,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); + + if(Build.VERSION.SDK_INT >= 12) { + setOnGenericMotionListener(new SDLGenericMotionListener_API12()); + } // Some arbitrary defaults to avoid a potential division by zero mWidth = 1.0f; @@ -560,21 +622,26 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // This is the entry point to the C app. // Start up the C app thread and enable sensor input for the first time - String apkFilePath = null; - ApplicationInfo appInfo = null; - Context context = getContext(); - PackageManager packMgmr = context.getPackageManager(); - try { - appInfo = packMgmr.getApplicationInfo("org.love2d.android", 0); - } catch (NameNotFoundException e) { - e.printStackTrace(); - throw new RuntimeException("Unable to locate assets, aborting..."); - } - apkFilePath = appInfo.sourceDir; - SDLActivity.mSDLThread = new Thread(new SDLMain(), "SDLThread"); enableSensor(Sensor.TYPE_ACCELEROMETER, true); SDLActivity.mSDLThread.start(); + + // Set up a listener thread to catch when the native thread ends + new Thread(new Runnable(){ + @Override + public void run(){ + try { + SDLActivity.mSDLThread.join(); + } + catch(Exception e){} + finally{ + // Native thread has finished + if (! SDLActivity.mExitCalledFromJava) { + SDLActivity.handleNativeExit(); + } + } + } + }).start(); } } @@ -586,16 +653,34 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // Key events @Override public boolean onKey(View v, int keyCode, KeyEvent event) { + // Dispatch the different events depending on where they come from + // Some SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD + // So, we try to process them as DPAD or GAMEPAD events first, if that fails we try them as KEYBOARD - if (event.getAction() == KeyEvent.ACTION_DOWN) { - //Log.v("SDL", "key down: " + keyCode); - SDLActivity.onNativeKeyDown(keyCode); - return true; + if ( (event.getSource() & 0x00000401) != 0 || /* API 12: SOURCE_GAMEPAD */ + (event.getSource() & InputDevice.SOURCE_DPAD) != 0 ) { + if (event.getAction() == KeyEvent.ACTION_DOWN) { + if (SDLActivity.onNativePadDown(event.getDeviceId(), keyCode) == 0) { + return true; + } + } else if (event.getAction() == KeyEvent.ACTION_UP) { + if (SDLActivity.onNativePadUp(event.getDeviceId(), keyCode) == 0) { + return true; + } + } } - else if (event.getAction() == KeyEvent.ACTION_UP) { - //Log.v("SDL", "key up: " + keyCode); - SDLActivity.onNativeKeyUp(keyCode); - return true; + + if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) { + if (event.getAction() == KeyEvent.ACTION_DOWN) { + //Log.v("SDL", "key down: " + keyCode); + SDLActivity.onNativeKeyDown(keyCode); + return true; + } + else if (event.getAction() == KeyEvent.ACTION_UP) { + //Log.v("SDL", "key up: " + keyCode); + SDLActivity.onNativeKeyUp(keyCode); + return true; + } } return false; @@ -604,31 +689,48 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // Touch events @Override public boolean onTouch(View v, MotionEvent event) { - final int touchDevId = event.getDeviceId(); - final int pointerCount = event.getPointerCount(); - // touchId, pointerId, action, x, y, pressure - int actionPointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT; /* API 8: event.getActionIndex(); */ - int pointerFingerId = event.getPointerId(actionPointerIndex); - int action = (event.getAction() & MotionEvent.ACTION_MASK); /* API 8: event.getActionMasked(); */ - - float x = event.getX(actionPointerIndex) / mWidth; - float y = event.getY(actionPointerIndex) / mHeight; - float p = event.getPressure(actionPointerIndex); - - if (action == MotionEvent.ACTION_MOVE && pointerCount > 1) { - // TODO send motion to every pointer if its position has - // changed since prev event. - for (int i = 0; i < pointerCount; i++) { + /* Ref: http://developer.android.com/training/gestures/multi.html */ + final int touchDevId = event.getDeviceId(); + final int pointerCount = event.getPointerCount(); + int action = event.getActionMasked(); + int pointerFingerId; + int i = -1; + float x,y,p; + + switch(action) { + case MotionEvent.ACTION_MOVE: + for (i = 0; i < pointerCount; i++) { pointerFingerId = event.getPointerId(i); x = event.getX(i) / mWidth; y = event.getY(i) / mHeight; p = event.getPressure(i); SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p); } - } else { + break; + + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_DOWN: + // Primary pointer up/down, the index is always zero + i = 0; + case MotionEvent.ACTION_POINTER_UP: + case MotionEvent.ACTION_POINTER_DOWN: + // Non primary pointer up/down + if (i == -1) { + i = event.getActionIndex(); + } + + pointerFingerId = event.getPointerId(i); + x = event.getX(i) / mWidth; + y = event.getY(i) / mHeight; + p = event.getPressure(i); SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p); - } - return true; + break; + + default: + break; + } + + return true; } // Sensor events @@ -675,8 +777,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, y / SensorManager.GRAVITY_EARTH, event.values[2] / SensorManager.GRAVITY_EARTH - 1); } - } - + } } /* This is a fake invisible editor view that receives the input and defines the @@ -796,5 +897,140 @@ class SDLInputConnection extends BaseInputConnection { public native void nativeSetComposingText(String text, int newCursorPosition); + @Override + public boolean deleteSurroundingText(int beforeLength, int afterLength) { + // Workaround to capture backspace key. Ref: http://stackoverflow.com/questions/14560344/android-backspace-in-webview-baseinputconnection + if (beforeLength == 1 && afterLength == 0) { + // backspace + return super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL)) + && super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL)); + } + + return super.deleteSurroundingText(beforeLength, afterLength); + } } +/* A null joystick handler for API level < 12 devices (the accelerometer is handled separately) */ +class SDLJoystickHandler { + + public boolean handleMotionEvent(MotionEvent event) { + return false; + } + + public void pollInputDevices() { + } +} + +/* Actual joystick functionality available for API >= 12 devices */ +class SDLJoystickHandler_API12 extends SDLJoystickHandler { + + class SDLJoystick { + public int device_id; + public String name; + public ArrayList axes; + } + + private ArrayList mJoysticks; + + public SDLJoystickHandler_API12() { + + mJoysticks = new ArrayList(); + } + + @Override + public void pollInputDevices() { + int[] deviceIds = InputDevice.getDeviceIds(); + // It helps processing the device ids in reverse order + // For example, in the case of the XBox 360 wireless dongle, + // so the first controller seen by SDL matches what the receiver + // considers to be the first controller + + for(int i=deviceIds.length-1; i>-1; i--) { + SDLJoystick joystick = getJoystick(deviceIds[i]); + if (joystick == null) { + joystick = new SDLJoystick(); + InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]); + if( (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) { + joystick.device_id = deviceIds[i]; + joystick.name = joystickDevice.getName(); + joystick.axes = new ArrayList(); + + for (InputDevice.MotionRange range : joystickDevice.getMotionRanges()) { + if ( (range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) { + joystick.axes.add(range); + } + } + + mJoysticks.add(joystick); + SDLActivity.nativeAddJoystick(joystick.device_id, joystick.name, 0, -1, joystick.axes.size(), 0, 0); + } + } + } + + /* Check removed devices */ + ArrayList removedDevices = new ArrayList(); + for(int i=0; i < mJoysticks.size(); i++) { + int device_id = mJoysticks.get(i).device_id; + int j; + for (j=0; j < deviceIds.length; j++) { + if (device_id == deviceIds[j]) break; + } + if (j == deviceIds.length) { + removedDevices.add(device_id); + } + } + + for(int i=0; i < removedDevices.size(); i++) { + int device_id = removedDevices.get(i); + SDLActivity.nativeRemoveJoystick(device_id); + for (int j=0; j < mJoysticks.size(); j++) { + if (mJoysticks.get(j).device_id == device_id) { + mJoysticks.remove(j); + break; + } + } + } + } + + protected SDLJoystick getJoystick(int device_id) { + for(int i=0; i < mJoysticks.size(); i++) { + if (mJoysticks.get(i).device_id == device_id) { + return mJoysticks.get(i); + } + } + return null; + } + + @Override + public boolean handleMotionEvent(MotionEvent event) { + if ( (event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) { + int actionPointerIndex = event.getActionIndex(); + int action = event.getActionMasked(); + switch(action) { + case MotionEvent.ACTION_MOVE: + SDLJoystick joystick = getJoystick(event.getDeviceId()); + if ( joystick != null ) { + for (int i = 0; i < joystick.axes.size(); i++) { + InputDevice.MotionRange range = joystick.axes.get(i); + /* Normalize the value to -1...1 */ + float value = ( event.getAxisValue( range.getAxis(), actionPointerIndex) - range.getMin() ) / range.getRange() * 2.0f - 1.0f; + SDLActivity.onNativeJoy(joystick.device_id, i, value ); + } + } + break; + default: + break; + } + } + return true; + } +} + +class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener { + // Generic Motion (mouse hover, joystick...) events go here + // We only have joysticks yet + @Override + public boolean onGenericMotion(View v, MotionEvent event) { + return SDLActivity.handleJoystickMotionEvent(event); + } +}