Fixes #2022, do not resume on Android when surfaceChanged
If the app is in landscape mode and the user presses the power button, a pause is followed immediately by a surfaceChanged event because the lock screen is shown in portrait mode. This triggers a "false" resume. So, we just pause and resume following the onWindowFocusChanged events. Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before blocking the event pump.
This commit is contained in:
commit
dad420670f
859 changed files with 310893 additions and 0 deletions
28
Xcode/SDL/Info-Framework.plist
Normal file
28
Xcode/SDL/Info-Framework.plist
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>http://www.libsdl.org</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.libsdl.SDL2</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Simple DirectMedia Layer</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.0</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
</dict>
|
||||
</plist>
|
2877
Xcode/SDL/SDL.xcodeproj/project.pbxproj
Executable file
2877
Xcode/SDL/SDL.xcodeproj/project.pbxproj
Executable file
File diff suppressed because it is too large
Load diff
15
Xcode/SDL/pkg-support/SDL.info
Executable file
15
Xcode/SDL/pkg-support/SDL.info
Executable file
|
@ -0,0 +1,15 @@
|
|||
Title SDL 2.0.0
|
||||
Version 1
|
||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
Diskname (null)
|
||||
DeleteWarning
|
||||
NeedsAuthorization NO
|
||||
DisableStop NO
|
||||
UseUserMask NO
|
||||
Application NO
|
||||
Relocatable YES
|
||||
Required NO
|
||||
InstallOnly NO
|
||||
RequiresReboot NO
|
||||
InstallFat NO
|
43
Xcode/SDL/pkg-support/codesign-frameworks.sh
Executable file
43
Xcode/SDL/pkg-support/codesign-frameworks.sh
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
|
||||
# WARNING: You may have to run Clean in Xcode after changing CODE_SIGN_IDENTITY!
|
||||
|
||||
# Verify that $CODE_SIGN_IDENTITY is set
|
||||
if [ -z "$CODE_SIGN_IDENTITY" ] ; then
|
||||
echo "CODE_SIGN_IDENTITY needs to be non-empty for codesigning frameworks!"
|
||||
|
||||
if [ "$CONFIGURATION" = "Release" ] ; then
|
||||
exit 1
|
||||
else
|
||||
# Codesigning is optional for non-release builds.
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
SAVEIFS=$IFS
|
||||
IFS=$(echo -en "\n\b")
|
||||
|
||||
FRAMEWORK_DIR="${TARGET_BUILD_DIR}"
|
||||
|
||||
# Loop through all frameworks
|
||||
FRAMEWORKS=`find "${FRAMEWORK_DIR}" -type d -name "*.framework" | sed -e "s/\(.*\)/\1\/Versions\/A\//"`
|
||||
RESULT=$?
|
||||
if [[ $RESULT != 0 ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Found:"
|
||||
echo "${FRAMEWORKS}"
|
||||
|
||||
for FRAMEWORK in $FRAMEWORKS;
|
||||
do
|
||||
echo "Signing '${FRAMEWORK}'"
|
||||
`codesign -f -v -s "${CODE_SIGN_IDENTITY}" "${FRAMEWORK}"`
|
||||
RESULT=$?
|
||||
if [[ $RESULT != 0 ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# restore $IFS
|
||||
IFS=$SAVEIFS
|
19
Xcode/SDL/pkg-support/resources/License.txt
Normal file
19
Xcode/SDL/pkg-support/resources/License.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2013 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.
|
32
Xcode/SDL/pkg-support/resources/ReadMe.txt
Executable file
32
Xcode/SDL/pkg-support/resources/ReadMe.txt
Executable file
|
@ -0,0 +1,32 @@
|
|||
The Simple DirectMedia Layer (SDL for short) is a cross-platform
|
||||
library designed to make it easy to write multi-media software,
|
||||
such as games and emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the zlib license:
|
||||
http://zlib.net/zlib_license.html
|
||||
|
||||
|
||||
This packages contains the SDL framework for OS X.
|
||||
Conforming with Apple guidelines, this framework
|
||||
contains both the SDL runtime component and development header files.
|
||||
|
||||
|
||||
To Install:
|
||||
Copy the SDL2.framework to /Library/Frameworks
|
||||
|
||||
You may alternatively install it in <Your home directory>/Library/Frameworks
|
||||
if your access privileges are not high enough.
|
||||
|
||||
|
||||
Additional References:
|
||||
|
||||
- Screencast tutorials for getting started with OpenSceneGraph/Mac OS X are
|
||||
available at:
|
||||
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips
|
||||
Though these are OpenSceneGraph centric, the same exact concepts apply to
|
||||
SDL, thus the videos are recommended for everybody getting started with
|
||||
developing on Mac OS X. (You can skim over the PlugIns stuff since SDL
|
||||
doesn't have any PlugIns to worry about.)
|
BIN
Xcode/SDL/pkg-support/resources/SDL_DS_Store
Normal file
BIN
Xcode/SDL/pkg-support/resources/SDL_DS_Store
Normal file
Binary file not shown.
BIN
Xcode/SDL/pkg-support/sdl_logo.pdf
Normal file
BIN
Xcode/SDL/pkg-support/sdl_logo.pdf
Normal file
Binary file not shown.
4406
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
Executable file
4406
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
Executable file
File diff suppressed because it is too large
Load diff
1558
Xcode/XcodeDocSet/Doxyfile
Normal file
1558
Xcode/XcodeDocSet/Doxyfile
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue