Skip to content
Permalink
Browse files
Merged default into iOS-improvements
  • Loading branch information
slime73 committed Dec 2, 2014
2 parents ba6392d + 52760dc commit cc0631a095d0d5c6754ef5957b1e725a79dbca88
Showing 320 changed files with 604 additions and 20,464 deletions.
@@ -555,6 +555,20 @@
DB89957918A19ABA0092407C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A873910730675007319AE /* Carbon.framework */; };
DB89957A18A19ABA0092407C /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 003FA645093FFD41000C53B3 /* libSDL2.a */; };
DB89958418A19B130092407C /* testhotplug.c in Sources */ = {isa = PBXBuildFile; fileRef = DB89958318A19B130092407C /* testhotplug.c */; };
DBEC54DD1A1A81C3005B1EAB /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73672219A54A90004122E4 /* CoreVideo.framework */; };
DBEC54DE1A1A81C3005B1EAB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F33A709CA188600EBEB88 /* Cocoa.framework */; };
DBEC54DF1A1A81C3005B1EAB /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 003FA645093FFD41000C53B3 /* libSDL2.a */; };
DBEC54E01A1A81C3005B1EAB /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A863B10730545007319AE /* CoreAudio.framework */; };
DBEC54E11A1A81C3005B1EAB /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A863C10730545007319AE /* ForceFeedback.framework */; };
DBEC54E21A1A81C3005B1EAB /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A863D10730545007319AE /* IOKit.framework */; };
DBEC54E31A1A81C3005B1EAB /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A869F10730593007319AE /* AudioToolbox.framework */; };
DBEC54E41A1A81C3005B1EAB /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A86A010730593007319AE /* CoreFoundation.framework */; };
DBEC54E51A1A81C3005B1EAB /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A871410730623007319AE /* AudioUnit.framework */; };
DBEC54E61A1A81C3005B1EAB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002A873910730675007319AE /* Carbon.framework */; };
DBEC54EB1A1A8205005B1EAB /* controllermap.c in Sources */ = {isa = PBXBuildFile; fileRef = DBEC54D11A1A811D005B1EAB /* controllermap.c */; };
DBEC54ED1A1A828A005B1EAB /* axis.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBEC54D61A1A8145005B1EAB /* axis.bmp */; };
DBEC54EE1A1A828D005B1EAB /* button.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBEC54D71A1A8145005B1EAB /* button.bmp */; };
DBEC54EF1A1A828F005B1EAB /* controllermap.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBEC54D81A1A8145005B1EAB /* controllermap.bmp */; };
FA73672319A54A90004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73672219A54A90004122E4 /* CoreVideo.framework */; };
FA73672819A54AB6004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73672219A54A90004122E4 /* CoreVideo.framework */; };
FA73672919A54AB9004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73672219A54A90004122E4 /* CoreVideo.framework */; };
@@ -1056,6 +1070,18 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
DBEC54EC1A1A827C005B1EAB /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 16;
files = (
DBEC54ED1A1A828A005B1EAB /* axis.bmp in CopyFiles */,
DBEC54EE1A1A828D005B1EAB /* button.bmp in CopyFiles */,
DBEC54EF1A1A828F005B1EAB /* controllermap.bmp in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
@@ -1186,6 +1212,11 @@
DB89957E18A19ABA0092407C /* testhotplug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhotplug; sourceTree = BUILT_PRODUCTS_DIR; };
DB89958318A19B130092407C /* testhotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhotplug.c; path = ../../test/testhotplug.c; sourceTree = "<group>"; };
DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "TestDropFile-Info.plist"; sourceTree = "<group>"; };
DBEC54D11A1A811D005B1EAB /* controllermap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = controllermap.c; path = ../../test/controllermap.c; sourceTree = "<group>"; };
DBEC54D61A1A8145005B1EAB /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = axis.bmp; path = ../../test/axis.bmp; sourceTree = "<group>"; };
DBEC54D71A1A8145005B1EAB /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = button.bmp; path = ../../test/button.bmp; sourceTree = "<group>"; };
DBEC54D81A1A8145005B1EAB /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = controllermap.bmp; path = ../../test/controllermap.bmp; sourceTree = "<group>"; };
DBEC54EA1A1A81C3005B1EAB /* controllermap */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = controllermap; sourceTree = BUILT_PRODUCTS_DIR; };
FA73672219A54A90004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */

