Compare commits

..

7 Commits

2251 changed files with 4374 additions and 2166 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.love2d.android"
android:versionCode="19"
android:versionName="0.10.0"
android:versionCode="21"
android:versionName="0.10.1"
android:installLocation="auto" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
@@ -11,7 +11,7 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@drawable/love"
android:label="LÖVE for Android"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<service android:name=".DownloadService" />
+9
View File
@@ -41,6 +41,15 @@ Bugs and feature requests should be reported to the issue tracker at [https://bi
Changelog:
----------
0.10.1:
This release contains all bugfixes of the desktor 0.10.1 release. Android
specific fixes are:
* Added a new love.conf flag t.externalstorage, which determines whether files are saved in internal or external storage on Android devices.
* Fixed audio on Android to pause when the app is inactive, and resume when the app becomes active again.
* Fixed a driver bug on some Android devices which caused all objects to show up as black.
* Fixed love.graphics.clear(colortable) causing crashes on OpenGL ES 2 systems when a Canvas is active.
* New icons
0.10.0:
* first official release!
* Disabled JIT by default as it can cause performance problems. To enable JIT call jit.on()
Binary file not shown.
Binary file not shown.
Binary file not shown.
+31 -10
View File
@@ -8,7 +8,8 @@ host_os=`uname -s | tr "[:upper:]" "[:lower:]"`
host_arch=`uname -m`
if [ -f android/armeabi/libluajit.a ] &&
[ -f android/armeabi-v7a/libluajit.a ]; then
[ -f android/armeabi-v7a/libluajit.a ] &&
[ -f android/x86/libluajit.a ]; then
echo "LuaJIT Already built"
exit 0
fi
@@ -27,20 +28,37 @@ if [[ x$NDK = "x" ]]; then
fi
NDKABI=9
NDKVER=$NDK/toolchains/arm-linux-androideabi-4.8
NDKP=$NDKVER/prebuilt/${host_os}-${host_arch}/bin/arm-linux-androideabi-
NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
CFLAGS=""
# Since OSX still has bash 3, we don't have associative arrays, fake them instead
armeabi=0
armeabiv7a=1
x86=2
NDKVER[$armeabi]="$NDK/toolchains/arm-linux-androideabi-4.8"
NDKP[$armeabi]="${NDKVER[$armeabi]}/prebuilt/${host_os}-${host_arch}/bin/arm-linux-androideabi-"
NDKF[$armeabi]="--sysroot \"$NDK/platforms/android-$NDKABI/arch-arm\""
CFLAGS[$armeabi]=""
NDKVER[$armeabiv7a]="${NDKVER[$armeabi]}"
NDKP[$armeabiv7a]="${NDKP[$armeabi]}"
NDKF[$armeabiv7a]="${NDKF[$armeabi]}"
CFLAGS[$armeabiv7a]="${CFLAGS[$armeabi]}"
NDKVER[$x86]="$NDK/toolchains/x86-4.8"
NDKP[$x86]="${NDKVER[$x86]}/prebuilt/${host_os}-${host_arch}/bin/i686-linux-android-"
NDKF[$x86]="--sysroot \"$NDK/platforms/android-$NDKABI/arch-x86\""
CFLAGS[$x86]="-DLUAJIT_NO_LOG2"
buildLuaJIT()
{
arch="$1"
ndkarch="$2"
archkey="$1"
arch="$2"
ndkarch="$3"
DESTDIR=../android/$arch
mkdir -p $DESTDIR 2>/dev/null
rm "$DESTDIR"/*.a 2>/dev/null
make clean
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_SYS=Linux TARGET_FLAGS="$NDKF $ndkarch" TARGET_CFLAGS="$CFLAGS" libluajit.a
make HOST_CC="gcc -m32" CROSS="${NDKP[$archkey]}" TARGET_SYS=Linux TARGET_FLAGS="${NDKF[$archkey]} $ndkarch" TARGET_CFLAGS="${CFLAGS[$archkey]}" libluajit.a
if [ -f libluajit.a ]; then
mv libluajit.a $DESTDIR/libluajit.a
@@ -50,9 +68,12 @@ buildLuaJIT()
cd src
# Android/ARM, armeabi (ARMv5TE soft-float), Android 2.2+ (Froyo)
buildLuaJIT armeabi
buildLuaJIT $armeabi armeabi
# Android/ARM, armeabi-v7a (ARMv7 VFP), Android 4.0+ (ICS)
buildLuaJIT armeabi-v7a "-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wl,--fix-cortex-a8"
buildLuaJIT $armeabiv7a armeabi-v7a "-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wl,--fix-cortex-a8"
# Android/x86
buildLuaJIT $x86 x86
make clean
+78 -8
View File
@@ -169,6 +169,13 @@ if(MSVC)
endif()
endforeach()
endif()
# Make sure /RTC1 is disabled, otherwise it will use functions from the CRT
foreach(flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
string(REGEX REPLACE "/RTC(su|[1su])" "" ${flag_var} "${${flag_var}}")
endforeach(flag_var)
endif()
# Those are used for pkg-config and friends, so that the SDL2.pc, sdl2-config,
@@ -382,7 +389,7 @@ if(USE_GCC OR USE_CLANG)
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
check_c_compiler_flag("" HAVE_NO_UNDEFINED)
set(CMAKE_REQUIRED_FLAGS)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
if(HAVE_NO_UNDEFINED)
list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
endif()
@@ -688,6 +695,52 @@ if(SDL_VIDEO)
endif()
endif()
if(ANDROID)
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
file(GLOB ANDROID_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_MAIN_SOURCES})
if(SDL_AUDIO)
set(SDL_AUDIO_DRIVER_ANDROID 1)
file(GLOB ANDROID_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_AUDIO_SOURCES})
set(HAVE_SDL_AUDIO TRUE)
endif()
if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_ANDROID 1)
file(GLOB ANDROID_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_FILESYSTEM_SOURCES})
set(HAVE_SDL_FILESYSTEM TRUE)
endif()
if(SDL_JOYSTICK)
set(SDL_JOYSTICK_ANDROID 1)
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
set(HAVE_SDL_JOYSTICK TRUE)
endif()
if(SDL_POWER)
set(SDL_POWER_ANDROID 1)
file(GLOB ANDROID_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_POWER_SOURCES})
set(HAVE_SDL_POWER TRUE)
endif()
if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_ANDROID 1)
file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_VIDEO_SOURCES})
set(HAVE_SDL_VIDEO TRUE)
#enable gles
if(VIDEO_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1)
set(HAVE_VIDEO_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_OGL_ES2 1)
endif()
endif()
list(APPEND EXTRA_LDFLAGS "-Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit")
endif()
# Platform-specific options and settings
if(EMSCRIPTEN)
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
@@ -826,7 +879,7 @@ elseif(UNIX AND NOT APPLE)
if(SDL_JOYSTICK)
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
if(LINUX)
if(LINUX AND NOT ANDROID)
set(SDL_JOYSTICK_LINUX 1)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
@@ -898,9 +951,20 @@ elseif(WINDOWS)
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
if(MSVC)
# Prevent codegen that would use the VC runtime libraries.
add_definitions(/GS-)
if(NOT ARCH_64)
add_definitions(/arch:SSE)
endif()
endif()
# Check for DirectX
if(DIRECTX)
if(NOT CMAKE_COMPILER_IS_MINGW)
if(DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700)
set(USE_WINSDK_DIRECTX TRUE)
endif()
if(NOT CMAKE_COMPILER_IS_MINGW AND NOT USE_WINSDK_DIRECTX)
if("$ENV{DXSDK_DIR}" STREQUAL "")
message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
endif()
@@ -926,7 +990,7 @@ elseif(WINDOWS)
check_include_file(dxgi.h HAVE_DXGI_H)
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
set(HAVE_DIRECTX TRUE)
if(NOT CMAKE_COMPILER_IS_MINGW)
if(NOT CMAKE_COMPILER_IS_MINGW AND NOT USE_WINSDK_DIRECTX)
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
include_directories($ENV{DXSDK_DIR}\\Include)
@@ -1044,7 +1108,7 @@ elseif(WINDOWS)
list(APPEND EXTRA_LIBS dinput8 dxguid)
if(CMAKE_COMPILER_IS_MINGW)
list(APPEND EXTRA_LIBS dxerr8)
else()
elseif (NOT USE_WINSDK_DIRECTX)
list(APPEND EXTRA_LIBS dxerr)
endif()
endif()
@@ -1087,7 +1151,7 @@ elseif(APPLE)
# Requires the darwin file implementation
if(SDL_FILE)
file(GLOB EXTRA_SOURCES ${PROJECT_SOURCE_DIR}/src/file/cocoa/*.m)
file(GLOB EXTRA_SOURCES ${SDL2_SOURCE_DIR}/src/file/cocoa/*.m)
set(SOURCE_FILES ${EXTRA_SOURCES} ${SOURCE_FILES})
set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
set(HAVE_SDL_FILE TRUE)
@@ -1403,8 +1467,14 @@ if(SDL_SHARED)
SOVERSION ${LT_REVISION}
OUTPUT_NAME "SDL2")
endif()
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
if(MSVC)
# Don't try to link with the default set of libraries.
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
endif()
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
endif()
if(SDL_STATIC)
@@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2016 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
@@ -12,13 +12,13 @@ CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
TARGET_STATIC = libSDL13.a
TARGET_SHARED = libSDL13.so
SOURCES = ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c \
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c ./src/cdrom/dummy/*.c \
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o
@@ -71,13 +71,13 @@ Linux:
iOS:
* Added support for iOS 8
* The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels
* SDL_GetWindowSize() and display mode sizes are in the "DPI-independent points" / "screen coordinates" coordinate space rather than pixels (matches OS X behavior)
* Added native resolution support for the iPhone 6 Plus
* Added support for MFi game controllers
* Added support for the hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK
* Added sRGB OpenGL ES context support on iOS 7+
* Added native resolution support for the iPhone 6 Plus
* Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER
* The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels
* SDL_GetWindowSize() and display mode sizes are in the "DPI-independent points" coordinate space rather than pixels (matches OS X behavior)
* SDL_SysWMinfo now contains the OpenGL ES framebuffer and color renderbuffer objects used by the window's active GLES view
* Fixed various rotation and orientation issues
* Fixed memory leaks

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 578 B

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 450 KiB

After

Width:  |  Height:  |  Size: 450 KiB

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2016 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

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

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