Skip to content

Commit

Permalink
Fixes #2022, do not resume on Android when surfaceChanged
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gabomdq committed Aug 12, 2013
0 parents commit dad4206
Show file tree
Hide file tree
Showing 859 changed files with 310,893 additions and 0 deletions.
97 changes: 97 additions & 0 deletions .hgignore
@@ -0,0 +1,97 @@
syntax:glob
aclocal.m4
autom4te*
config.cache
config.log
config.status
Makefile
sdl-config
SDL2.spec
build

# for Xcode
*.orig
*.swp
*.tmp
*.rej
*~
*.o
*.mode1*
*.model*
*.perspective*
*.perspective*
*.pbxuser
(^|/)build($|/)
.DS_Store
Xcode/SDL/SDL.xcodeproj/xcuserdata
Xcode/SDL/SDL.xcodeproj/project.xcworkspace
Xcode/SDLTest/SDLTest.xcodeproj/xcuserdata
Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace
Xcode-iOS/SDL/SDL.xcodeproj/xcuserdata
Xcode-iOS/SDL/SDL.xcodeproj/project.xcworkspace
Xcode-iOS/Demos/Demos.xcodeproj/xcuserdata
Xcode-iOS/Demos/Demos.xcodeproj/project.xcworkspace

# for Visual C++
Debug
Release
*.user
*.ncb
*.suo
*.sdf

# for Android
android-project/local.properties

sdl.pc
test/autom4te*
test/config.cache
test/config.log
test/config.status
test/Makefile
test/SDL2.dll
test/checkkeys
test/loopwave
test/testatomic
test/testaudioinfo
test/testautomation
test/testdraw2
test/testerror
test/testfile
test/testgamecontroller
test/testgesture
test/testgl2
test/testgles
test/testhaptic
test/testiconv
test/testime
test/testintersections
test/testjoystick
test/testkeys
test/testloadso
test/testlock
test/testmessage
test/testmultiaudio
test/testnative
test/testoverlay2
test/testplatform
test/testpower
test/testrelative
test/testrendercopyex
test/testrendertarget
test/testresample
test/testrumble
test/testscale
test/testsem
test/testshader
test/testshape
test/testsprite2
test/testspriteminimal
test/teststreaming
test/testthread
test/testtimer
test/testver
test/testwm2
test/torturethread
test/*.exe
test/*.dSYM
49 changes: 49 additions & 0 deletions Android.mk
@@ -0,0 +1,49 @@
LOCAL_PATH := $(call my-dir)

###########################
#
# SDL shared library
#
###########################

include $(CLEAR_VARS)

LOCAL_MODULE := SDL2

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)

LOCAL_SRC_FILES := \
$(subst $(LOCAL_PATH)/,, \
$(wildcard $(LOCAL_PATH)/src/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
$(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/*.c) \
$(wildcard $(LOCAL_PATH)/src/video/android/*.c))

LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog

include $(BUILD_SHARED_LIBRARY)
16 changes: 16 additions & 0 deletions BUGS.txt
@@ -0,0 +1,16 @@

Bugs are now managed in the SDL bug tracker, here:

http://bugzilla.libsdl.org/

You may report bugs there, and search to see if a given issue has already
been reported, discussed, and maybe even fixed.


You may also find help on the SDL mailing list. Subscription information:

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
bugs discussed on the mailing list may be forgotten or missed.

0 comments on commit dad4206

Please sign in to comment.