@@ -1974,6 +2005,23 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
DBEC54DC1A1A81C3005B1EAB /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DBEC54DD1A1A81C3005B1EAB /* CoreVideo.framework in Frameworks */,
DBEC54DE1A1A81C3005B1EAB /* Cocoa.framework in Frameworks */,
DBEC54DF1A1A81C3005B1EAB /* libSDL2.a in Frameworks */,
DBEC54E01A1A81C3005B1EAB /* CoreAudio.framework in Frameworks */,
DBEC54E11A1A81C3005B1EAB /* ForceFeedback.framework in Frameworks */,
DBEC54E21A1A81C3005B1EAB /* IOKit.framework in Frameworks */,
DBEC54E31A1A81C3005B1EAB /* AudioToolbox.framework in Frameworks */,
DBEC54E41A1A81C3005B1EAB /* CoreFoundation.framework in Frameworks */,
DBEC54E51A1A81C3005B1EAB /* AudioUnit.framework in Frameworks */,
DBEC54E61A1A81C3005B1EAB /* Carbon.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
@@ -2007,13 +2055,16 @@
00794E4609D207B4003FC8A1 /* Resources */ = {
isa = PBXGroup;
children = (
DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */,
DB166ECF16A1D87000A1396C /* shapes */,
DBEC54D61A1A8145005B1EAB /* axis.bmp */,
DBEC54D71A1A8145005B1EAB /* button.bmp */,
DBEC54D81A1A8145005B1EAB /* controllermap.bmp */,
00794E5D09D20839003FC8A1 /* icon.bmp */,
00794E5E09D20839003FC8A1 /* moose.dat */,
00794E5F09D20839003FC8A1 /* picture.xbm */,
00794E6109D20839003FC8A1 /* sample.bmp */,
00794E6209D20839003FC8A1 /* sample.wav */,
DB166ECF16A1D87000A1396C /* shapes */,
DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */,
00794E6309D20839003FC8A1 /* utf8.txt */,
);
name = Resources;
@@ -2037,6 +2088,7 @@
isa = PBXGroup;
children = (
092D6D10FFB30A2C7F000001 /* checkkeys.c */,
DBEC54D11A1A811D005B1EAB /* controllermap.c */,
083E4872006D84C97F000001 /* loopwave.c */,
0017958F1074216E00F5D044 /* testatomic.c */,
001795B01074222D00F5D044 /* testaudioinfo.c */,
@@ -2138,6 +2190,7 @@
DB0F490117CA5212008798C5 /* testfilesystem */,
DB89957E18A19ABA0092407C /* testhotplug */,
DB445EF818184B7000B306B0 /* testdropfile.app */,
DBEC54EA1A1A81C3005B1EAB /* controllermap */,
);
name = Products;
sourceTree = "<group>";
@@ -2926,6 +2979,23 @@
productReference = DB89957E18A19ABA0092407C /* testhotplug */;
productType = "com.apple.product-type.tool";
};
DBEC54D91A1A81C3005B1EAB /* controllermap */ = {
isa = PBXNativeTarget;
buildConfigurationList = DBEC54E71A1A81C3005B1EAB /* Build configuration list for PBXNativeTarget "controllermap" */;
buildPhases = (
DBEC54DA1A1A81C3005B1EAB /* Sources */,
DBEC54DC1A1A81C3005B1EAB /* Frameworks */,
DBEC54EC1A1A827C005B1EAB /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = controllermap;
productName = checkkeys;
productReference = DBEC54EA1A1A81C3005B1EAB /* controllermap */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
@@ -2958,6 +3028,7 @@
BEC566920761D90300A33029 /* All */,
DB166D7E16A1D12400A1396C /* SDL_test */,
BEC566AB0761D90300A33029 /* checkkeys */,
DBEC54D91A1A81C3005B1EAB /* controllermap */,
BEC566C50761D90300A33029 /* loopwave */,
0017957410741F7900F5D044 /* testatomic */,
00179595107421BF00F5D044 /* testaudioinfo */,
@@ -3422,6 +3493,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
DBEC54DA1A1A81C3005B1EAB /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DBEC54EB1A1A8205005B1EAB /* controllermap.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
@@ -4339,6 +4418,20 @@
};
name = Release;
};
DBEC54E81A1A81C3005B1EAB /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = controllermap;
};
name = Debug;
};
DBEC54E91A1A81C3005B1EAB /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = controllermap;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
@@ -4774,6 +4867,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
DBEC54E71A1A81C3005B1EAB /* Build configuration list for PBXNativeTarget "controllermap" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DBEC54E81A1A81C3005B1EAB /* Debug */,
DBEC54E91A1A81C3005B1EAB /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
@@ -1072,7 +1072,7 @@ public void run(){
}
}
}
});
}, "SDLThreadListener");
SDLActivity.mSDLThread.start();
}
}
@@ -15728,7 +15728,7 @@ find_lib()
else
host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
fi
for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
lib=`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`
if test x$lib != x; then
echo $lib
@@ -142,7 +142,7 @@ find_lib()
else
host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
fi
for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
if test x$lib != x; then
echo $lib
@@ -116,6 +116,69 @@ Here is a rough list of what works, and what doens't:



