Mercurial > sdl-ios-xcode
view test/gcc-fat.sh @ 4391:07b330419439 SDL-1.2
Fixed bug #849 some more:
Tim Angus 2009-11-26 14:41:04 PST
Fix to the cursor not being responsive when the app doesn't have
SDL_APPINPUTFOCUS
The problems with the directx driver are similar to the ones I introduced in
the windib driver with r4478. Basically if the application did not have focus,
the mouse position is not updated. It's not really that the mouse cursor was
invisible, it's that it is stuck underneath another window where you can't see
it. This behaviour predates my r4478 changes and is the reason I unwittingly
broke the windib driver as I had been replicating the way the directx driver
deals with focus. Prior to r4478 the directx driver could not be used in
windowed mode, so the broken focusing would not have actually been observable.
Anyway, the attached patch makes the directx driver behaves like the windib
driver in terms of focus.
Time for 1.2.15? ;)
I've added an additional change of moving the calls to WIN_GrabInput that are
made on WM_ACTIVATE messages so that they only occur when the state is
SDL_APPINPUTFOCUS. When a fullscreen application is minimised using alt-tab, it
still receives WM_ACTIVATE messages when other applications are selected. If
WIN_GrabInput is called when the SDL application doesn't have input focus, bad
things happen; it shouldn't be being called at all.
I've also added a line to make sure that SDL_APPMOUSEFOCUS state is dropped
when the application is minimised following an alt-tab.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 11 Dec 2009 15:24:53 +0000 |
parents | 6cb18cf1777e |
children |
line wrap: on
line source
#!/bin/sh # # Build Universal binaries on Mac OS X, thanks Ryan! # # Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf ppc x86 # Locate Xcode SDK path SDK_PATH=/Developer/SDKs if [ ! -d $SDK_PATH ]; then echo "Couldn't find SDK path" exit 1 fi if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then # PowerPC compiler flags (10.2 runtime compatibility) GCC_COMPILE_PPC="gcc-3.3 -arch ppc \ -DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \ -nostdinc \ -F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \ -I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \ -isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include" GCC_LINK_PPC="\ -L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \ -F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \ -Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk" else # 10.2 or 10.3 SDK # PowerPC compiler flags (10.3 runtime compatibility) GCC_COMPILE_PPC="gcc-4.0 -arch ppc -mmacosx-version-min=10.3 \ -DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \ -nostdinc \ -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ -I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \ -isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include" GCC_LINK_PPC="\ -L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \ -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ -Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk" fi # 10.2 or 10.3 SDK # Intel compiler flags (10.4 runtime compatibility) GCC_COMPILE_X86="gcc-4.0 -arch i386 -mmacosx-version-min=10.4 \ -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ -nostdinc \ -F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \ -I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \ -isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include" GCC_LINK_X86="\ -L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \ -Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk" # Output both PowerPC and Intel object files args="$*" compile=yes link=yes while test x$1 != x; do case $1 in --version) exec gcc $1;; -v) exec gcc $1;; -V) exec gcc $1;; -print-prog-name=*) exec gcc $1;; -print-search-dirs) exec gcc $1;; -E) GCC_COMPILE_PPC="$GCC_COMPILE_PPC -E" GCC_COMPILE_X86="$GCC_COMPILE_X86 -E" compile=no; link=no;; -c) link=no;; -o) output=$2;; *.c|*.cc|*.cpp|*.S) source=$1;; esac shift done if test x$link = xyes; then GCC_COMPILE_PPC="$GCC_COMPILE_PPC $GCC_LINK_PPC" GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86" fi if test x"$output" = x; then if test x$link = xyes; then output=a.out elif test x$compile = xyes; then output=`echo $source | sed -e 's|.*/||' -e 's|\(.*\)\.[^\.]*|\1|'`.o fi fi if test x"$output" != x; then dir=ppc/`dirname $output` if test -d $dir; then : else mkdir -p $dir fi fi set -- $args while test x$1 != x; do if test -f "ppc/$1" && test "$1" != "$output"; then ppc_args="$ppc_args ppc/$1" else ppc_args="$ppc_args $1" fi shift done $GCC_COMPILE_PPC $ppc_args || exit $? if test x"$output" != x; then cp $output ppc/$output fi if test x"$output" != x; then dir=x86/`dirname $output` if test -d $dir; then : else mkdir -p $dir fi fi set -- $args while test x$1 != x; do if test -f "x86/$1" && test "$1" != "$output"; then x86_args="$x86_args x86/$1" else x86_args="$x86_args $1" fi shift done $GCC_COMPILE_X86 $x86_args || exit $? if test x"$output" != x; then cp $output x86/$output fi if test x"$output" != x; then lipo -create -o $output ppc/$output x86/$output fi