--- /dev/null
--- /dev/null
++[general]
++upstream_branch = none
set_option(VIDEO_WAYLAND "Use Wayland video driver" ${UNIX_SYS})
dep_option(WAYLAND_SHARED "Dynamically load Wayland support" ON "VIDEO_WAYLAND" OFF)
dep_option(VIDEO_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF)
- set_option(VIDEO_MIR "Use Mir video driver" ${UNIX_SYS})
- dep_option(MIR_SHARED "Dynamically load Mir support" ON "VIDEO_MIR" OFF)
set_option(VIDEO_RPI "Use Raspberry Pi video driver" ${UNIX_SYS})
dep_option(X11_SHARED "Dynamically load X11 support" ON "VIDEO_X11" OFF)
+set_option(VIDEO_TIZEN "Use Tizen video driver" ${UNIX_SYS})
+dep_option(TIZEN_SHARED "Dynamically load Tizen support" ON "VIDEO_TIZEN" OFF)
set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm)
foreach(_SUB ${SDL_X11_OPTIONS})
string(TOUPPER "VIDEO_X11_${_SUB}" _OPT)
endif()
endif()
+ 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)
+
+ if(SDL_TIMERS)
+ set(SDL_TIMER_HAIKU 1)
+ file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/haiku/*.c)
+ set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
+ set(HAVE_SDL_TIMERS TRUE)
+ endif()
+
+ if(SDL_LOCALE)
+ file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/haiku/*.cc)
+ set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
+ set(HAVE_SDL_LOCALE TRUE)
+ endif()
+
+ CheckPTHREAD()
+
+ elseif(RISCOS)
+ file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/riscos/*.c)
+ set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
+ set(HAVE_SDL_MISC TRUE)
+
+ if(SDL_TIMERS)
+ set(SDL_TIMER_UNIX 1)
+ file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+ set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
+ set(HAVE_SDL_TIMERS TRUE)
+
+ if(CLOCK_GETTIME)
+ set(HAVE_CLOCK_GETTIME 1)
+ endif()
+ endif()
+
CheckPTHREAD()
-
- if(SDL_AUDIO)
- CheckOSS()
+elseif(TIZEN)
+ if(SDL_VIDEO)
+ add_definitions(-D_EFL_BETA_API_SUPPORT)
+ if(VIDEO_VULKAN)
+ set(SDL_VIDEO_VULKAN 1)
+ set(HAVE_VIDEO_VULKAN TRUE)
+ set(SDL_CFLAGS "${SDL_CFLAGS} -I/usr/include")
+ endif()
endif()
endif()
{ $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 && \
- test x$video_opengl_egl = xyes && \
+ if test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
- WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
- WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+ if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon xdg-shell-client text-client tizen-extension-client; then
+ WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon xdg-shell-client text-client tizen-extension-client`
+ WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon xdg-shell-client text-client tizen-extension-client`
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
- WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
- WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
video_wayland=yes
fi
fi
fi
}
- EXTRA_CFLAGS="$EXTRA_CFLAGS $TIZEN_CFLAGS -DTIZEN -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE -pie"
+CheckTizen()
+{
+ # Check whether --enable-video-tizen was given.
+if test "${enable_video_tizen+set}" = set; then :
+ enableval=$enable_video_tizen;
+else
+ enable_video_tizen=yes
+fi
+
+
+ if test x$enable_video = xyes -a x$enable_video_tizen = 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 Tizen support" >&5
+$as_echo_n "checking for Tizen support... " >&6; }
+ video_tizen=no
+ if test x$PKG_CONFIG != xno && \
+ test x$video_opengl_egl = xyes && \
+ test x$video_opengles_v2 = xyes; then
+ if $PKG_CONFIG --exists wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc appcore-ui; then
+ TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc appcore-ui`
+ TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc appcore-ui`
+ video_tizen=yes
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_tizen" >&5
+$as_echo "$video_tizen" >&6; }
+
+ if test x$video_tizen = xyes; then
+
+$as_echo "#define SDL_VIDEO_DRIVER_TIZEN 1" >>confdefs.h
+
+ SOURCES="$SOURCES $srcdir/src/video/tizen/*.c"
+ SOURCES="$SOURCES $srcdir/src/core/tizen/*.c"
+ SDLMAIN_SOURCES="$srcdir/src/main/tizen/*.c"
+
+ SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
+ SDL_LIBS="-lSDL2main $SDL_LIBS"
+
++ EXTRA_CFLAGS="$EXTRA_CFLAGS $TIZEN_CFLAGS -DTIZEN -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE -pie -Wno-error=declaration-after-statement"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $TIZEN_LIBS -pie -Wl,-z,relro,-z,now"
+ SUMMARY_video="${SUMMARY_video} tizen"
+ have_video=yes
+ fi
+ fi
+
+ if test x$enable_joystick = xyes; then
+ SUMMARY="${SUMMARY}SDL2 tizen joystick in:\n"
+
+$as_echo "#define SDL_JOYSTICK_TIZEN 1" >>confdefs.h
+
+ SOURCES="$SOURCES $srcdir/src/joystick/tizen/*.c"
+ have_joystick=yes
+ fi
+}
+
+CheckMir()
+{
+ # Check whether --enable-video-mir was given.
+if test "${enable_video_mir+set}" = set; then :
+ enableval=$enable_video_mir;
+else
+ enable_video_mir=yes
+fi
+
+
+ if test x$enable_video = xyes -a x$enable_video_mir = 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 Mir support" >&5
+$as_echo_n "checking for Mir support... " >&6; }
+ video_mir=no
+ if test x$PKG_CONFIG != xno; then
+ if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
+ MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
+ MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $MIR_CFLAGS"
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <mir_toolkit/mir_client_library.h>
+
+int
+main ()
+{
+
+ MirWindowAttrib attrib = mir_window_attrib_state
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ video_mir=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_mir" >&5
+$as_echo "$video_mir" >&6; }
+
+ if test x$video_mir = xyes; then
+
+$as_echo "#define SDL_VIDEO_DRIVER_MIR 1" >>confdefs.h
+
+ SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $MIR_CFLAGS"
+ # Check whether --enable-mir-shared was given.
+if test "${enable_mir_shared+set}" = set; then :
+ enableval=$enable_mir_shared;
+else
+ enable_mir_shared=maybe
+fi
+
+
+ case "$host" in
+ *)
+ mirclient_lib=`find_lib "libmirclient.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
+ xkbcommon_lib=`find_lib "libxkbcommon.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
+ ;;
+ esac
+
+ if test x$enable_mir_shared = xmaybe; then
+ enable_mir_shared=yes
+ fi
+ if test x$have_loadso != xyes && \
+ test x$enable_mir_shared = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&5
+$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&2;}
+ enable_mir_shared=no
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_mir_shared = xyes && \
+ test x$mirclient_lib != x && \
+ test x$xkbcommon_lib != x; then
+ echo "-- dynamic libmirclient -> $mirclient_lib"
+ echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
+
+cat >>confdefs.h <<_ACEOF
+#define SDL_VIDEO_DRIVER_MIR_DYNAMIC "$mirclient_lib"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "$xkbcommon_lib"
+_ACEOF
+
+ SUMMARY_video="${SUMMARY_video} mir(dynamic)"
+ else
+ enable_mir_shared=no
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MIR_LIBS"
+ SUMMARY_video="${SUMMARY_video} mir"
+ fi
+ have_video=yes
+ fi
+ fi
+}
+
CheckNativeClient()
{
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
CheckOpenGLX11
CheckOpenGLESX11
CheckVulkan
- CheckMir
CheckWayland
- CheckInputEvents
+ CheckTizen
CheckLibUDev
CheckDBus
CheckIME
,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 && \
- test x$video_opengl_egl = xyes && \
+ if test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
- WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
- WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+ if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon xdg-shell-client text-client tizen-extension-client; then
+ WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon xdg-shell-client text-client tizen-extension-client`
+ WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon xdg-shell-client text-client tizen-extension-client`
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
- WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
- WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
video_wayland=yes
fi
fi
fi
}
- AC_HELP_STRING([--enable-video-tizen], [use tizen video driver [[default=yes]]]),
- ,enable_video_tizen=yes)
+dnl Check for Tizen
+CheckTizen()
+{
+ AC_ARG_ENABLE(video-tizen,
- EXTRA_CFLAGS="$EXTRA_CFLAGS $TIZEN_CFLAGS -DTIZEN -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE -pie"
++ AC_HELP_STRING([--enable-video-tizen], [use tizen video driver [[default=yes]]]),
++ ,enable_video_tizen=yes)
+
+ if test x$enable_video = xyes -a x$enable_video_tizen = xyes; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ AC_MSG_CHECKING(for Tizen support)
+ video_tizen=no
+ if test x$PKG_CONFIG != xno && \
+ test x$video_opengl_egl = xyes && \
+ test x$video_opengles_v2 = xyes; then
+ if $PKG_CONFIG --exists wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm ecore-ipc appcore-ui; then
+ TIZEN_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc appcore-ui`
+ TIZEN_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-egl-tizen ecore ecore-wl2 xdg-shell-client text-client tizen-extension-client eina elementary capi-appfw-application capi-system-system-settings ecore-input dlog ecore-imf libdrm aul ecore-ipc appcore-ui`
+ video_tizen=yes
+ fi
+ fi
+ AC_MSG_RESULT($video_tizen)
+
+ if test x$video_tizen = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_TIZEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/tizen/*.c"
+ SOURCES="$SOURCES $srcdir/src/core/tizen/*.c"
+ SDLMAIN_SOURCES="$srcdir/src/main/tizen/*.c"
+
+ SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
+ SDL_LIBS="-lSDL2main $SDL_LIBS"
+
++ EXTRA_CFLAGS="$EXTRA_CFLAGS $TIZEN_CFLAGS -DTIZEN -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE -pie -Wno-error=declaration-after-statement"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $TIZEN_LIBS -pie -Wl,-z,relro,-z,now"
+ SUMMARY_video="${SUMMARY_video} tizen"
+ have_video=yes
+ fi
+ fi
+
+ if test x$enable_joystick = xyes; then
+ SUMMARY="${SUMMARY}SDL2 tizen joystick in:\n"
+ AC_DEFINE(SDL_JOYSTICK_TIZEN, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/joystick/tizen/*.c"
+ have_joystick=yes
+ fi
+}
+
+dnl Check for Mir
+CheckMir()
+{
+ AC_ARG_ENABLE(video-mir,
+AC_HELP_STRING([--enable-video-mir], [use Mir video driver [[default=no]]]),
+ ,enable_video_mir=no)
+
+ if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ AC_MSG_CHECKING(for Mir support)
+ video_mir=no
+ if test x$PKG_CONFIG != xno; then
+ if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
+ MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
+ MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $MIR_CFLAGS"
+
+ dnl This will disable Mir if >= v0.26 is not available
+ AC_TRY_COMPILE([
+ #include <mir_toolkit/mir_client_library.h>
+ ],[
+ MirWindowAttrib attrib = mir_window_attrib_state
+ ],[
+ video_mir=yes
+ ])
+ CFLAGS="$save_CFLAGS"
+ fi
+ fi
+ AC_MSG_RESULT($video_mir)
+
+ if test x$video_mir = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_MIR, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $MIR_CFLAGS"
+ AC_ARG_ENABLE(mir-shared,
+AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=maybe]]]),
+ , enable_mir_shared=maybe)
+
+ dnl FIXME: Do BSD and OS X need special cases?
+ case "$host" in
+ *)
+ mirclient_lib=[`find_lib "libmirclient.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xkbcommon_lib=[`find_lib "libxkbcommon.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+ ;;
+ esac
+
+ if test x$enable_mir_shared = xmaybe; then
+ enable_mir_shared=yes
+ fi
+ if test x$have_loadso != xyes && \
+ test x$enable_mir_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic Mir loading])
+ enable_mir_shared=no
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_mir_shared = xyes && \
+ test x$mirclient_lib != x && \
+ test x$xkbcommon_lib != x; then
+ echo "-- dynamic libmirclient -> $mirclient_lib"
+ echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_MIR_DYNAMIC, "$mirclient_lib", [ ])
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON, "$xkbcommon_lib", [ ])
+ SUMMARY_video="${SUMMARY_video} mir(dynamic)"
+ else
+ enable_mir_shared=no
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MIR_LIBS"
+ SUMMARY_video="${SUMMARY_video} mir"
+ fi
+ have_video=yes
+ fi
+ fi
+}
+
dnl Check for Native Client stuff
CheckNativeClient()
{
dnl Check to see if OpenGL ES support is desired
AC_ARG_ENABLE(video-opengles,
- AC_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
+ AS_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
, enable_video_opengles=yes)
AC_ARG_ENABLE(video-opengles1,
- AC_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
+ AS_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
, enable_video_opengles1=yes)
AC_ARG_ENABLE(video-opengles2,
- AC_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
+ AS_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
, enable_video_opengles2=yes)
+
dnl Find OpenGL ES
CheckOpenGLESX11()
{
CheckOpenGLX11
CheckOpenGLESX11
CheckVulkan
- CheckMir
CheckWayland
- CheckInputEvents
+ CheckTizen
CheckLibUDev
CheckDBus
CheckIME
--- /dev/null
++<<<<<<< HEAD:extension/SDL2_ttf-2.0.14/COPYING.txt
+/*\r
+ SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts\r
+ Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>\r
+\r
+ This software is provided 'as-is', without any express or implied\r
+ warranty. In no event will the authors be held liable for any damages\r
+ arising from the use of this software.\r
+\r
+ Permission is granted to anyone to use this software for any purpose,\r
+ including commercial applications, and to alter it and redistribute it\r
+ freely, subject to the following restrictions:\r
+\r
+ 1. The origin of this software must not be misrepresented; you must not\r
+ claim that you wrote the original software. If you use this software\r
+ in a product, an acknowledgment in the product documentation would be\r
+ appreciated but is not required.\r
+ 2. Altered source versions must be plainly marked as such, and must not be\r
+ misrepresented as being the original software.\r
+ 3. This notice may not be removed or altered from any source distribution.\r
+*/\r
++=======
++/*
++ Simple DirectMedia Layer
++ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
++
++ 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_sysurl.h"
++
++int
++SDL_SYS_OpenURL(const char *url)
++{
++ return SDL_Unsupported();
++}
++
++/* vi: set ts=4 sw=4 expandtab: */
++
++>>>>>>> upstream:src/misc/dummy/SDL_sysurl.c
#include "SDL_timer.h"
#include "SDL_version.h"
#include "SDL_video.h"
+#include "SDL_vulkan.h"
+ #include "SDL_locale.h"
+ #include "SDL_misc.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
+#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XDGSHELLCLIENT @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XDGSHELLCLIENT@
+#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_TEXTCLIENT @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_TEXTCLIENT@
+#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_TIZENEXTENSIONCLIENT @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_TIZENEXTENSIONCLIENT@
- #cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
- #cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
- #cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
Called on iOS in applicationDidBecomeActive()
Called on Android in onResume()
*/
+ SDL_APP_CONTROL, /**< The application is launching with some arguments.
+ Called on Tizen in _tizen_sdl_control().
+ */
+ SDL_APP_LOWBATTERY, /**< The application is low on battery, reduce power consumption if possible.
+ Called on Tizen in _tizen_app_low_battery().
+ */
+ SDL_APP_LANGUAGE_CHANGED, /**< The application receives this event, when displayed language is changed by system.
+ Called on Tizen in _tizen_app_lang_changed().
+ */
+ SDL_APP_REGION_CHANGED, /**< The application will receive this event, when displayed language is changed by system.
+ Called on Tizen in _tizen_app_region_changed().
+ */
+ SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
+
+ /* Display events */
+ SDL_DISPLAYEVENT = 0x150, /**< Display state change */
+
/* Window events */
SDL_WINDOWEVENT = 0x200, /**< Window state change */
SDL_SYSWMEVENT, /**< System specific event */
* Return the name for this currently opened controller
*/
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
+/**
+ * Get the USB vendor ID of an opened controller, if available.
+ * If the vendor ID isn't available this function returns 0.
+ */
+extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller);
+/**
+ * Get the USB product ID of an opened controller, if available.
+ * If the product ID isn't available this function returns 0.
+ */
+extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller);
+/**
+ * Get the product version of an opened controller, if available.
+ * If the product version isn't available this function returns 0.
+ */
+extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller);
/**
+ * Return the type of this currently opened controller
+ */
+ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
+
+ /**
+ * Get the player index of an opened game controller, or -1 if it's not available
+ *
+ * For XInput controllers this returns the XInput user index.
+ */
+ extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
+
+ /**
+ * Set the player index of an opened game controller
+ */
+ extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
+
+ /**
* Get the USB vendor ID of an opened controller, if available.
* If the vendor ID isn't available this function returns 0.
*/
*/
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
+
+/**
+ * \brief Set Tizen indicator opacity
+ *
+ * The variable can be one of
+ * "#opaque" - Opacifies the indicator
+ * "#translucent" - Be translucent the indicator
+ * "#transparent" - Transparentizes the indicator (this is the default)
+ * "#bg_transparent" - Transparentizes the indicator background
+ */
+#define SDL_HINT_TIZEN_INDICATOR_OPACITY "SDL_TIZEN_INDICATOR_OPACITY"
+
/**
-
+ * \brief A variable controlling whether the 2D render API is compatible or efficient.
+ *
+ * This variable can be set to the following values:
+ *
+ * "0" - Don't use batching to make rendering more efficient.
+ * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
+ *
+ * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
+ * it batches up draw requests and sends them all to the GPU only when forced
+ * to (during SDL_RenderPresent, when changing render targets, by updating a
+ * texture that the batch needs, etc). This is significantly more efficient,
+ * but it can cause problems for apps that expect to render on top of the
+ * render API's output. As such, SDL will disable batching if a specific
+ * render backend is requested (since this might indicate that the app is
+ * planning to use the underlying graphics API directly). This hint can
+ * be used to explicitly request batching in this instance. It is a contract
+ * that you will either never use the underlying graphics API directly, or
+ * if you do, you will call SDL_RenderFlush() before you do so any current
+ * batch goes to the GPU before your work begins. Not following this contract
+ * will result in undefined behavior.
+ */
+ #define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
+
+ /**
+ * \brief A variable controlling whether SDL updates joystick state when getting input events
+ *
+ * This variable can be set to the following values:
+ *
+ * "0" - You'll call SDL_JoystickUpdate() manually
+ * "1" - SDL will automatically call SDL_JoystickUpdate() (default)
+ *
+ * This hint can be toggled on and off at runtime.
+ */
+ #define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
+
+
+ /**
+ * \brief A variable controlling whether SDL updates sensor state when getting input events
+ *
+ * This variable can be set to the following values:
+ *
+ * "0" - You'll call SDL_SensorUpdate() manually
+ * "1" - SDL will automatically call SDL_SensorUpdate() (default)
+ *
+ * This hint can be toggled on and off at runtime.
+ */
+ #define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
+
+
+ /**
+ * \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
+ *
+ * This variable can be set to the following values:
+ *
+ * "0" - Don't log any events (default)
+ * "1" - Log all events except mouse and finger motion, which are pretty spammy.
+ * "2" - Log all events.
+ *
+ * This is generally meant to be used to debug SDL itself, but can be useful
+ * for application developers that need better visibility into what is going
+ * on in the event queue. Logged events are sent through SDL_Log(), which
+ * means by default they appear on stdout on most platforms or maybe
+ * OutputDebugString() on Windows, and can be funneled by the app with
+ * SDL_LogSetOutputFunction(), etc.
+ *
+ * This hint can be toggled on and off at runtime, if you only need to log
+ * events for a small subset of program execution.
+ */
+ #define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
+
+
+
+ /**
+ * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
+ *
+ * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
+ * file) is not always reliable. In case the size is wrong, it's possible to
+ * just ignore it and step through the chunks until a fixed limit is reached.
+ *
+ * Note that files that have trailing data unrelated to the WAVE file or
+ * corrupt files may slow down the loading process without a reliable boundary.
+ * By default, SDL stops after 10000 chunks to prevent wasting time. Use the
+ * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
+ *
+ * This variable can be set to the following values:
+ *
+ * "force" - Always use the RIFF chunk size as a boundary for the chunk search
+ * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
+ * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
+ * "maximum" - Search for chunks until the end of file (not recommended)
+ */
+ #define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
+
+ /**
+ * \brief Controls how a truncated WAVE file is handled.
+ *
+ * A WAVE file is considered truncated if any of the chunks are incomplete or
+ * the data chunk size is not a multiple of the block size. By default, SDL
+ * decodes until the first incomplete block, as most applications seem to do.
+ *
+ * This variable can be set to the following values:
+ *
+ * "verystrict" - Raise an error if the file is truncated
+ * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
+ * "dropframe" - Decode until the first incomplete sample frame
+ * "dropblock" - Decode until the first incomplete block (default)
+ */
+ #define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
+
+ /**
+ * \brief Controls how the fact chunk affects the loading of a WAVE file.
+ *
+ * The fact chunk stores information about the number of samples of a WAVE
+ * file. The Standards Update from Microsoft notes that this value can be used
+ * to 'determine the length of the data in seconds'. This is especially useful
+ * for compressed formats (for which this is a mandatory chunk) if they produce
+ * multiple sample frames per block and truncating the block is not allowed.
+ * The fact chunk can exactly specify how many sample frames there should be
+ * in this case.
+ *
+ * Unfortunately, most application seem to ignore the fact chunk and so SDL
+ * ignores it by default as well.
+ *
+ * This variable can be set to the following values:
+ *
+ * "truncate" - Use the number of samples to truncate the wave data if
+ * the fact chunk is present and valid
+ * "strict" - Like "truncate", but raise an error if the fact chunk
+ * is invalid, not present for non-PCM formats, or if the
+ * data chunk doesn't have that many samples
+ * "ignorezero" - Like "truncate", but ignore fact chunk if the number of
+ * samples is zero
+ * "ignore" - Ignore fact chunk entirely (default)
+ */
+ #define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
+
+ /**
+ * \brief Override for SDL_GetDisplayUsableBounds()
+ *
+ * If set, this hint will override the expected results for
+ * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
+ * to do this, but this allows an embedded system to request that some of the
+ * screen be reserved for other uses when paired with a well-behaved
+ * application.
+ *
+ * The contents of this hint must be 4 comma-separated integers, the first
+ * is the bounds x, then y, width and height, in that order.
+ */
+ #define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
+
+ /**
+ * \brief Specify an application name for an audio device.
+ *
+ * Some audio backends (such as PulseAudio) allow you to describe your audio
+ * stream. Among other things, this description might show up in a system
+ * control panel that lets the user adjust the volume on specific audio
+ * streams instead of using one giant master volume slider.
+ *
+ * This hints lets you transmit that information to the OS. The contents of
+ * this hint are used while opening an audio device. You should use a string
+ * that describes your program ("My Game 2: The Revenge")
+ *
+ * Setting this to "" or leaving it unset will have SDL use a reasonable
+ * default: probably the application's name or "SDL Application" if SDL
+ * doesn't have any better information.
+ *
+ * On targets where this is not supported, this hint does nothing.
+ */
+ #define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
+
+ /**
+ * \brief Specify an application name for an audio device.
+ *
+ * Some audio backends (such as PulseAudio) allow you to describe your audio
+ * stream. Among other things, this description might show up in a system
+ * control panel that lets the user adjust the volume on specific audio
+ * streams instead of using one giant master volume slider.
+ *
+ * This hints lets you transmit that information to the OS. The contents of
+ * this hint are used while opening an audio device. You should use a string
+ * that describes your what your program is playing ("audio stream" is
+ * probably sufficient in many cases, but this could be useful for something
+ * like "team chat" if you have a headset playing VoIP audio separately).
+ *
+ * Setting this to "" or leaving it unset will have SDL use a reasonable
+ * default: "audio stream" or something similar.
+ *
+ * On targets where this is not supported, this hint does nothing.
+ */
+ #define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
+
+
+ /**
+ * \brief Override for SDL_GetPreferredLocales()
+ *
+ * If set, this will be favored over anything the OS might report for the
+ * user's preferred locales. Changing this hint at runtime will not generate
+ * a SDL_LOCALECHANGED event (but if you can change the hint, you can push
+ * your own event, if you want).
+ *
+ * The format of this hint is a comma-separated list of language and locale,
+ * combined with an underscore, as is a common format: "en_GB". Locale is
+ * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
+ */
+ #define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
+
+
+ /**
* \brief An enumeration of hint priorities
*/
typedef enum
#endif /* __WINRT__ */
+extern DECLSPEC int SDLCALL SDL_tizen_app_init(int argc, char *argv[]);
+
+ #if defined(__IPHONEOS__)
+
+ /**
+ * \brief Initializes and launches an SDL application.
+ *
+ * \param argc The argc parameter from the application's main() function
+ * \param argv The argv parameter from the application's main() function
+ * \param mainFunction The SDL app's C-style main().
+ * \return the return value from mainFunction
+ */
+ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
+
+ #endif /* __IPHONEOS__ */
+
#ifdef __cplusplus
}
EGLSurface surface;
} android;
#endif
+#if defined(SDL_VIDEO_DRIVER_TIZEN)
+ 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) */
+
+ /* For GLES */
+ void* egl_display; /**< EGLDispaly when OPENGLES is enabled */
+ void* egl_surface; /**< EGLSurface when OPENGLES is enabled for this wl_surface */
+ } tizen;
+#endif
+ #if defined(SDL_VIDEO_DRIVER_OS2)
+ struct
+ {
+ HWND hwnd; /**< The window handle */
+ HWND hwndFrame; /**< The frame window handle */
+ } os2;
+ #endif
+
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
struct
{
--- /dev/null
- Version: 2.0.8
+Summary: Simple DirectMedia Layer
+Name: SDL2
- %define __version 2.0.8
++Version: 2.0.14
+Release: 2
+Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
+URL: http://www.libsdl.org/
+License: Zlib and SGI-B-2.0
+Group: System Environment/Libraries
+BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
+Prefix: %{_prefix}
+%ifos linux
+Provides: libSDL2-2.0.so.0
+%endif
+
+%define _unpackaged_files_terminate_build 0
+%define __defattr %defattr(-,root,root)
+%define __soext so
++%define __version 2.0.14
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: pkgconfig(egl)
+BuildRequires: pkgconfig(glesv2)
+BuildRequires: pkgconfig(wayland-client)
+BuildRequires: pkgconfig(wayland-cursor)
+BuildRequires: pkgconfig(wayland-egl)
+BuildRequires: pkgconfig(wayland-egl-tizen)
+BuildRequires: pkgconfig(text-client)
+BuildRequires: pkgconfig(tizen-extension-client)
+BuildRequires: pkgconfig(tizen-remote-surface-client)
+BuildRequires: pkgconfig(wayland-tbm-client)
+Requires: libwayland-extension-client
+BuildRequires: pkgconfig(xkbcommon)
+BuildRequires: pkgconfig(libpng)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(pixman-1)
+BuildRequires: pkgconfig(freetype2)
+BuildRequires: pkgconfig(fontconfig)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(libdrm)
+BuildRequires: pkgconfig(ecore-ipc)
+BuildRequires: binutils-devel
+BuildRequires: which
+BuildRequires: autoconf
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(ecore-wl2)
+BuildRequires: pkgconfig(appcore-common)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-system-system-settings)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(ecore-imf)
+BuildRequires: pkgconfig(aul)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(libpulse)
+BuildRequires: terminfo-base-mini
+
+BuildRequires: pkgconfig(appcore-ui)
+
+%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.
+
+
+%package -n SDL2_ttf
+Summary: Libraries, includes and more to develop SDL applications.
+Group: Development/Libraries
+Version: 2.0.14
+Release: 1
+%description -n SDL2_ttf
+This library allows you to use TrueType fonts to render text in SDL applications.
+%package -n SDL2_ttf-devel
+Summary: Libraries, includes and more to develop SDL applications.
+Group: Development/Libraries
+Version: 2.0.14
+Release: 1
+Requires: SDL2_ttf
+Requires: SDL2-devel
+%description -n SDL2_ttf-devel
+This library allows you to use TrueType fonts to render text in SDL applications.
+%prep
+%setup -q
+
+%build
+cd src/video/tizen/indicator
+#make %{?_smp_mflgs}
+BUILD_PATH=$RPM_BUILD_DIR/%{name}-%{__version}
+
+cd ../../../../
+%if "%{asan}" == "1"
+%restore_fcommon
+LDFLAGS+=" -lasan -ldl "
+%endif
+%ifos linux
+libtoolize --force
+chmod +x configure
+CFLAGS="$RPM_OPT_FLAGS" %configure --prefix=%{prefix} --disable-video-directfb --disable-video-wayland --enable-video-tizen %{?asan:--disable-assembly}
+make %{?_smp_mflgs}
+rm -rf build-scripts/ltmain.sh
+#########
+mkdir -p $BUILD_PATH/usr/include/SDL2
+mkdir -p $BUILD_PATH/usr/lib/pkgconfig
+export PKG_CONFIG_PATH=$BUILD_PATH/usr/lib/pkgconfig
+cp -f $BUILD_PATH/include/* $BUILD_PATH/usr/include/SDL2
+cp -f $BUILD_PATH/sdl2.pc $BUILD_PATH/usr/lib/pkgconfig
+cp -f $BUILD_PATH/build/.libs/lib*.%{__soext} $BUILD_PATH/usr/lib
+cp -f $BUILD_PATH/build/.libs/libSDL2main.a $BUILD_PATH/usr/lib
+#########
+cd extension/SDL2_ttf-2.0.14
+libtoolize --force
+chmod +x autogen.sh
+./autogen.sh
+chmod +x configure
+CPPFLAGS="-I$BUILD_PATH/usr/include/SDL2"
+LDFLAGS="-L$BUILD_PATH/usr/lib"
+LIBS="-lSDL2 -lSDL2main"
+CFLAGS="$RPM_OPT_FLAGS -I$BUILD_PATH/usr/include/SDL2" %configure --prefix=%{prefix}
+rm -rf ltmain.sh
+
+make %{?_smp_mflgs}
+%else
+%configure %{?asan:--disable-assembly}
+%endif
+#make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ifos linux
+cd src/video/tizen/indicator
+make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_bindir}
+
+cd ../../../../
+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}
+cd extension/SDL2_ttf-2.0.14
+make install prefix=$RPM_BUILD_ROOT%{prefix} \
+ bindir=$RPM_BUILD_ROOT%{_bindir} \
+ libdir=$RPM_BUILD_ROOT%{_libdir} \
+ includedir=$RPM_BUILD_ROOT%{_includedir} \
+%else
+%makeinstall
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+/usr/bin/sdl_indicator
+%manifest SDL2.manifest
+%{__defattr}
+%license COPYING.txt
+#%doc README*.txt COPYING.txt CREDITS.txt BUGS.txt
+%{_libdir}/lib*.%{__soext}.*
+%exclude %{_libdir}/libSDL2_ttf*
+
+%files devel
+%{__defattr}
+#%doc docs/README*.md
+%{_bindir}/*-config
+%{_libdir}/lib*.a
+%{_libdir}/lib*.la
+%{_libdir}/lib*.%{__soext}
+%{_includedir}/*/*.h
++%{_libdir}/cmake/*
+%{_libdir}/pkgconfig/*
+%{_datadir}/aclocal/*
+%exclude %{_includedir}/SDL2/SDL_ttf.h
+%exclude %{_libdir}/libSDL2_ttf*
+%exclude %{_libdir}/pkgconfig/SDL2_ttf.pc
+%files -n SDL2_ttf
+%defattr(-,root,root)
+#%doc README CHANGES COPYING
+%{_libdir}/libSDL2_ttf*.so.*
+%{_libdir}/libSDL2_ttf*.so
+%files -n SDL2_ttf-devel
+%defattr(-,root,root)
+#%doc README CHANGES COPYING
+%{_libdir}/libSDL2_ttf.la
+%{_libdir}/libSDL2_ttf.a
+%{_libdir}/libSDL2_ttf*.so
+%{_libdir}/pkgconfig/SDL2_ttf.pc
+%{_includedir}/*/SDL_ttf.h
+
+%changelog
+* Thu Jun 04 2015 Ryan C. Gordon <icculus@icculus.org>
+- Fixed README paths.
+
+* Sun Dec 07 2014 Simone Contini <s.contini@oltrelinux.com>
+- Fixed changelog date issue and docs filenames
+
+* Sun Jan 22 2012 Sam Lantinga <slouken@libsdl.org>
+- Updated for SDL 2.0
+
+* Tue May 16 2006 Sam Lantinga <slouken@libsdl.org>
+- Removed support for Darwin, due to build problems on ps2linux
+
+* Sat Jan 03 2004 Anders Bjorklund <afb@algonet.se>
+- Added support for Darwin, updated spec file
+
+* Wed Jan 19 2000 Sam Lantinga <slouken@libsdl.org>
+- 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 <hakan@iconsult.com>
+- Hacked Mandrake sdl spec to build 1.1
+
+* Sun Dec 19 1999 John Buswell <johnb@mandrakesoft.com>
+- Build Release
+
+* Sat Dec 18 1999 John Buswell <johnb@mandrakesoft.com>
+- Add symlink for libSDL-1.0.so.0 required by sdlbomber
+- Added docs
+
+* Thu Dec 09 1999 Lenny Cartier <lenny@mandrakesoft.com>
+- v 1.0.0
+
+* Mon Nov 1 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
+- First spec file for Mandrake distribution.
+
+# end of file
--- /dev/null
+ /*
+ Simple DirectMedia Layer
++<<<<<<< HEAD:src/video/tizen/SDL_tizentouch.h
++ Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
++ Copyright 2015 Samsung Electronics co., Ltd. All Rights Reserved.
++=======
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
++>>>>>>> upstream:src/audio/openslES/SDL_openslES.h
+
+ 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.
+ */
++<<<<<<< HEAD:src/video/tizen/SDL_tizentouch.h
++
++#include "../../SDL_internal.h"
++
++#include "SDL_tizenvideo.h"
++
++#define ACTION_POINTER_DOWN 1
++#define ACTION_POINTER_UP 2
++#define ACTION_POINTER_MOVE 3
++#define ACTION_CANCEL 4
++#define ACTION_OUTSIDE 5
++
++#define TOUCH_THRESHOLD 100.0f
++
++extern void Tizen_InitTouch(void);
++extern void Tizen_QuitTouch(void);
++extern void Tizen_OnTouch(_THIS, int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p);
++=======
+ #include "../../SDL_internal.h"
+
+ #ifndef _SDL_openslesaudio_h
+ #define _SDL_openslesaudio_h
+
+ #include "../SDL_sysaudio.h"
+
+ /* Hidden "this" pointer for the audio functions */
+ #define _THIS SDL_AudioDevice *this
+
+ #define NUM_BUFFERS 2 /* -- Don't lower this! */
+
+ struct SDL_PrivateAudioData
+ {
+ Uint8 *mixbuff;
+ int next_buffer;
+ Uint8 *pmixbuff[NUM_BUFFERS];
+ SDL_sem *playsem;
+ };
+
+ void openslES_ResumeDevices(void);
+ void openslES_PauseDevices(void);
+
+ #endif /* _SDL_openslesaudio_h */
++>>>>>>> upstream:src/audio/openslES/SDL_openslES.h
+
+ /* vi: set ts=4 sw=4 expandtab: */
#define SDL_WinRTGetDeviceFamily SDL_WinRTGetDeviceFamily_REAL
#define SDL_log10 SDL_log10_REAL
#define SDL_log10f SDL_log10f_REAL
- #define SDL_tizen_app_init SDL_tizen_app_init_REAL
++#define SDL_tizen_app_init SDL_tizen_app_init_REAL
+ #define SDL_GameControllerMappingForDeviceIndex SDL_GameControllerMappingForDeviceIndex_REAL
+ #define SDL_LinuxSetThreadPriority SDL_LinuxSetThreadPriority_REAL
+ #define SDL_HasAVX512F SDL_HasAVX512F_REAL
+ #define SDL_IsChromebook SDL_IsChromebook_REAL
+ #define SDL_IsDeXMode SDL_IsDeXMode_REAL
+ #define SDL_AndroidBackButton SDL_AndroidBackButton_REAL
+ #define SDL_exp SDL_exp_REAL
+ #define SDL_expf SDL_expf_REAL
+ #define SDL_wcsdup SDL_wcsdup_REAL
+ #define SDL_GameControllerRumble SDL_GameControllerRumble_REAL
+ #define SDL_JoystickRumble SDL_JoystickRumble_REAL
+ #define SDL_NumSensors SDL_NumSensors_REAL
+ #define SDL_SensorGetDeviceName SDL_SensorGetDeviceName_REAL
+ #define SDL_SensorGetDeviceType SDL_SensorGetDeviceType_REAL
+ #define SDL_SensorGetDeviceNonPortableType SDL_SensorGetDeviceNonPortableType_REAL
+ #define SDL_SensorGetDeviceInstanceID SDL_SensorGetDeviceInstanceID_REAL
+ #define SDL_SensorOpen SDL_SensorOpen_REAL
+ #define SDL_SensorFromInstanceID SDL_SensorFromInstanceID_REAL
+ #define SDL_SensorGetName SDL_SensorGetName_REAL
+ #define SDL_SensorGetType SDL_SensorGetType_REAL
+ #define SDL_SensorGetNonPortableType SDL_SensorGetNonPortableType_REAL
+ #define SDL_SensorGetInstanceID SDL_SensorGetInstanceID_REAL
+ #define SDL_SensorGetData SDL_SensorGetData_REAL
+ #define SDL_SensorClose SDL_SensorClose_REAL
+ #define SDL_SensorUpdate SDL_SensorUpdate_REAL
+ #define SDL_IsTablet SDL_IsTablet_REAL
+ #define SDL_GetDisplayOrientation SDL_GetDisplayOrientation_REAL
+ #define SDL_HasColorKey SDL_HasColorKey_REAL
+ #define SDL_CreateThreadWithStackSize SDL_CreateThreadWithStackSize_REAL
+ #define SDL_JoystickGetDevicePlayerIndex SDL_JoystickGetDevicePlayerIndex_REAL
+ #define SDL_JoystickGetPlayerIndex SDL_JoystickGetPlayerIndex_REAL
+ #define SDL_GameControllerGetPlayerIndex SDL_GameControllerGetPlayerIndex_REAL
+ #define SDL_RenderFlush SDL_RenderFlush_REAL
+ #define SDL_RenderDrawPointF SDL_RenderDrawPointF_REAL
+ #define SDL_RenderDrawPointsF SDL_RenderDrawPointsF_REAL
+ #define SDL_RenderDrawLineF SDL_RenderDrawLineF_REAL
+ #define SDL_RenderDrawLinesF SDL_RenderDrawLinesF_REAL
+ #define SDL_RenderDrawRectF SDL_RenderDrawRectF_REAL
+ #define SDL_RenderDrawRectsF SDL_RenderDrawRectsF_REAL
+ #define SDL_RenderFillRectF SDL_RenderFillRectF_REAL
+ #define SDL_RenderFillRectsF SDL_RenderFillRectsF_REAL
+ #define SDL_RenderCopyF SDL_RenderCopyF_REAL
+ #define SDL_RenderCopyExF SDL_RenderCopyExF_REAL
+ #define SDL_GetTouchDeviceType SDL_GetTouchDeviceType_REAL
+ #define SDL_UIKitRunApp SDL_UIKitRunApp_REAL
+ #define SDL_SIMDGetAlignment SDL_SIMDGetAlignment_REAL
+ #define SDL_SIMDAlloc SDL_SIMDAlloc_REAL
+ #define SDL_SIMDFree SDL_SIMDFree_REAL
+ #define SDL_RWsize SDL_RWsize_REAL
+ #define SDL_RWseek SDL_RWseek_REAL
+ #define SDL_RWtell SDL_RWtell_REAL
+ #define SDL_RWread SDL_RWread_REAL
+ #define SDL_RWwrite SDL_RWwrite_REAL
+ #define SDL_RWclose SDL_RWclose_REAL
+ #define SDL_LoadFile SDL_LoadFile_REAL
+ #define SDL_Metal_CreateView SDL_Metal_CreateView_REAL
+ #define SDL_Metal_DestroyView SDL_Metal_DestroyView_REAL
+ #define SDL_LockTextureToSurface SDL_LockTextureToSurface_REAL
+ #define SDL_HasARMSIMD SDL_HasARMSIMD_REAL
+ #define SDL_strtokr SDL_strtokr_REAL
+ #define SDL_wcsstr SDL_wcsstr_REAL
+ #define SDL_wcsncmp SDL_wcsncmp_REAL
+ #define SDL_GameControllerTypeForIndex SDL_GameControllerTypeForIndex_REAL
+ #define SDL_GameControllerGetType SDL_GameControllerGetType_REAL
+ #define SDL_GameControllerFromPlayerIndex SDL_GameControllerFromPlayerIndex_REAL
+ #define SDL_GameControllerSetPlayerIndex SDL_GameControllerSetPlayerIndex_REAL
+ #define SDL_JoystickFromPlayerIndex SDL_JoystickFromPlayerIndex_REAL
+ #define SDL_JoystickSetPlayerIndex SDL_JoystickSetPlayerIndex_REAL
+ #define SDL_SetTextureScaleMode SDL_SetTextureScaleMode_REAL
+ #define SDL_GetTextureScaleMode SDL_GetTextureScaleMode_REAL
+ #define SDL_OnApplicationWillTerminate SDL_OnApplicationWillTerminate_REAL
+ #define SDL_OnApplicationDidReceiveMemoryWarning SDL_OnApplicationDidReceiveMemoryWarning_REAL
+ #define SDL_OnApplicationWillResignActive SDL_OnApplicationWillResignActive_REAL
+ #define SDL_OnApplicationDidEnterBackground SDL_OnApplicationDidEnterBackground_REAL
+ #define SDL_OnApplicationWillEnterForeground SDL_OnApplicationWillEnterForeground_REAL
+ #define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidBecomeActive_REAL
+ #define SDL_OnApplicationDidChangeStatusBarOrientation SDL_OnApplicationDidChangeStatusBarOrientation_REAL
+ #define SDL_GetAndroidSDKVersion SDL_GetAndroidSDKVersion_REAL
+ #define SDL_isupper SDL_isupper_REAL
+ #define SDL_islower SDL_islower_REAL
+ #define SDL_JoystickAttachVirtual SDL_JoystickAttachVirtual_REAL
+ #define SDL_JoystickDetachVirtual SDL_JoystickDetachVirtual_REAL
+ #define SDL_JoystickIsVirtual SDL_JoystickIsVirtual_REAL
+ #define SDL_JoystickSetVirtualAxis SDL_JoystickSetVirtualAxis_REAL
+ #define SDL_JoystickSetVirtualBall SDL_JoystickSetVirtualBall_REAL
+ #define SDL_JoystickSetVirtualButton SDL_JoystickSetVirtualButton_REAL
+ #define SDL_JoystickSetVirtualHat SDL_JoystickSetVirtualHat_REAL
+ #define SDL_GetErrorMsg SDL_GetErrorMsg_REAL
+ #define SDL_LockSensors SDL_LockSensors_REAL
+ #define SDL_UnlockSensors SDL_UnlockSensors_REAL
+ #define SDL_Metal_GetLayer SDL_Metal_GetLayer_REAL
+ #define SDL_Metal_GetDrawableSize SDL_Metal_GetDrawableSize_REAL
+ #define SDL_trunc SDL_trunc_REAL
+ #define SDL_truncf SDL_truncf_REAL
+ #define SDL_GetPreferredLocales SDL_GetPreferredLocales_REAL
+ #define SDL_SIMDRealloc SDL_SIMDRealloc_REAL
+ #define SDL_AndroidRequestPermission SDL_AndroidRequestPermission_REAL
+ #define SDL_OpenURL SDL_OpenURL_REAL
+ #define SDL_HasSurfaceRLE SDL_HasSurfaceRLE_REAL
+ #define SDL_GameControllerHasLED SDL_GameControllerHasLED_REAL
+ #define SDL_GameControllerSetLED SDL_GameControllerSetLED_REAL
+ #define SDL_JoystickHasLED SDL_JoystickHasLED_REAL
+ #define SDL_JoystickSetLED SDL_JoystickSetLED_REAL
+ #define SDL_GameControllerRumbleTriggers SDL_GameControllerRumbleTriggers_REAL
+ #define SDL_JoystickRumbleTriggers SDL_JoystickRumbleTriggers_REAL
+ #define SDL_GameControllerHasAxis SDL_GameControllerHasAxis_REAL
+ #define SDL_GameControllerHasButton SDL_GameControllerHasButton_REAL
+ #define SDL_GameControllerGetNumTouchpads SDL_GameControllerGetNumTouchpads_REAL
+ #define SDL_GameControllerGetNumTouchpadFingers SDL_GameControllerGetNumTouchpadFingers_REAL
+ #define SDL_GameControllerGetTouchpadFinger SDL_GameControllerGetTouchpadFinger_REAL
+ #define SDL_crc32 SDL_crc32_REAL
+ #define SDL_GameControllerGetSerial SDL_GameControllerGetSerial_REAL
+ #define SDL_JoystickGetSerial SDL_JoystickGetSerial_REAL
+ #define SDL_GameControllerHasSensor SDL_GameControllerHasSensor_REAL
+ #define SDL_GameControllerSetSensorEnabled SDL_GameControllerSetSensorEnabled_REAL
+ #define SDL_GameControllerIsSensorEnabled SDL_GameControllerIsSensorEnabled_REAL
+ #define SDL_GameControllerGetSensorData SDL_GameControllerGetSensorData_REAL
+ #define SDL_wcscasecmp SDL_wcscasecmp_REAL
+ #define SDL_wcsncasecmp SDL_wcsncasecmp_REAL
#endif
SDL_DYNAPI_PROC(double,SDL_log10,(double a),(a),return)
SDL_DYNAPI_PROC(float,SDL_log10f,(float a),(a),return)
- SDL_DYNAPI_PROC(int,SDL_tizen_app_init,(int a, char *b[]),(a,b),return)
++SDL_DYNAPI_PROC(int,SDL_tizen_app_init,(int a, char *b[]),(a,b),return)
+ SDL_DYNAPI_PROC(char*,SDL_GameControllerMappingForDeviceIndex,(int a),(a),return)
+ #ifdef __LINUX__
+ SDL_DYNAPI_PROC(int,SDL_LinuxSetThreadPriority,(Sint64 a, int b),(a,b),return)
+ #endif
+ SDL_DYNAPI_PROC(SDL_bool,SDL_HasAVX512F,(void),(),return)
+ #ifdef __ANDROID__
+ SDL_DYNAPI_PROC(SDL_bool,SDL_IsChromebook,(void),(),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_IsDeXMode,(void),(),return)
+ SDL_DYNAPI_PROC(void,SDL_AndroidBackButton,(void),(),)
+ #endif
+ SDL_DYNAPI_PROC(double,SDL_exp,(double a),(a),return)
+ SDL_DYNAPI_PROC(float,SDL_expf,(float a),(a),return)
+ SDL_DYNAPI_PROC(wchar_t*,SDL_wcsdup,(const wchar_t *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerRumble,(SDL_GameController *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickRumble,(SDL_Joystick *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_NumSensors,(void),(),return)
+ SDL_DYNAPI_PROC(const char*,SDL_SensorGetDeviceName,(int a),(a),return)
+ SDL_DYNAPI_PROC(SDL_SensorType,SDL_SensorGetDeviceType,(int a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_SensorGetDeviceNonPortableType,(int a),(a),return)
+ SDL_DYNAPI_PROC(SDL_SensorID,SDL_SensorGetDeviceInstanceID,(int a),(a),return)
+ SDL_DYNAPI_PROC(SDL_Sensor*,SDL_SensorOpen,(int a),(a),return)
+ SDL_DYNAPI_PROC(SDL_Sensor*,SDL_SensorFromInstanceID,(SDL_SensorID a),(a),return)
+ SDL_DYNAPI_PROC(const char*,SDL_SensorGetName,(SDL_Sensor *a),(a),return)
+ SDL_DYNAPI_PROC(SDL_SensorType,SDL_SensorGetType,(SDL_Sensor *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_SensorGetNonPortableType,(SDL_Sensor *a),(a),return)
+ SDL_DYNAPI_PROC(SDL_SensorID,SDL_SensorGetInstanceID,(SDL_Sensor *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_SensorGetData,(SDL_Sensor *a, float *b, int c),(a,b,c),return)
+ SDL_DYNAPI_PROC(void,SDL_SensorClose,(SDL_Sensor *a),(a),)
+ SDL_DYNAPI_PROC(void,SDL_SensorUpdate,(void),(),)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_IsTablet,(void),(),return)
+ SDL_DYNAPI_PROC(SDL_DisplayOrientation,SDL_GetDisplayOrientation,(int a),(a),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_HasColorKey,(SDL_Surface *a),(a),return)
+
+ #ifdef SDL_CreateThreadWithStackSize
+ #undef SDL_CreateThreadWithStackSize
+ #endif
+
+ #if defined(__WIN32__)
+ SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThreadWithStackSize,(SDL_ThreadFunction a, const char *b, const size_t c, void *d, pfnSDL_CurrentBeginThread e, pfnSDL_CurrentEndThread f),(a,b,c,d,e,f),return)
+ #elif defined(__OS2__)
+ SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThreadWithStackSize,(SDL_ThreadFunction a, const char *b, const size_t c, void *d, pfnSDL_CurrentBeginThread e, pfnSDL_CurrentEndThread f),(a,b,c,d,e,f),return)
+ #else
+ SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThreadWithStackSize,(SDL_ThreadFunction a, const char *b, const size_t c, void *d),(a,b,c,d),return)
+ #endif
+
+ SDL_DYNAPI_PROC(int,SDL_JoystickGetDevicePlayerIndex,(int a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickGetPlayerIndex,(SDL_Joystick *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerGetPlayerIndex,(SDL_GameController *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderFlush,(SDL_Renderer *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderDrawPointF,(SDL_Renderer *a, float b, float c),(a,b,c),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderDrawPointsF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderDrawLineF,(SDL_Renderer *a, float b, float c, float d, float e),(a,b,c,d,e),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderDrawLinesF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderDrawRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderDrawRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderFillRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderFillRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderCopyF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_RenderCopyExF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d, const double e, const SDL_FPoint *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return)
+ SDL_DYNAPI_PROC(SDL_TouchDeviceType,SDL_GetTouchDeviceType,(SDL_TouchID a),(a),return)
+ #ifdef __IPHONEOS__
+ SDL_DYNAPI_PROC(int,SDL_UIKitRunApp,(int a, char *b, SDL_main_func c),(a,b,c),return)
+ #endif
+ SDL_DYNAPI_PROC(size_t,SDL_SIMDGetAlignment,(void),(),return)
+ SDL_DYNAPI_PROC(void*,SDL_SIMDAlloc,(const size_t a),(a),return)
+ SDL_DYNAPI_PROC(void,SDL_SIMDFree,(void *a),(a),)
+ SDL_DYNAPI_PROC(Sint64,SDL_RWsize,(SDL_RWops *a),(a),return)
+ SDL_DYNAPI_PROC(Sint64,SDL_RWseek,(SDL_RWops *a, Sint64 b, int c),(a,b,c),return)
+ SDL_DYNAPI_PROC(Sint64,SDL_RWtell,(SDL_RWops *a),(a),return)
+ SDL_DYNAPI_PROC(size_t,SDL_RWread,(SDL_RWops *a, void *b, size_t c, size_t d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(size_t,SDL_RWwrite,(SDL_RWops *a, const void *b, size_t c, size_t d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_RWclose,(SDL_RWops *a),(a),return)
+ SDL_DYNAPI_PROC(void*,SDL_LoadFile,(const char *a, size_t *b),(a,b),return)
+ SDL_DYNAPI_PROC(SDL_MetalView,SDL_Metal_CreateView,(SDL_Window *a),(a),return)
+ SDL_DYNAPI_PROC(void,SDL_Metal_DestroyView,(SDL_MetalView a),(a),)
+ SDL_DYNAPI_PROC(int,SDL_LockTextureToSurface,(SDL_Texture *a, const SDL_Rect *b, SDL_Surface **c),(a,b,c),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_HasARMSIMD,(void),(),return)
+ SDL_DYNAPI_PROC(char*,SDL_strtokr,(char *a, const char *b, char **c),(a,b,c),return)
+ SDL_DYNAPI_PROC(wchar_t*,SDL_wcsstr,(const wchar_t *a, const wchar_t *b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_wcsncmp,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
+ SDL_DYNAPI_PROC(SDL_GameControllerType,SDL_GameControllerTypeForIndex,(int a),(a),return)
+ SDL_DYNAPI_PROC(SDL_GameControllerType,SDL_GameControllerGetType,(SDL_GameController *a),(a),return)
+ SDL_DYNAPI_PROC(SDL_GameController*,SDL_GameControllerFromPlayerIndex,(int a),(a),return)
+ SDL_DYNAPI_PROC(void,SDL_GameControllerSetPlayerIndex,(SDL_GameController *a, int b),(a,b),)
+ SDL_DYNAPI_PROC(SDL_Joystick*,SDL_JoystickFromPlayerIndex,(int a),(a),return)
+ SDL_DYNAPI_PROC(void,SDL_JoystickSetPlayerIndex,(SDL_Joystick *a, int b),(a,b),)
+ SDL_DYNAPI_PROC(int,SDL_SetTextureScaleMode,(SDL_Texture *a, SDL_ScaleMode b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_GetTextureScaleMode,(SDL_Texture *a, SDL_ScaleMode *b),(a,b),return)
+ SDL_DYNAPI_PROC(void,SDL_OnApplicationWillTerminate,(void),(),)
+ SDL_DYNAPI_PROC(void,SDL_OnApplicationDidReceiveMemoryWarning,(void),(),)
+ SDL_DYNAPI_PROC(void,SDL_OnApplicationWillResignActive,(void),(),)
+ SDL_DYNAPI_PROC(void,SDL_OnApplicationDidEnterBackground,(void),(),)
+ SDL_DYNAPI_PROC(void,SDL_OnApplicationWillEnterForeground,(void),(),)
+ SDL_DYNAPI_PROC(void,SDL_OnApplicationDidBecomeActive,(void),(),)
+ #ifdef __IPHONEOS__
+ SDL_DYNAPI_PROC(void,SDL_OnApplicationDidChangeStatusBarOrientation,(void),(),)
+ #endif
+ #ifdef __ANDROID__
+ SDL_DYNAPI_PROC(int,SDL_GetAndroidSDKVersion,(void),(),return)
+ #endif
+ SDL_DYNAPI_PROC(int,SDL_isupper,(int a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_islower,(int a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickAttachVirtual,(SDL_JoystickType a, int b, int c, int d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickDetachVirtual,(int a),(a),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickIsVirtual,(int a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualAxis,(SDL_Joystick *a, int b, Sint16 c),(a,b,c),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualButton,(SDL_Joystick *a, int b, Uint8 c),(a,b,c),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualHat,(SDL_Joystick *a, int b, Uint8 c),(a,b,c),return)
+ SDL_DYNAPI_PROC(char*,SDL_GetErrorMsg,(char *a, int b),(a,b),return)
+ SDL_DYNAPI_PROC(void,SDL_LockSensors,(void),(),)
+ SDL_DYNAPI_PROC(void,SDL_UnlockSensors,(void),(),)
+ SDL_DYNAPI_PROC(void*,SDL_Metal_GetLayer,(SDL_MetalView a),(a),return)
+ SDL_DYNAPI_PROC(void,SDL_Metal_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
+ SDL_DYNAPI_PROC(double,SDL_trunc,(double a),(a),return)
+ SDL_DYNAPI_PROC(float,SDL_truncf,(float a),(a),return)
+ SDL_DYNAPI_PROC(SDL_Locale *,SDL_GetPreferredLocales,(void),(),return)
+ SDL_DYNAPI_PROC(void*,SDL_SIMDRealloc,(void *a, const size_t b),(a, b),return)
+ #ifdef __ANDROID__
+ SDL_DYNAPI_PROC(SDL_bool,SDL_AndroidRequestPermission,(const char *a),(a),return)
+ #endif
+ SDL_DYNAPI_PROC(int,SDL_OpenURL,(const char *a),(a),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_HasSurfaceRLE,(SDL_Surface *a),(a),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasLED,(SDL_GameController *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerSetLED,(SDL_GameController *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasLED,(SDL_Joystick *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickSetLED,(SDL_Joystick *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerRumbleTriggers,(SDL_GameController *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_JoystickRumbleTriggers,(SDL_Joystick *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerGetNumTouchpads,(SDL_GameController *a),(a),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerGetNumTouchpadFingers,(SDL_GameController *a, int b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerGetTouchpadFinger,(SDL_GameController *a, int b, int c, Uint8 *d, float *e, float *f, float *g),(a,b,c,d,e,f,g),return)
+ SDL_DYNAPI_PROC(Uint32,SDL_crc32,(Uint32 a, const void *b, size_t c),(a,b,c),return)
+ SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetSerial,(SDL_GameController *a),(a),return)
+ SDL_DYNAPI_PROC(const char*,SDL_JoystickGetSerial,(SDL_Joystick *a),(a),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasSensor,(SDL_GameController *a, SDL_SensorType b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerSetSensorEnabled,(SDL_GameController *a, SDL_SensorType b, SDL_bool c),(a,b,c),return)
+ SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerIsSensorEnabled,(SDL_GameController *a, SDL_SensorType b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_GameControllerGetSensorData,(SDL_GameController *a, SDL_SensorType b, float *c, int d),(a,b,c,d),return)
+ SDL_DYNAPI_PROC(int,SDL_wcscasecmp,(const wchar_t *a, const wchar_t *b),(a,b),return)
+ SDL_DYNAPI_PROC(int,SDL_wcsncasecmp,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
--- /dev/null
++<<<<<<< HEAD:extension/SDL2_ttf-2.0.14/COPYING.txt
++/*\r
++ SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts\r
++ Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>\r
++\r
++ This software is provided 'as-is', without any express or implied\r
++ warranty. In no event will the authors be held liable for any damages\r
++ arising from the use of this software.\r
++\r
++ Permission is granted to anyone to use this software for any purpose,\r
++ including commercial applications, and to alter it and redistribute it\r
++ freely, subject to the following restrictions:\r
++\r
++ 1. The origin of this software must not be misrepresented; you must not\r
++ claim that you wrote the original software. If you use this software\r
++ in a product, an acknowledgment in the product documentation would be\r
++ appreciated but is not required.\r
++ 2. Altered source versions must be plainly marked as such, and must not be\r
++ misrepresented as being the original software.\r
++ 3. This notice may not be removed or altered from any source distribution.\r
++*/\r
++=======
+ /*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
+
+ 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_sysurl.h"
+
+ int
+ SDL_SYS_OpenURL(const char *url)
+ {
+ return SDL_Unsupported();
+ }
+
+ /* vi: set ts=4 sw=4 expandtab: */
+
++>>>>>>> upstream:src/misc/dummy/SDL_sysurl.c
SDL_DBusContext *dbus = SDL_DBus_GetContext();
char **paths = NULL;
int i, numpaths = 0;
+ if(!dbus) {
+ return retval;
+ }
- if (!SDL_DBus_CallMethodOnConnection(dbus->system_conn, UPOWER_DBUS_NODE, UPOWER_DBUS_PATH, UPOWER_DBUS_INTERFACE, "EnumerateDevices",
+ if (!dbus || !SDL_DBus_CallMethodOnConnection(dbus->system_conn, UPOWER_DBUS_NODE, UPOWER_DBUS_PATH, UPOWER_DBUS_INTERFACE, "EnumerateDevices",
DBUS_TYPE_INVALID,
DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &paths, &numpaths, DBUS_TYPE_INVALID)) {
return SDL_FALSE; /* try a different approach than UPower. */
*
* \return Timer id or -1 on failure.
*/
+/*
static SDL_TimerID
- SDLTest_SetTestTimeout(int timeout, void (*callback)())
+ SDLTest_SetTestTimeout(int timeout, void (*callback)(void))
{
Uint32 timeoutInMilliseconds;
SDL_TimerID timerID;
/**
* \brief Timeout handler. Aborts test run and exits harness process.
*/
-#if defined(__WATCOMC__)
-#pragma aux SDLTest_BailOut aborts;
-#endif
+/*
static SDL_NORETURN void
- SDLTest_BailOut()
+ SDLTest_BailOut(void)
{
SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run.");
- exit(TEST_ABORTED); /* bail out from the test */
+ exit(TEST_ABORTED); // bail out from the test
}
+*/
/**
* \brief Execute a test using the given execution key.
/* Log run with fuzzer parameters */
SDLTest_Log("::::: Test Run /w seed '%s' started\n", runSeed);
- /* Count the total number of tests */
+ /* Count the total number of tests */
suiteCounter = 0;
while (testSuites[suiteCounter]) {
- testSuite=(SDLTest_TestSuiteReference *)testSuites[suiteCounter];
+ testSuite = testSuites[suiteCounter];
suiteCounter++;
testCounter = 0;
while (testSuite->testCases[testCounter])
return retval;
}
}
- #endif
- retval = SDL_LoadFunction(_this->egl_data->egl_dll_handle, proc);
- if (!retval && SDL_strlen(proc) <= 1022) {
- procname[0] = '_';
- SDL_strlcpy(procname + 1, proc, 1022);
- retval = SDL_LoadFunction(_this->egl_data->egl_dll_handle, procname);
- }
+#ifdef __TIZEN__
+ char *Tizen_Not_Support_API[4] = {
+ "eglSetDamageRegionKHR",
+ "eglSwapBuffersWithDamageEXT",
+ "eglSwapBuffersWithDamageINTEL",
+ "eglSwapBuffersWithDamage"
+ };
+
+ int i;
+ for(i=0; i<4; i++)
+ {
+ if(!SDL_strcmp(proc, Tizen_Not_Support_API[i]))
+ return NULL;
+ }
+#endif
+
return retval;
}
if (!_this->egl_data) {
return SDL_SetError("OpenGL not initialized");
}
-
- /* The android emulator crashes badly if you try to eglMakeCurrent
- * with a valid context and invalid surface, so we have to check for both here.
- */
- if (!egl_context || (!egl_surface && !_this->gl_allow_no_surface)) {
- _this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
- } else {
+#ifdef __TIZEN__
+ if ((SDL_EGL_HasExtension(_this, SDL_EGL_DISPLAY_EXTENSION, "EGL_KHR_surfaceless_context")) && (!egl_surface)) {
if (!_this->egl_data->eglMakeCurrent(_this->egl_data->egl_display,
- egl_surface, egl_surface, egl_context)) {
- return SDL_EGL_SetError("Unable to make EGL context current", "eglMakeCurrent");
+ EGL_NO_SURFACE , EGL_NO_SURFACE , egl_context)) {
+ return SDL_SetError("Unable to make EGL context current");
- }
++ }
+ }
+ else
+#endif
+ {
+ /* The android emulator crashes badly if you try to eglMakeCurrent
+ * with a valid context and invalid surface, so we have to check for both here.
+ */
+ if (!egl_context || !egl_surface) {
+ _this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+ } else {
+ if (!_this->egl_data->eglMakeCurrent(_this->egl_data->egl_display,
+ egl_surface, egl_surface, egl_context)) {
+ return SDL_EGL_SetError("Unable to make EGL context current", "eglMakeCurrent");
+ }
}
}
-
return 0;
}
SDL_EGL_SetSwapInterval(_THIS, int interval)
{
EGLBoolean status;
--
++
if (!_this->egl_data) {
return SDL_SetError("EGL not initialized");
}
--
++
status = _this->egl_data->eglSwapInterval(_this->egl_data->egl_display, interval);
if (status == EGL_TRUE) {
_this->egl_data->egl_swapinterval = interval;
return 0;
}
--
++
return SDL_EGL_SetError("Unable to set the EGL swap interval", "eglSwapInterval");
}
extern VideoBootStrap VIVANTE_bootstrap;
extern VideoBootStrap Emscripten_bootstrap;
extern VideoBootStrap QNX_bootstrap;
+extern VideoBootStrap TIZEN_bootstrap;
+ extern VideoBootStrap OFFSCREEN_bootstrap;
+ extern VideoBootStrap OS2DIVE_bootstrap;
+ extern VideoBootStrap OS2VMAN_bootstrap;
extern SDL_VideoDevice *SDL_GetVideoDevice(void);
extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
if (driver_name == NULL) {
driver_name = SDL_getenv("SDL_VIDEODRIVER");
}
- if (driver_name == NULL) {
+
+ /* For Tizen */
++ if (driver_name == NULL) {
+ driver_name = "tizen";
+ }
+
if (driver_name != NULL) {
for (i = 0; bootstrap[i]; ++i) {
if (SDL_strncasecmp(bootstrap[i]->name, driver_name, SDL_strlen(driver_name)) == 0) {
return 0;
}
+#ifdef __TIZEN__
+ if ((SDL_GL_ExtensionSupported("EGL_KHR_surfaceless_context")) && (!window)) {
+ /* current window checking */
+ SDL_Window* cur_win = SDL_GL_GetCurrentWindow();
+ if (!ctx) cur_win = NULL;
+ CHECK_WINDOW_MAGIC(cur_win, -1);
+
+ if (!(cur_win->flags & SDL_WINDOW_OPENGL)) {
+ return SDL_SetError("The specified window isn't an OpenGL window");
+ }
+ retval = _this->GL_MakeCurrent(_this, NULL, ctx);
+ if (retval == 0) {
+ _this->current_glwin = cur_win;
+ _this->current_glctx = ctx;
+ SDL_TLSSet(_this->current_glwin_tls, cur_win, NULL);
+ SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
+ }
+ return retval;
+ }
+#endif
+
if (!ctx) {
window = NULL;
- } else {
+ } else if (window) {
CHECK_WINDOW_MAGIC(window, -1);
if (!(window->flags & SDL_WINDOW_OPENGL)) {
--- /dev/null
- SDL_AddHintCallback(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH,
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
+ Copyright 2015 Samsung Electronics co., Ltd. All Rights Reserved.
+
+ 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 <thomas.perl@jollamobile.com> */
+
+#include "../../SDL_internal.h"
+
+#if SDL_VIDEO_DRIVER_TIZEN
+
+#include "SDL_video.h"
+#include "SDL_mouse.h"
+#include "SDL_stdinc.h"
+#include "SDL_hints.h"
+#include "SDL_log.h"
+
+#include "../SDL_sysvideo.h"
+#include "../../events/SDL_events_c.h"
+#include "../../core/tizen/SDL_tizen.h"
+
+#include "SDL_tizenvideo.h"
+#include "SDL_tizenevents_c.h"
+#include "SDL_tizenmouse.h"
+#include "SDL_tizentouch.h"
+
+static void Tizen_GetNormalizedCoordinates(_THIS,float x, float y,
+ float *normalized_x, float *normalized_y)
+{
+ int window_w, window_h;
+
+ SDL_GetWindowSize(_this->windows, &window_w, &window_h);
+ *normalized_x = (float)(x / window_w);
+ *normalized_y = (float)(y / window_h);
+}
+
+static volatile SDL_bool separate_mouse_and_touch = SDL_FALSE;
+
+static void
+SeparateEventsHintWatcher(void *userdata, const char *name,
+ const char *oldValue, const char *newValue)
+{
+ SDL_Unsupported();
+}
+
+void Tizen_InitTouch(void)
+{
+ /*By default,tizen only have one touch device*/
+ SDL_TouchID deviceId = 1;
+
- if(SDL_AddTouch(deviceId, "Tizen_Touch")<0)
++ SDL_AddHintCallback(SDL_HINT_MOUSE_TOUCH_EVENTS,
+ SeparateEventsHintWatcher, NULL);
- SDL_DelHintCallback(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH,
++ if(SDL_AddTouch(deviceId, SDL_TOUCH_DEVICE_DIRECT, "Tizen_Touch")<0)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_ASSERT, "error: can't add tizen touch %s, %d", __FILE__, __LINE__);
+ }
+}
+
+void Tizen_QuitTouch(void)
+{
- if (SDL_AddTouch(touchDeviceId, "Tizen_Touch") < 0) {
++ SDL_DelHintCallback(SDL_HINT_MOUSE_TOUCH_EVENTS,
+ SeparateEventsHintWatcher, NULL);
+ separate_mouse_and_touch = SDL_FALSE;
+}
+
+void Tizen_OnTouch(_THIS, int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p)
+{
+ SDL_TouchID touchDeviceId = 0;
+ SDL_FingerID fingerId = 0;
+ float normalized_x, normalized_y;
+
+ if (!_this->windows) {
+ return;
+ }
+ Tizen_GetNormalizedCoordinates(_this,x,y,&normalized_x,&normalized_y);
+
+ touchDeviceId = (SDL_TouchID)touch_device_id_in;
- SDL_SendTouch(touchDeviceId, fingerId, SDL_TRUE, normalized_x, normalized_y, p);
++ if (SDL_AddTouch(touchDeviceId, SDL_TOUCH_DEVICE_DIRECT, "Tizen_Touch") < 0) {
+ SDL_LogError(SDL_LOG_CATEGORY_ASSERT, "error: can't add touch %s, %d", __FILE__, __LINE__);
+ }
+
+ fingerId = (SDL_FingerID)pointer_finger_id_in;
+ switch (action) {
+ case ACTION_POINTER_DOWN:
+ /* Touch pointer down */
- SDL_SendTouchMotion(touchDeviceId, fingerId, normalized_x, normalized_y, p);
++ SDL_SendTouch(touchDeviceId, fingerId, NULL, SDL_TRUE, normalized_x, normalized_y, p);
+ break;
+
+ case ACTION_POINTER_MOVE:
- SDL_SendTouch(touchDeviceId, fingerId, SDL_FALSE, normalized_x, normalized_y, p);
++ SDL_SendTouchMotion(touchDeviceId, fingerId, NULL, normalized_x, normalized_y, p);
+ break;
+
+ case ACTION_POINTER_UP:
+ /* Touch pointer up */
++ SDL_SendTouch(touchDeviceId, fingerId, NULL, SDL_FALSE, normalized_x, normalized_y, p);
+ break;
+
+ default:
+ break;
+ }
+}
+
+#endif /* SDL_VIDEO_DRIVER_TIZEN */
+
+/* vi: set ts=4 sw=4 expandtab: */
--- /dev/null
- Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
- Copyright 2015 Samsung Electronics co., Ltd. All Rights Reserved.
+/*
+ Simple DirectMedia Layer
++ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
+
+ 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"
+
+#include "SDL_tizenvideo.h"
+
+#define ACTION_POINTER_DOWN 1
+#define ACTION_POINTER_UP 2
+#define ACTION_POINTER_MOVE 3
+#define ACTION_CANCEL 4
+#define ACTION_OUTSIDE 5
+
+#define TOUCH_THRESHOLD 100.0f
+
+extern void Tizen_InitTouch(void);
+extern void Tizen_QuitTouch(void);
+extern void Tizen_OnTouch(_THIS, int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p);
+
+/* vi: set ts=4 sw=4 expandtab: */
--- /dev/null
- SDL_AddVideoDisplay(&display);
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
+ Copyright 2015 Samsung Electronics co., Ltd. All Rights Reserved.
+
+ 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_TIZEN
+
+#include "SDL_video.h"
+#include "SDL_mouse.h"
+#include "SDL_stdinc.h"
+
+#include "../../events/SDL_events_c.h"
+#include "../../core/tizen/SDL_tizen.h"
+
+#include "SDL_tizenvideo.h"
+#include "SDL_tizenwindow.h"
+#include "SDL_tizenkeyboard.h"
+#include "SDL_tizenvulkan.h"
+#include "SDL_tizenopengles.h"
+
+#include "SDL_tizenevents_c.h"
+#include "SDL_tizenmouse.h"
+
+
+#define TIZENVID_DRIVER_NAME "tizen"
+
+static void
+_tizen_add_display(SDL_VideoData *d, uint32_t id)
+{
+ SDL_VideoDisplay display;
+ SDL_DisplayMode mode;
+ static char *display_name = "tizen";
+ Ecore_Wl2_Display *wl2_display = NULL;
+
+ SDL_zero(display);
+ SDL_zero(mode);
+
+ display.name = display_name;
+
+ if (!ecore_wl2_init()) return;
+
+ wl2_display = ecore_wl2_display_connect(NULL);
+ if (!wl2_display) return;
+
+ d->wl2_display = wl2_display;
+ ecore_wl2_display_screen_size_get(wl2_display, &mode.w, &mode.h);
+ mode.refresh_rate = 60; //Hz
+ mode.format = SDL_PIXELFORMAT_ARGB8888;
+
+ SDL_AddDisplayMode(&display, &mode);
+
+ display.current_mode = mode;
+ display.desktop_mode = mode;
+
- static int
- Tizen_Available(void)
- {
- return 1;
- }
-
++ SDL_AddVideoDisplay(&display, SDL_FALSE);
+}
+
+/* Wayland driver bootstrap functions */
- Tizen_Available, Tizen_CreateDevice
+static void
+Tizen_DeleteDevice(SDL_VideoDevice *device)
+{
+ SDL_free(device->driverdata);
+ SDL_free(device);
+}
+
+static SDL_VideoDevice *
+Tizen_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;
+ }
+
+ /* Tizen video */
+ device->VideoInit = Tizen_VideoInit;
+ device->VideoQuit = Tizen_VideoQuit;
+ device->SetDisplayMode = Tizen_SetDisplayMode;
+ device->GetDisplayModes = Tizen_GetDisplayModes;
+ device->free = Tizen_DeleteDevice;
+
+ device->PumpEvents = Tizen_PumpEvents;
+#if SDL_VIDEO_OPENGL_EGL
+ device->GL_SwapWindow = Tizen_GLES_SwapWindow;
+ device->GL_GetSwapInterval = Tizen_GLES_GetSwapInterval;
+ device->GL_SetSwapInterval = Tizen_GLES_SetSwapInterval;
+ device->GL_MakeCurrent = Tizen_GLES_MakeCurrent;
+ device->GL_CreateContext = Tizen_GLES_CreateContext;
+ device->GL_LoadLibrary = Tizen_GLES_LoadLibrary;
+ device->GL_UnloadLibrary = Tizen_GLES_UnloadLibrary;
+ device->GL_GetProcAddress = Tizen_GLES_GetProcAddress;
+ device->GL_DeleteContext = Tizen_GLES_DeleteContext;
+ device->SetWindowBordered = Tizen_SetWindowBordered;
+#endif
+ device->CreateSDLWindow = Tizen_CreateWindow;
+ device->SetWindowTitle = Tizen_SetWindowTitle;
+ device->ShowWindow = Tizen_ShowWindow;
+ device->HideWindow = Tizen_HideWindow;
+ device->RaiseWindow = Tizen_RaiseWindow;
+ device->SetWindowFullscreen = Tizen_SetWindowFullscreen;
+ device->SetWindowSize = Tizen_SetWindowSize;
+ device->DestroyWindow = Tizen_DestroyWindow;
+ device->SetWindowHitTest = Tizen_SetWindowHitTest;
+ device->GetWindowWMInfo = Tizen_GetWindowWMInfo;
+ device->SetWindowPosition = Tizen_SetWindowPosition;
+ device->SetWindowOpacity = Tizen_SetWindowOpacity;
+
+ /* Text input */
+ device->StartTextInput = Tizen_StartTextInput;
+ device->StopTextInput = Tizen_StopTextInput;
+ //device->SetTextInputRect = Tizen_SetTextInputRect;
+
+ /* Screen keyboard */
+ device->HasScreenKeyboardSupport = Tizen_HasScreenKeyboardSupport;
+ device->ShowScreenKeyboard = Tizen_ShowScreenKeyboard;
+ //device->HideScreenKeyboard = Tizen_HideScreenKeyboard;
+ device->IsScreenKeyboardShown = Tizen_IsScreenKeyboardShown;
+
+#if SDL_VIDEO_VULKAN
+ device->Vulkan_GetInstanceExtensions = Tizen_Vulkan_GetInstanceExtensions;
+ device->Vulkan_CreateSurface = Tizen_Vulkan_CreateSurface;
+ device->Vulkan_LoadLibrary = Tizen_Vulkan_LoadLibrary;
+#endif
+ device->GetWindowSize = Tizen_GetWindowSize;
+
+ return device;
+}
+
+VideoBootStrap TIZEN_bootstrap = {
+ TIZENVID_DRIVER_NAME, "SDL tizen video driver",
++ Tizen_CreateDevice
+};
+
+int
+Tizen_VideoInit(_THIS)
+{
+ SDL_VideoData *data = SDL_malloc(sizeof * data);
+
+ if (data == NULL)
+ return SDL_OutOfMemory();
+ memset(data, 0, sizeof * data);
+
+ _this->driverdata = data;
+
+ _tizen_add_display(data, 0);
+ data->display = ecore_wl2_display_get(data->wl2_display);
+
+ Tizen_InitWindow(_this);
+ Tizen_InitMouse();
+ return 0;
+}
+
+void
+Tizen_GetDisplayModes(_THIS, SDL_VideoDisplay *sdl_display)
+{
+ SDL_Unsupported();
+}
+
+int
+Tizen_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
+{
+ return SDL_Unsupported();
+}
+
+void
+Tizen_VideoQuit(_THIS)
+{
+ if(!_this)
+ return;
+
+ SDL_VideoData *data = _this->driverdata;
+ if(!data)
+ return;
+
+ _tizen_ecore_ipc_client_send(OP_TERMINATE, 0, 0, 0);
+
+ Tizen_DeinitWindow(_this);
+ Tizen_FiniKeyboard();
+ Tizen_FiniMouse();
+
+ ecore_wl2_display_disconnect(data->wl2_display);
+ ecore_wl2_shutdown();
+ SDL_tizen_app_exit();
+
+}
+
+
+#endif /* SDL_VIDEO_DRIVER_TIZEN */
+
+/* vi: set ts=4 sw=4 expandtab: */
-cmake_minimum_required(VERSION 2.8.11)
-project(SDL2 C)
+INCLUDE(FindPkgConfig)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(sdl2_test C CXX)
-# Global settings for all of the test targets
-# FIXME: is this wrong?
-remove_definitions(-DUSING_GENERATED_CONFIG_H)
-link_libraries(SDL2_test SDL2-static)
+IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7l")
+ADD_DEFINITIONS("-DARCH_ARMV7")
+ELSE()
+ADD_DEFINITIONS("-DARCH_I586")
+ENDIF()
-# FIXME: Parent directory CMakeLists.txt only sets these for mingw/cygwin,
-# but we need them for VS as well.
-if(WINDOWS)
- link_libraries(SDL2main)
- add_definitions(-Dmain=SDL_main)
-endif()
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Debug")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-add_executable(checkkeys checkkeys.c)
-add_executable(loopwave loopwave.c)
-add_executable(loopwavequeue loopwavequeue.c)
-add_executable(testresample testresample.c)
-add_executable(testaudioinfo testaudioinfo.c)
+IF(NOT DEFINED PACKAGE_NAME)
+ SET(PACKAGE_NAME "org.tizen.${PROJECT_NAME}")
+ENDIF(NOT DEFINED PACKAGE_NAME)
+IF(NOT DEFINED RESDIR)
+ SET(RESDIR "${PREFIX}/res")
+ENDIF(NOT DEFINED RESDIR)
-file(GLOB TESTAUTOMATION_SOURCE_FILES testautomation*.c)
-add_executable(testautomation ${TESTAUTOMATION_SOURCE_FILES})
+set(SDL_MAJOR_VERSION 2)
+set(SDL_MINOR_VERSION 0)
- set(SDL_MICRO_VERSION 8)
++set(SDL_MICRO_VERSION 14)
+set(SDL_INTERFACE_AGE 0)
+set(SDL_BINARY_AGE 4)
+set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
-add_executable(testmultiaudio testmultiaudio.c)
-add_executable(testaudiohotplug testaudiohotplug.c)
-add_executable(testaudiocapture testaudiocapture.c)
-add_executable(testatomic testatomic.c)
-add_executable(testintersections testintersections.c)
-add_executable(testrelative testrelative.c)
-add_executable(testhittesting testhittesting.c)
-add_executable(testdraw2 testdraw2.c)
-add_executable(testdrawchessboard testdrawchessboard.c)
-add_executable(testdropfile testdropfile.c)
-add_executable(testerror testerror.c)
-add_executable(testfile testfile.c)
-add_executable(testgamecontroller testgamecontroller.c)
-add_executable(testgesture testgesture.c)
-add_executable(testgl2 testgl2.c)
-add_executable(testgles testgles.c)
-add_executable(testgles2 testgles2.c)
-add_executable(testhaptic testhaptic.c)
-add_executable(testhotplug testhotplug.c)
-add_executable(testrumble testrumble.c)
-add_executable(testthread testthread.c)
-add_executable(testiconv testiconv.c)
-add_executable(testime testime.c)
-add_executable(testjoystick testjoystick.c)
-add_executable(testkeys testkeys.c)
-add_executable(testloadso testloadso.c)
-add_executable(testlock testlock.c)
+set(LIBNAME SDL2)
+set(CMAKE_C_FLAGS "-g -O2")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
-if(APPLE)
- add_executable(testnative testnative.c
- testnativecocoa.m
- testnativex11.c)
-elseif(WINDOWS)
- add_executable(testnative testnative.c testnativew32.c)
-elseif(UNIX)
- add_executable(testnative testnative.c testnativex11.c)
-endif()
-
-add_executable(testoverlay2 testoverlay2.c testyuv_cvt.c)
-add_executable(testplatform testplatform.c)
-add_executable(testpower testpower.c)
-add_executable(testfilesystem testfilesystem.c)
-add_executable(testrendertarget testrendertarget.c)
-add_executable(testscale testscale.c)
-add_executable(testsem testsem.c)
-add_executable(testshader testshader.c)
-add_executable(testshape testshape.c)
-add_executable(testsprite2 testsprite2.c)
-add_executable(testspriteminimal testspriteminimal.c)
-add_executable(teststreaming teststreaming.c)
-add_executable(testtimer testtimer.c)
-add_executable(testver testver.c)
-add_executable(testviewport testviewport.c)
-add_executable(testwm2 testwm2.c)
-add_executable(testyuv testyuv.c testyuv_cvt.c)
-add_executable(torturethread torturethread.c)
-add_executable(testrendercopyex testrendercopyex.c)
-add_executable(testmessage testmessage.c)
-add_executable(testdisplayinfo testdisplayinfo.c)
-add_executable(testqsort testqsort.c)
-add_executable(testbounds testbounds.c)
-add_executable(testcustomcursor testcustomcursor.c)
-add_executable(controllermap controllermap.c)
-add_executable(testvulkan testvulkan.c)
-add_executable(testoffscreen testoffscreen.c)
-
-# HACK: Dummy target to cause the resource files to be copied to the build directory.
-# Need to make it an executable so we can use the TARGET_FILE_DIR generator expression.
-# This is needed so they get copied to the correct Debug/Release subdirectory in Xcode.
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/resources_dummy.c "int main(int argc, const char **argv){ return 1; }\n")
-add_executable(SDL2_test_resoureces ${CMAKE_CURRENT_BINARY_DIR}/resources_dummy.c)
-
-file(GLOB RESOURCE_FILES *.bmp *.wav moose.dat utf8.txt)
-foreach(RESOURCE_FILE ${RESOURCE_FILES})
- add_custom_command(TARGET SDL2_test_resoureces POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:SDL2_test_resoureces>)
-endforeach(RESOURCE_FILE)
-
-file(COPY ${RESOURCE_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-
-# TODO: Might be easier to make all targets depend on the resources...?
-
-set(NEEDS_RESOURCES
- testscale
- testrendercopyex
- controllermap
- testyuv
- testgamecontroller
- testshape
- testshader
- testnative
- testspriteminimal
- testautomation
- testcustomcursor
- testrendertarget
- testsprite2
- loopwave
- loopwavequeue
- testresample
- testaudiohotplug
- testmultiaudio
+ADD_DEFINITIONS(-D__TIZEN__)
+INCLUDE(FindPkgConfig)
+pkg_check_modules(APPS_PKGS REQUIRED
+ dlog
+ egl
+ glesv2
+ glesv1
+ sdl2
)
-foreach(APP IN LISTS NEEDS_RESOURCES)
- add_dependencies(${APP} SDL2_test_resoureces)
- if(APPLE)
- # Make sure resource files get installed into macOS/iOS .app bundles.
- target_sources(${APP} PRIVATE "${RESOURCE_FILES}")
- set_target_properties(${APP} PROPERTIES RESOURCE "${RESOURCE_FILES}")
- endif()
-endforeach()
+FOREACH(flag ${APPS_PKGS_CFLAGS}) #${APPS_PKGS_LDFLAGS}
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
-# Set Apple App ID / Bundle ID. This is needed to launch apps on some Apple
-# platforms (iOS, for example).
-if(APPLE)
- if(${CMAKE_VERSION} VERSION_LESS "3.7.0")
- # CMake's 'BUILDSYSTEM_TARGETS' property is only available in
- # CMake 3.7 and above.
- message(WARNING "Unable to set Bundle ID for Apple .app builds due to old CMake (pre 3.7).")
- else()
- get_property(TARGETS DIRECTORY ${CMAKE_CURRENT_LIST_DIR} PROPERTY BUILDSYSTEM_TARGETS)
- foreach(CURRENT_TARGET IN LISTS TARGETS)
- get_property(TARGET_TYPE TARGET ${CURRENT_TARGET} PROPERTY TYPE)
- if(TARGET_TYPE STREQUAL "EXECUTABLE")
- set_target_properties("${CURRENT_TARGET}" PROPERTIES
- MACOSX_BUNDLE_GUI_IDENTIFIER "org.libsdl.${CURRENT_TARGET}"
- MACOSX_BUNDLE_BUNDLE_VERSION "${SDL_VERSION}"
- MACOSX_BUNDLE_SHORT_VERSION_STRING "${SDL_VERSION}"
- )
- endif()
- endforeach()
- endif()
-endif()
+set (AUTOMATION_SOURCE
+ testautomation.c
+ testautomation_audio.c
+ testautomation_clipboard.c
+ testautomation_events.c
+ testautomation_hints.c
+ testautomation_keyboard.c
+ testautomation_main.c
+ testautomation_mouse.c
+ testautomation_pixels.c
+ testautomation_platform.c
+ testautomation_rect.c
+ testautomation_render.c
+ testautomation_rwops.c
+ testautomation_sdltest.c
+ testautomation_stdlib.c
+ testautomation_surface.c
+ testautomation_syswm.c
+ testautomation_timer.c
+ testautomation_video.c
+ )
+set (LOOPWAVE_SOURCE
+ loopwave.c
+ )
+set (LOOPWAVEQUEUE_SOURCE
+ loopwavequeue.c
+ )
+set (ATOMIC_SOURCE
+ testatomic.c
+ )
+set (AUDIOCAPTURE_SOURCE
+ testaudiocapture.c
+ )
+set (AUDIOHOTPLUGIN_SOURCE
+ testaudiohotplug.c
+ )
+set (AUDIOINFO_SOURCE
+ testaudioinfo.c
+ )
+set (BOUNDS_SOURCE
+ testbounds.c
+ )
+set (CUSTOMCURSOR_SOURCE
+ testcustomcursor.c
+ )
+set (DISPLAYINFO_SOURCE
+ testdisplayinfo.c
+ )
+set (DRAW2_SOURCE
+ testdraw2.c
+ )
+set (DRAWCHESSBOARD_SOURCE
+ testdrawchessboard.c
+ )
+set (DORPFILE_SOURCE
+ testdropfile.c
+ )
+set (ERROR_SOURCE
+ testerror.c
+ )
+set (FILE_SOURCE
+ testfile.c
+ )
+set (FILESYSTEM_SOURCE
+ testfilesystem.c
+ )
+set (GLES_SOURCE
+ testgles.c
+ )
+set (GLES2_SOURCE
+ testgles2.c
+ )
+set (HIT_SOURCE
+ testhittesting.c
+ )
+set (CONV_SOURCE
+ testiconv.c
+ )
+set (TIME_SOURCE
+ testime.c
+ )
+set (INTERSECTION_SOURCE
+ testintersections.c
+ )
++set (JOYSTICK_SOURCE
++ testjoystick.c
++ )
+set (KEYS_SOURCE
+ testkeys.c
+ )
+set (LOADSO_SOURCE
+ testloadso.c
+ )
++set (LOCALE_SOURCE
++ testlocale.c
++ )
+set (LOCK_SOURCE
+ testlock.c
+ )
+set (MULTIAUDIO_SOURCE
+ testmultiaudio.c
+ )
++set (OFFSCREEN_SOURCE
++ testoffscreen.c
++ )
+set (OVERLAY2_SOURCE
+ testoverlay2.c testyuv_cvt.c
+ )
+set (PLATFORM_SOURCE
+ testplatform.c
+ )
+set (QSORT_SOURCE
+ testqsort.c
+ )
+set (RELATIVE_SOURCE
+ testrelative.c
+ )
+set (RENDERCOPYEX_SOURCE
+ testrendercopyex.c
+ )
+set (RENDERTARGET_SOURCE
+ testrendertarget.c
+ )
+set (RESAMPLE_SOURCE
+ testresample.c
+ )
+set (SCALE_SOURCE
+ testscale.c
+ )
+set (SEM_SOURCE
+ testsem.c
+ )
++set (SENSOR_SOURCE
++ testsensor.c
++ )
+set (SHADER_SOURCE
+ testshader.c
+ )
+set (SPRITE2_SOURCE
+ testsprite2.c
+ )
+set (SPRITEMINIMAL_SOURCE
+ testspriteminimal.c
+ )
+set (STREAMING_SOURCE
+ teststreaming.c
+ )
+set (THREAD_SOURCE
+ testthread.c
+ )
+set (TIMER_SOURCE
+ testtimer.c
+ )
++set (URL_SOURCE
++ testurl.c
++ )
+set (VER_SOURCE
+ testver.c
+ )
+set (VIEWPORT_SOURCE
+ testviewport.c
+ )
+set (TORTURETHREAD_SOURCE
+ torturethread.c
+ )
+set (VULKAN_SOURCE
+ testvulkan.c
+ )
+set (YUV_SOURCE
+ testyuv.c testyuv_cvt.c
+ )
- set (JOYSTICK_SOURCE
- testjoystick.c
- )
+add_executable(testautomation ${AUTOMATION_SOURCE})
+TARGET_LINK_LIBRARIES(testautomation ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(loopwave ${LOOPWAVE_SOURCE})
+TARGET_LINK_LIBRARIES(loopwave ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(loopwavequeue ${LOOPWAVEQUEUE_SOURCE})
+TARGET_LINK_LIBRARIES(loopwavequeue ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testatomic ${ATOMIC_SOURCE})
+TARGET_LINK_LIBRARIES(testatomic ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testaudiohotplug ${AUDIOHOTPLUGIN_SOURCE})
+TARGET_LINK_LIBRARIES(testaudiohotplug ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testaudiocapture ${AUDIOCAPTURE_SOURCE})
+TARGET_LINK_LIBRARIES(testaudiocapture ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testaudioinfo ${AUDIOINFO_SOURCE})
+TARGET_LINK_LIBRARIES(testaudioinfo ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testbounds ${BOUNDS_SOURCE})
+TARGET_LINK_LIBRARIES(testbounds ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testcustomcursor ${CUSTOMCURSOR_SOURCE})
+TARGET_LINK_LIBRARIES(testcustomcursor ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testdisplayinfo ${DISPLAYINFO_SOURCE})
+TARGET_LINK_LIBRARIES(testdisplayinfo ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testdraw2 ${DRAW2_SOURCE})
+TARGET_LINK_LIBRARIES(testdraw2 ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testdrawchessboard ${DRAWCHESSBOARD_SOURCE})
+TARGET_LINK_LIBRARIES(testdrawchessboard ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testdropfile ${DORPFILE_SOURCE})
+TARGET_LINK_LIBRARIES(testdropfile ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testerror ${ERROR_SOURCE})
+TARGET_LINK_LIBRARIES(testerror ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testfile ${FILE_SOURCE})
+TARGET_LINK_LIBRARIES(testfile ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testfilesystem ${FILESYSTEM_SOURCE})
+TARGET_LINK_LIBRARIES(testfilesystem ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testgles ${GLES_SOURCE})
+TARGET_LINK_LIBRARIES(testgles ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testgles2 ${GLES2_SOURCE})
+TARGET_LINK_LIBRARIES(testgles2 ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testhit ${HIT_SOURCE})
+TARGET_LINK_LIBRARIES(testhit ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testiconv ${CONV_SOURCE})
+TARGET_LINK_LIBRARIES(testiconv ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testime ${TIME_SOURCE})
+TARGET_LINK_LIBRARIES(testime ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testintersection ${INTERSECTION_SOURCE})
+TARGET_LINK_LIBRARIES(testintersection ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
++add_executable(testjoystick ${JOYSTICK_SOURCE})
++TARGET_LINK_LIBRARIES(testjoystick ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testkeys ${KEYS_SOURCE})
+TARGET_LINK_LIBRARIES(testkeys ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testloadso ${LOADSO_SOURCE})
+TARGET_LINK_LIBRARIES(testloadso ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
++add_executable(testlocale ${LOCALE_SOURCE})
++TARGET_LINK_LIBRARIES(testlocale ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testlock ${LOCK_SOURCE})
+TARGET_LINK_LIBRARIES(testlock ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testmultiaudio ${MULTIAUDIO_SOURCE})
+TARGET_LINK_LIBRARIES(testmultiaudio ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
++add_executable(testoffscreen ${OFFSCREEN_SOURCE})
++TARGET_LINK_LIBRARIES(testoffscreen ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testoverlay2 ${OVERLAY2_SOURCE})
+TARGET_LINK_LIBRARIES(testoverlay2 ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testplatform ${PLATFORM_SOURCE})
+TARGET_LINK_LIBRARIES(testplatform ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testqsort ${QSORT_SOURCE})
+TARGET_LINK_LIBRARIES(testqsort ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testrelative ${RELATIVE_SOURCE})
+TARGET_LINK_LIBRARIES(testrelative ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testrendercopyex ${RENDERCOPYEX_SOURCE})
+TARGET_LINK_LIBRARIES(testrendercopyex ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testrendertarget ${RENDERTARGET_SOURCE})
+TARGET_LINK_LIBRARIES(testrendertarget ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testresample ${RESAMPLE_SOURCE})
+TARGET_LINK_LIBRARIES(testresample ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testscale ${SCALE_SOURCE})
+TARGET_LINK_LIBRARIES(testscale ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testsem ${SEM_SOURCE})
+TARGET_LINK_LIBRARIES(testsem ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
++add_executable(testsensor ${SENSOR_SOURCE})
++TARGET_LINK_LIBRARIES(testsensor ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testshader ${SHADER_SOURCE})
+TARGET_LINK_LIBRARIES(testshader ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testsprite2 ${SPRITE2_SOURCE})
+TARGET_LINK_LIBRARIES(testsprite2 ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testspriteminimal ${SPRITEMINIMAL_SOURCE})
+TARGET_LINK_LIBRARIES(testspriteminimal ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(teststreaming ${STREAMING_SOURCE})
+TARGET_LINK_LIBRARIES(teststreaming ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testthread ${THREAD_SOURCE})
+TARGET_LINK_LIBRARIES(testthread ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testtimer ${TIMER_SOURCE})
+TARGET_LINK_LIBRARIES(testtimer ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
++add_executable(testurl ${URL_SOURCE})
++TARGET_LINK_LIBRARIES(testurl ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testver ${VER_SOURCE})
+TARGET_LINK_LIBRARIES(testver ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(testviewport ${VIEWPORT_SOURCE})
+TARGET_LINK_LIBRARIES(testviewport ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+add_executable(torturethread ${TORTURETHREAD_SOURCE})
+TARGET_LINK_LIBRARIES(torturethread ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+#add_executable(testvulkan ${VULKAN_SOURCE})
+#TARGET_LINK_LIBRARIES(testvulkan SDL2main SDL2 pthread vulkan)
+add_executable(testyuv ${YUV_SOURCE})
+TARGET_LINK_LIBRARIES(testyuv ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
- add_executable(testjoystick ${JOYSTICK_SOURCE})
- TARGET_LINK_LIBRARIES(testjoystick ${APPS_PKGS_LDFLAGS} SDL2_test SDL2main)
+# Install
+INSTALL(TARGETS testautomation DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS loopwave DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS loopwavequeue DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testatomic DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testaudiocapture DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testaudiohotplug DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testaudioinfo DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testbounds DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testcustomcursor DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testdisplayinfo DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testdraw2 DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testdrawchessboard DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testdropfile DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testerror DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testfile DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testfilesystem DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testgles DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testgles2 DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testhit DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testiconv DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testime DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testintersection DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
++INSTALL(TARGETS testjoystick DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testkeys DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testloadso DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
++INSTALL(TARGETS testlocale DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testlock DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testmultiaudio DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
++INSTALL(TARGETS testoffscreen DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testoverlay2 DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testplatform DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testqsort DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testrelative DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testrendercopyex DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testrendertarget DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testresample DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testscale DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testsem DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
++INSTALL(TARGETS testsensor DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testshader DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testsprite2 DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testspriteminimal DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS teststreaming DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testthread DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testtimer DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
++INSTALL(TARGETS testurl DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testver DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testviewport DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS torturethread DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+#INSTALL(TARGETS testvulkan DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(TARGETS testyuv DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
- INSTALL(TARGETS testjoystick DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION /opt/usr/apps/org.tizen.sdl2_test/)
-
-
-
-
-
-
-
-
-
-
-
-
--- /dev/null
- BuildRequires: Vulkan-LoaderAndValidationLayers
- BuildRequires: Vulkan-LoaderAndValidationLayers-devel
+Name: org.tizen.sdl2_test
+Summary: sdl2demo
+Version: 0.1
+Release: 1
+Group: TO_BE/FILLED_IN
+License: Zlib
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: edje-bin
+BuildRequires: pkgconfig(dlog)
+
+BuildRequires: cmake
+BuildRequires: edje-bin
+BuildRequires: embryo-bin
+BuildRequires: gettext-devel
+
+BuildRequires: pkgconfig(egl)
++BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(glesv2)
+BuildRequires: pkgconfig(glesv1)
+BuildRequires: pkgconfig(sdl2)
++#BuildRequires: Vulkan-LoaderAndValidationLayers
++#BuildRequires: Vulkan-LoaderAndValidationLayers-devel
+%define _packagedir /opt/usr/apps/%{name}
+%define _resdir %{_packagedir}/res
+
+
+
+Autoreq: no
+
+
+%description
+Description: sdl_test
+
+%package devel
+Summary: sdl_test library development headers
+Group: Development/Libraries
+Requires: %{name} = %{version}
+
+%description devel
+Web App Service library development headers
+%prep
+%setup -q
+
+%build
+export CFLAGS="$CFLAGS %{?__vd_cflags} -Wno-error"
+export CXXFLAGS="$CXXFLAGS %{?__vd_cxxflags} -Wno-error"
+cmake . \
+ -DCMAKE_INSTALL_PREFIX=%{_packagedir} \
+ -DPACKAGE_NAME=%{name} \
+ -DVERSION=%{version} \
+ -DTIZEN_VERSION=%{tizen}
+#make %{?jobs:-j%jobs}
+#output different color when make error
+make 2>&1 %{?jobs:-j%jobs} | sed -e 's%^.*: error: .*$%\x1b[37;41m&\x1b[m%' -e 's%^.*: warning: .*$%\x1b[30;43m&\x1b[m%'
+
+%install
+rm -rf %{buildroot}
+
+%make_install
+
+
+%clean
+rm -rf %{buildroot}
+
+%post
+chmod 777 %{_packagedir}
+
+%files
+%defattr(-,root,root,-)
+%attr(755,root,root) %{_packagedir}/*
+
+
+%files devel
}
/* load the trojan moose images */
- handle = SDL_RWFromFile("moose.dat", "rb");
+ handle = SDL_RWFromFile("res/moose.dat", "rb");
if (handle == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !\n");
- free(RawMooseData);
+ SDL_free(RawMooseData);
quit(2);
}
emscripten_cancel_main_loop();
}
#endif
+
+ frames++;
+ now = SDL_GetTicks();
+ if (SDL_TICKS_PASSED(now, next_fps_check)) {
+ /* Print out some timing information */
+ const Uint32 then = next_fps_check - fps_check_delay;
+ const double fps = ((double) frames * 1000) / (now - then);
+ SDL_Log("%2.2f frames per second\n", fps);
+ next_fps_check = now + fps_check_delay;
+ frames = 0;
+ }
+
}
-
int
main(int argc, char *argv[])
{
int i;
- Uint32 then, now, frames;
Uint64 seed;
- const char *icon = "icon.bmp";
+ const char *icon = "res/icon.bmp";
/* Initialize parameters */
num_sprites = NUM_SPRITES;