Caveats
-------

#### SDL_GetPrefPath() usage when upgrading existing WinRT apps to SDL 2.0.4

SDL 2.0.4 fixes two bugs found in SDL_GetPrefPath() which can affect
an app's save data. These bugs only apply to WinRT apps (and not
Windows Desktop / Win32 apps, or to apps on any other SDL platform).
In particular, for older versions of SDL (anything before 2.0.4):

1. SDL_GetPrefPath() would return an invalid path, one in which attempts
to write files to would fail, in many cases. Some of the path elements
returned by SDL_GetPrefPath() would not get created (as done on other
SDL platforms). Files could be written to this path, however apps would
need to explicitly create the missing directories first.

2. SDL_GetPrefPath() would return a path inside a WinRT 'Roaming' folder,
the contents of which could get automatically synchronized across multiple
devices, by Windows. This process could occur while an app was running.
Apps which were not explicitly built to handle this scenario could
have their SDL_GetPrefPath-backed save data swapped out by Windows at
unexpected times, which raised potential for data-loss (if apps weren't
designed to support live file-synchronization.)


SDL_GetPrefPath(), starting with SDL 2.0.4, addresses these by:

1. making sure that SDL_GetPrefPath() returns a directory in which data
can be written to immediately, without first needing to create directories.

2. basing SDL_GetPrefPath() off of a non-Roaming / 'Local' folder, the
contents of which do not get automatically synchronized across devices,
and which may be safer in terms of data-integrity.

Apps can, at their discretion, choose to utilize WinRT's Roaming
functionality by calling the following before calling SDL_GetPrefPath():

SDL_SetHint(SDL_HINT_WINRT_PREF_PATH_ROOT, "roaming");

Alternatively, to restore SDL_GetPrefPath()'s old behavior (found in
SDL 2.0.3, and in many pre-2.0.4 versions of SDL found on hg.libsdl.org),
whereby a Roaming path is returned for Windows Store apps, and a Local
folder is returned for Windows Phone apps, use the following code:

SDL_SetHint(SDL_HINT_WINRT_PREF_PATH_ROOT, "old");

Before using Roaming data in any capacity, it is highly recommended that
one read the following:

1. Microsoft's documentation on the Roaming data. Details on this can be
found on MSDN, at:
[Guidelines for roaming app data](http://msdn.microsoft.com/en-us/library/windows/apps/hh465094.aspx).

2. the SDL documentation for SDL_HINT_WINRT_PREF_PATH_ROOT, which is
listed inside SDL_hints.h.

Please note that Roaming support is not available on Windows Phone 8.0,
due to limitations in the OS itself. Attempts to use it will fail, with
SDL_GetPrefPath() returning NULL (if SDL_HINT_WINRT_PREF_PATH_ROOT is
set to "roaming" on that platform). Windows Phone 8.1 does not have this
limitation, and does support Roaming data.



Setup, High-Level Steps
-----------------------
@@ -58,6 +58,6 @@ typedef enum
#endif
#include "close_code.h"

#endif /* _SDL_video_h */
#endif /* _SDL_blendmode_h */

/* vi: set ts=4 sw=4 expandtab: */
@@ -131,6 +131,6 @@ extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
#endif
#include "close_code.h"

#endif /* _SDL_system_h */
#endif /* _SDL_filesystem_h */

/* vi: set ts=4 sw=4 expandtab: */
@@ -43,7 +43,7 @@ extern "C" {
* \file SDL_gamecontroller.h
*
* In order to use these functions, SDL_Init() must have been called
* with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
* with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system
* for game controllers, and load appropriate drivers.
*
* If you would like to receive controller updates while the application
@@ -347,6 +347,9 @@ typedef struct _SDL_Haptic SDL_Haptic;
/**
* \brief Structure that represents a haptic direction.
*
* This is the direction where the force comes from,
* instead of the direction in which the force is exerted.
*
* Directions can be specified by:
* - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
* - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
@@ -555,7 +558,7 @@ typedef struct SDL_HapticPeriodic
Uint16 period; /**< Period of the wave. */
Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
Sint16 offset; /**< Mean value of the wave. */
Uint16 phase; /**< Horizontal shift given by hundredth of a degree. */
Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */

/* Envelope */
Uint16 attack_length; /**< Duration of the attack. */
@@ -492,6 +492,36 @@ extern "C" {
*/
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"

/**
* \brief A variable that dictates what SDL_GetPrefPath() returns in WinRT apps.
*
* The variable can be set to the following values:
* * "local" - Use the app's 'local' folder to store data.
* * "roaming" - Use the app's 'roaming' folder to store data.
* On Windows Phone 8.0, this setting is not supported due to
* limitations in the OS itself. Attempts to use this (via
* SDL_GetPrefPath()) on Windows Phone 8.0 will fail, with
* SDL_GetPrefPath() returning NULL. (Windows Phone 8.1 does,
* however, support roaming folders.)
* * "old" - Use the app's 'local' folder on Windows Phone, and 'roaming'
* on non-Phone versions of WinRT. This mimics behavior found
* in SDL 2.0.3's implementation of SDL_GetPrefPath() for WinRT
* (and was changed for SDL 2.0.4, further details of which are
* in the "Caveats" section of SDL's
* [WinRT README file](README-winrt.md).
*
* The default is to use the app's "local" folder.
*
* Details on 'local' verses 'roaming' folders can be found on MSDN, in
* the documentation for WinRT's Windows.Storage.ApplicationData class,
* (available at http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata ).
*
* The application's local and roaming paths may, alternatively, be retrieved
* via the SDL_WinRTGetFSPathUTF8() and SDL_WinRTGetFSPathUNICODE() functions,
* which are defined in SDL_system.h.
*/
#define SDL_HINT_WINRT_PREF_PATH_ROOT "SDL_WINRT_PREF_PATH_ROOT"

/**
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
*
@@ -87,7 +87,7 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);

/**
* Open a joystick for use.
* The index passed as an argument refers tothe N'th joystick on the system.
* The index passed as an argument refers to the N'th joystick on the system.
* This index is the value which will identify this joystick in future joystick
* events.
*
@@ -371,7 +371,7 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
* \param rect A pointer to the rectangle of pixels to update, or NULL to
* update the entire texture.
* \param pixels The raw pixel data.
* \param pitch The number of bytes between rows of pixel data.
* \param pitch The number of bytes in a row of pixel data, including padding between lines.
*
* \return 0 on success, or -1 if the texture is not valid.
*
@@ -71,7 +71,7 @@ void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *as
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);

/**
* \brief Explicitely pass without checking an assertion condition. Updates assertion counter.
* \brief Explicitly pass without checking an assertion condition. Updates assertion counter.
*
* \param assertDescription Message to log with the assert describing it.
*/

0 comments on commit cc0631a

Please sign in to comment.