From 170cdadf6000a55f2f3f4fab6bb0fcd659aaa599 Mon Sep 17 00:00:00 2001
From: Areloch
Date: Thu, 22 Dec 2016 00:52:34 -0600
Subject: [PATCH 01/26] Fixes window icons with SDL, hooking it through the var
$Core::windowIcon as the path. Also adjusted the splash window icon to use
the var $Core::splashWindowImage for it's path.
---
Engine/source/console/consoleFunctions.cpp | 7 ++-
.../source/windowManager/sdl/sdlWindowMgr.cpp | 46 +++++++++++++++++++
Templates/Empty/game/main.cs | 2 +
Templates/Full/game/main.cs | 2 +
4 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/Engine/source/console/consoleFunctions.cpp b/Engine/source/console/consoleFunctions.cpp
index 7f8fbf1c0..76b3f3d9f 100644
--- a/Engine/source/console/consoleFunctions.cpp
+++ b/Engine/source/console/consoleFunctions.cpp
@@ -2141,13 +2141,18 @@ DefineEngineFunction( gotoWebPage, void, ( const char* address ),,
//-----------------------------------------------------------------------------
-DefineEngineFunction( displaySplashWindow, bool, (const char* path), ("art/gui/splash.bmp"),
+DefineEngineFunction( displaySplashWindow, bool, (const char* path), (""),
"Display a startup splash window suitable for showing while the engine still starts up.\n\n"
"@note This is currently only implemented on Windows.\n\n"
"@param path relative path to splash screen image to display.\n"
"@return True if the splash window could be successfully initialized.\n\n"
"@ingroup Platform" )
{
+ if (path == "")
+ {
+ path = Con::getVariable("$Core::splashWindowImage");
+ }
+
return Platform::displaySplashWindow(path);
}
diff --git a/Engine/source/windowManager/sdl/sdlWindowMgr.cpp b/Engine/source/windowManager/sdl/sdlWindowMgr.cpp
index 9dbe1708d..6157374dd 100644
--- a/Engine/source/windowManager/sdl/sdlWindowMgr.cpp
+++ b/Engine/source/windowManager/sdl/sdlWindowMgr.cpp
@@ -24,6 +24,7 @@
#include "gfx/gfxDevice.h"
#include "core/util/journal/process.h"
#include "core/strings/unicode.h"
+#include "gfx/bitmap/gBitmap.h"
#include "SDL.h"
@@ -165,6 +166,51 @@ PlatformWindow *PlatformWindowManagerSDL::createWindow(GFXDevice *device, const
window->mOwningManager = this;
mWindowMap[ window->mWindowId ] = window;
+ //Now, fetch our window icon, if any
+ Torque::Path iconPath = Torque::Path(Con::getVariable( "$Core::windowIcon" ));
+ Resource bmp = GBitmap::load(iconPath);
+ if (bmp != NULL)
+ {
+ U32 pitch;
+ U32 width = bmp->getWidth();
+ bool hasAlpha = bmp->getHasTransparency();
+ U32 depth;
+
+ if (hasAlpha)
+ {
+ pitch = 4 * width;
+ depth = 32;
+ }
+ else
+ {
+ pitch = 3 * width;
+ depth = 24;
+ }
+
+ Uint32 rmask, gmask, bmask, amask;
+ if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+ {
+ S32 shift = hasAlpha ? 8 : 0;
+ rmask = 0xff000000 >> shift;
+ gmask = 0x00ff0000 >> shift;
+ bmask = 0x0000ff00 >> shift;
+ amask = 0x000000ff >> shift;
+ }
+ else
+ {
+ rmask = 0x000000ff;
+ gmask = 0x0000ff00;
+ bmask = 0x00ff0000;
+ amask = hasAlpha ? 0xff000000 : 0;
+ }
+
+ SDL_Surface* iconSurface = SDL_CreateRGBSurfaceFrom(bmp->getAddress(0, 0), bmp->getWidth(), bmp->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
+
+ SDL_SetWindowIcon(window->mWindowHandle, iconSurface);
+
+ SDL_FreeSurface(iconSurface);
+ }
+
if(device)
{
window->mDevice = device;
diff --git a/Templates/Empty/game/main.cs b/Templates/Empty/game/main.cs
index 22a3ab2ff..87daf9770 100644
--- a/Templates/Empty/game/main.cs
+++ b/Templates/Empty/game/main.cs
@@ -28,6 +28,8 @@ $defaultGame = "scripts";
// Set profile directory
$Pref::Video::ProfilePath = "core/profile";
+$Core::windowIcon = "core/torque.png";
+$Core::splashWindowImage = "art/gui/splash.bmp";
function createCanvas(%windowTitle)
{
diff --git a/Templates/Full/game/main.cs b/Templates/Full/game/main.cs
index 2a261201d..d4a6656e0 100644
--- a/Templates/Full/game/main.cs
+++ b/Templates/Full/game/main.cs
@@ -28,6 +28,8 @@ $defaultGame = "scripts";
// Set profile directory
$Pref::Video::ProfilePath = "core/profile";
+$Core::windowIcon = "core/torque.png";
+$Core::splashWindowImage = "art/gui/splash.bmp";
function createCanvas(%windowTitle)
{
From 5e47c018b2f8ea5dacb42a0bc3fdbabca361e5d2 Mon Sep 17 00:00:00 2001
From: Johxz
Date: Sun, 1 Jan 2017 21:40:41 -0600
Subject: [PATCH 02/26] enable video recording
---
.../game/core/scripts/client/screenshot.cs | 15 +++++++
.../Empty/game/scripts/client/default.bind.cs | 43 +++++++++++++++++++
.../game/core/scripts/client/screenshot.cs | 15 +++++++
.../Full/game/scripts/client/default.bind.cs | 43 +++++++++++++++++++
4 files changed, 116 insertions(+)
diff --git a/Templates/Empty/game/core/scripts/client/screenshot.cs b/Templates/Empty/game/core/scripts/client/screenshot.cs
index 897325a1a..3c78aa2cd 100644
--- a/Templates/Empty/game/core/scripts/client/screenshot.cs
+++ b/Templates/Empty/game/core/scripts/client/screenshot.cs
@@ -55,6 +55,9 @@ function formatSessionNumber(%number)
// Records a movie file from the Canvas content using the specified fps.
// Possible encoder values are "PNG" and "THEORA" (default).
//---------------------------------------------------------------------------------------------
+
+$RecordingMovie = false;
+
function recordMovie(%movieName, %fps, %encoder)
{
// If the canvas doesn't exist yet, setup a flag so it'll
@@ -65,12 +68,24 @@ function recordMovie(%movieName, %fps, %encoder)
if (%encoder $= "")
%encoder = "THEORA";
%resolution = Canvas.getVideoMode();
+
+ // Start the movie recording
+ ChatHud.AddLine( "\c4Recording movie file to [\c2" @ %movieName @ "\cr].ogv.");
+ echo("Recording movie to: " @ %movieName);
startVideoCapture(Canvas, %movieName, %encoder, %fps);
+
+ $RecordingMovie = true;
}
function stopMovie()
{
+ // Stop the current recording
+ ChatHud.AddLine( "\c4Recording movie file finished.");
+ echo("Stopped movie recording");
+
stopVideoCapture();
+
+ $RecordingMovie = false;
}
/// This is bound in initializeCommon() to take
diff --git a/Templates/Empty/game/scripts/client/default.bind.cs b/Templates/Empty/game/scripts/client/default.bind.cs
index 51dc53d4b..b4216a33d 100644
--- a/Templates/Empty/game/scripts/client/default.bind.cs
+++ b/Templates/Empty/game/scripts/client/default.bind.cs
@@ -409,6 +409,49 @@ function stopRecordingDemo( %val )
moveMap.bind( keyboard, F3, startRecordingDemo );
moveMap.bind( keyboard, F4, stopRecordingDemo );
+//------------------------------------------------------------------------------
+// Theora Video Capture (Records a movie file)
+//------------------------------------------------------------------------------
+
+function toggleMovieRecording(%val)
+{
+ if (!%val)
+ return;
+
+ %movieEncodingType = "THEORA"; // Valid encoder values are "PNG" and "THEORA" (default).
+ %movieFPS = 30; // video capture frame rate.
+
+ if (!$RecordingMovie)
+ {
+ // locate a non-existent filename to use
+ for(%i = 0; %i < 1000; %i++)
+ {
+ %num = %i;
+ if(%num < 10)
+ %num = "0" @ %num;
+ if(%num < 100)
+ %num = "0" @ %num;
+
+ %filePath = "movies/movie" @ %num;
+ if(!isfile(%filePath))
+ break;
+ }
+ if(%i == 1000)
+ return;
+
+ // Start the movie recording
+ recordMovie(%filePath, %movieFPS, %movieEncodingType);
+
+ }
+ else
+ {
+ // Stop the current recording
+ stopMovie();
+ }
+}
+
+// Key binding works at any time and not just while in a game.
+GlobalActionMap.bind(keyboard, "alt m", toggleMovieRecording);
//------------------------------------------------------------------------------
// Helper Functions
diff --git a/Templates/Full/game/core/scripts/client/screenshot.cs b/Templates/Full/game/core/scripts/client/screenshot.cs
index 897325a1a..3c78aa2cd 100644
--- a/Templates/Full/game/core/scripts/client/screenshot.cs
+++ b/Templates/Full/game/core/scripts/client/screenshot.cs
@@ -55,6 +55,9 @@ function formatSessionNumber(%number)
// Records a movie file from the Canvas content using the specified fps.
// Possible encoder values are "PNG" and "THEORA" (default).
//---------------------------------------------------------------------------------------------
+
+$RecordingMovie = false;
+
function recordMovie(%movieName, %fps, %encoder)
{
// If the canvas doesn't exist yet, setup a flag so it'll
@@ -65,12 +68,24 @@ function recordMovie(%movieName, %fps, %encoder)
if (%encoder $= "")
%encoder = "THEORA";
%resolution = Canvas.getVideoMode();
+
+ // Start the movie recording
+ ChatHud.AddLine( "\c4Recording movie file to [\c2" @ %movieName @ "\cr].ogv.");
+ echo("Recording movie to: " @ %movieName);
startVideoCapture(Canvas, %movieName, %encoder, %fps);
+
+ $RecordingMovie = true;
}
function stopMovie()
{
+ // Stop the current recording
+ ChatHud.AddLine( "\c4Recording movie file finished.");
+ echo("Stopped movie recording");
+
stopVideoCapture();
+
+ $RecordingMovie = false;
}
/// This is bound in initializeCommon() to take
diff --git a/Templates/Full/game/scripts/client/default.bind.cs b/Templates/Full/game/scripts/client/default.bind.cs
index 1af881a81..ed804bbb2 100644
--- a/Templates/Full/game/scripts/client/default.bind.cs
+++ b/Templates/Full/game/scripts/client/default.bind.cs
@@ -583,6 +583,49 @@ function stopRecordingDemo( %val )
moveMap.bind( keyboard, F3, startRecordingDemo );
moveMap.bind( keyboard, F4, stopRecordingDemo );
+//------------------------------------------------------------------------------
+// Theora Video Capture (Records a movie file)
+//------------------------------------------------------------------------------
+
+function toggleMovieRecording(%val)
+{
+ if (!%val)
+ return;
+
+ %movieEncodingType = "THEORA"; // Valid encoder values are "PNG" and "THEORA" (default).
+ %movieFPS = 30; // video capture frame rate.
+
+ if (!$RecordingMovie)
+ {
+ // locate a non-existent filename to use
+ for(%i = 0; %i < 1000; %i++)
+ {
+ %num = %i;
+ if(%num < 10)
+ %num = "0" @ %num;
+ if(%num < 100)
+ %num = "0" @ %num;
+
+ %filePath = "movies/movie" @ %num;
+ if(!isfile(%filePath))
+ break;
+ }
+ if(%i == 1000)
+ return;
+
+ // Start the movie recording
+ recordMovie(%filePath, %movieFPS, %movieEncodingType);
+
+ }
+ else
+ {
+ // Stop the current recording
+ stopMovie();
+ }
+}
+
+// Key binding works at any time and not just while in a game.
+GlobalActionMap.bind(keyboard, "alt m", toggleMovieRecording);
//------------------------------------------------------------------------------
// Helper Functions
From bfa2b5e9638b8f915303476e8dde999ded4fe13d Mon Sep 17 00:00:00 2001
From: Azaezel
Date: Tue, 10 Jan 2017 08:02:08 -0600
Subject: [PATCH 03/26] adress #1914
---
Engine/source/renderInstance/renderMeshMgr.cpp | 2 +-
Engine/source/renderInstance/renderPrePassMgr.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Engine/source/renderInstance/renderMeshMgr.cpp b/Engine/source/renderInstance/renderMeshMgr.cpp
index 476c5e9b8..ce27a09c2 100644
--- a/Engine/source/renderInstance/renderMeshMgr.cpp
+++ b/Engine/source/renderInstance/renderMeshMgr.cpp
@@ -245,7 +245,7 @@ void RenderMeshMgr::render(SceneRenderState * state)
if ( passRI->accuTex != lastAccuTex )
{
sgData.accuTex = passRI->accuTex;
- lastAccuTex = lastAccuTex;
+ lastAccuTex = passRI->accuTex;
dirty = true;
}
diff --git a/Engine/source/renderInstance/renderPrePassMgr.cpp b/Engine/source/renderInstance/renderPrePassMgr.cpp
index 2c3f2c4c2..23e44f6ed 100644
--- a/Engine/source/renderInstance/renderPrePassMgr.cpp
+++ b/Engine/source/renderInstance/renderPrePassMgr.cpp
@@ -480,7 +480,7 @@ void RenderPrePassMgr::render( SceneRenderState *state )
if (passRI->accuTex != lastAccuTex)
{
sgData.accuTex = passRI->accuTex;
- lastAccuTex = lastAccuTex;
+ lastAccuTex = passRI->accuTex;
dirty = true;
}
From bcc5459818e6c57decbd68af4cf55f299ffad93c Mon Sep 17 00:00:00 2001
From: "Thomas \"elfprince13\" Dickerson"
Date: Wed, 11 Jan 2017 23:34:46 -0500
Subject: [PATCH 04/26] whitespace
---
Engine/source/console/fieldBrushObject.cpp | 24 +-
Engine/source/console/fileSystemFunctions.cpp | 150 ++--
Engine/source/console/persistenceManager.cpp | 62 +-
Engine/source/console/scriptFilename.cpp | 22 +-
Engine/source/console/scriptObjects.cpp | 84 +--
Engine/source/console/sim.cpp | 22 +-
Engine/source/console/simDictionary.cpp | 8 +-
Engine/source/console/simDictionary.h | 2 +-
Engine/source/console/simEvents.cpp | 8 +-
Engine/source/console/simManager.cpp | 10 +-
Engine/source/console/simObject.cpp | 20 +-
Engine/source/console/simObject.h | 2 +-
Engine/source/console/simObjectMemento.cpp | 46 +-
Engine/source/console/simObjectMemento.h | 2 +-
Engine/source/console/simPersistSet.cpp | 14 +-
Engine/source/console/simSerialize.cpp | 14 +-
Engine/source/console/stringStack.cpp | 2 +-
Engine/source/console/telnetConsole.cpp | 12 +-
Engine/source/console/telnetDebugger.cpp | 30 +-
Engine/source/console/typeValidators.cpp | 56 +-
Engine/source/environment/river.cpp | 228 +++----
Engine/source/gfx/gl/gfxGLStateBlock.cpp | 32 +-
Engine/source/gfx/video/videoCapture.cpp | 2 +-
.../source/gui/buttons/guiIconButtonCtrl.cpp | 32 +-
.../gui/buttons/guiToggleButtonCtrl.cpp | 2 +-
Engine/source/gui/containers/guiFormCtrl.cpp | 2 +-
Engine/source/gui/containers/guiPaneCtrl.cpp | 16 +-
.../source/gui/containers/guiRolloutCtrl.cpp | 14 +-
.../source/gui/containers/guiWindowCtrl.cpp | 16 +-
Engine/source/gui/controls/guiListBoxCtrl.cpp | 134 ++--
Engine/source/gui/controls/guiMLTextCtrl.cpp | 52 +-
Engine/source/gui/controls/guiPopUpCtrl.cpp | 162 ++---
Engine/source/gui/controls/guiPopUpCtrlEx.cpp | 298 ++++----
Engine/source/gui/controls/guiTextCtrl.cpp | 40 +-
.../source/gui/controls/guiTextEditCtrl.cpp | 136 ++--
.../source/gui/controls/guiTreeViewCtrl.cpp | 364 +++++-----
Engine/source/gui/core/guiCanvas.cpp | 488 ++++++-------
Engine/source/gui/editor/guiEditCtrl.cpp | 24 +-
Engine/source/gui/editor/guiMenuBar.cpp | 248 +++----
.../gui/editor/guiParticleGraphCtrl.cpp | 640 +++++++++---------
.../source/gui/game/guiChunkedBitmapCtrl.cpp | 4 +-
Engine/source/gui/worldEditor/undoActions.cpp | 22 +-
Engine/source/lighting/lightManager.cpp | 14 +-
Engine/source/navigation/navMesh.cpp | 8 +-
Engine/source/platform/menus/popupMenu.cpp | 18 +-
Engine/source/platform/profiler.cpp | 44 +-
Engine/source/platformMac/macFileIO.mm | 2 +-
.../renderInstance/renderPrePassMgr.cpp | 2 +-
Engine/source/scene/sceneContainer.cpp | 6 +-
Engine/source/sim/actionMap.cpp | 582 ++++++++--------
50 files changed, 2111 insertions(+), 2111 deletions(-)
diff --git a/Engine/source/console/fieldBrushObject.cpp b/Engine/source/console/fieldBrushObject.cpp
index d0eaf541c..484178dec 100644
--- a/Engine/source/console/fieldBrushObject.cpp
+++ b/Engine/source/console/fieldBrushObject.cpp
@@ -109,15 +109,15 @@ void FieldBrushObject::destroyFields()
static char replacebuf[1024];
static char* suppressSpaces(const char* in_pname)
{
- U32 i = 0;
- char chr;
- do
- {
- chr = in_pname[i];
- replacebuf[i++] = (chr != 32) ? chr : '_';
- } while(chr);
+ U32 i = 0;
+ char chr;
+ do
+ {
+ chr = in_pname[i];
+ replacebuf[i++] = (chr != 32) ? chr : '_';
+ } while(chr);
- return replacebuf;
+ return replacebuf;
}
//-----------------------------------------------------------------------------
@@ -125,7 +125,7 @@ static char* suppressSpaces(const char* in_pname)
//-----------------------------------------------------------------------------
DefineConsoleMethod(FieldBrushObject, queryGroups, const char*, (const char* simObjName), , "(simObject) Query available static-field groups for selected object./\n"
"@param simObject Object to query static-field groups on.\n"
- "@return Space-seperated static-field group list.")
+ "@return Space-seperated static-field group list.")
{
// Fetch selected object.
SimObject* pSimObject = dynamic_cast( Sim::findObject( simObjName ) );
@@ -194,7 +194,7 @@ DefineConsoleMethod(FieldBrushObject, queryGroups, const char*, (const char* sim
DefineConsoleMethod(FieldBrushObject, queryFields, const char*, (const char* simObjName, const char* groupList), (""), "(simObject, [groupList]) Query available static-fields for selected object./\n"
"@param simObject Object to query static-fields on.\n"
"@param groupList groups to filter static-fields against.\n"
- "@return Space-seperated static-field list.")
+ "@return Space-seperated static-field list.")
{
// Fetch selected object.
SimObject* pSimObject = dynamic_cast( Sim::findObject( simObjName ) );
@@ -369,7 +369,7 @@ DefineConsoleMethod(FieldBrushObject, queryFields, const char*, (const char* sim
DefineConsoleMethod(FieldBrushObject, copyFields, void, (const char* simObjName, const char* pFieldList), (""), "(simObject, [fieldList]) Copy selected static-fields for selected object./\n"
"@param simObject Object to copy static-fields from.\n"
"@param fieldList fields to filter static-fields against.\n"
- "@return No return value.")
+ "@return No return value.")
{
// Fetch selected object.
SimObject* pSimObject = dynamic_cast( Sim::findObject( simObjName ) );
@@ -502,7 +502,7 @@ void FieldBrushObject::copyFields( SimObject* pSimObject, const char* fieldList
//-----------------------------------------------------------------------------
DefineConsoleMethod(FieldBrushObject, pasteFields, void, (const char* simObjName), , "(simObject) Paste copied static-fields to selected object./\n"
"@param simObject Object to paste static-fields to.\n"
- "@return No return value.")
+ "@return No return value.")
{
// Fetch selected object.
SimObject* pSimObject = dynamic_cast( Sim::findObject( simObjName ) );
diff --git a/Engine/source/console/fileSystemFunctions.cpp b/Engine/source/console/fileSystemFunctions.cpp
index d5ee048ca..d8531ff7c 100644
--- a/Engine/source/console/fileSystemFunctions.cpp
+++ b/Engine/source/console/fileSystemFunctions.cpp
@@ -210,7 +210,7 @@ DefineEngineFunction( findNextFile, String, ( const char* pattern ), ( "" ),
//-----------------------------------------------------------------------------
DefineEngineFunction( getFileCount, S32, ( const char* pattern, bool recurse ), ( "", true ),
- "@brief Returns the number of files in the directory tree that match the given patterns\n\n"
+ "@brief Returns the number of files in the directory tree that match the given patterns\n\n"
"This function differs from getFileCountMultiExpr() in that it supports a single search "
"pattern being passed in.\n\n"
@@ -246,7 +246,7 @@ DefineEngineFunction( getFileCount, S32, ( const char* pattern, bool recurse ),
//-----------------------------------------------------------------------------
DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool recurse ), ( "", true),
- "@brief Returns the first file in the directory system matching the given patterns.\n\n"
+ "@brief Returns the first file in the directory system matching the given patterns.\n\n"
"Use the corresponding findNextFileMultiExpr() to step through "
"the results. If you're only interested in the number of files returned by the "
@@ -259,10 +259,10 @@ DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool
"call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders "
"a previous search invalid.\n\n"
- "@param pattern The path and file name pattern to match against, such as *.cs. Separate "
+ "@param pattern The path and file name pattern to match against, such as *.cs. Separate "
"multiple patterns with TABs. For example: \"*.cs\" TAB \"*.dso\"\n"
- "@param recurse If true, the search will exhaustively recurse into subdirectories "
- "of the given path and match the given filename patterns.\n"
+ "@param recurse If true, the search will exhaustively recurse into subdirectories "
+ "of the given path and match the given filename patterns.\n"
"@return String of the first matching file path, or an empty string if no matching "
"files were found.\n\n"
@@ -280,7 +280,7 @@ DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool
"@see findNextFileMultiExpr()"
"@see getFileCountMultiExpr()"
"@see findFirstFile()"
- "@ingroup FileSearches")
+ "@ingroup FileSearches")
{
S32 numResults = buildFileList(pattern, recurse, true);
@@ -302,7 +302,7 @@ DefineEngineFunction(findFirstFileMultiExpr, String, ( const char* pattern, bool
DefineEngineFunction(findNextFileMultiExpr, String, ( const char* pattern ), (""),
"@brief Returns the next file matching a search begun in findFirstFileMultiExpr().\n\n"
- "@param pattern The path and file name pattern to match against. This is optional "
+ "@param pattern The path and file name pattern to match against. This is optional "
"and may be left out as it is not used by the code. It is here for legacy reasons.\n"
"@return String of the next matching file path, or an empty string if no matching "
"files were found.\n\n"
@@ -319,7 +319,7 @@ DefineEngineFunction(findNextFileMultiExpr, String, ( const char* pattern ), (""
"@endtsexample\n\n"
"@see findFirstFileMultiExpr()"
- "@ingroup FileSearches")
+ "@ingroup FileSearches")
{
if ( sgFindFilesPos + 1 > sgFindFilesResults.size() )
return String();
@@ -328,16 +328,16 @@ DefineEngineFunction(findNextFileMultiExpr, String, ( const char* pattern ), (""
}
DefineEngineFunction(getFileCountMultiExpr, S32, ( const char* pattern, bool recurse ), ( "", true),
- "@brief Returns the number of files in the directory tree that match the given patterns\n\n"
+ "@brief Returns the number of files in the directory tree that match the given patterns\n\n"
"If you're interested in a list of files that match the given patterns and not just "
"the number of files, use findFirstFileMultiExpr() and findNextFileMultiExpr().\n\n"
- "@param pattern The path and file name pattern to match against, such as *.cs. Separate "
+ "@param pattern The path and file name pattern to match against, such as *.cs. Separate "
"multiple patterns with TABs. For example: \"*.cs\" TAB \"*.dso\"\n"
- "@param recurse If true, the search will exhaustively recurse into subdirectories "
- "of the given path and match the given filename pattern.\n"
- "@return Number of files located using the patterns\n\n"
+ "@param recurse If true, the search will exhaustively recurse into subdirectories "
+ "of the given path and match the given filename pattern.\n"
+ "@return Number of files located using the patterns\n\n"
"@tsexample\n"
"// Count all DTS or Collada models\n"
@@ -347,7 +347,7 @@ DefineEngineFunction(getFileCountMultiExpr, S32, ( const char* pattern, bool rec
"@see findFirstFileMultiExpr()"
"@see findNextFileMultiExpr()"
- "@ingroup FileSearches")
+ "@ingroup FileSearches")
{
S32 numResults = buildFileList(pattern, recurse, true);
@@ -399,14 +399,14 @@ DefineEngineFunction(isFile, bool, ( const char* fileName ),,
}
DefineEngineFunction( IsDirectory, bool, ( const char* directory ),,
- "@brief Determines if a specified directory exists or not\n\n"
+ "@brief Determines if a specified directory exists or not\n\n"
- "@param directory String containing path in the form of \"foo/bar\"\n"
+ "@param directory String containing path in the form of \"foo/bar\"\n"
"@return Returns true if the directory was found.\n"
- "@note Do not include a trailing slash '/'.\n"
+ "@note Do not include a trailing slash '/'.\n"
- "@ingroup FileSystem")
+ "@ingroup FileSystem")
{
String dir(Torque::Path::CleanSeparators(directory));
Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), dir.c_str());
@@ -416,12 +416,12 @@ DefineEngineFunction( IsDirectory, bool, ( const char* directory ),,
}
DefineEngineFunction(isWriteableFileName, bool, ( const char* fileName ),,
- "@brief Determines if a file name can be written to using File I/O\n\n"
+ "@brief Determines if a file name can be written to using File I/O\n\n"
- "@param fileName Name and path of file to check\n"
- "@return Returns true if the file can be written to.\n"
+ "@param fileName Name and path of file to check\n"
+ "@return Returns true if the file can be written to.\n"
- "@ingroup FileSystem")
+ "@ingroup FileSystem")
{
String filename(Torque::Path::CleanSeparators(fileName));
Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), filename.c_str());
@@ -434,32 +434,32 @@ DefineEngineFunction(isWriteableFileName, bool, ( const char* fileName ),,
}
DefineEngineFunction(startFileChangeNotifications, void, (),,
- "@brief Start watching resources for file changes\n\n"
+ "@brief Start watching resources for file changes\n\n"
"Typically this is called during initializeCore().\n\n"
"@see stopFileChangeNotifications()\n"
- "@ingroup FileSystem")
+ "@ingroup FileSystem")
{
Torque::FS::StartFileChangeNotifications();
}
DefineEngineFunction(stopFileChangeNotifications, void, (),,
- "@brief Stop watching resources for file changes\n\n"
+ "@brief Stop watching resources for file changes\n\n"
"Typically this is called during shutdownCore().\n\n"
"@see startFileChangeNotifications()\n"
- "@ingroup FileSystem")
+ "@ingroup FileSystem")
{
Torque::FS::StopFileChangeNotifications();
}
DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ), ( "", 0 ),
- "@brief Gathers a list of directories starting at the given path.\n\n"
+ "@brief Gathers a list of directories starting at the given path.\n\n"
- "@param path String containing the path of the directory\n"
- "@param depth Depth of search, as in how many subdirectories to parse through\n"
- "@return Tab delimited string containing list of directories found during search, \"\" if no files were found\n"
+ "@param path String containing the path of the directory\n"
+ "@param depth Depth of search, as in how many subdirectories to parse through\n"
+ "@return Tab delimited string containing list of directories found during search, \"\" if no files were found\n"
- "@ingroup FileSystem")
+ "@ingroup FileSystem")
{
// Grab the full path.
char fullpath[1024];
@@ -508,23 +508,23 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ),
}
DefineEngineFunction(fileSize, S32, ( const char* fileName ),,
- "@brief Determines the size of a file on disk\n\n"
+ "@brief Determines the size of a file on disk\n\n"
- "@param fileName Name and path of the file to check\n"
- "@return Returns filesize in bytes, or -1 if no file\n"
+ "@param fileName Name and path of the file to check\n"
+ "@return Returns filesize in bytes, or -1 if no file\n"
- "@ingroup FileSystem")
+ "@ingroup FileSystem")
{
Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), fileName);
return Platform::getFileSize( sgScriptFilenameBuffer );
}
DefineEngineFunction( fileModifiedTime, String, ( const char* fileName ),,
- "@brief Returns a platform specific formatted string with the last modified time for the file.\n\n"
+ "@brief Returns a platform specific formatted string with the last modified time for the file.\n\n"
- "@param fileName Name and path of file to check\n"
- "@return Formatted string (OS specific) containing modified time, \"9/3/2010 12:33:47 PM\" for example\n"
- "@ingroup FileSystem")
+ "@param fileName Name and path of file to check\n"
+ "@return Formatted string (OS specific) containing modified time, \"9/3/2010 12:33:47 PM\" for example\n"
+ "@ingroup FileSystem")
{
Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), fileName);
@@ -566,12 +566,12 @@ DefineEngineFunction( fileCreatedTime, String, ( const char* fileName ),,
}
DefineEngineFunction(fileDelete, bool, ( const char* path ),,
- "@brief Delete a file from the hard drive\n\n"
+ "@brief Delete a file from the hard drive\n\n"
- "@param path Name and path of the file to delete\n"
- "@note THERE IS NO RECOVERY FROM THIS. Deleted file is gone for good.\n"
- "@return True if file was successfully deleted\n"
- "@ingroup FileSystem")
+ "@param path Name and path of the file to delete\n"
+ "@note THERE IS NO RECOVERY FROM THIS. Deleted file is gone for good.\n"
+ "@return True if file was successfully deleted\n"
+ "@ingroup FileSystem")
{
static char fileName[1024];
static char sandboxFileName[1024];
@@ -586,11 +586,11 @@ DefineEngineFunction(fileDelete, bool, ( const char* path ),,
//----------------------------------------------------------------
DefineEngineFunction(fileExt, String, ( const char* fileName ),,
- "@brief Get the extension of a file\n\n"
+ "@brief Get the extension of a file\n\n"
- "@param fileName Name and path of file\n"
- "@return String containing the extension, such as \".exe\" or \".cs\"\n"
- "@ingroup FileSystem")
+ "@param fileName Name and path of file\n"
+ "@return String containing the extension, such as \".exe\" or \".cs\"\n"
+ "@ingroup FileSystem")
{
const char *ret = dStrrchr(fileName, '.');
if(ret)
@@ -626,11 +626,11 @@ DefineEngineFunction(fileBase, String, ( const char* fileName ),,
}
DefineEngineFunction(fileName, String, ( const char* fileName ),,
- "@brief Get only the file name of a path and file name string (removes path)\n\n"
+ "@brief Get only the file name of a path and file name string (removes path)\n\n"
- "@param fileName Name and path of file to check\n"
- "@return String containing the file name, minus the path\n"
- "@ingroup FileSystem")
+ "@param fileName Name and path of file to check\n"
+ "@return String containing the file name, minus the path\n"
+ "@ingroup FileSystem")
{
S32 pathLen = dStrlen( fileName );
FrameTemp szPathCopy( pathLen + 1);
@@ -649,11 +649,11 @@ DefineEngineFunction(fileName, String, ( const char* fileName ),,
}
DefineEngineFunction(filePath, String, ( const char* fileName ),,
- "@brief Get the path of a file (removes name and extension)\n\n"
+ "@brief Get the path of a file (removes name and extension)\n\n"
- "@param fileName Name and path of file to check\n"
- "@return String containing the path, minus name and extension\n"
- "@ingroup FileSystem")
+ "@param fileName Name and path of file to check\n"
+ "@return String containing the path, minus name and extension\n"
+ "@ingroup FileSystem")
{
S32 pathLen = dStrlen( fileName );
FrameTemp szPathCopy( pathLen + 1);
@@ -672,10 +672,10 @@ DefineEngineFunction(filePath, String, ( const char* fileName ),,
}
DefineEngineFunction(getWorkingDirectory, String, (),,
- "@brief Reports the current directory\n\n"
+ "@brief Reports the current directory\n\n"
- "@return String containing full file path of working directory\n"
- "@ingroup FileSystem")
+ "@return String containing full file path of working directory\n"
+ "@ingroup FileSystem")
{
return Platform::getCurrentDirectory();
}
@@ -687,13 +687,13 @@ DefineEngineFunction(getWorkingDirectory, String, (),,
// are not currently built with TORQUE_TOOLS defined.
DefineEngineFunction(makeFullPath, String, ( const char* path, const char* cwd ), ( "", ""),
- "@brief Converts a relative file path to a full path\n\n"
+ "@brief Converts a relative file path to a full path\n\n"
- "For example, \"./console.log\" becomes \"C:/Torque/t3d/examples/FPS Example/game/console.log\"\n"
- "@param path Name of file or path to check\n"
+ "For example, \"./console.log\" becomes \"C:/Torque/t3d/examples/FPS Example/game/console.log\"\n"
+ "@param path Name of file or path to check\n"
"@param cwd Optional current working directory from which to build the full path.\n"
- "@return String containing non-relative directory of path\n"
- "@ingroup FileSystem")
+ "@return String containing non-relative directory of path\n"
+ "@ingroup FileSystem")
{
static const U32 bufSize = 512;
char *buf = Con::getReturnBuffer(bufSize);
@@ -702,25 +702,25 @@ DefineEngineFunction(makeFullPath, String, ( const char* path, const char* cwd )
}
DefineEngineFunction(makeRelativePath, String, ( const char* path, const char* to ), ( "", ""),
- "@brief Turns a full or local path to a relative one\n\n"
+ "@brief Turns a full or local path to a relative one\n\n"
"For example, \"./game/art\" becomes \"game/art\"\n"
"@param path Full path (may include a file) to convert\n"
"@param to Optional base path used for the conversion. If not supplied the current "
"working directory is used.\n"
- "@returns String containing relative path\n"
- "@ingroup FileSystem")
+ "@returns String containing relative path\n"
+ "@ingroup FileSystem")
{
return Platform::makeRelativePathName( path, dStrlen(to) > 1 ? to : NULL );
}
DefineEngineFunction(pathConcat, String, ( const char* path, const char* file), ( "", ""),
- "@brief Combines two separate strings containing a file path and file name together into a single string\n\n"
+ "@brief Combines two separate strings containing a file path and file name together into a single string\n\n"
- "@param path String containing file path\n"
- "@param file String containing file name\n"
- "@return String containing concatenated file name and path\n"
- "@ingroup FileSystem")
+ "@param path String containing file path\n"
+ "@param file String containing file name\n"
+ "@return String containing concatenated file name and path\n"
+ "@ingroup FileSystem")
{
static const U32 bufSize = 1024;
char *buf = Con::getReturnBuffer(bufSize);
@@ -731,10 +731,10 @@ DefineEngineFunction(pathConcat, String, ( const char* path, const char* file),
//-----------------------------------------------------------------------------
DefineEngineFunction(getExecutableName, String, (),,
- "@brief Gets the name of the game's executable\n\n"
+ "@brief Gets the name of the game's executable\n\n"
- "@return String containing this game's executable name\n"
- "@ingroup FileSystem")
+ "@return String containing this game's executable name\n"
+ "@ingroup FileSystem")
{
return Platform::getExecutableName();
}
diff --git a/Engine/source/console/persistenceManager.cpp b/Engine/source/console/persistenceManager.cpp
index 322626801..7db907475 100644
--- a/Engine/source/console/persistenceManager.cpp
+++ b/Engine/source/console/persistenceManager.cpp
@@ -34,22 +34,22 @@
IMPLEMENT_CONOBJECT(PersistenceManager);
ConsoleDocClass( PersistenceManager,
- "@brief this class manages updating SimObjects in the file they were "
- "created in non-destructively (mostly aimed at datablocks and materials).\n\n"
+ "@brief this class manages updating SimObjects in the file they were "
+ "created in non-destructively (mostly aimed at datablocks and materials).\n\n"
- "Basic scripting interface:\n\n"
- " - Creation: new PersistenceManager(FooManager);\n"
- " - Flag objects as dirty: FooManager.setDirty(
There are different solution files for the various
- versions of the IDE. Please use the appropiate version
+ versions of the IDE. Please use the appropriate version
2008, 2010, 2012 or 2013.
@@ -101,7 +101,7 @@
files to project")
Instead of adding the files to your project it is more
- desireable to add them to the linker options: Project|Properties|Linker|Command
+ desirable to add them to the linker options: Project|Properties|Linker|Command
Line and type the names of the libraries to link with in the "Additional
Options:" box. Note: This must be done for each build
configuration (e.g. Release,Debug).
diff --git a/Engine/lib/sdl/VisualC/clean.sh b/Engine/lib/sdl/VisualC/clean.sh
deleted file mode 100644
index fd16f9a12..000000000
--- a/Engine/lib/sdl/VisualC/clean.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete
-find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -delete
-find . -depth -type d \( -name Win32 -o -name x64 \) -exec rm -rv {} \;
diff --git a/Engine/lib/sdl/WhatsNew.txt b/Engine/lib/sdl/WhatsNew.txt
index 9b7139f5d..1979ac2b3 100644
--- a/Engine/lib/sdl/WhatsNew.txt
+++ b/Engine/lib/sdl/WhatsNew.txt
@@ -1,6 +1,69 @@
This is a list of major changes in SDL's version history.
+---------------------------------------------------------------------------
+2.0.5:
+---------------------------------------------------------------------------
+
+General:
+* Implemented audio capture support for some platforms
+* Added SDL_DequeueAudio() to retrieve audio when buffer queuing is turned on for audio capture
+* Added events for dragging and dropping text
+* Added events for dragging and dropping multiple items
+* By default the click raising a window will not be delivered to the SDL application. You can set the hint SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH to "1" to allow that click through to the window.
+* Saving a surface with an alpha channel as a BMP will use a newer BMP format that supports alpha information. You can set the hint SDL_HINT_BMP_SAVE_LEGACY_FORMAT to "1" to use the old format.
+* Added SDL_GetHintBoolean() to get the boolean value of a hint
+* Added SDL_RenderSetIntegerScale() to set whether to smoothly scale or use integral multiples of the viewport size when scaling the rendering output
+* Added SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() to create an SDL surface with a specific pixel format
+* Added SDL_GetDisplayUsableBounds() which returns the area usable for windows. For example, on Mac OS X, this subtracts the area occupied by the menu bar and dock.
+* Added SDL_GetWindowBordersSize() which returns the size of the window's borders around the client area
+* Added a window event SDL_WINDOWEVENT_HIT_TEST when a window had a hit test that wasn't SDL_HITTEST_NORMAL (e.g. in the title bar or window frame)
+* Added SDL_SetWindowResizable() to change whether a window is resizable
+* Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity() to affect the window transparency
+* Added SDL_SetWindowModalFor() to set a window as modal for another window
+* Added support for AUDIO_U16LSB and AUDIO_U16MSB to SDL_MixAudioFormat()
+* Fixed flipped images when reading back from target textures when using the OpenGL renderer
+* Fixed texture color modulation with SDL_BLENDMODE_NONE when using the OpenGL renderer
+* Fixed bug where the alpha value of colorkeys was ignored when blitting in some cases
+
+Windows:
+* Added a hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING to prevent SDL from raising a debugger exception to name threads. This exception can cause problems with .NET applications when running under a debugger.
+* The hint SDL_HINT_THREAD_STACK_SIZE is now supported on Windows
+* Fixed XBox controller triggers automatically being pulled at startup
+* The first icon from the executable is used as the default window icon at runtime
+* Fixed SDL log messages being printed twice if SDL was built with C library support
+* Reset dead keys when the SDL window loses focus, so dead keys pressed in SDL applications don't affect text input into other applications.
+
+Mac OS X:
+* Fixed selecting the dummy video driver
+* The caps lock key now generates a pressed event when pressed and a released event when released, instead of a press/release event pair when pressed.
+* Fixed mouse wheel events on Mac OS X 10.12
+* The audio driver has been updated to use AVFoundation for better compatibility with newer versions of Mac OS X
+
+Linux:
+* Added support for the Fcitx IME
+* Added a window event SDL_WINDOWEVENT_TAKE_FOCUS when a window manager asks the SDL window whether it wants to take focus.
+* Refresh rates are now rounded instead of truncated, e.g. 59.94 Hz is rounded up to 60 Hz instead of 59.
+* Added initial support for touchscreens on Raspberry Pi
+
+OpenBSD:
+* SDL_GetBasePath() is now implemented on OpenBSD
+
+iOS:
+* Added support for dynamically loaded objects on iOS 8 and newer
+
+tvOS:
+* Added support for Apple TV
+* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote.
+
+Android:
+* Fixed SDL not resizing window when Android screen resolution changes
+* Corrected the joystick Z axis reporting for the accelerometer
+
+Emscripten (running in a web browser):
+* Many bug fixes and improvements
+
+
---------------------------------------------------------------------------
2.0.4:
---------------------------------------------------------------------------
diff --git a/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist b/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist
index bccaa8afc..da4183466 100644
--- a/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist
+++ b/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist
@@ -11,7 +11,7 @@
CFBundleIconFileCFBundleIdentifier
- org.libsdl.SDL2
+ $(PRODUCT_BUNDLE_IDENTIFIER)CFBundleInfoDictionaryVersion6.0CFBundleName
@@ -19,10 +19,10 @@
CFBundlePackageTypeFMWKCFBundleShortVersionString
- 2.0.4
+ 2.0.5CFBundleSignatureSDLXCFBundleVersion
- 2.0.4
+ 2.0.5
diff --git a/Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj
old mode 100644
new mode 100755
index 9fc2a5019..1f16953cf
--- a/Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -7,15 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
- 007317A20858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
- 007317A30858DECD00B2BC32 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
- 007317A50858DECD00B2BC32 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179E0858DECD00B2BC32 /* CoreAudio.framework */; };
007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
- 007317A90858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
- 007317AA0858DECD00B2BC32 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
007317AB0858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
- 007317AC0858DECD00B2BC32 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179E0858DECD00B2BC32 /* CoreAudio.framework */; };
007317AD0858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
007317C30858E15000B2BC32 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; };
00CFA89D106B4BA100758660 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
@@ -57,14 +51,12 @@
04BD000912E6671800899322 /* SDL_diskaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD8912E6671700899322 /* SDL_diskaudio.h */; };
04BD001012E6671800899322 /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD9412E6671700899322 /* SDL_dummyaudio.c */; };
04BD001112E6671800899322 /* SDL_dummyaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD9512E6671700899322 /* SDL_dummyaudio.h */; };
- 04BD001812E6671800899322 /* SDL_coreaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDA012E6671700899322 /* SDL_coreaudio.c */; };
04BD001912E6671800899322 /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDA112E6671700899322 /* SDL_coreaudio.h */; };
04BD002612E6671800899322 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB412E6671700899322 /* SDL_audio.c */; };
04BD002712E6671800899322 /* SDL_audio_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB512E6671700899322 /* SDL_audio_c.h */; };
04BD002812E6671800899322 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB612E6671700899322 /* SDL_audiocvt.c */; };
04BD002912E6671800899322 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB712E6671700899322 /* SDL_audiodev.c */; };
04BD002A12E6671800899322 /* SDL_audiodev_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB812E6671700899322 /* SDL_audiodev_c.h */; };
- 04BD002B12E6671800899322 /* SDL_audiomem.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB912E6671700899322 /* SDL_audiomem.h */; };
04BD002C12E6671800899322 /* SDL_audiotypecvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDBA12E6671700899322 /* SDL_audiotypecvt.c */; };
04BD002D12E6671800899322 /* SDL_mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDBB12E6671700899322 /* SDL_mixer.c */; };
04BD003412E6671800899322 /* SDL_sysaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDC212E6671700899322 /* SDL_sysaudio.h */; };
@@ -211,14 +203,12 @@
04BD022512E6671800899322 /* SDL_diskaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD8912E6671700899322 /* SDL_diskaudio.h */; };
04BD022C12E6671800899322 /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD9412E6671700899322 /* SDL_dummyaudio.c */; };
04BD022D12E6671800899322 /* SDL_dummyaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD9512E6671700899322 /* SDL_dummyaudio.h */; };
- 04BD023412E6671800899322 /* SDL_coreaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDA012E6671700899322 /* SDL_coreaudio.c */; };
04BD023512E6671800899322 /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDA112E6671700899322 /* SDL_coreaudio.h */; };
04BD024212E6671800899322 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB412E6671700899322 /* SDL_audio.c */; };
04BD024312E6671800899322 /* SDL_audio_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB512E6671700899322 /* SDL_audio_c.h */; };
04BD024412E6671800899322 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB612E6671700899322 /* SDL_audiocvt.c */; };
04BD024512E6671800899322 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB712E6671700899322 /* SDL_audiodev.c */; };
04BD024612E6671800899322 /* SDL_audiodev_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB812E6671700899322 /* SDL_audiodev_c.h */; };
- 04BD024712E6671800899322 /* SDL_audiomem.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB912E6671700899322 /* SDL_audiomem.h */; };
04BD024812E6671800899322 /* SDL_audiotypecvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDBA12E6671700899322 /* SDL_audiotypecvt.c */; };
04BD024912E6671800899322 /* SDL_mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDBB12E6671700899322 /* SDL_mixer.c */; };
04BD025012E6671800899322 /* SDL_sysaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDC212E6671700899322 /* SDL_sysaudio.h */; };
@@ -387,6 +377,10 @@
04F7805D12FB74A200FC43C0 /* SDL_drawline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7804512FB74A200FC43C0 /* SDL_drawline.h */; };
04F7805E12FB74A200FC43C0 /* SDL_drawpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7804612FB74A200FC43C0 /* SDL_drawpoint.c */; };
04F7805F12FB74A200FC43C0 /* SDL_drawpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7804712FB74A200FC43C0 /* SDL_drawpoint.h */; };
+ 562C4AE91D8F496200AF9EBE /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; };
+ 562C4AEA1D8F496300AF9EBE /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; };
+ 562D3C7C1D8F4933003FEEE6 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = FABA34C61D8B5DB100915323 /* SDL_coreaudio.m */; };
+ 562D3C7D1D8F4933003FEEE6 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = FABA34C61D8B5DB100915323 /* SDL_coreaudio.m */; };
566CDE8F148F0AC200C5A9BB /* SDL_dropevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 566CDE8D148F0AC200C5A9BB /* SDL_dropevents_c.h */; };
566CDE90148F0AC200C5A9BB /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */; };
567E2F1C17C44BB2005F1892 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */; };
@@ -406,6 +400,12 @@
56A6702A185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
56A6702B185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
56A6702C185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
+ 56C5237E1D8F4985001F2F30 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; };
+ 56C5237F1D8F4985001F2F30 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; };
+ 56C523801D8F498B001F2F30 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00D0D08310675DD9004B05EF /* CoreFoundation.framework */; };
+ 56C523811D8F498C001F2F30 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00D0D08310675DD9004B05EF /* CoreFoundation.framework */; };
+ A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; };
+ A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; };
A77E6EB4167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; };
A77E6EB5167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; };
AA0AD09D16648D1700CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; };
@@ -563,7 +563,6 @@
DB313F7617554B71006C0E22 /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDA112E6671700899322 /* SDL_coreaudio.h */; };
DB313F7717554B71006C0E22 /* SDL_audio_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB512E6671700899322 /* SDL_audio_c.h */; };
DB313F7817554B71006C0E22 /* SDL_audiodev_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB812E6671700899322 /* SDL_audiodev_c.h */; };
- DB313F7917554B71006C0E22 /* SDL_audiomem.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB912E6671700899322 /* SDL_audiomem.h */; };
DB313F7A17554B71006C0E22 /* SDL_sysaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDC212E6671700899322 /* SDL_sysaudio.h */; };
DB313F7B17554B71006C0E22 /* SDL_wave.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDC412E6671700899322 /* SDL_wave.h */; };
DB313F7C17554B71006C0E22 /* blank_cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDD612E6671700899322 /* blank_cursor.h */; };
@@ -698,7 +697,6 @@
DB313FFF17554B71006C0E22 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD7512E6671700899322 /* SDL_spinlock.c */; };
DB31400017554B71006C0E22 /* SDL_diskaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD8812E6671700899322 /* SDL_diskaudio.c */; };
DB31400117554B71006C0E22 /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD9412E6671700899322 /* SDL_dummyaudio.c */; };
- DB31400217554B71006C0E22 /* SDL_coreaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDA012E6671700899322 /* SDL_coreaudio.c */; };
DB31400317554B71006C0E22 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB412E6671700899322 /* SDL_audio.c */; };
DB31400417554B71006C0E22 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB612E6671700899322 /* SDL_audiocvt.c */; };
DB31400517554B71006C0E22 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB712E6671700899322 /* SDL_audiodev.c */; };
@@ -802,10 +800,7 @@
DB31406817554B71006C0E22 /* SDL_x11xinput2.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628ACF159367F2005138DD /* SDL_x11xinput2.c */; };
DB31406917554B71006C0E22 /* SDL_x11messagebox.c in Sources */ = {isa = PBXBuildFile; fileRef = AA9E4092163BE51E007A2AD0 /* SDL_x11messagebox.c */; };
DB31406A17554B71006C0E22 /* SDL_cocoamessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC38C164063D200AB8930 /* SDL_cocoamessagebox.m */; };
- DB31406C17554B71006C0E22 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
- DB31406D17554B71006C0E22 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
DB31406E17554B71006C0E22 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
- DB31406F17554B71006C0E22 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179E0858DECD00B2BC32 /* CoreAudio.framework */; };
DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; };
DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
@@ -813,6 +808,7 @@
FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; };
FA73671E19A54140004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; };
FA73671F19A54144004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; };
+ FABA34C71D8B5DB100915323 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = FABA34C61D8B5DB100915323 /* SDL_coreaudio.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -826,10 +822,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; };
- 0073179C0858DECD00B2BC32 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; };
0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
- 0073179E0858DECD00B2BC32 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; };
0073179F0858DECD00B2BC32 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; };
007317C10858E15000B2BC32 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; };
00794D3F09D0C461003FC8A1 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = ""; };
@@ -857,14 +850,12 @@
04BDFD8912E6671700899322 /* SDL_diskaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_diskaudio.h; sourceTree = ""; };
04BDFD9412E6671700899322 /* SDL_dummyaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dummyaudio.c; sourceTree = ""; };
04BDFD9512E6671700899322 /* SDL_dummyaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dummyaudio.h; sourceTree = ""; };
- 04BDFDA012E6671700899322 /* SDL_coreaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_coreaudio.c; sourceTree = ""; };
04BDFDA112E6671700899322 /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coreaudio.h; sourceTree = ""; };
04BDFDB412E6671700899322 /* SDL_audio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_audio.c; sourceTree = ""; };
04BDFDB512E6671700899322 /* SDL_audio_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audio_c.h; sourceTree = ""; };
04BDFDB612E6671700899322 /* SDL_audiocvt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_audiocvt.c; sourceTree = ""; };
04BDFDB712E6671700899322 /* SDL_audiodev.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_audiodev.c; sourceTree = ""; };
04BDFDB812E6671700899322 /* SDL_audiodev_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audiodev_c.h; sourceTree = ""; };
- 04BDFDB912E6671700899322 /* SDL_audiomem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_audiomem.h; sourceTree = ""; };
04BDFDBA12E6671700899322 /* SDL_audiotypecvt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_audiotypecvt.c; sourceTree = ""; };
04BDFDBB12E6671700899322 /* SDL_mixer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_mixer.c; sourceTree = ""; };
04BDFDC212E6671700899322 /* SDL_sysaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysaudio.h; sourceTree = ""; };
@@ -1027,6 +1018,8 @@
56A6701E185654B40007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = ""; };
56A6701F185654B40007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = ""; };
56A67020185654B40007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = ""; };
+ A7381E931D8B69C300B177DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+ A7381E951D8B69D600B177DD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = ""; };
AA0F8490178D5ECC00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = ""; };
AA628AC8159367B7005138DD /* SDL_rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rotate.c; sourceTree = ""; };
@@ -1106,6 +1099,7 @@
F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = ""; };
F5A2EF3900C6A39A01000001 /* BUGS.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS.txt; path = ../../BUGS.txt; sourceTree = SOURCE_ROOT; };
FA73671C19A540EF004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; };
+ FABA34C61D8B5DB100915323 /* SDL_coreaudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_coreaudio.m; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -1113,11 +1107,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */,
+ A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */,
FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */,
- 007317A20858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */,
- 007317A30858DECD00B2BC32 /* AudioUnit.framework in Frameworks */,
007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */,
- 007317A50858DECD00B2BC32 /* CoreAudio.framework in Frameworks */,
007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */,
00D0D08410675DD9004B05EF /* CoreFoundation.framework in Frameworks */,
00D0D0D810675E46004B05EF /* Carbon.framework in Frameworks */,
@@ -1129,14 +1122,14 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 56C5237E1D8F4985001F2F30 /* CoreAudio.framework in Frameworks */,
FA73671E19A54140004122E4 /* CoreVideo.framework in Frameworks */,
- 007317A90858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */,
- 007317AA0858DECD00B2BC32 /* AudioUnit.framework in Frameworks */,
007317AB0858DECD00B2BC32 /* Cocoa.framework in Frameworks */,
- 007317AC0858DECD00B2BC32 /* CoreAudio.framework in Frameworks */,
007317AD0858DECD00B2BC32 /* IOKit.framework in Frameworks */,
+ 56C523801D8F498B001F2F30 /* CoreFoundation.framework in Frameworks */,
007317C30858E15000B2BC32 /* Carbon.framework in Frameworks */,
DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */,
+ 562C4AE91D8F496200AF9EBE /* AudioToolbox.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1144,14 +1137,14 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 56C5237F1D8F4985001F2F30 /* CoreAudio.framework in Frameworks */,
FA73671F19A54144004122E4 /* CoreVideo.framework in Frameworks */,
- DB31406C17554B71006C0E22 /* AudioToolbox.framework in Frameworks */,
- DB31406D17554B71006C0E22 /* AudioUnit.framework in Frameworks */,
DB31406E17554B71006C0E22 /* Cocoa.framework in Frameworks */,
- DB31406F17554B71006C0E22 /* CoreAudio.framework in Frameworks */,
DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */,
+ 56C523811D8F498C001F2F30 /* CoreFoundation.framework in Frameworks */,
DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */,
DB31408D17554D3C006C0E22 /* ForceFeedback.framework in Frameworks */,
+ 562C4AEA1D8F496300AF9EBE /* AudioToolbox.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1307,7 +1300,6 @@
04BDFDB612E6671700899322 /* SDL_audiocvt.c */,
04BDFDB712E6671700899322 /* SDL_audiodev.c */,
04BDFDB812E6671700899322 /* SDL_audiodev_c.h */,
- 04BDFDB912E6671700899322 /* SDL_audiomem.h */,
04BDFDBA12E6671700899322 /* SDL_audiotypecvt.c */,
04BDFDBB12E6671700899322 /* SDL_mixer.c */,
04BDFDC212E6671700899322 /* SDL_sysaudio.h */,
@@ -1339,8 +1331,8 @@
04BDFD9F12E6671700899322 /* coreaudio */ = {
isa = PBXGroup;
children = (
- 04BDFDA012E6671700899322 /* SDL_coreaudio.c */,
04BDFDA112E6671700899322 /* SDL_coreaudio.h */,
+ FABA34C61D8B5DB100915323 /* SDL_coreaudio.m */,
);
path = coreaudio;
sourceTree = "";
@@ -1737,13 +1729,12 @@
BEC562FE0761C0E800A33029 /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
+ A7381E931D8B69C300B177DD /* AudioToolbox.framework */,
+ A7381E951D8B69D600B177DD /* CoreAudio.framework */,
FA73671C19A540EF004122E4 /* CoreVideo.framework */,
00D0D08310675DD9004B05EF /* CoreFoundation.framework */,
007317C10858E15000B2BC32 /* Carbon.framework */,
- 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */,
- 0073179C0858DECD00B2BC32 /* AudioUnit.framework */,
0073179D0858DECD00B2BC32 /* Cocoa.framework */,
- 0073179E0858DECD00B2BC32 /* CoreAudio.framework */,
0073179F0858DECD00B2BC32 /* IOKit.framework */,
00CFA89C106B4BA100758660 /* ForceFeedback.framework */,
);
@@ -1840,7 +1831,6 @@
04BD001912E6671800899322 /* SDL_coreaudio.h in Headers */,
04BD002712E6671800899322 /* SDL_audio_c.h in Headers */,
04BD002A12E6671800899322 /* SDL_audiodev_c.h in Headers */,
- 04BD002B12E6671800899322 /* SDL_audiomem.h in Headers */,
04BD003412E6671800899322 /* SDL_sysaudio.h in Headers */,
04BD003612E6671800899322 /* SDL_wave.h in Headers */,
04BD004212E6671800899322 /* blank_cursor.h in Headers */,
@@ -1996,7 +1986,6 @@
04BD024312E6671800899322 /* SDL_audio_c.h in Headers */,
04BD024612E6671800899322 /* SDL_audiodev_c.h in Headers */,
AAC070FD195606770073DCDF /* SDL_opengles2_gl2.h in Headers */,
- 04BD024712E6671800899322 /* SDL_audiomem.h in Headers */,
04BD025012E6671800899322 /* SDL_sysaudio.h in Headers */,
04BD025212E6671800899322 /* SDL_wave.h in Headers */,
04BD025D12E6671800899322 /* blank_cursor.h in Headers */,
@@ -2151,7 +2140,6 @@
DB313F7717554B71006C0E22 /* SDL_audio_c.h in Headers */,
DB313F7817554B71006C0E22 /* SDL_audiodev_c.h in Headers */,
AAC070FE195606770073DCDF /* SDL_opengles2_gl2.h in Headers */,
- DB313F7917554B71006C0E22 /* SDL_audiomem.h in Headers */,
DB313F7A17554B71006C0E22 /* SDL_sysaudio.h in Headers */,
DB313F7B17554B71006C0E22 /* SDL_wave.h in Headers */,
DB313F7C17554B71006C0E22 /* blank_cursor.h in Headers */,
@@ -2323,7 +2311,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0630;
+ LastUpgradeCheck = 0730;
TargetAttributes = {
BECDF5FE0761BA81005FE872 = {
DevelopmentTeam = EH385AYQ6F;
@@ -2404,7 +2392,6 @@
04BDFFFC12E6671800899322 /* SDL_spinlock.c in Sources */,
04BD000812E6671800899322 /* SDL_diskaudio.c in Sources */,
04BD001012E6671800899322 /* SDL_dummyaudio.c in Sources */,
- 04BD001812E6671800899322 /* SDL_coreaudio.c in Sources */,
04BD002612E6671800899322 /* SDL_audio.c in Sources */,
04BD002812E6671800899322 /* SDL_audiocvt.c in Sources */,
04BD002912E6671800899322 /* SDL_audiodev.c in Sources */,
@@ -2440,6 +2427,7 @@
04BD00A812E6671800899322 /* SDL_string.c in Sources */,
04BD00BD12E6671800899322 /* SDL_syscond.c in Sources */,
04BD00BE12E6671800899322 /* SDL_sysmutex.c in Sources */,
+ FABA34C71D8B5DB100915323 /* SDL_coreaudio.m in Sources */,
04BD00C012E6671800899322 /* SDL_syssem.c in Sources */,
04BD00C112E6671800899322 /* SDL_systhread.c in Sources */,
04BD00CA12E6671800899322 /* SDL_thread.c in Sources */,
@@ -2523,7 +2511,6 @@
04BD021812E6671800899322 /* SDL_spinlock.c in Sources */,
04BD022412E6671800899322 /* SDL_diskaudio.c in Sources */,
04BD022C12E6671800899322 /* SDL_dummyaudio.c in Sources */,
- 04BD023412E6671800899322 /* SDL_coreaudio.c in Sources */,
04BD024212E6671800899322 /* SDL_audio.c in Sources */,
04BD024412E6671800899322 /* SDL_audiocvt.c in Sources */,
04BD024512E6671800899322 /* SDL_audiodev.c in Sources */,
@@ -2559,6 +2546,7 @@
04BD02C012E6671800899322 /* SDL_qsort.c in Sources */,
04BD02C112E6671800899322 /* SDL_stdlib.c in Sources */,
04BD02C212E6671800899322 /* SDL_string.c in Sources */,
+ 562D3C7C1D8F4933003FEEE6 /* SDL_coreaudio.m in Sources */,
04BD02D712E6671800899322 /* SDL_syscond.c in Sources */,
04BD02D812E6671800899322 /* SDL_sysmutex.c in Sources */,
04BD02DA12E6671800899322 /* SDL_syssem.c in Sources */,
@@ -2642,7 +2630,6 @@
DB313FFF17554B71006C0E22 /* SDL_spinlock.c in Sources */,
DB31400017554B71006C0E22 /* SDL_diskaudio.c in Sources */,
DB31400117554B71006C0E22 /* SDL_dummyaudio.c in Sources */,
- DB31400217554B71006C0E22 /* SDL_coreaudio.c in Sources */,
DB31400317554B71006C0E22 /* SDL_audio.c in Sources */,
DB31400417554B71006C0E22 /* SDL_audiocvt.c in Sources */,
DB31400517554B71006C0E22 /* SDL_audiodev.c in Sources */,
@@ -2678,6 +2665,7 @@
DB31402417554B71006C0E22 /* SDL_qsort.c in Sources */,
DB31402517554B71006C0E22 /* SDL_stdlib.c in Sources */,
DB31402617554B71006C0E22 /* SDL_string.c in Sources */,
+ 562D3C7D1D8F4933003FEEE6 /* SDL_coreaudio.m in Sources */,
DB31402717554B71006C0E22 /* SDL_syscond.c in Sources */,
DB31402817554B71006C0E22 /* SDL_sysmutex.c in Sources */,
DB31402917554B71006C0E22 /* SDL_syssem.c in Sources */,
@@ -2767,14 +2755,31 @@
00CFA621106A567900758660 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEPLOYMENT_POSTPROCESSING = YES;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
GCC_AUTO_VECTORIZATION = YES;
GCC_ENABLE_SSE3_EXTENSIONS = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.5;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
STRIP_STYLE = "non-global";
};
@@ -2783,15 +2788,17 @@
00CFA622106A567900758660 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
- DYLIB_CURRENT_VERSION = 5.0.0;
+ DYLIB_CURRENT_VERSION = 5.1.0;
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = /usr/X11R6/include;
INFOPLIST_FILE = "Info-Framework.plist";
INSTALL_PATH = "@rpath";
OTHER_LDFLAGS = "-liconv";
+ PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
PRODUCT_NAME = SDL2;
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = framework;
@@ -2827,12 +2834,30 @@
00CFA627106A568900758660 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
GCC_AUTO_VECTORIZATION = YES;
GCC_ENABLE_SSE3_EXTENSIONS = YES;
+ GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.5;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
@@ -2842,15 +2867,17 @@
00CFA628106A568900758660 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_LINK_OBJC_RUNTIME = NO;
COMBINE_HIDPI_IMAGES = YES;
DYLIB_COMPATIBILITY_VERSION = 1.0.0;
- DYLIB_CURRENT_VERSION = 5.0.0;
+ DYLIB_CURRENT_VERSION = 5.1.0;
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = /usr/X11R6/include;
INFOPLIST_FILE = "Info-Framework.plist";
INSTALL_PATH = "@rpath";
OTHER_LDFLAGS = "-liconv";
+ PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2;
PRODUCT_NAME = SDL2;
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = framework;
diff --git a/Engine/lib/sdl/Xcode/SDL/pkg-support/SDL.info b/Engine/lib/sdl/Xcode/SDL/pkg-support/SDL.info
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/Xcode/SDL/pkg-support/resources/ReadMe.txt b/Engine/lib/sdl/Xcode/SDL/pkg-support/resources/ReadMe.txt
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj b/Engine/lib/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
old mode 100644
new mode 100755
index 59cdd631b..144d24ca5
--- a/Engine/lib/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
+++ b/Engine/lib/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
@@ -3934,7 +3934,7 @@
);
GCC_OPTIMIZATION_LEVEL = 0;
HEADER_SEARCH_PATHS = ../../include;
- MACOSX_DEPLOYMENT_TARGET = 10.5;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
};
name = Debug;
};
@@ -4060,7 +4060,7 @@
);
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
HEADER_SEARCH_PATHS = ../../include;
- MACOSX_DEPLOYMENT_TARGET = 10.5;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
};
name = Release;
};
diff --git a/Engine/lib/sdl/autogen.sh b/Engine/lib/sdl/autogen.sh
old mode 100644
new mode 100755
index 649d7b31e..3e958e195
--- a/Engine/lib/sdl/autogen.sh
+++ b/Engine/lib/sdl/autogen.sh
@@ -3,6 +3,10 @@
echo "Generating build information using autoconf"
echo "This may take a while ..."
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+pushd $srcdir
+
# Regenerate configuration files
cat acinclude/* >aclocal.m4
found=false
@@ -15,5 +19,7 @@ if test x$found = xfalse; then
fi
(cd test; sh autogen.sh)
+popd
+
# Run configure for this platform
echo "Now you are ready to run ./configure"
diff --git a/Engine/lib/sdl/build-scripts/androidbuild.sh b/Engine/lib/sdl/build-scripts/androidbuild.sh
old mode 100644
new mode 100755
index 8ca3c916d..fb48e2e5b
--- a/Engine/lib/sdl/build-scripts/androidbuild.sh
+++ b/Engine/lib/sdl/build-scripts/androidbuild.sh
@@ -87,8 +87,8 @@ else
fi
cp -r $SDLPATH/Android.mk $BUILDPATH/jni/SDL
-sed -i "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/jni/src/Android.mk
-sed -i "s|org\.libsdl\.app|$APP|g" $BUILDPATH/AndroidManifest.xml
+sed -i -e "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/jni/src/Android.mk
+sed -i -e "s|org\.libsdl\.app|$APP|g" $BUILDPATH/AndroidManifest.xml
# Copy user sources
for src in "${SOURCES[@]}"
@@ -105,8 +105,8 @@ do
done
ACTIVITY="${folder}Activity"
-sed -i "s|SDLActivity|$ACTIVITY|g" $BUILDPATH/AndroidManifest.xml
-sed -i "s|SDLActivity|$APP|g" $BUILDPATH/build.xml
+sed -i -e "s|SDLActivity|$ACTIVITY|g" $BUILDPATH/AndroidManifest.xml
+sed -i -e "s|SDLActivity|$APP|g" $BUILDPATH/build.xml
# Fill in a default Activity
echo "package $APP;" > "$ACTIVITY.java"
diff --git a/Engine/lib/sdl/build-scripts/checker-buildbot.sh b/Engine/lib/sdl/build-scripts/checker-buildbot.sh
old mode 100644
new mode 100755
index 682e7fbbb..eb014311a
--- a/Engine/lib/sdl/build-scripts/checker-buildbot.sh
+++ b/Engine/lib/sdl/build-scripts/checker-buildbot.sh
@@ -61,13 +61,13 @@ mkdir checker-buildbot
cd checker-buildbot
# You might want to do this for CMake-backed builds instead...
-PATH="$CHECKERDIR:$PATH" scan-build -o analysis cmake -DCMAKE_BUILD_TYPE=Debug ..
+PATH="$CHECKERDIR:$PATH" scan-build -o analysis cmake -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled ..
# ...or run configure without the scan-build wrapper...
-#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0" ../configure
+#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0" ../configure --enable-assertions=enabled
# ...but this works for our buildbots just fine (EXCEPT ON LATEST MAC OS X).
-#CFLAGS="-O0" PATH="$CHECKERDIR:$PATH" scan-build -o analysis ../configure
+#CFLAGS="-O0" PATH="$CHECKERDIR:$PATH" scan-build -o analysis ../configure --enable-assertions=enabled
rm -rf analysis
PATH="$CHECKERDIR:$PATH" scan-build -o analysis $MAKE
diff --git a/Engine/lib/sdl/build-scripts/emscripten-buildbot.sh b/Engine/lib/sdl/build-scripts/emscripten-buildbot.sh
old mode 100644
new mode 100755
index db5fb8184..42eebb697
--- a/Engine/lib/sdl/build-scripts/emscripten-buildbot.sh
+++ b/Engine/lib/sdl/build-scripts/emscripten-buildbot.sh
@@ -51,13 +51,14 @@ mkdir buildbot
pushd buildbot
echo "Configuring..."
-emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed"
+emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
echo "Building..."
-emmake $MAKE
+emmake $MAKE || exit $?
echo "Moving things around..."
-emmake $MAKE install
+emmake $MAKE install || exit $?
+
# Fix up a few things to a real install path
perl -w -pi -e "s#$PWD/emscripten-sdl2-installed#/usr/local#g;" ./emscripten-sdl2-installed/lib/libSDL2.la ./emscripten-sdl2-installed/lib/pkgconfig/sdl2.pc ./emscripten-sdl2-installed/bin/sdl2-config
mkdir -p ./usr
diff --git a/Engine/lib/sdl/build-scripts/g++-fat.sh b/Engine/lib/sdl/build-scripts/g++-fat.sh
old mode 100644
new mode 100755
index 29b04302f..0dbe99039
--- a/Engine/lib/sdl/build-scripts/g++-fat.sh
+++ b/Engine/lib/sdl/build-scripts/g++-fat.sh
@@ -6,11 +6,11 @@
DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
-# Intel 32-bit compiler flags (10.5 runtime compatibility)
-GCC_COMPILE_X86="g++ -arch i386 -mmacosx-version-min=10.5 \
+# Intel 32-bit compiler flags (10.6 runtime compatibility)
+GCC_COMPILE_X86="g++ -arch i386 -mmacosx-version-min=10.6 \
-I/usr/local/include"
-GCC_LINK_X86="-mmacosx-version-min=10.5"
+GCC_LINK_X86="-mmacosx-version-min=10.6"
# Intel 64-bit compiler flags (10.6 runtime compatibility)
GCC_COMPILE_X64="g++ -arch x86_64 -mmacosx-version-min=10.6 \
diff --git a/Engine/lib/sdl/build-scripts/gcc-fat.sh b/Engine/lib/sdl/build-scripts/gcc-fat.sh
old mode 100644
new mode 100755
index e556c1dd1..65f759d4a
--- a/Engine/lib/sdl/build-scripts/gcc-fat.sh
+++ b/Engine/lib/sdl/build-scripts/gcc-fat.sh
@@ -6,15 +6,15 @@
DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
-# Intel 32-bit compiler flags (10.5 runtime compatibility)
-GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.5 \
+# Intel 32-bit compiler flags (10.6 runtime compatibility)
+GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.6 \
-I/usr/local/include"
-GCC_LINK_X86="-mmacosx-version-min=10.5"
+GCC_LINK_X86="-mmacosx-version-min=10.6"
# Intel 64-bit compiler flags (10.6 runtime compatibility)
GCC_COMPILE_X64="gcc -arch x86_64 -mmacosx-version-min=10.6 \
--DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
+-DMAC_OS_X_VERSION_MIN_REQUIRED=1060 \
-I/usr/local/include"
GCC_LINK_X64="-mmacosx-version-min=10.6"
diff --git a/Engine/lib/sdl/build-scripts/install-sh b/Engine/lib/sdl/build-scripts/install-sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/iosbuild.sh b/Engine/lib/sdl/build-scripts/iosbuild.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/ltmain.sh b/Engine/lib/sdl/build-scripts/ltmain.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/mkinstalldirs b/Engine/lib/sdl/build-scripts/mkinstalldirs
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/nacl-buildbot.sh b/Engine/lib/sdl/build-scripts/nacl-buildbot.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/naclbuild.sh b/Engine/lib/sdl/build-scripts/naclbuild.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/raspberrypi-buildbot.sh b/Engine/lib/sdl/build-scripts/raspberrypi-buildbot.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/showrev.sh b/Engine/lib/sdl/build-scripts/showrev.sh
old mode 100644
new mode 100755
index 2a68fe694..517992d9c
--- a/Engine/lib/sdl/build-scripts/showrev.sh
+++ b/Engine/lib/sdl/build-scripts/showrev.sh
@@ -2,6 +2,4 @@
#
# Print the current source revision, if available
-# FIXME: this prints the tip, which isn't useful if you're on a different
-# branch, or just not sync'd to the tip.
-hg tip --template 'hg-{rev}:{node|short}' || (echo "hg-0:baadf00d"; exit 1)
+hg parents --template 'hg-{rev}:{node|short}' || (echo "hg-0:baadf00d"; exit 1)
diff --git a/Engine/lib/sdl/build-scripts/strip_fPIC.sh b/Engine/lib/sdl/build-scripts/strip_fPIC.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/update-copyright.sh b/Engine/lib/sdl/build-scripts/update-copyright.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/build-scripts/updaterev.sh b/Engine/lib/sdl/build-scripts/updaterev.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/cmake/sdlchecks.cmake b/Engine/lib/sdl/cmake/sdlchecks.cmake
index 7ff0985fd..b10078192 100644
--- a/Engine/lib/sdl/cmake/sdlchecks.cmake
+++ b/Engine/lib/sdl/cmake/sdlchecks.cmake
@@ -105,7 +105,9 @@ macro(CheckALSA)
if(ALSA)
CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ASOUNDLIB_H)
if(HAVE_ASOUNDLIB_H)
- CHECK_LIBRARY_EXISTS(asound snd_pcm_open "" HAVE_LIBASOUND)
+ CHECK_LIBRARY_EXISTS(asound snd_pcm_recover "" HAVE_LIBASOUND)
+ endif()
+ if(HAVE_LIBASOUND)
set(HAVE_ALSA TRUE)
file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ALSA_SOURCES})
@@ -537,6 +539,27 @@ macro(CheckMir)
endif()
endmacro()
+macro(WaylandProtocolGen _SCANNER _XML _PROTL)
+ set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
+ set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h")
+
+ add_custom_command(
+ OUTPUT "${_WAYLAND_PROT_H_CODE}"
+ DEPENDS "${_XML}"
+ COMMAND "${_SCANNER}"
+ ARGS client-header "${_XML}" "${_WAYLAND_PROT_H_CODE}"
+ )
+
+ add_custom_command(
+ OUTPUT "${_WAYLAND_PROT_C_CODE}"
+ DEPENDS "${_WAYLAND_PROT_H_CODE}"
+ COMMAND "${_SCANNER}"
+ ARGS code "${_XML}" "${_WAYLAND_PROT_C_CODE}"
+ )
+
+ set(SOURCE_FILES ${SOURCE_FILES} "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
+endmacro()
+
# Requires:
# - EGL
# - PkgCheckModules
@@ -545,7 +568,51 @@ endmacro()
# - HAVE_DLOPEN opt
macro(CheckWayland)
if(VIDEO_WAYLAND)
- pkg_check_modules(WAYLAND wayland-client wayland-cursor wayland-egl egl xkbcommon)
+ pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon)
+
+ # We have to generate some protocol interface code for some various Wayland features.
+ if(WAYLAND_FOUND)
+ execute_process(
+ COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-client
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ RESULT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR_RC
+ OUTPUT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(NOT WAYLAND_CORE_PROTOCOL_DIR_RC EQUAL 0)
+ set(WAYLAND_FOUND FALSE)
+ endif()
+ endif()
+
+ if(WAYLAND_FOUND)
+ execute_process(
+ COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ RESULT_VARIABLE WAYLAND_PROTOCOLS_DIR_RC
+ OUTPUT_VARIABLE WAYLAND_PROTOCOLS_DIR
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(NOT WAYLAND_PROTOCOLS_DIR_RC EQUAL 0)
+ set(WAYLAND_FOUND FALSE)
+ endif()
+ endif()
+
+ if(WAYLAND_FOUND)
+ execute_process(
+ COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ RESULT_VARIABLE WAYLAND_SCANNER_RC
+ OUTPUT_VARIABLE WAYLAND_SCANNER
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(NOT WAYLAND_SCANNER_RC EQUAL 0)
+ set(WAYLAND_FOUND FALSE)
+ endif()
+ endif()
+
if(WAYLAND_FOUND)
link_directories(
${WAYLAND_LIBRARY_DIRS}
@@ -559,6 +626,17 @@ macro(CheckWayland)
file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${WAYLAND_SOURCES})
+ # We have to generate some protocol interface code for some unstable Wayland features.
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
+ include_directories("${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
+
+ WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_CORE_PROTOCOL_DIR}/wayland.xml" "wayland")
+
+ foreach(_PROTL relative-pointer-unstable-v1 pointer-constraints-unstable-v1)
+ string(REGEX REPLACE "\\-unstable\\-.*$" "" PROTSUBDIR ${_PROTL})
+ WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_PROTOCOLS_DIR}/unstable/${PROTSUBDIR}/${_PROTL}.xml" "${_PROTL}")
+ endforeach()
+
if(VIDEO_WAYLAND_QT_TOUCH)
set(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1)
endif()
@@ -679,7 +757,6 @@ macro(CheckOpenGLX11)
set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_OPENGL_GLX 1)
set(SDL_VIDEO_RENDER_OGL 1)
- list(APPEND EXTRA_LIBS GL)
endif()
endif()
endmacro()
@@ -767,7 +844,8 @@ macro(CheckPTHREAD)
endif()
# Run some tests
- set(CMAKE_REQUIRED_FLAGS "${PTHREAD_CFLAGS} ${PTHREAD_LDFLAGS}")
+ set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${PTHREAD_CFLAGS} ${PTHREAD_LDFLAGS}")
if(CMAKE_CROSSCOMPILING)
set(HAVE_PTHREADS 1)
else()
@@ -829,7 +907,7 @@ macro(CheckPTHREAD)
int main(int argc, char** argv) { return 0; }" HAVE_PTHREAD_NP_H)
check_function_exists(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
check_function_exists(pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP)
- set(CMAKE_REQUIRED_FLAGS)
+ set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
set(SOURCE_FILES ${SOURCE_FILES}
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
@@ -883,7 +961,8 @@ macro(CheckUSBHID)
endif()
endif()
- set(CMAKE_REQUIRED_FLAGS "${USB_CFLAGS}")
+ set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${USB_CFLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${USB_LIBS}")
check_c_source_compiles("
#include
@@ -984,7 +1063,7 @@ macro(CheckUSBHID)
set(HAVE_SDL_JOYSTICK TRUE)
set(CMAKE_REQUIRED_LIBRARIES)
- set(CMAKE_REQUIRED_FLAGS)
+ set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
endif()
endmacro()
@@ -998,12 +1077,13 @@ macro(CheckRPI)
listtostr(VIDEO_RPI_INCLUDE_DIRS VIDEO_RPI_INCLUDE_FLAGS "-I")
listtostr(VIDEO_RPI_LIBRARY_DIRS VIDEO_RPI_LIBRARY_FLAGS "-L")
- set(CMAKE_REQUIRED_FLAGS "${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
+ set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${VIDEO_RPI_LIBS}")
check_c_source_compiles("
#include
int main(int argc, char **argv) {}" HAVE_VIDEO_RPI)
- set(CMAKE_REQUIRED_FLAGS)
+ set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES)
if(SDL_VIDEO AND HAVE_VIDEO_RPI)
diff --git a/Engine/lib/sdl/configure b/Engine/lib/sdl/configure
old mode 100644
new mode 100755
index a41f02595..5070f6e6a
--- a/Engine/lib/sdl/configure
+++ b/Engine/lib/sdl/configure
@@ -630,6 +630,7 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
+WAYLAND_SCANNER
EXTRA_LDFLAGS
BUILD_LDFLAGS
EXTRA_CFLAGS
@@ -637,6 +638,8 @@ BUILD_CFLAGS
SDLTEST_OBJECTS
SDLMAIN_OBJECTS
VERSION_OBJECTS
+GEN_OBJECTS
+GEN_HEADERS
OBJECTS
INCLUDE
ac_aux_dir
@@ -846,7 +849,9 @@ enable_video_opengles1
enable_video_opengles2
enable_libudev
enable_dbus
+enable_ime
enable_ibus
+enable_fcitx
enable_input_tslib
enable_pthreads
enable_pthread_sem
@@ -1584,7 +1589,9 @@ Optional Features:
include OpenGL ES 2.0 support [[default=yes]]
--enable-libudev enable libudev support [[default=yes]]
--enable-dbus enable D-Bus support [[default=yes]]
+ --enable-ime enable IME support [[default=yes]]
--enable-ibus enable IBus support [[default=yes]]
+ --enable-fcitx enable fcitx support [[default=yes]]
--enable-input-tslib use the Touchscreen library for input
[[default=yes]]
--enable-pthreads use POSIX threads for multi-threading
@@ -2683,9 +2690,9 @@ orig_CFLAGS="$CFLAGS"
#
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=0
-SDL_MICRO_VERSION=4
-SDL_INTERFACE_AGE=0
-SDL_BINARY_AGE=4
+SDL_MICRO_VERSION=5
+SDL_INTERFACE_AGE=1
+SDL_BINARY_AGE=5
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
@@ -17601,7 +17608,7 @@ LIBS="$ALSA_LIBS $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
$as_echo "$ALSA_LIBS" >&6; }
-min_alsa_version=0.9.0
+min_alsa_version=1.0.11
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libasound headers version >= $min_alsa_version" >&5
$as_echo_n "checking for libasound headers version >= $min_alsa_version... " >&6; }
no_alsa=""
@@ -18650,6 +18657,43 @@ $as_echo "$have_gcc_preferred_stack_boundary" >&6; }
fi
}
+CheckDeclarationAfterStatement()
+{
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -Wdeclaration-after-statement option" >&5
+$as_echo_n "checking for GCC -Wdeclaration-after-statement option... " >&6; }
+ have_gcc_declaration_after_statement=no
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int x = 0;
+
+int
+main ()
+{
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ have_gcc_declaration_after_statement=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_declaration_after_statement" >&5
+$as_echo "$have_gcc_declaration_after_statement" >&6; }
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_declaration_after_statement = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
+ fi
+}
+
CheckWarnAll()
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -Wall option" >&5
@@ -18767,9 +18811,12 @@ $as_echo_n "checking for Wayland support... " >&6; }
if test x$PKG_CONFIG != xno && \
test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then
+ if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+ WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
+ WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
+ WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
video_wayland=yes
fi
fi
@@ -18785,8 +18832,11 @@ $as_echo "#define SDL_VIDEO_DRIVER_WAYLAND 1" >>confdefs.h
$as_echo "#define SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1" >>confdefs.h
fi
+
+ WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1"
+
SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
# Check whether --enable-wayland-shared was given.
if test "${enable_wayland_shared+set}" = set; then :
enableval=$enable_wayland_shared;
@@ -18928,7 +18978,7 @@ int
main ()
{
- MirMotionToolType tool = mir_motion_tool_type_mouse;
+ MirTouchAction actions = mir_touch_actions
;
return 0;
@@ -21604,6 +21654,23 @@ $as_echo "#define HAVE_DBUS_DBUS_H 1" >>confdefs.h
fi
}
+CheckIME()
+{
+ # Check whether --enable-ime was given.
+if test "${enable_ime+set}" = set; then :
+ enableval=$enable_ime;
+else
+ enable_ime=yes
+fi
+
+ if test x$enable_ime = xyes; then
+
+$as_echo "#define SDL_USE_IME 1" >>confdefs.h
+
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
+ fi
+}
+
CheckIBus()
{
# Check whether --enable-ibus was given.
@@ -21677,7 +21744,11 @@ fi
CFLAGS="$save_CFLAGS"
if test x$have_ibus_ibus_h_hdr = xyes; then
- if test x$enable_dbus != xyes; then
+ if test x$enable_ime != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
+$as_echo "$as_me: WARNING: IME support is required for IBus." >&2;}
+ have_ibus_ibus_h_hdr=no
+ elif test x$enable_dbus != xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
$as_echo "$as_me: WARNING: DBus support is required for IBus." >&2;}
have_ibus_ibus_h_hdr=no
@@ -21697,6 +21768,90 @@ $as_echo "#define HAVE_IBUS_IBUS_H 1" >>confdefs.h
fi
}
+CheckFcitx()
+{
+ # Check whether --enable-fcitx was given.
+if test "${enable_fcitx+set}" = set; then :
+ enableval=$enable_fcitx;
+else
+ enable_fcitx=yes
+fi
+
+ if test x$enable_fcitx = xyes; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test x$PKG_CONFIG != xno; then
+ FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
+ CFLAGS="$CFLAGS $FCITX_CFLAGS"
+ ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcitx_frontend_h" = xyes; then :
+ have_fcitx_frontend_h_hdr=yes
+else
+ have_fcitx_frontend_h_hdr=no
+fi
+
+
+ CFLAGS="$save_CFLAGS"
+ if test x$have_fcitx_frontend_h_hdr = xyes; then
+ if test x$enable_ime != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
+$as_echo "$as_me: WARNING: IME support is required for fcitx." >&2;}
+ have_fcitx_frontend_h_hdr=no
+ elif test x$enable_dbus != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
+$as_echo "$as_me: WARNING: DBus support is required for fcitx." >&2;}
+ have_fcitx_frontend_h_hdr=no
+ else
+
+$as_echo "#define HAVE_FCITX_FRONTEND_H 1" >>confdefs.h
+
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
+ fi
+ fi
+ fi
+ fi
+}
+
CheckTslib()
{
# Check whether --enable-input-tslib was given.
@@ -22894,6 +23049,8 @@ fi
}
+CheckWarnAll
+
case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*)
case "$host" in
@@ -22962,6 +23119,7 @@ case "$host" in
*-*-minix*) ARCH=minix ;;
esac
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -22982,7 +23140,9 @@ case "$host" in
CheckWayland
CheckLibUDev
CheckDBus
+ CheckIME
CheckIBus
+ CheckFcitx
case $ARCH in
linux)
CheckInputEvents
@@ -23392,6 +23552,7 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
ARCH=ios
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -23402,7 +23563,7 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
# Set up files for the audio library
if test x$enable_audio = xyes; then
- SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
SUMMARY_audio="${SUMMARY_audio} coreaudio"
have_audio=yes
fi
@@ -23461,6 +23622,7 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -23476,7 +23638,8 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
$as_echo "#define SDL_AUDIO_DRIVER_COREAUDIO 1" >>confdefs.h
- SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox"
SUMMARY_audio="${SUMMARY_audio} coreaudio"
have_audio=yes
fi
@@ -23494,8 +23657,8 @@ $as_echo "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h
$as_echo "#define SDL_HAPTIC_IOKIT 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
- have_haptic=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
+ have_haptic=yes
fi
# Set up files for the power library
if test x$enable_power = xyes; then
@@ -23532,10 +23695,6 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
- # If audio is used, add the AudioUnit framework
- if test x$enable_audio = xyes; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
- fi
;;
*-nacl|*-pnacl)
ARCH=nacl
@@ -23581,6 +23740,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1" >>confdefs.h
fi
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -23630,8 +23790,6 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
;;
esac
-CheckWarnAll
-
# Verify that we have all the platform specific files we need
if test x$have_joystick != xyes; then
@@ -23687,6 +23845,57 @@ if test x$SDLMAIN_SOURCES = x; then
fi
SDLTEST_SOURCES="$srcdir/src/test/*.c"
+if test x$video_wayland = xyes; then
+ WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
+ WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
+ WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
+ sed 's,[^ ]\+,\\$(gen)/&-protocol.c,g'`
+ WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
+ sed 's,[^ ]\+,\\$(gen)/&-client-protocol.h,g'`
+ GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES"
+ GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS"
+
+ WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
+$WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
+ \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
+ \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@"
+
+ WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS="
+$WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
+ \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
+ \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@"
+
+ WAYLAND_CORE_PROTOCOL_OBJECT="
+\$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
+ \$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
+
+ WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+ do echo ; echo \$p | sed\
+ "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
+ \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
+ \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
+
+ WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+ do echo ; echo \$p | sed\
+ "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
+ \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
+ \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
+
+ WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+ do echo ; echo \$p | sed\
+ "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
+
+ WAYLAND_PROTOCOLS_DEPENDS="
+$WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
+$WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
+$WAYLAND_CORE_PROTOCOL_OBJECT
+$WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS
+$WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS
+$WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE
+"
+fi
+
OBJECTS=`echo $SOURCES`
DEPENDS=`echo $SOURCES | tr ' ' '\n'`
for EXT in asm cc m c S; do
@@ -23696,6 +23905,8 @@ for EXT in asm cc m c S; do
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
done
+GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
+
VERSION_OBJECTS=`echo $VERSION_SOURCES`
VERSION_DEPENDS=`echo $VERSION_SOURCES`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
@@ -23722,6 +23933,36 @@ SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\
if test "x$enable_rpath" = "xyes"; then
if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --enable-new-dtags" >&5
+$as_echo_n "checking for linker option --enable-new-dtags... " >&6; }
+ have_enable_new_dtags=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ have_enable_new_dtags=yes
+ SDL_RLD_FLAGS="$SDL_RLD_FLAGS -Wl,--enable-new-dtags"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_enable_new_dtags" >&5
+$as_echo "$have_enable_new_dtags" >&6; }
fi
if test $ARCH = solaris; then
SDL_RLD_FLAGS="-R\${libdir}"
@@ -23767,6 +24008,9 @@ fi
+
+
+
cat >Makefile.rules <<__EOF__
# Build rules for objects
@@ -23778,6 +24022,7 @@ $DEPENDS
$VERSION_DEPENDS
$SDLMAIN_DEPENDS
$SDLTEST_DEPENDS
+$WAYLAND_PROTOCOLS_DEPENDS
__EOF__
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc"
@@ -23810,11 +24055,21 @@ if test x$have_dbus_dbus_h_hdr = xyes; then
else
SUMMARY="${SUMMARY}Using dbus : NO\n"
fi
+if test x$enable_ime = xyes; then
+ SUMMARY="${SUMMARY}Using ime : YES\n"
+else
+ SUMMARY="${SUMMARY}Using ime : NO\n"
+fi
if test x$have_ibus_ibus_h_hdr = xyes; then
SUMMARY="${SUMMARY}Using ibus : YES\n"
else
SUMMARY="${SUMMARY}Using ibus : NO\n"
fi
+if test x$have_fcitx_frontend_h_hdr = xyes; then
+ SUMMARY="${SUMMARY}Using fcitx : YES\n"
+else
+ SUMMARY="${SUMMARY}Using fcitx : NO\n"
+fi
ac_config_commands="$ac_config_commands summary"
diff --git a/Engine/lib/sdl/configure.in b/Engine/lib/sdl/configure.in
index f585d01af..37c57e288 100644
--- a/Engine/lib/sdl/configure.in
+++ b/Engine/lib/sdl/configure.in
@@ -20,9 +20,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
#
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=0
-SDL_MICRO_VERSION=4
-SDL_INTERFACE_AGE=0
-SDL_BINARY_AGE=4
+SDL_MICRO_VERSION=5
+SDL_INTERFACE_AGE=1
+SDL_BINARY_AGE=5
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
AC_SUBST(SDL_MAJOR_VERSION)
@@ -770,7 +770,7 @@ CheckALSA()
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
, enable_alsa=yes)
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
- AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
+ AM_PATH_ALSA(1.0.11, have_alsa=yes, have_alsa=no)
# Restore all flags from before the ALSA detection runs
CFLAGS="$alsa_save_CFLAGS"
LDFLAGS="$alsa_save_LDFLAGS"
@@ -1124,6 +1124,30 @@ CheckStackBoundary()
fi
}
+dnl See if GCC's -Wdeclaration-after-statement is supported.
+dnl This lets us catch things that would fail on a C89 compiler when using
+dnl a modern GCC.
+CheckDeclarationAfterStatement()
+{
+ AC_MSG_CHECKING(for GCC -Wdeclaration-after-statement option)
+ have_gcc_declaration_after_statement=no
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
+ AC_TRY_COMPILE([
+ int x = 0;
+ ],[
+ ],[
+ have_gcc_declaration_after_statement=yes
+ ])
+ AC_MSG_RESULT($have_gcc_declaration_after_statement)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_declaration_after_statement = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -Wdeclaration-after-statement -Werror=declaration-after-statement"
+ fi
+}
+
dnl See if GCC's -Wall is supported.
CheckWarnAll()
{
@@ -1177,9 +1201,12 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
if test x$PKG_CONFIG != xno && \
test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
- if $PKG_CONFIG --exists wayland-client wayland-egl wayland-cursor egl xkbcommon ; then
+ if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+ WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
+ WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
+ WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
video_wayland=yes
fi
fi
@@ -1190,8 +1217,11 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
if test x$enable_video_wayland_qt_touch = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ])
fi
+
+ WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1"
+
SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
- EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
AC_ARG_ENABLE(wayland-shared,
AC_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[default=maybe]]]),
, enable_wayland_shared=maybe)
@@ -1260,12 +1290,12 @@ AC_HELP_STRING([--enable-video-mir], [use Mir video driver [[default=yes]]]),
MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS $MIR_CFLAGS"
-
- dnl This will disable Mir on Ubuntu < 14.04
+
+ dnl This will disable Mir if >= v0.25 is not available
AC_TRY_COMPILE([
#include
],[
- MirMotionToolType tool = mir_motion_tool_type_mouse;
+ MirTouchAction actions = mir_touch_actions
],[
video_mir=yes
])
@@ -2230,6 +2260,18 @@ AC_HELP_STRING([--enable-dbus], [enable D-Bus support [[default=yes]]]),
fi
}
+dnl See if the platform wanna IME support.
+CheckIME()
+{
+ AC_ARG_ENABLE(ime,
+AC_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
+ , enable_ime=yes)
+ if test x$enable_ime = xyes; then
+ AC_DEFINE(SDL_USE_IME, 1, [ ])
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
+ fi
+}
+
dnl See if the platform has libibus IME support.
CheckIBus()
{
@@ -2250,7 +2292,10 @@ AC_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
have_inotify_inotify_h_hdr=no)
CFLAGS="$save_CFLAGS"
if test x$have_ibus_ibus_h_hdr = xyes; then
- if test x$enable_dbus != xyes; then
+ if test x$enable_ime != xyes; then
+ AC_MSG_WARN([IME support is required for IBus.])
+ have_ibus_ibus_h_hdr=no
+ elif test x$enable_dbus != xyes; then
AC_MSG_WARN([DBus support is required for IBus.])
have_ibus_ibus_h_hdr=no
elif test x$have_inotify_inotify_h_hdr != xyes; then
@@ -2266,6 +2311,38 @@ AC_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
fi
}
+dnl See if the platform has fcitx IME support.
+CheckFcitx()
+{
+ AC_ARG_ENABLE(fcitx,
+AC_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
+ , enable_fcitx=yes)
+ if test x$enable_fcitx = xyes; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ if test x$PKG_CONFIG != xno; then
+ FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
+ CFLAGS="$CFLAGS $FCITX_CFLAGS"
+ AC_CHECK_HEADER(fcitx/frontend.h,
+ have_fcitx_frontend_h_hdr=yes,
+ have_fcitx_frontend_h_hdr=no)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_fcitx_frontend_h_hdr = xyes; then
+ if test x$enable_ime != xyes; then
+ AC_MSG_WARN([IME support is required for fcitx.])
+ have_fcitx_frontend_h_hdr=no
+ elif test x$enable_dbus != xyes; then
+ AC_MSG_WARN([DBus support is required for fcitx.])
+ have_fcitx_frontend_h_hdr=no
+ else
+ AC_DEFINE(HAVE_FCITX_FRONTEND_H, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
+ SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
+ fi
+ fi
+ fi
+ fi
+}
+
dnl See if we can use the Touchscreen input library
CheckTslib()
{
@@ -2801,6 +2878,9 @@ AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]
, enable_rpath=yes)
}
+dnl Do this on all platforms, before everything else (other things might want to override it).
+CheckWarnAll
+
dnl Set up the configuration based on the host platform!
case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*)
@@ -2870,6 +2950,7 @@ case "$host" in
*-*-minix*) ARCH=minix ;;
esac
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -2890,7 +2971,9 @@ case "$host" in
CheckWayland
CheckLibUDev
CheckDBus
+ CheckIME
CheckIBus
+ CheckFcitx
case $ARCH in
linux)
CheckInputEvents
@@ -3196,6 +3279,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
ARCH=ios
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -3206,7 +3290,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
# Set up files for the audio library
if test x$enable_audio = xyes; then
- SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
SUMMARY_audio="${SUMMARY_audio} coreaudio"
have_audio=yes
fi
@@ -3265,6 +3349,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -3278,7 +3363,8 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
- SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox"
SUMMARY_audio="${SUMMARY_audio} coreaudio"
have_audio=yes
fi
@@ -3292,8 +3378,8 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
if test x$enable_haptic = xyes; then
AC_DEFINE(SDL_HAPTIC_IOKIT, 1, [ ])
SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
- have_haptic=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
+ have_haptic=yes
fi
# Set up files for the power library
if test x$enable_power = xyes; then
@@ -3324,10 +3410,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
- # If audio is used, add the AudioUnit framework
- if test x$enable_audio = xyes; then
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
- fi
;;
*-nacl|*-pnacl)
ARCH=nacl
@@ -3366,6 +3448,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
fi
CheckVisibilityHidden
+ CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
@@ -3407,9 +3490,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
;;
esac
-dnl Do this on all platforms, after everything else.
-CheckWarnAll
-
# Verify that we have all the platform specific files we need
if test x$have_joystick != xyes; then
@@ -3453,6 +3533,57 @@ if test x$SDLMAIN_SOURCES = x; then
fi
SDLTEST_SOURCES="$srcdir/src/test/*.c"
+if test x$video_wayland = xyes; then
+ WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
+ WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
+ WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
+ sed 's,[[^ ]]\+,\\$(gen)/&-protocol.c,g'`
+ WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
+ sed 's,[[^ ]]\+,\\$(gen)/&-client-protocol.h,g'`
+ GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES"
+ GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS"
+
+ WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
+$WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
+ \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
+ \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@"
+
+ WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS="
+$WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
+ \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
+ \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@"
+
+ WAYLAND_CORE_PROTOCOL_OBJECT="
+\$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
+ \$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
+
+ WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+ do echo ; echo \$p | sed\
+ "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
+ \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
+ \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
+
+ WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+ do echo ; echo \$p | sed\
+ "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
+ \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
+ \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
+
+ WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
+ do echo ; echo \$p | sed\
+ "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
+ \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
+
+ WAYLAND_PROTOCOLS_DEPENDS="
+$WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
+$WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
+$WAYLAND_CORE_PROTOCOL_OBJECT
+$WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS
+$WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS
+$WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE
+"
+fi
+
OBJECTS=`echo $SOURCES`
DEPENDS=`echo $SOURCES | tr ' ' '\n'`
for EXT in asm cc m c S; do
@@ -3462,6 +3593,8 @@ for EXT in asm cc m c S; do
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
done
+GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+
VERSION_OBJECTS=`echo $VERSION_SOURCES`
VERSION_DEPENDS=`echo $VERSION_SOURCES`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
@@ -3488,6 +3621,19 @@ SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.
if test "x$enable_rpath" = "xyes"; then
if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
+
+ AC_MSG_CHECKING(for linker option --enable-new-dtags)
+ have_enable_new_dtags=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
+ AC_TRY_LINK([
+ ],[
+ ],[
+ have_enable_new_dtags=yes
+ SDL_RLD_FLAGS="$SDL_RLD_FLAGS -Wl,--enable-new-dtags"
+ ])
+ LDFLAGS="$save_LDFLAGS"
+ AC_MSG_RESULT($have_enable_new_dtags)
fi
if test $ARCH = solaris; then
SDL_RLD_FLAGS="-R\${libdir}"
@@ -3526,6 +3672,8 @@ dnl Expand the sources and objects needed to build the library
AC_SUBST(ac_aux_dir)
AC_SUBST(INCLUDE)
AC_SUBST(OBJECTS)
+AC_SUBST(GEN_HEADERS)
+AC_SUBST(GEN_OBJECTS)
AC_SUBST(VERSION_OBJECTS)
AC_SUBST(SDLMAIN_OBJECTS)
AC_SUBST(SDLTEST_OBJECTS)
@@ -3534,6 +3682,7 @@ AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(BUILD_LDFLAGS)
AC_SUBST(EXTRA_LDFLAGS)
AC_SUBST(WINDRES)
+AC_SUBST(WAYLAND_SCANNER)
cat >Makefile.rules <<__EOF__
@@ -3546,6 +3695,7 @@ $DEPENDS
$VERSION_DEPENDS
$SDLMAIN_DEPENDS
$SDLTEST_DEPENDS
+$WAYLAND_PROTOCOLS_DEPENDS
__EOF__
AC_CONFIG_FILES([
@@ -3578,11 +3728,21 @@ if test x$have_dbus_dbus_h_hdr = xyes; then
else
SUMMARY="${SUMMARY}Using dbus : NO\n"
fi
+if test x$enable_ime = xyes; then
+ SUMMARY="${SUMMARY}Using ime : YES\n"
+else
+ SUMMARY="${SUMMARY}Using ime : NO\n"
+fi
if test x$have_ibus_ibus_h_hdr = xyes; then
SUMMARY="${SUMMARY}Using ibus : YES\n"
else
SUMMARY="${SUMMARY}Using ibus : NO\n"
fi
+if test x$have_fcitx_frontend_h_hdr = xyes; then
+ SUMMARY="${SUMMARY}Using fcitx : YES\n"
+else
+ SUMMARY="${SUMMARY}Using fcitx : NO\n"
+fi
AC_CONFIG_COMMANDS([summary], [echo -en "$SUMMARY"], [SUMMARY="$SUMMARY"])
AC_OUTPUT
diff --git a/Engine/lib/sdl/debian/changelog b/Engine/lib/sdl/debian/changelog
index 84d1b878b..6a88d2473 100644
--- a/Engine/lib/sdl/debian/changelog
+++ b/Engine/lib/sdl/debian/changelog
@@ -1,3 +1,9 @@
+libsdl2 (2.0.4) UNRELEASED; urgency=low
+
+ * Updated SDL to version 2.0.4
+
+ -- Sam Lantinga Thu, 07 Jan 2016 11:02:39 -0800
+
libsdl2 (2.0.3) UNRELEASED; urgency=low
* Updated SDL to version 2.0.3
diff --git a/Engine/lib/sdl/debian/copyright b/Engine/lib/sdl/debian/copyright
index 8ce26d1c5..99c3d4496 100644
--- a/Engine/lib/sdl/debian/copyright
+++ b/Engine/lib/sdl/debian/copyright
@@ -31,10 +31,6 @@ Copyright: 1995 Erik Corry
1995 Brown University
License: BrownUn_UnCalifornia_ErikCorry
-Files: src/stdlib/SDL_qsort.c
-Copyright: 1998 Gareth McCaughan
-License: Gareth_McCaughan
-
Files: src/test/SDL_test_md5.c
Copyright: 1997-2016 Sam Lantinga
1990 RSA Data Security, Inc.
@@ -270,13 +266,6 @@ License: BrownUn_UnCalifornia_ErikCorry
* SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-License: Gareth_McCaughan
- You may use it in anything you like; you may make money
- out of it; you may distribute it in object form or as
- part of an executable without including source code;
- you don't have to credit me. (But it would be nice if
- you did.)
-
License: Johnson_M._Hart
Permission is granted for any and all use providing that this
copyright is properly acknowledged.
diff --git a/Engine/lib/sdl/debian/libsdl2-dev.install b/Engine/lib/sdl/debian/libsdl2-dev.install
index 7f99ff427..af2c5b19d 100644
--- a/Engine/lib/sdl/debian/libsdl2-dev.install
+++ b/Engine/lib/sdl/debian/libsdl2-dev.install
@@ -5,4 +5,5 @@ usr/lib/*/libSDL2.a
usr/lib/*/libSDL2main.a
usr/lib/*/libSDL2_test.a
usr/lib/*/pkgconfig/sdl2.pc
+usr/lib/*/cmake/SDL2/sdl2-config.cmake
usr/share/aclocal/sdl2.m4
diff --git a/Engine/lib/sdl/debian/rules b/Engine/lib/sdl/debian/rules
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/sdl2-config.cmake.in b/Engine/lib/sdl/sdl2-config.cmake.in
index e5a036adf..03efbe174 100644
--- a/Engine/lib/sdl/sdl2-config.cmake.in
+++ b/Engine/lib/sdl/sdl2-config.cmake.in
@@ -8,3 +8,4 @@ set(SDL2_EXEC_PREFIX "@prefix@")
set(SDL2_LIBDIR "@libdir@")
set(SDL2_INCLUDE_DIRS "@includedir@/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")
+string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
diff --git a/Engine/lib/sdl/sdl2.m4 b/Engine/lib/sdl/sdl2.m4
index a03b2d270..b915f99ed 100644
--- a/Engine/lib/sdl/sdl2.m4
+++ b/Engine/lib/sdl/sdl2.m4
@@ -4,6 +4,9 @@
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
+#
+# Changelog:
+# * also look for SDL2.framework under Mac OS X
# serial 1
@@ -20,6 +23,10 @@ AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
+AC_ARG_ENABLE(sdlframework, [ --disable-sdlframework Do not search for SDL2.framework],
+ , search_sdl_framework=yes)
+
+AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
min_sdl_version=ifelse([$1], ,2.0.0,$1)
@@ -53,14 +60,36 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run
fi
AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
PATH="$as_save_PATH"
- AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
- if test "$SDL2_CONFIG" = "no" ; then
- no_sdl=yes
- else
- SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
- SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+ if test "$SDL2_CONFIG" = "no" -a "x$search_sdl_framework" = "xyes"; then
+ AC_MSG_CHECKING(for SDL2.framework)
+ if test "x$SDL2_FRAMEWORK" != x; then
+ sdl_framework=$SDL2_FRAMEWORK
+ else
+ for d in / ~/ /System/; do
+ if test -d "$dLibrary/Frameworks/SDL2.framework"; then
+ sdl_framework="$dLibrary/Frameworks/SDL2.framework"
+ fi
+ done
+ fi
+
+ if test -d $sdl_framework; then
+ AC_MSG_RESULT($sdl_framework)
+ sdl_framework_dir=`dirname $sdl_framework`
+ SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
+ SDL_LIBS="-F$sdl_framework_dir -Wl,-framework,SDL2"
+ else
+ no_sdl=yes
+ fi
+ fi
+
+ if test "$SDL2_CONFIG" != "no"; then
+ if test "x$sdl_pc" = "xno"; then
+ AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+ SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+ SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+ fi
sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
@@ -141,12 +170,15 @@ int main (int argc, char *argv[])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
+
+ fi
+ if test "x$sdl_pc" = "xno"; then
+ if test "x$no_sdl" = "xyes"; then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ fi
fi
- fi
- if test "x$no_sdl" = x ; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
fi
fi
if test "x$no_sdl" = x ; then
diff --git a/Engine/lib/sdl/src/audio/SDL_audiomem.h b/Engine/lib/sdl/src/audio/SDL_audiomem.h
deleted file mode 100644
index 091d15c29..000000000
--- a/Engine/lib/sdl/src/audio/SDL_audiomem.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2016 Sam Lantinga
-
- 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.
-*/
-#include "../SDL_internal.h"
-
-#define SDL_AllocAudioMem SDL_malloc
-#define SDL_FreeAudioMem SDL_free
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/Engine/lib/sdl/src/audio/coreaudio/SDL_coreaudio.c b/Engine/lib/sdl/src/audio/coreaudio/SDL_coreaudio.c
deleted file mode 100644
index 46b617dc0..000000000
--- a/Engine/lib/sdl/src/audio/coreaudio/SDL_coreaudio.c
+++ /dev/null
@@ -1,698 +0,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2016 Sam Lantinga
-
- 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.
-*/
-#include "../../SDL_internal.h"
-
-#if SDL_AUDIO_DRIVER_COREAUDIO
-
-#include "SDL_audio.h"
-#include "../SDL_audio_c.h"
-#include "../SDL_sysaudio.h"
-#include "SDL_coreaudio.h"
-#include "SDL_assert.h"
-
-#define DEBUG_COREAUDIO 0
-
-static void COREAUDIO_CloseDevice(_THIS);
-
-#define CHECK_RESULT(msg) \
- if (result != noErr) { \
- COREAUDIO_CloseDevice(this); \
- SDL_SetError("CoreAudio error (%s): %d", msg, (int) result); \
- return 0; \
- }
-
-#if MACOSX_COREAUDIO
-static const AudioObjectPropertyAddress devlist_address = {
- kAudioHardwarePropertyDevices,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster
-};
-
-typedef void (*addDevFn)(const char *name, const int iscapture, AudioDeviceID devId, void *data);
-
-typedef struct AudioDeviceList
-{
- AudioDeviceID devid;
- SDL_bool alive;
- struct AudioDeviceList *next;
-} AudioDeviceList;
-
-static AudioDeviceList *output_devs = NULL;
-static AudioDeviceList *capture_devs = NULL;
-
-static SDL_bool
-add_to_internal_dev_list(const int iscapture, AudioDeviceID devId)
-{
- AudioDeviceList *item = (AudioDeviceList *) SDL_malloc(sizeof (AudioDeviceList));
- if (item == NULL) {
- return SDL_FALSE;
- }
- item->devid = devId;
- item->alive = SDL_TRUE;
- item->next = iscapture ? capture_devs : output_devs;
- if (iscapture) {
- capture_devs = item;
- } else {
- output_devs = item;
- }
-
- return SDL_TRUE;
-}
-
-static void
-addToDevList(const char *name, const int iscapture, AudioDeviceID devId, void *data)
-{
- if (add_to_internal_dev_list(iscapture, devId)) {
- SDL_AddAudioDevice(iscapture, name, (void *) ((size_t) devId));
- }
-}
-
-static void
-build_device_list(int iscapture, addDevFn addfn, void *addfndata)
-{
- OSStatus result = noErr;
- UInt32 size = 0;
- AudioDeviceID *devs = NULL;
- UInt32 i = 0;
- UInt32 max = 0;
-
- result = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject,
- &devlist_address, 0, NULL, &size);
- if (result != kAudioHardwareNoError)
- return;
-
- devs = (AudioDeviceID *) alloca(size);
- if (devs == NULL)
- return;
-
- result = AudioObjectGetPropertyData(kAudioObjectSystemObject,
- &devlist_address, 0, NULL, &size, devs);
- if (result != kAudioHardwareNoError)
- return;
-
- max = size / sizeof (AudioDeviceID);
- for (i = 0; i < max; i++) {
- CFStringRef cfstr = NULL;
- char *ptr = NULL;
- AudioDeviceID dev = devs[i];
- AudioBufferList *buflist = NULL;
- int usable = 0;
- CFIndex len = 0;
- const AudioObjectPropertyAddress addr = {
- kAudioDevicePropertyStreamConfiguration,
- iscapture ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput,
- kAudioObjectPropertyElementMaster
- };
-
- const AudioObjectPropertyAddress nameaddr = {
- kAudioObjectPropertyName,
- iscapture ? kAudioDevicePropertyScopeInput : kAudioDevicePropertyScopeOutput,
- kAudioObjectPropertyElementMaster
- };
-
- result = AudioObjectGetPropertyDataSize(dev, &addr, 0, NULL, &size);
- if (result != noErr)
- continue;
-
- buflist = (AudioBufferList *) SDL_malloc(size);
- if (buflist == NULL)
- continue;
-
- result = AudioObjectGetPropertyData(dev, &addr, 0, NULL,
- &size, buflist);
-
- if (result == noErr) {
- UInt32 j;
- for (j = 0; j < buflist->mNumberBuffers; j++) {
- if (buflist->mBuffers[j].mNumberChannels > 0) {
- usable = 1;
- break;
- }
- }
- }
-
- SDL_free(buflist);
-
- if (!usable)
- continue;
-
-
- size = sizeof (CFStringRef);
- result = AudioObjectGetPropertyData(dev, &nameaddr, 0, NULL, &size, &cfstr);
- if (result != kAudioHardwareNoError)
- continue;
-
- len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr),
- kCFStringEncodingUTF8);
-
- ptr = (char *) SDL_malloc(len + 1);
- usable = ((ptr != NULL) &&
- (CFStringGetCString
- (cfstr, ptr, len + 1, kCFStringEncodingUTF8)));
-
- CFRelease(cfstr);
-
- if (usable) {
- len = strlen(ptr);
- /* Some devices have whitespace at the end...trim it. */
- while ((len > 0) && (ptr[len - 1] == ' ')) {
- len--;
- }
- usable = (len > 0);
- }
-
- if (usable) {
- ptr[len] = '\0';
-
-#if DEBUG_COREAUDIO
- printf("COREAUDIO: Found %s device #%d: '%s' (devid %d)\n",
- ((iscapture) ? "capture" : "output"),
- (int) *devCount, ptr, (int) dev);
-#endif
- addfn(ptr, iscapture, dev, addfndata);
- }
- SDL_free(ptr); /* addfn() would have copied the string. */
- }
-}
-
-static void
-free_audio_device_list(AudioDeviceList **list)
-{
- AudioDeviceList *item = *list;
- while (item) {
- AudioDeviceList *next = item->next;
- SDL_free(item);
- item = next;
- }
- *list = NULL;
-}
-
-static void
-COREAUDIO_DetectDevices(void)
-{
- build_device_list(SDL_TRUE, addToDevList, NULL);
- build_device_list(SDL_FALSE, addToDevList, NULL);
-}
-
-static void
-build_device_change_list(const char *name, const int iscapture, AudioDeviceID devId, void *data)
-{
- AudioDeviceList **list = (AudioDeviceList **) data;
- AudioDeviceList *item;
- for (item = *list; item != NULL; item = item->next) {
- if (item->devid == devId) {
- item->alive = SDL_TRUE;
- return;
- }
- }
-
- add_to_internal_dev_list(iscapture, devId); /* new device, add it. */
- SDL_AddAudioDevice(iscapture, name, (void *) ((size_t) devId));
-}
-
-static void
-reprocess_device_list(const int iscapture, AudioDeviceList **list)
-{
- AudioDeviceList *item;
- AudioDeviceList *prev = NULL;
- for (item = *list; item != NULL; item = item->next) {
- item->alive = SDL_FALSE;
- }
-
- build_device_list(iscapture, build_device_change_list, list);
-
- /* free items in the list that aren't still alive. */
- item = *list;
- while (item != NULL) {
- AudioDeviceList *next = item->next;
- if (item->alive) {
- prev = item;
- } else {
- SDL_RemoveAudioDevice(iscapture, (void *) ((size_t) item->devid));
- if (prev) {
- prev->next = item->next;
- } else {
- *list = item->next;
- }
- SDL_free(item);
- }
- item = next;
- }
-}
-
-/* this is called when the system's list of available audio devices changes. */
-static OSStatus
-device_list_changed(AudioObjectID systemObj, UInt32 num_addr, const AudioObjectPropertyAddress *addrs, void *data)
-{
- reprocess_device_list(SDL_TRUE, &capture_devs);
- reprocess_device_list(SDL_FALSE, &output_devs);
- return 0;
-}
-#endif
-
-/* The CoreAudio callback */
-static OSStatus
-outputCallback(void *inRefCon,
- AudioUnitRenderActionFlags * ioActionFlags,
- const AudioTimeStamp * inTimeStamp,
- UInt32 inBusNumber, UInt32 inNumberFrames,
- AudioBufferList * ioData)
-{
- SDL_AudioDevice *this = (SDL_AudioDevice *) inRefCon;
- AudioBuffer *abuf;
- UInt32 remaining, len;
- void *ptr;
- UInt32 i;
-
- /* Only do anything if audio is enabled and not paused */
- if (!this->enabled || this->paused) {
- for (i = 0; i < ioData->mNumberBuffers; i++) {
- abuf = &ioData->mBuffers[i];
- SDL_memset(abuf->mData, this->spec.silence, abuf->mDataByteSize);
- }
- return 0;
- }
-
- /* No SDL conversion should be needed here, ever, since we accept
- any input format in OpenAudio, and leave the conversion to CoreAudio.
- */
- /*
- SDL_assert(!this->convert.needed);
- SDL_assert(this->spec.channels == ioData->mNumberChannels);
- */
-
- for (i = 0; i < ioData->mNumberBuffers; i++) {
- abuf = &ioData->mBuffers[i];
- remaining = abuf->mDataByteSize;
- ptr = abuf->mData;
- while (remaining > 0) {
- if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
- /* Generate the data */
- SDL_LockMutex(this->mixer_lock);
- (*this->spec.callback)(this->spec.userdata,
- this->hidden->buffer, this->hidden->bufferSize);
- SDL_UnlockMutex(this->mixer_lock);
- this->hidden->bufferOffset = 0;
- }
-
- len = this->hidden->bufferSize - this->hidden->bufferOffset;
- if (len > remaining)
- len = remaining;
- SDL_memcpy(ptr, (char *)this->hidden->buffer +
- this->hidden->bufferOffset, len);
- ptr = (char *)ptr + len;
- remaining -= len;
- this->hidden->bufferOffset += len;
- }
- }
-
- return 0;
-}
-
-static OSStatus
-inputCallback(void *inRefCon,
- AudioUnitRenderActionFlags * ioActionFlags,
- const AudioTimeStamp * inTimeStamp,
- UInt32 inBusNumber, UInt32 inNumberFrames,
- AudioBufferList * ioData)
-{
- /* err = AudioUnitRender(afr->fAudioUnit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, afr->fAudioBuffer); */
- /* !!! FIXME: write me! */
- return noErr;
-}
-
-
-#if MACOSX_COREAUDIO
-static const AudioObjectPropertyAddress alive_address =
-{
- kAudioDevicePropertyDeviceIsAlive,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster
-};
-
-static OSStatus
-device_unplugged(AudioObjectID devid, UInt32 num_addr, const AudioObjectPropertyAddress *addrs, void *data)
-{
- SDL_AudioDevice *this = (SDL_AudioDevice *) data;
- SDL_bool dead = SDL_FALSE;
- UInt32 isAlive = 1;
- UInt32 size = sizeof (isAlive);
- OSStatus error;
-
- if (!this->enabled) {
- return 0; /* already known to be dead. */
- }
-
- error = AudioObjectGetPropertyData(this->hidden->deviceID, &alive_address,
- 0, NULL, &size, &isAlive);
-
- if (error == kAudioHardwareBadDeviceError) {
- dead = SDL_TRUE; /* device was unplugged. */
- } else if ((error == kAudioHardwareNoError) && (!isAlive)) {
- dead = SDL_TRUE; /* device died in some other way. */
- }
-
- if (dead) {
- SDL_OpenedAudioDeviceDisconnected(this);
- }
-
- return 0;
-}
-#endif
-
-static void
-COREAUDIO_CloseDevice(_THIS)
-{
- if (this->hidden != NULL) {
- if (this->hidden->audioUnitOpened) {
- #if MACOSX_COREAUDIO
- /* Unregister our disconnect callback. */
- AudioObjectRemovePropertyListener(this->hidden->deviceID, &alive_address, device_unplugged, this);
- #endif
-
- AURenderCallbackStruct callback;
- const AudioUnitElement output_bus = 0;
- const AudioUnitElement input_bus = 1;
- const int iscapture = this->iscapture;
- const AudioUnitElement bus =
- ((iscapture) ? input_bus : output_bus);
- const AudioUnitScope scope =
- ((iscapture) ? kAudioUnitScope_Output :
- kAudioUnitScope_Input);
-
- /* stop processing the audio unit */
- AudioOutputUnitStop(this->hidden->audioUnit);
-
- /* Remove the input callback */
- SDL_memset(&callback, 0, sizeof(AURenderCallbackStruct));
- AudioUnitSetProperty(this->hidden->audioUnit,
- kAudioUnitProperty_SetRenderCallback,
- scope, bus, &callback, sizeof(callback));
-
- #if MACOSX_COREAUDIO
- CloseComponent(this->hidden->audioUnit);
- #else
- AudioComponentInstanceDispose(this->hidden->audioUnit);
- #endif
-
- this->hidden->audioUnitOpened = 0;
- }
- SDL_free(this->hidden->buffer);
- SDL_free(this->hidden);
- this->hidden = NULL;
- }
-}
-
-#if MACOSX_COREAUDIO
-static int
-prepare_device(_THIS, void *handle, int iscapture)
-{
- AudioDeviceID devid = (AudioDeviceID) ((size_t) handle);
- OSStatus result = noErr;
- UInt32 size = 0;
- UInt32 alive = 0;
- pid_t pid = 0;
-
- AudioObjectPropertyAddress addr = {
- 0,
- kAudioObjectPropertyScopeGlobal,
- kAudioObjectPropertyElementMaster
- };
-
- if (handle == NULL) {
- size = sizeof (AudioDeviceID);
- addr.mSelector =
- ((iscapture) ? kAudioHardwarePropertyDefaultInputDevice :
- kAudioHardwarePropertyDefaultOutputDevice);
- result = AudioObjectGetPropertyData(kAudioObjectSystemObject, &addr,
- 0, NULL, &size, &devid);
- CHECK_RESULT("AudioHardwareGetProperty (default device)");
- }
-
- addr.mSelector = kAudioDevicePropertyDeviceIsAlive;
- addr.mScope = iscapture ? kAudioDevicePropertyScopeInput :
- kAudioDevicePropertyScopeOutput;
-
- size = sizeof (alive);
- result = AudioObjectGetPropertyData(devid, &addr, 0, NULL, &size, &alive);
- CHECK_RESULT
- ("AudioDeviceGetProperty (kAudioDevicePropertyDeviceIsAlive)");
-
- if (!alive) {
- SDL_SetError("CoreAudio: requested device exists, but isn't alive.");
- return 0;
- }
-
- addr.mSelector = kAudioDevicePropertyHogMode;
- size = sizeof (pid);
- result = AudioObjectGetPropertyData(devid, &addr, 0, NULL, &size, &pid);
-
- /* some devices don't support this property, so errors are fine here. */
- if ((result == noErr) && (pid != -1)) {
- SDL_SetError("CoreAudio: requested device is being hogged.");
- return 0;
- }
-
- this->hidden->deviceID = devid;
- return 1;
-}
-#endif
-
-static int
-prepare_audiounit(_THIS, void *handle, int iscapture,
- const AudioStreamBasicDescription * strdesc)
-{
- OSStatus result = noErr;
- AURenderCallbackStruct callback;
-#if MACOSX_COREAUDIO
- ComponentDescription desc;
- Component comp = NULL;
-#else
- AudioComponentDescription desc;
- AudioComponent comp = NULL;
-#endif
- const AudioUnitElement output_bus = 0;
- const AudioUnitElement input_bus = 1;
- const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
- const AudioUnitScope scope = ((iscapture) ? kAudioUnitScope_Output :
- kAudioUnitScope_Input);
-
-#if MACOSX_COREAUDIO
- if (!prepare_device(this, handle, iscapture)) {
- return 0;
- }
-#endif
-
- SDL_zero(desc);
- desc.componentType = kAudioUnitType_Output;
- desc.componentManufacturer = kAudioUnitManufacturer_Apple;
-
-#if MACOSX_COREAUDIO
- desc.componentSubType = kAudioUnitSubType_DefaultOutput;
- comp = FindNextComponent(NULL, &desc);
-#else
- desc.componentSubType = kAudioUnitSubType_RemoteIO;
- comp = AudioComponentFindNext(NULL, &desc);
-#endif
-
- if (comp == NULL) {
- SDL_SetError("Couldn't find requested CoreAudio component");
- return 0;
- }
-
- /* Open & initialize the audio unit */
-#if MACOSX_COREAUDIO
- result = OpenAComponent(comp, &this->hidden->audioUnit);
- CHECK_RESULT("OpenAComponent");
-#else
- /*
- AudioComponentInstanceNew only available on iPhone OS 2.0 and Mac OS X 10.6
- We can't use OpenAComponent on iPhone because it is not present
- */
- result = AudioComponentInstanceNew(comp, &this->hidden->audioUnit);
- CHECK_RESULT("AudioComponentInstanceNew");
-#endif
-
- this->hidden->audioUnitOpened = 1;
-
-#if MACOSX_COREAUDIO
- result = AudioUnitSetProperty(this->hidden->audioUnit,
- kAudioOutputUnitProperty_CurrentDevice,
- kAudioUnitScope_Global, 0,
- &this->hidden->deviceID,
- sizeof(AudioDeviceID));
- CHECK_RESULT
- ("AudioUnitSetProperty (kAudioOutputUnitProperty_CurrentDevice)");
-#endif
-
- /* Set the data format of the audio unit. */
- result = AudioUnitSetProperty(this->hidden->audioUnit,
- kAudioUnitProperty_StreamFormat,
- scope, bus, strdesc, sizeof(*strdesc));
- CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_StreamFormat)");
-
- /* Set the audio callback */
- SDL_memset(&callback, 0, sizeof(AURenderCallbackStruct));
- callback.inputProc = ((iscapture) ? inputCallback : outputCallback);
- callback.inputProcRefCon = this;
- result = AudioUnitSetProperty(this->hidden->audioUnit,
- kAudioUnitProperty_SetRenderCallback,
- scope, bus, &callback, sizeof(callback));
- CHECK_RESULT
- ("AudioUnitSetProperty (kAudioUnitProperty_SetRenderCallback)");
-
- /* Calculate the final parameters for this audio specification */
- SDL_CalculateAudioSpec(&this->spec);
-
- /* Allocate a sample buffer */
- this->hidden->bufferOffset = this->hidden->bufferSize = this->spec.size;
- this->hidden->buffer = SDL_malloc(this->hidden->bufferSize);
-
- result = AudioUnitInitialize(this->hidden->audioUnit);
- CHECK_RESULT("AudioUnitInitialize");
-
- /* Finally, start processing of the audio unit */
- result = AudioOutputUnitStart(this->hidden->audioUnit);
- CHECK_RESULT("AudioOutputUnitStart");
-
-#if MACOSX_COREAUDIO
- /* Fire a callback if the device stops being "alive" (disconnected, etc). */
- AudioObjectAddPropertyListener(this->hidden->deviceID, &alive_address, device_unplugged, this);
-#endif
-
- /* We're running! */
- return 1;
-}
-
-
-static int
-COREAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
-{
- AudioStreamBasicDescription strdesc;
- SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
- int valid_datatype = 0;
-
- /* Initialize all variables that we clean on shutdown */
- this->hidden = (struct SDL_PrivateAudioData *)
- SDL_malloc((sizeof *this->hidden));
- if (this->hidden == NULL) {
- return SDL_OutOfMemory();
- }
- SDL_memset(this->hidden, 0, (sizeof *this->hidden));
-
- /* Setup a AudioStreamBasicDescription with the requested format */
- SDL_memset(&strdesc, '\0', sizeof(AudioStreamBasicDescription));
- strdesc.mFormatID = kAudioFormatLinearPCM;
- strdesc.mFormatFlags = kLinearPCMFormatFlagIsPacked;
- strdesc.mChannelsPerFrame = this->spec.channels;
- strdesc.mSampleRate = this->spec.freq;
- strdesc.mFramesPerPacket = 1;
-
- while ((!valid_datatype) && (test_format)) {
- this->spec.format = test_format;
- /* Just a list of valid SDL formats, so people don't pass junk here. */
- switch (test_format) {
- case AUDIO_U8:
- case AUDIO_S8:
- case AUDIO_U16LSB:
- case AUDIO_S16LSB:
- case AUDIO_U16MSB:
- case AUDIO_S16MSB:
- case AUDIO_S32LSB:
- case AUDIO_S32MSB:
- case AUDIO_F32LSB:
- case AUDIO_F32MSB:
- valid_datatype = 1;
- strdesc.mBitsPerChannel = SDL_AUDIO_BITSIZE(this->spec.format);
- if (SDL_AUDIO_ISBIGENDIAN(this->spec.format))
- strdesc.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
-
- if (SDL_AUDIO_ISFLOAT(this->spec.format))
- strdesc.mFormatFlags |= kLinearPCMFormatFlagIsFloat;
- else if (SDL_AUDIO_ISSIGNED(this->spec.format))
- strdesc.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
- break;
- }
- }
-
- if (!valid_datatype) { /* shouldn't happen, but just in case... */
- COREAUDIO_CloseDevice(this);
- return SDL_SetError("Unsupported audio format");
- }
-
- strdesc.mBytesPerFrame =
- strdesc.mBitsPerChannel * strdesc.mChannelsPerFrame / 8;
- strdesc.mBytesPerPacket =
- strdesc.mBytesPerFrame * strdesc.mFramesPerPacket;
-
- if (!prepare_audiounit(this, handle, iscapture, &strdesc)) {
- COREAUDIO_CloseDevice(this);
- return -1; /* prepare_audiounit() will call SDL_SetError()... */
- }
-
- return 0; /* good to go. */
-}
-
-static void
-COREAUDIO_Deinitialize(void)
-{
-#if MACOSX_COREAUDIO
- AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &devlist_address, device_list_changed, NULL);
- free_audio_device_list(&capture_devs);
- free_audio_device_list(&output_devs);
-#endif
-}
-
-static int
-COREAUDIO_Init(SDL_AudioDriverImpl * impl)
-{
- /* Set the function pointers */
- impl->OpenDevice = COREAUDIO_OpenDevice;
- impl->CloseDevice = COREAUDIO_CloseDevice;
- impl->Deinitialize = COREAUDIO_Deinitialize;
-
-#if MACOSX_COREAUDIO
- impl->DetectDevices = COREAUDIO_DetectDevices;
- AudioObjectAddPropertyListener(kAudioObjectSystemObject, &devlist_address, device_list_changed, NULL);
-#else
- impl->OnlyHasDefaultOutputDevice = 1;
-
- /* Set category to ambient sound so that other music continues playing.
- You can change this at runtime in your own code if you need different
- behavior. If this is common, we can add an SDL hint for this.
- */
- AudioSessionInitialize(NULL, NULL, NULL, nil);
- UInt32 category = kAudioSessionCategory_AmbientSound;
- AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(UInt32), &category);
-#endif
-
- impl->ProvidesOwnCallbackThread = 1;
-
- return 1; /* this audio target is available. */
-}
-
-AudioBootStrap COREAUDIO_bootstrap = {
- "coreaudio", "CoreAudio", COREAUDIO_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_COREAUDIO */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/Engine/lib/sdl/src/audio/sdlgenaudiocvt.pl b/Engine/lib/sdl/src/audio/sdlgenaudiocvt.pl
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/src/dynapi/gendynapi.pl b/Engine/lib/sdl/src/dynapi/gendynapi.pl
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/src/joystick/sort_controllers.py b/Engine/lib/sdl/src/joystick/sort_controllers.py
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/src/video/sdlgenblit.pl b/Engine/lib/sdl/src/video/sdlgenblit.pl
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/test/Makefile.in b/Engine/lib/sdl/test/Makefile.in
index 9a1df774e..68f0d3dab 100644
--- a/Engine/lib/sdl/test/Makefile.in
+++ b/Engine/lib/sdl/test/Makefile.in
@@ -13,7 +13,10 @@ TARGETS = \
loopwavequeue$(EXE) \
testatomic$(EXE) \
testaudioinfo$(EXE) \
+ testaudiocapture$(EXE) \
testautomation$(EXE) \
+ testbounds$(EXE) \
+ testcustomcursor$(EXE) \
testdraw2$(EXE) \
testdrawchessboard$(EXE) \
testdropfile$(EXE) \
@@ -61,6 +64,7 @@ TARGETS = \
testrendercopyex$(EXE) \
testmessage$(EXE) \
testdisplayinfo$(EXE) \
+ testqsort$(EXE) \
controllermap$(EXE) \
all: Makefile $(TARGETS)
@@ -110,6 +114,9 @@ testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
testaudiohotplug$(EXE): $(srcdir)/testaudiohotplug.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+testaudiocapture$(EXE): $(srcdir)/testaudiocapture.c
+ $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
testatomic$(EXE): $(srcdir)/testatomic.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
@@ -270,6 +277,15 @@ testmessage$(EXE): $(srcdir)/testmessage.c
testdisplayinfo$(EXE): $(srcdir)/testdisplayinfo.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+testqsort$(EXE): $(srcdir)/testqsort.c
+ $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
+testbounds$(EXE): $(srcdir)/testbounds.c
+ $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
+testcustomcursor$(EXE): $(srcdir)/testcustomcursor.c
+ $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
controllermap$(EXE): $(srcdir)/controllermap.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
diff --git a/Engine/lib/sdl/test/autogen.sh b/Engine/lib/sdl/test/autogen.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/test/configure b/Engine/lib/sdl/test/configure
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/test/controllermap.c b/Engine/lib/sdl/test/controllermap.c
index 3fb30d68a..d626f9f89 100644
--- a/Engine/lib/sdl/test/controllermap.c
+++ b/Engine/lib/sdl/test/controllermap.c
@@ -26,12 +26,9 @@
#define SCREEN_HEIGHT 480
#else
#define SCREEN_WIDTH 512
-#define SCREEN_HEIGHT 317
+#define SCREEN_HEIGHT 320
#endif
-#define MAP_WIDTH 512
-#define MAP_HEIGHT 317
-
#define MARKER_BUTTON 1
#define MARKER_AXIS 2
@@ -47,7 +44,7 @@ typedef struct MappingStep
SDL_Texture *
-LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)
+LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)
{
SDL_Surface *temp;
SDL_Texture *texture;
@@ -226,7 +223,7 @@ WatchJoystick(SDL_Joystick * joystick)
SDL_RenderCopy(screen, background, NULL, NULL);
SDL_SetTextureAlphaMod(marker, alpha);
SDL_SetTextureColorMod(marker, 10, 255, 21);
- SDL_RenderCopyEx(screen, marker, NULL, &dst, step->angle, NULL, 0);
+ SDL_RenderCopyEx(screen, marker, NULL, &dst, step->angle, NULL, SDL_FLIP_NONE);
SDL_RenderPresent(screen);
if (SDL_PollEvent(&event)) {
diff --git a/Engine/lib/sdl/test/gcc-fat.sh b/Engine/lib/sdl/test/gcc-fat.sh
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/test/testatomic.c b/Engine/lib/sdl/test/testatomic.c
index 41cc9ab1b..d371ef31f 100644
--- a/Engine/lib/sdl/test/testatomic.c
+++ b/Engine/lib/sdl/test/testatomic.c
@@ -284,7 +284,7 @@ typedef struct
char cache_pad4[SDL_CACHELINE_SIZE-sizeof(SDL_SpinLock)-2*sizeof(SDL_atomic_t)];
#endif
- volatile SDL_bool active;
+ SDL_atomic_t active;
/* Only needed for the mutex test */
SDL_mutex *mutex;
@@ -305,7 +305,7 @@ static void InitEventQueue(SDL_EventQueue *queue)
SDL_AtomicSet(&queue->rwcount, 0);
SDL_AtomicSet(&queue->watcher, 0);
#endif
- queue->active = SDL_TRUE;
+ SDL_AtomicSet(&queue->active, 1);
}
static SDL_bool EnqueueEvent_LockFree(SDL_EventQueue *queue, const SDL_Event *event)
@@ -538,7 +538,7 @@ static int FIFO_Reader(void* _data)
if (DequeueEvent_LockFree(queue, &event)) {
WriterData *writer = (WriterData*)event.user.data1;
++data->counters[writer->index];
- } else if (queue->active) {
+ } else if (SDL_AtomicGet(&queue->active)) {
++data->waits;
SDL_Delay(0);
} else {
@@ -551,7 +551,7 @@ static int FIFO_Reader(void* _data)
if (DequeueEvent_Mutex(queue, &event)) {
WriterData *writer = (WriterData*)event.user.data1;
++data->counters[writer->index];
- } else if (queue->active) {
+ } else if (SDL_AtomicGet(&queue->active)) {
++data->waits;
SDL_Delay(0);
} else {
@@ -571,7 +571,7 @@ static int FIFO_Watcher(void* _data)
{
SDL_EventQueue *queue = (SDL_EventQueue *)_data;
- while (queue->active) {
+ while (SDL_AtomicGet(&queue->active)) {
SDL_AtomicLock(&queue->lock);
SDL_AtomicIncRef(&queue->watcher);
while (SDL_AtomicGet(&queue->rwcount) > 0) {
@@ -652,7 +652,7 @@ static void RunFIFOTest(SDL_bool lock_free)
}
/* Shut down the queue so readers exit */
- queue.active = SDL_FALSE;
+ SDL_AtomicSet(&queue.active, 0);
/* Wait for the readers */
while (SDL_AtomicGet(&readersRunning) > 0) {
diff --git a/Engine/lib/sdl/test/testaudiocapture.c b/Engine/lib/sdl/test/testaudiocapture.c
new file mode 100644
index 000000000..26321a71c
--- /dev/null
+++ b/Engine/lib/sdl/test/testaudiocapture.c
@@ -0,0 +1,165 @@
+/*
+ Copyright (C) 1997-2016 Sam Lantinga
+
+ 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.
+*/
+#include "SDL.h"
+
+#include
+
+#ifdef __EMSCRIPTEN__
+#include
+#endif
+
+static SDL_Window *window = NULL;
+static SDL_Renderer *renderer = NULL;
+static SDL_AudioSpec spec;
+static SDL_AudioDeviceID devid_in = 0;
+static SDL_AudioDeviceID devid_out = 0;
+
+static void
+loop()
+{
+ SDL_bool please_quit = SDL_FALSE;
+ SDL_Event e;
+
+ while (SDL_PollEvent(&e)) {
+ if (e.type == SDL_QUIT) {
+ please_quit = SDL_TRUE;
+ } else if (e.type == SDL_KEYDOWN) {
+ if (e.key.keysym.sym == SDLK_ESCAPE) {
+ please_quit = SDL_TRUE;
+ }
+ } else if (e.type == SDL_MOUSEBUTTONDOWN) {
+ if (e.button.button == 1) {
+ SDL_PauseAudioDevice(devid_out, SDL_TRUE);
+ SDL_PauseAudioDevice(devid_in, SDL_FALSE);
+ }
+ } else if (e.type == SDL_MOUSEBUTTONUP) {
+ if (e.button.button == 1) {
+ SDL_PauseAudioDevice(devid_in, SDL_TRUE);
+ SDL_PauseAudioDevice(devid_out, SDL_FALSE);
+ }
+ }
+ }
+
+ if (SDL_GetAudioDeviceStatus(devid_in) == SDL_AUDIO_PLAYING) {
+ SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);
+ } else {
+ SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
+ }
+ SDL_RenderClear(renderer);
+ SDL_RenderPresent(renderer);
+
+ if (please_quit) {
+ /* stop playing back, quit. */
+ SDL_Log("Shutting down.\n");
+ SDL_PauseAudioDevice(devid_in, 1);
+ SDL_CloseAudioDevice(devid_in);
+ SDL_PauseAudioDevice(devid_out, 1);
+ SDL_CloseAudioDevice(devid_out);
+ SDL_DestroyRenderer(renderer);
+ SDL_DestroyWindow(window);
+ SDL_Quit();
+ #ifdef __EMSCRIPTEN__
+ emscripten_cancel_main_loop();
+ #endif
+ exit(0);
+ }
+
+ /* Note that it would be easier to just have a one-line function that
+ calls SDL_QueueAudio() as a capture device callback, but we're
+ trying to test the API, so we use SDL_DequeueAudio() here. */
+ while (SDL_TRUE) {
+ Uint8 buf[1024];
+ const Uint32 br = SDL_DequeueAudio(devid_in, buf, sizeof (buf));
+ SDL_QueueAudio(devid_out, buf, br);
+ if (br < sizeof (buf)) {
+ break;
+ }
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ /* (argv[1] == NULL means "open default device.") */
+ const char *devname = argv[1];
+ SDL_AudioSpec wanted;
+ int devcount;
+ int i;
+
+ /* Enable standard application logging */
+ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
+
+ /* Load the SDL library */
+ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
+ return (1);
+ }
+
+ window = SDL_CreateWindow("testaudiocapture", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 320, 240, 0);
+ renderer = SDL_CreateRenderer(window, -1, 0);
+ SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
+ SDL_RenderClear(renderer);
+ SDL_RenderPresent(renderer);
+
+ SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
+
+ devcount = SDL_GetNumAudioDevices(SDL_TRUE);
+ for (i = 0; i < devcount; i++) {
+ SDL_Log(" Capture device #%d: '%s'\n", i, SDL_GetAudioDeviceName(i, SDL_TRUE));
+ }
+
+ SDL_zero(wanted);
+ wanted.freq = 44100;
+ wanted.format = AUDIO_F32SYS;
+ wanted.channels = 1;
+ wanted.samples = 4096;
+ wanted.callback = NULL;
+
+ SDL_zero(spec);
+
+ /* DirectSound can fail in some instances if you open the same hardware
+ for both capture and output and didn't open the output end first,
+ according to the docs, so if you're doing something like this, always
+ open your capture devices second in case you land in those bizarre
+ circumstances. */
+
+ SDL_Log("Opening default playback device...\n");
+ devid_out = SDL_OpenAudioDevice(NULL, SDL_FALSE, &wanted, &spec, SDL_AUDIO_ALLOW_ANY_CHANGE);
+ if (!devid_out) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open an audio device for playback: %s!\n", SDL_GetError());
+ SDL_Quit();
+ exit(1);
+ }
+
+ SDL_Log("Opening capture device %s%s%s...\n",
+ devname ? "'" : "",
+ devname ? devname : "[[default]]",
+ devname ? "'" : "");
+
+ devid_in = SDL_OpenAudioDevice(argv[1], SDL_TRUE, &spec, &spec, 0);
+ if (!devid_in) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open an audio device for capture: %s!\n", SDL_GetError());
+ SDL_Quit();
+ exit(1);
+ }
+
+ SDL_Log("Ready! Hold down mouse or finger to record!\n");
+
+#ifdef __EMSCRIPTEN__
+ emscripten_set_main_loop(loop, 0, 1);
+#else
+ while (1) { loop(); SDL_Delay(16); }
+#endif
+
+ return 0;
+}
+
diff --git a/Engine/lib/sdl/test/testaudiohotplug.c b/Engine/lib/sdl/test/testaudiohotplug.c
index e13868ec2..73d480505 100644
--- a/Engine/lib/sdl/test/testaudiohotplug.c
+++ b/Engine/lib/sdl/test/testaudiohotplug.c
@@ -74,6 +74,12 @@ poked(int sig)
done = 1;
}
+static const char*
+devtypestr(int iscapture)
+{
+ return iscapture ? "capture" : "output";
+}
+
static void
iteration()
{
@@ -82,10 +88,21 @@ iteration()
while (SDL_PollEvent(&e)) {
if (e.type == SDL_QUIT) {
done = 1;
+ } else if (e.type == SDL_KEYUP) {
+ if (e.key.keysym.sym == SDLK_ESCAPE)
+ done = 1;
} else if (e.type == SDL_AUDIODEVICEADDED) {
- const char *name = SDL_GetAudioDeviceName(e.adevice.which, 0);
- SDL_Log("New %s audio device: %s\n", e.adevice.iscapture ? "capture" : "output", name);
- if (!e.adevice.iscapture) {
+ int index = e.adevice.which;
+ int iscapture = e.adevice.iscapture;
+ const char *name = SDL_GetAudioDeviceName(index, iscapture);
+ if (name != NULL)
+ SDL_Log("New %s audio device at index %u: %s\n", devtypestr(iscapture), (unsigned int) index, name);
+ else {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Got new %s device at index %u, but failed to get the name: %s\n",
+ devtypestr(iscapture), (unsigned int) index, SDL_GetError());
+ continue;
+ }
+ if (!iscapture) {
positions[posindex] = 0;
spec.userdata = &positions[posindex++];
spec.callback = fillerup;
@@ -99,7 +116,7 @@ iteration()
}
} else if (e.type == SDL_AUDIODEVICEREMOVED) {
dev = (SDL_AudioDeviceID) e.adevice.which;
- SDL_Log("%s device %u removed.\n", e.adevice.iscapture ? "capture" : "output", (unsigned int) dev);
+ SDL_Log("%s device %u removed.\n", devtypestr(e.adevice.iscapture), (unsigned int) dev);
SDL_CloseAudioDevice(dev);
}
}
@@ -163,6 +180,7 @@ main(int argc, char *argv[])
SDL_Log("%i: %s", i, SDL_GetAudioDriver(i));
}
+ SDL_Log("Select a driver with the SDL_AUDIODRIVER environment variable.\n");
SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
#ifdef __EMSCRIPTEN__
@@ -175,6 +193,8 @@ main(int argc, char *argv[])
#endif
/* Clean up on signal */
+ /* Quit audio first, then free WAV. This prevents access violations in the audio threads. */
+ SDL_QuitSubSystem(SDL_INIT_AUDIO);
SDL_FreeWAV(sound);
SDL_Quit();
return (0);
diff --git a/Engine/lib/sdl/test/testaudioinfo.c b/Engine/lib/sdl/test/testaudioinfo.c
index 53bf0f5e2..485fd0a38 100644
--- a/Engine/lib/sdl/test/testaudioinfo.c
+++ b/Engine/lib/sdl/test/testaudioinfo.c
@@ -18,7 +18,7 @@ print_devices(int iscapture)
const char *typestr = ((iscapture) ? "capture" : "output");
int n = SDL_GetNumAudioDevices(iscapture);
- SDL_Log("%s devices:\n", typestr);
+ SDL_Log("Found %d %s device%s:\n", n, typestr, n != 1 ? "s" : "");
if (n == -1)
SDL_Log(" Driver can't detect specific %s devices.\n\n", typestr);
@@ -27,7 +27,11 @@ print_devices(int iscapture)
else {
int i;
for (i = 0; i < n; i++) {
- SDL_Log(" %s\n", SDL_GetAudioDeviceName(i, iscapture));
+ const char *name = SDL_GetAudioDeviceName(i, iscapture);
+ if (name != NULL)
+ SDL_Log(" %d: %s\n", i, name);
+ else
+ SDL_Log(" %d Error: %s\n", i, SDL_GetError());
}
SDL_Log("\n");
}
@@ -55,9 +59,9 @@ main(int argc, char **argv)
int i;
SDL_Log("Built-in audio drivers:\n");
for (i = 0; i < n; ++i) {
- SDL_Log(" %s\n", SDL_GetAudioDriver(i));
+ SDL_Log(" %d: %s\n", i, SDL_GetAudioDriver(i));
}
- SDL_Log("\n");
+ SDL_Log("Select a driver with the SDL_AUDIODRIVER environment variable.\n");
}
SDL_Log("Using audio driver: %s\n\n", SDL_GetCurrentAudioDriver());
diff --git a/Engine/lib/sdl/test/testautomation_events.c b/Engine/lib/sdl/test/testautomation_events.c
index f9eb5bb9e..a0119bdbe 100644
--- a/Engine/lib/sdl/test/testautomation_events.c
+++ b/Engine/lib/sdl/test/testautomation_events.c
@@ -87,7 +87,7 @@ events_addDelEventWatch(void *arg)
/* Create user event */
event.type = SDL_USEREVENT;
- event.user.code = SDLTest_RandomSint32();;
+ event.user.code = SDLTest_RandomSint32();
event.user.data1 = (void *)&_userdataValue1;
event.user.data2 = (void *)&_userdataValue2;
@@ -137,7 +137,7 @@ events_addDelEventWatchWithUserdata(void *arg)
/* Create user event */
event.type = SDL_USEREVENT;
- event.user.code = SDLTest_RandomSint32();;
+ event.user.code = SDLTest_RandomSint32();
event.user.data1 = (void *)&_userdataValue1;
event.user.data2 = (void *)&_userdataValue2;
diff --git a/Engine/lib/sdl/test/testautomation_keyboard.c b/Engine/lib/sdl/test/testautomation_keyboard.c
index 453832e25..b2c3b9ae1 100644
--- a/Engine/lib/sdl/test/testautomation_keyboard.c
+++ b/Engine/lib/sdl/test/testautomation_keyboard.c
@@ -401,8 +401,8 @@ keyboard_setTextInputRect(void *arg)
SDL_Rect refRect;
/* Normal visible refRect, origin inside */
- refRect.x = SDLTest_RandomIntegerInRange(1, 50);;
- refRect.y = SDLTest_RandomIntegerInRange(1, 50);;
+ refRect.x = SDLTest_RandomIntegerInRange(1, 50);
+ refRect.y = SDLTest_RandomIntegerInRange(1, 50);
refRect.w = SDLTest_RandomIntegerInRange(10, 50);
refRect.h = SDLTest_RandomIntegerInRange(10, 50);
_testSetTextInputRect(refRect);
@@ -415,8 +415,8 @@ keyboard_setTextInputRect(void *arg)
_testSetTextInputRect(refRect);
/* 1Pixel refRect */
- refRect.x = SDLTest_RandomIntegerInRange(10, 50);;
- refRect.y = SDLTest_RandomIntegerInRange(10, 50);;
+ refRect.x = SDLTest_RandomIntegerInRange(10, 50);
+ refRect.y = SDLTest_RandomIntegerInRange(10, 50);
refRect.w = 1;
refRect.h = 1;
_testSetTextInputRect(refRect);
@@ -450,15 +450,15 @@ keyboard_setTextInputRect(void *arg)
_testSetTextInputRect(refRect);
/* negative refRect */
- refRect.x = SDLTest_RandomIntegerInRange(-200, -100);;
- refRect.y = SDLTest_RandomIntegerInRange(-200, -100);;
+ refRect.x = SDLTest_RandomIntegerInRange(-200, -100);
+ refRect.y = SDLTest_RandomIntegerInRange(-200, -100);
refRect.w = 50;
refRect.h = 50;
_testSetTextInputRect(refRect);
/* oversized refRect */
- refRect.x = SDLTest_RandomIntegerInRange(1, 50);;
- refRect.y = SDLTest_RandomIntegerInRange(1, 50);;
+ refRect.x = SDLTest_RandomIntegerInRange(1, 50);
+ refRect.y = SDLTest_RandomIntegerInRange(1, 50);
refRect.w = 5000;
refRect.h = 5000;
_testSetTextInputRect(refRect);
diff --git a/Engine/lib/sdl/test/testautomation_main.c b/Engine/lib/sdl/test/testautomation_main.c
index ef8f19e9e..ae060cdd1 100644
--- a/Engine/lib/sdl/test/testautomation_main.c
+++ b/Engine/lib/sdl/test/testautomation_main.c
@@ -137,7 +137,7 @@ static const SDLTest_TestCaseReference mainTest3 =
static const SDLTest_TestCaseReference mainTest4 =
{ (SDLTest_TestCaseFp)main_testImpliedJoystickQuit, "main_testImpliedJoystickQuit", "Tests that quit for gamecontroller doesn't quit joystick if you inited it explicitly", TEST_ENABLED};
-/* Sequence of Platform test cases */
+/* Sequence of Main test cases */
static const SDLTest_TestCaseReference *mainTests[] = {
&mainTest1,
&mainTest2,
@@ -146,7 +146,7 @@ static const SDLTest_TestCaseReference *mainTests[] = {
NULL
};
-/* Platform test suite (global) */
+/* Main test suite (global) */
SDLTest_TestSuiteReference mainTestSuite = {
"Main",
NULL,
diff --git a/Engine/lib/sdl/test/testautomation_sdltest.c b/Engine/lib/sdl/test/testautomation_sdltest.c
index ec1da8a50..54cd6e257 100644
--- a/Engine/lib/sdl/test/testautomation_sdltest.c
+++ b/Engine/lib/sdl/test/testautomation_sdltest.c
@@ -1093,7 +1093,7 @@ sdltest_randomIntegerInRange(void *arg)
SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result);
/* Range with max at integer limit */
- min = long_min - (Sint32)SDLTest_RandomSint16();;
+ min = long_min - (Sint32)SDLTest_RandomSint16();
max = long_max;
result = SDLTest_RandomIntegerInRange(min, max);
SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(...,SINT32_MAX)");
diff --git a/Engine/lib/sdl/test/testautomation_stdlib.c b/Engine/lib/sdl/test/testautomation_stdlib.c
index 89245fdcb..b541995f5 100644
--- a/Engine/lib/sdl/test/testautomation_stdlib.c
+++ b/Engine/lib/sdl/test/testautomation_stdlib.c
@@ -253,6 +253,43 @@ stdlib_getsetenv(void *arg)
return TEST_COMPLETED;
}
+/**
+ * @brief Call to SDL_sscanf
+ */
+#undef SDL_sscanf
+int
+stdlib_sscanf(void *arg)
+{
+ int output;
+ int result;
+ int expected_output;
+ int expected_result;
+
+ expected_output = output = 123;
+ expected_result = -1;
+ result = SDL_sscanf("", "%i", &output);
+ SDLTest_AssertPass("Call to SDL_sscanf(\"\", \"%%i\", &output)");
+ SDLTest_AssertCheck(expected_output == output, "Check output, expected: %i, got: %i", expected_output, output);
+ SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result);
+
+ expected_output = output = 123;
+ expected_result = 0;
+ result = SDL_sscanf("a", "%i", &output);
+ SDLTest_AssertPass("Call to SDL_sscanf(\"a\", \"%%i\", &output)");
+ SDLTest_AssertCheck(expected_output == output, "Check output, expected: %i, got: %i", expected_output, output);
+ SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result);
+
+ output = 123;
+ expected_output = 2;
+ expected_result = 1;
+ result = SDL_sscanf("2", "%i", &output);
+ SDLTest_AssertPass("Call to SDL_sscanf(\"2\", \"%%i\", &output)");
+ SDLTest_AssertCheck(expected_output == output, "Check output, expected: %i, got: %i", expected_output, output);
+ SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result);
+
+ return TEST_COMPLETED;
+}
+
/* ================= Test References ================== */
/* Standard C routine test cases */
@@ -265,12 +302,15 @@ static const SDLTest_TestCaseReference stdlibTest2 =
static const SDLTest_TestCaseReference stdlibTest3 =
{ (SDLTest_TestCaseFp)stdlib_getsetenv, "stdlib_getsetenv", "Call to SDL_getenv and SDL_setenv", TEST_ENABLED };
+static const SDLTest_TestCaseReference stdlibTest4 =
+ { (SDLTest_TestCaseFp)stdlib_sscanf, "stdlib_sscanf", "Call to SDL_sscanf", TEST_ENABLED };
+
/* Sequence of Standard C routine test cases */
static const SDLTest_TestCaseReference *stdlibTests[] = {
- &stdlibTest1, &stdlibTest2, &stdlibTest3, NULL
+ &stdlibTest1, &stdlibTest2, &stdlibTest3, &stdlibTest4, NULL
};
-/* Timer test suite (global) */
+/* Standard C routine test suite (global) */
SDLTest_TestSuiteReference stdlibTestSuite = {
"Stdlib",
NULL,
diff --git a/Engine/lib/sdl/test/testbounds.c b/Engine/lib/sdl/test/testbounds.c
new file mode 100644
index 000000000..b410be96c
--- /dev/null
+++ b/Engine/lib/sdl/test/testbounds.c
@@ -0,0 +1,40 @@
+/*
+ Copyright (C) 1997-2014 Sam Lantinga
+
+ 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.
+*/
+
+#include "SDL.h"
+
+int main(int argc, char **argv)
+{
+ int total, i;
+
+ if (SDL_Init(SDL_INIT_VIDEO) < 0) {
+ SDL_Log("SDL_Init(SDL_INIT_VIDEO) failed: %s", SDL_GetError());
+ return 1;
+ }
+
+ total = SDL_GetNumVideoDisplays();
+ for (i = 0; i < total; i++) {
+ SDL_Rect bounds = { -1,-1,-1,-1 }, usable = { -1,-1,-1,-1 };
+ SDL_GetDisplayBounds(i, &bounds);
+ SDL_GetDisplayUsableBounds(i, &usable);
+ SDL_Log("Display #%d ('%s'): bounds={(%d,%d),%dx%d}, usable={(%d,%d),%dx%d}",
+ i, SDL_GetDisplayName(i),
+ bounds.x, bounds.y, bounds.w, bounds.h,
+ usable.x, usable.y, usable.w, usable.h);
+ }
+
+ SDL_Quit();
+ return 0;
+}
+
+/* vi: set ts=4 sw=4 expandtab: */
+
diff --git a/Engine/lib/sdl/test/testcustomcursor.c b/Engine/lib/sdl/test/testcustomcursor.c
new file mode 100644
index 000000000..88b5c322d
--- /dev/null
+++ b/Engine/lib/sdl/test/testcustomcursor.c
@@ -0,0 +1,216 @@
+/*
+ Copyright (C) 1997-2016 Sam Lantinga
+
+ 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.
+*/
+
+#include
+#include
+
+#ifdef __EMSCRIPTEN__
+#include
+#endif
+
+#include "SDL_test_common.h"
+
+/* Stolen from the mailing list */
+/* Creates a new mouse cursor from an XPM */
+
+
+/* XPM */
+static const char *arrow[] = {
+ /* width height num_colors chars_per_pixel */
+ " 32 32 3 1",
+ /* colors */
+ "X c #000000",
+ ". c #ffffff",
+ " c None",
+ /* pixels */
+ "X ",
+ "XX ",
+ "X.X ",
+ "X..X ",
+ "X...X ",
+ "X....X ",
+ "X.....X ",
+ "X......X ",
+ "X.......X ",
+ "X........X ",
+ "X.....XXXXX ",
+ "X..X..X ",
+ "X.X X..X ",
+ "XX X..X ",
+ "X X..X ",
+ " X..X ",
+ " X..X ",
+ " X..X ",
+ " XX ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ "0,0"
+};
+
+static SDL_Cursor*
+init_color_cursor(const char *file)
+{
+ SDL_Cursor *cursor = NULL;
+ SDL_Surface *surface = SDL_LoadBMP(file);
+ if (surface) {
+ cursor = SDL_CreateColorCursor(surface, 0, 0);
+ SDL_FreeSurface(surface);
+ }
+ return cursor;
+}
+
+static SDL_Cursor*
+init_system_cursor(const char *image[])
+{
+ int i, row, col;
+ Uint8 data[4*32];
+ Uint8 mask[4*32];
+ int hot_x, hot_y;
+
+ i = -1;
+ for (row=0; row<32; ++row) {
+ for (col=0; col<32; ++col) {
+ if (col % 8) {
+ data[i] <<= 1;
+ mask[i] <<= 1;
+ } else {
+ ++i;
+ data[i] = mask[i] = 0;
+ }
+ switch (image[4+row][col]) {
+ case 'X':
+ data[i] |= 0x01;
+ mask[i] |= 0x01;
+ break;
+ case '.':
+ mask[i] |= 0x01;
+ break;
+ case ' ':
+ break;
+ }
+ }
+ }
+ sscanf(image[4+row], "%d,%d", &hot_x, &hot_y);
+ return SDL_CreateCursor(data, mask, 32, 32, hot_x, hot_y);
+}
+
+static SDLTest_CommonState *state;
+int done;
+SDL_Cursor *cursor = NULL;
+
+/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
+static void
+quit(int rc)
+{
+ SDLTest_CommonQuit(state);
+ exit(rc);
+}
+
+void
+loop()
+{
+ int i;
+ SDL_Event event;
+ /* Check for events */
+ while (SDL_PollEvent(&event)) {
+ SDLTest_CommonEvent(state, &event, &done);
+ }
+
+ for (i = 0; i < state->num_windows; ++i) {
+ SDL_Renderer *renderer = state->renderers[i];
+ SDL_RenderClear(renderer);
+ SDL_RenderPresent(renderer);
+ }
+#ifdef __EMSCRIPTEN__
+ if (done) {
+ emscripten_cancel_main_loop();
+ }
+#endif
+}
+
+int
+main(int argc, char *argv[])
+{
+ int i;
+ const char *color_cursor = NULL;
+
+ /* Enable standard application logging */
+ SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
+
+ /* Initialize test framework */
+ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
+ if (!state) {
+ return 1;
+ }
+ for (i = 1; i < argc;) {
+ int consumed;
+
+ consumed = SDLTest_CommonArg(state, i);
+ if (consumed == 0) {
+ color_cursor = argv[i];
+ break;
+ }
+ if (consumed < 0) {
+ SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
+ quit(1);
+ }
+ i += consumed;
+ }
+
+ if (!SDLTest_CommonInit(state)) {
+ quit(2);
+ }
+
+ for (i = 0; i < state->num_windows; ++i) {
+ SDL_Renderer *renderer = state->renderers[i];
+ SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
+ SDL_RenderClear(renderer);
+ }
+
+ if (color_cursor) {
+ cursor = init_color_cursor(color_cursor);
+ } else {
+ cursor = init_system_cursor(arrow);
+ }
+ if (!cursor) {
+ SDL_Log("Error, couldn't create cursor\n");
+ quit(2);
+ }
+ SDL_SetCursor(cursor);
+
+ /* Main render loop */
+ done = 0;
+#ifdef __EMSCRIPTEN__
+ emscripten_set_main_loop(loop, 0, 1);
+#else
+ while (!done) {
+ loop();
+ }
+#endif
+
+ SDL_FreeCursor(cursor);
+ quit(0);
+
+ /* keep the compiler happy ... */
+ return(0);
+}
diff --git a/Engine/lib/sdl/test/testdisplayinfo.c b/Engine/lib/sdl/test/testdisplayinfo.c
index c228eb6b2..f06722e88 100644
--- a/Engine/lib/sdl/test/testdisplayinfo.c
+++ b/Engine/lib/sdl/test/testdisplayinfo.c
@@ -51,11 +51,18 @@ main(int argc, char *argv[])
for (dpy = 0; dpy < num_displays; dpy++) {
const int num_modes = SDL_GetNumDisplayModes(dpy);
SDL_Rect rect = { 0, 0, 0, 0 };
+ float ddpi, hdpi, vdpi;
int m;
SDL_GetDisplayBounds(dpy, &rect);
SDL_Log("%d: \"%s\" (%dx%d, (%d, %d)), %d modes.\n", dpy, SDL_GetDisplayName(dpy), rect.w, rect.h, rect.x, rect.y, num_modes);
+ if (SDL_GetDisplayDPI(dpy, &ddpi, &hdpi, &vdpi) == -1) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, " DPI: failed to query (%s)\n", SDL_GetError());
+ } else {
+ SDL_Log(" DPI: ddpi=%f; hdpi=%f; vdpi=%f\n", ddpi, hdpi, vdpi);
+ }
+
if (SDL_GetCurrentDisplayMode(dpy, &mode) == -1) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, " CURRENT: failed to query (%s)\n", SDL_GetError());
} else {
diff --git a/Engine/lib/sdl/test/testdrawchessboard.c b/Engine/lib/sdl/test/testdrawchessboard.c
index f2a1469d4..af929e9c3 100644
--- a/Engine/lib/sdl/test/testdrawchessboard.c
+++ b/Engine/lib/sdl/test/testdrawchessboard.c
@@ -100,7 +100,7 @@ main(int argc, char *argv[])
/* Create window and renderer for given surface */
- window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN);
+ window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0);
if(!window)
{
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n",SDL_GetError());
diff --git a/Engine/lib/sdl/test/testdropfile.c b/Engine/lib/sdl/test/testdropfile.c
index b7f215ee8..b729b2f64 100644
--- a/Engine/lib/sdl/test/testdropfile.c
+++ b/Engine/lib/sdl/test/testdropfile.c
@@ -77,9 +77,14 @@ main(int argc, char *argv[])
while (SDL_PollEvent(&event)) {
SDLTest_CommonEvent(state, &event, &done);
- if (event.type == SDL_DROPFILE) {
+ if (event.type == SDL_DROPBEGIN) {
+ SDL_Log("Drop beginning on window %u", (unsigned int) event.drop.windowID);
+ } else if (event.type == SDL_DROPCOMPLETE) {
+ SDL_Log("Drop complete on window %u", (unsigned int) event.drop.windowID);
+ } else if ((event.type == SDL_DROPFILE) || (event.type == SDL_DROPTEXT)) {
+ const char *typestr = (event.type == SDL_DROPFILE) ? "File" : "Text";
char *dropped_filedir = event.drop.file;
- SDL_Log("File dropped on window: %s", dropped_filedir);
+ SDL_Log("%s dropped on window %u: %s", typestr, (unsigned int) event.drop.windowID, dropped_filedir);
SDL_free(dropped_filedir);
}
}
diff --git a/Engine/lib/sdl/test/testfilesystem.c b/Engine/lib/sdl/test/testfilesystem.c
index abd301c0e..61a6d5a5a 100644
--- a/Engine/lib/sdl/test/testfilesystem.c
+++ b/Engine/lib/sdl/test/testfilesystem.c
@@ -32,9 +32,8 @@ main(int argc, char *argv[])
if(base_path == NULL){
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n",
SDL_GetError());
- return 0;
+ return 1;
}
-
SDL_Log("base path: '%s'\n", base_path);
SDL_free(base_path);
@@ -42,7 +41,7 @@ main(int argc, char *argv[])
if(pref_path == NULL){
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n",
SDL_GetError());
- return 0;
+ return 1;
}
SDL_Log("pref path: '%s'\n", pref_path);
SDL_free(pref_path);
diff --git a/Engine/lib/sdl/test/testgamecontroller.c b/Engine/lib/sdl/test/testgamecontroller.c
index ec1dfd322..38d2f7708 100644
--- a/Engine/lib/sdl/test/testgamecontroller.c
+++ b/Engine/lib/sdl/test/testgamecontroller.c
@@ -29,7 +29,7 @@
#define SCREEN_HEIGHT 320
#else
#define SCREEN_WIDTH 512
-#define SCREEN_HEIGHT 317
+#define SCREEN_HEIGHT 320
#endif
/* This is indexed by SDL_GameControllerButton. */
@@ -67,7 +67,7 @@ SDL_bool done = SDL_FALSE;
SDL_Texture *background, *button, *axis;
static SDL_Texture *
-LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)
+LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)
{
SDL_Surface *temp = NULL;
SDL_Texture *texture = NULL;
@@ -129,7 +129,7 @@ loop(void *arg)
for (i = 0; i < SDL_CONTROLLER_BUTTON_MAX; ++i) {
if (SDL_GameControllerGetButton(gamecontroller, (SDL_GameControllerButton)i) == SDL_PRESSED) {
const SDL_Rect dst = { button_positions[i].x, button_positions[i].y, 50, 50 };
- SDL_RenderCopyEx(screen, button, NULL, &dst, 0, NULL, 0);
+ SDL_RenderCopyEx(screen, button, NULL, &dst, 0, NULL, SDL_FLIP_NONE);
}
}
@@ -139,11 +139,11 @@ loop(void *arg)
if (value < -deadzone) {
const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 };
const double angle = axis_positions[i].angle;
- SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, 0);
+ SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
} else if (value > deadzone) {
const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 };
const double angle = axis_positions[i].angle + 180.0;
- SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, 0);
+ SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
}
}
@@ -181,6 +181,8 @@ WatchGameController(SDL_GameController * gamecontroller)
window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
SCREEN_HEIGHT, 0);
+ SDL_free(title);
+ title = NULL;
if (window == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError());
return SDL_FALSE;
diff --git a/Engine/lib/sdl/test/testgles.c b/Engine/lib/sdl/test/testgles.c
index 291661a09..5be48ac56 100644
--- a/Engine/lib/sdl/test/testgles.c
+++ b/Engine/lib/sdl/test/testgles.c
@@ -173,7 +173,7 @@ main(int argc, char *argv[])
quit(2);
}
- context = SDL_calloc(state->num_windows, sizeof(context));
+ context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
if (context == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
quit(2);
diff --git a/Engine/lib/sdl/test/testgles2.c b/Engine/lib/sdl/test/testgles2.c
index af5962ba4..45b3d79a3 100644
--- a/Engine/lib/sdl/test/testgles2.c
+++ b/Engine/lib/sdl/test/testgles2.c
@@ -546,7 +546,7 @@ main(int argc, char *argv[])
return 0;
}
- context = SDL_calloc(state->num_windows, sizeof(context));
+ context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
if (context == NULL) {
SDL_Log("Out of memory!\n");
quit(2);
@@ -640,7 +640,7 @@ main(int argc, char *argv[])
}
}
- datas = SDL_calloc(state->num_windows, sizeof(shader_data));
+ datas = (shader_data *)SDL_calloc(state->num_windows, sizeof(shader_data));
/* Set rendering settings for each context */
for (i = 0; i < state->num_windows; ++i) {
diff --git a/Engine/lib/sdl/test/testime.c b/Engine/lib/sdl/test/testime.c
index d6e7ea1f2..39a40f82f 100644
--- a/Engine/lib/sdl/test/testime.c
+++ b/Engine/lib/sdl/test/testime.c
@@ -9,7 +9,9 @@
including commercial applications, and to alter it and redistribute it
freely.
*/
-/* A simple program to test the Input Method support in the SDL library (2.0+) */
+/* A simple program to test the Input Method support in the SDL library (2.0+)
+ If you build without SDL_ttf, you can use the GNU Unifont hex file instead.
+ Download at http://unifoundry.com/unifont.html */
#include
#include
@@ -22,19 +24,342 @@
#include "SDL_test_common.h"
-#define DEFAULT_PTSIZE 30
-#define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf"
+#define DEFAULT_PTSIZE 30
+#ifdef HAVE_SDL_TTF
+#ifdef __MACOSX__
+#define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf"
+#elif __WIN32__
+/* Some japanese font present on at least Windows 8.1. */
+#define DEFAULT_FONT "C:\\Windows\\Fonts\\yugothic.ttf"
+#else
+#define DEFAULT_FONT "NoDefaultFont.ttf"
+#endif
+#else
+#define DEFAULT_FONT "unifont-9.0.02.hex"
+#endif
#define MAX_TEXT_LENGTH 256
static SDLTest_CommonState *state;
static SDL_Rect textRect, markedRect;
-static SDL_Color lineColor = {0,0,0,0};
-static SDL_Color backColor = {255,255,255,0};
-static SDL_Color textColor = {0,0,0,0};
+static SDL_Color lineColor = {0,0,0,255};
+static SDL_Color backColor = {255,255,255,255};
+static SDL_Color textColor = {0,0,0,255};
static char text[MAX_TEXT_LENGTH], markedText[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
static int cursor = 0;
#ifdef HAVE_SDL_TTF
static TTF_Font *font;
+#else
+#define UNIFONT_MAX_CODEPOINT 0x1ffff
+#define UNIFONT_NUM_GLYPHS 0x20000
+/* Using 512x512 textures that are supported everywhere. */
+#define UNIFONT_TEXTURE_WIDTH 512
+#define UNIFONT_GLYPHS_IN_ROW (UNIFONT_TEXTURE_WIDTH / 16)
+#define UNIFONT_GLYPHS_IN_TEXTURE (UNIFONT_GLYPHS_IN_ROW * UNIFONT_GLYPHS_IN_ROW)
+#define UNIFONT_NUM_TEXTURES ((UNIFONT_NUM_GLYPHS + UNIFONT_GLYPHS_IN_TEXTURE - 1) / UNIFONT_GLYPHS_IN_TEXTURE)
+#define UNIFONT_TEXTURE_SIZE (UNIFONT_TEXTURE_WIDTH * UNIFONT_TEXTURE_WIDTH * 4)
+#define UNIFONT_TEXTURE_PITCH (UNIFONT_TEXTURE_WIDTH * 4)
+#define UNIFONT_DRAW_SCALE 2
+struct UnifontGlyph {
+ Uint8 width;
+ Uint8 data[32];
+} *unifontGlyph;
+static SDL_Texture **unifontTexture;
+static Uint8 unifontTextureLoaded[UNIFONT_NUM_TEXTURES] = {0};
+
+/* Unifont loading code start */
+
+static Uint8 dehex(char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ else if (c >= 'a' && c <= 'f')
+ return c - 'a' + 10;
+ else if (c >= 'A' && c <= 'F')
+ return c - 'A' + 10;
+ return 255;
+}
+
+static Uint8 dehex2(char c1, char c2)
+{
+ return (dehex(c1) << 4) | dehex(c2);
+}
+
+static Uint8 validate_hex(const char *cp, size_t len, Uint32 *np)
+{
+ Uint32 n = 0;
+ for (; len > 0; cp++, len--)
+ {
+ Uint8 c = dehex(*cp);
+ if (c == 255)
+ return 0;
+ n = (n << 4) | c;
+ }
+ if (np != NULL)
+ *np = n;
+ return 1;
+}
+
+static void unifont_init(const char *fontname)
+{
+ Uint8 hexBuffer[65];
+ Uint32 numGlyphs = 0;
+ int lineNumber = 1;
+ size_t bytesRead;
+ SDL_RWops *hexFile;
+ const size_t unifontGlyphSize = UNIFONT_NUM_GLYPHS * sizeof(struct UnifontGlyph);
+ const size_t unifontTextureSize = UNIFONT_NUM_TEXTURES * state->num_windows * sizeof(void *);
+
+ /* Allocate memory for the glyph data so the file can be closed after initialization. */
+ unifontGlyph = (struct UnifontGlyph *)SDL_malloc(unifontGlyphSize);
+ if (unifontGlyph == NULL)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to allocate %d KiB for glyph data.\n", (int)(unifontGlyphSize + 1023) / 1024);
+ exit(-1);
+ }
+ SDL_memset(unifontGlyph, 0, unifontGlyphSize);
+
+ /* Allocate memory for texture pointers for all renderers. */
+ unifontTexture = (SDL_Texture **)SDL_malloc(unifontTextureSize);
+ if (unifontTexture == NULL)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to allocate %d KiB for texture pointer data.\n", (int)(unifontTextureSize + 1023) / 1024);
+ exit(-1);
+ }
+ SDL_memset(unifontTexture, 0, unifontTextureSize);
+
+ hexFile = SDL_RWFromFile(fontname, "rb");
+ if (hexFile == NULL)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to open font file: %s\n", fontname);
+ exit(-1);
+ }
+
+ /* Read all the glyph data into memory to make it accessible later when textures are created. */
+ do {
+ int i, codepointHexSize;
+ size_t bytesOverread;
+ Uint8 glyphWidth;
+ Uint32 codepoint;
+
+ bytesRead = SDL_RWread(hexFile, hexBuffer, 1, 9);
+ if (numGlyphs > 0 && bytesRead == 0)
+ break; /* EOF */
+ if ((numGlyphs == 0 && bytesRead == 0) || (numGlyphs > 0 && bytesRead < 9))
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unfiont: Unexpected end of hex file.\n");
+ exit(-1);
+ }
+
+ /* Looking for the colon that separates the codepoint and glyph data at position 2, 4, 6 and 8. */
+ if (hexBuffer[2] == ':')
+ codepointHexSize = 2;
+ else if (hexBuffer[4] == ':')
+ codepointHexSize = 4;
+ else if (hexBuffer[6] == ':')
+ codepointHexSize = 6;
+ else if (hexBuffer[8] == ':')
+ codepointHexSize = 8;
+ else
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Could not find codepoint and glyph data separator symbol in hex file on line %d.\n", lineNumber);
+ exit(-1);
+ }
+
+ if (!validate_hex((const char *)hexBuffer, codepointHexSize, &codepoint))
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Malformed hexadecimal number in hex file on line %d.\n", lineNumber);
+ exit(-1);
+ }
+ if (codepoint > UNIFONT_MAX_CODEPOINT)
+ SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "unifont: Codepoint on line %d exceeded limit of 0x%x.\n", lineNumber, UNIFONT_MAX_CODEPOINT);
+
+ /* If there was glyph data read in the last file read, move it to the front of the buffer. */
+ bytesOverread = 8 - codepointHexSize;
+ if (codepointHexSize < 8)
+ SDL_memmove(hexBuffer, hexBuffer + codepointHexSize + 1, bytesOverread);
+ bytesRead = SDL_RWread(hexFile, hexBuffer + bytesOverread, 1, 33 - bytesOverread);
+ if (bytesRead < (33 - bytesOverread))
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n");
+ exit(-1);
+ }
+ if (hexBuffer[32] == '\n')
+ glyphWidth = 8;
+ else
+ {
+ glyphWidth = 16;
+ bytesRead = SDL_RWread(hexFile, hexBuffer + 33, 1, 32);
+ if (bytesRead < 32)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Unexpected end of hex file.\n");
+ exit(-1);
+ }
+ }
+
+ if (!validate_hex((const char *)hexBuffer, glyphWidth * 4, NULL))
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Malformed hexadecimal glyph data in hex file on line %d.\n", lineNumber);
+ exit(-1);
+ }
+
+ if (codepoint <= UNIFONT_MAX_CODEPOINT)
+ {
+ if (unifontGlyph[codepoint].width > 0)
+ SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "unifont: Ignoring duplicate codepoint 0x%08x in hex file on line %d.\n", codepoint, lineNumber);
+ else
+ {
+ unifontGlyph[codepoint].width = glyphWidth;
+ /* Pack the hex data into a more compact form. */
+ for (i = 0; i < glyphWidth * 2; i++)
+ unifontGlyph[codepoint].data[i] = dehex2(hexBuffer[i * 2], hexBuffer[i * 2 + 1]);
+ numGlyphs++;
+ }
+ }
+
+ lineNumber++;
+ } while (bytesRead > 0);
+
+ SDL_RWclose(hexFile);
+ SDL_Log("unifont: Loaded %u glyphs.\n", numGlyphs);
+}
+
+static void unifont_make_rgba(Uint8 *src, Uint8 *dst, Uint8 width)
+{
+ int i, j;
+ Uint8 *row = dst;
+
+ for (i = 0; i < width * 2; i++)
+ {
+ Uint8 data = src[i];
+ for (j = 0; j < 8; j++)
+ {
+ if (data & 0x80)
+ {
+ row[0] = textColor.r;
+ row[1] = textColor.g;
+ row[2] = textColor.b;
+ row[3] = textColor.a;
+ }
+ else
+ {
+ row[0] = 0;
+ row[1] = 0;
+ row[2] = 0;
+ row[3] = 0;
+ }
+ data <<= 1;
+ row += 4;
+ }
+
+ if (width == 8 || (width == 16 && i % 2 == 1))
+ {
+ dst += UNIFONT_TEXTURE_PITCH;
+ row = dst;
+ }
+ }
+}
+
+static void unifont_load_texture(Uint32 textureID)
+{
+ int i;
+ Uint8 * textureRGBA;
+
+ if (textureID >= UNIFONT_NUM_TEXTURES)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Tried to load out of range texture %u.\n", textureID);
+ exit(-1);
+ }
+
+ textureRGBA = (Uint8 *)SDL_malloc(UNIFONT_TEXTURE_SIZE);
+ if (textureRGBA == NULL)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to allocate %d MiB for a texture.\n", UNIFONT_TEXTURE_SIZE / 1024 / 1024);
+ exit(-1);
+ }
+ SDL_memset(textureRGBA, 0, UNIFONT_TEXTURE_SIZE);
+
+ /* Copy the glyphs into memory in RGBA format. */
+ for (i = 0; i < UNIFONT_GLYPHS_IN_TEXTURE; i++)
+ {
+ Uint32 codepoint = UNIFONT_GLYPHS_IN_TEXTURE * textureID + i;
+ if (unifontGlyph[codepoint].width > 0)
+ {
+ const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE;
+ const size_t offset = (cInTex / UNIFONT_GLYPHS_IN_ROW) * UNIFONT_TEXTURE_PITCH * 16 + (cInTex % UNIFONT_GLYPHS_IN_ROW) * 16 * 4;
+ unifont_make_rgba(unifontGlyph[codepoint].data, textureRGBA + offset, unifontGlyph[codepoint].width);
+ }
+ }
+
+ /* Create textures and upload the RGBA data from above. */
+ for (i = 0; i < state->num_windows; ++i)
+ {
+ SDL_Renderer *renderer = state->renderers[i];
+ SDL_Texture *tex = unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID];
+ if (state->windows[i] == NULL || renderer == NULL || tex != NULL)
+ continue;
+ tex = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, UNIFONT_TEXTURE_WIDTH, UNIFONT_TEXTURE_WIDTH);
+ if (tex == NULL)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to create texture %u for renderer %d.\n", textureID, i);
+ exit(-1);
+ }
+ unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID] = tex;
+ SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND);
+ if (SDL_UpdateTexture(tex, NULL, textureRGBA, UNIFONT_TEXTURE_PITCH) != 0)
+ {
+ SDL_Log("unifont error: Failed to update texture %u data for renderer %d.\n", textureID, i);
+ }
+ }
+
+ SDL_free(textureRGBA);
+ unifontTextureLoaded[textureID] = 1;
+}
+
+static Sint32 unifont_draw_glyph(Uint32 codepoint, int rendererID, SDL_Rect *dstrect)
+{
+ SDL_Texture *texture;
+ const Uint32 textureID = codepoint / UNIFONT_GLYPHS_IN_TEXTURE;
+ SDL_Rect srcrect;
+ srcrect.w = srcrect.h = 16;
+ if (codepoint > UNIFONT_MAX_CODEPOINT)
+ return 0;
+ if (!unifontTextureLoaded[textureID])
+ unifont_load_texture(textureID);
+ texture = unifontTexture[UNIFONT_NUM_TEXTURES * rendererID + textureID];
+ if (texture != NULL)
+ {
+ const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE;
+ srcrect.x = cInTex % UNIFONT_GLYPHS_IN_ROW * 16;
+ srcrect.y = cInTex / UNIFONT_GLYPHS_IN_ROW * 16;
+ SDL_RenderCopy(state->renderers[rendererID], texture, &srcrect, dstrect);
+ }
+ return unifontGlyph[codepoint].width;
+}
+
+static void unifont_cleanup()
+{
+ int i, j;
+ for (i = 0; i < state->num_windows; ++i)
+ {
+ SDL_Renderer *renderer = state->renderers[i];
+ if (state->windows[i] == NULL || renderer == NULL)
+ continue;
+ for (j = 0; j < UNIFONT_NUM_TEXTURES; j++)
+ {
+ SDL_Texture *tex = unifontTexture[UNIFONT_NUM_TEXTURES * i + j];
+ if (tex != NULL)
+ SDL_DestroyTexture(tex);
+ }
+ }
+
+ for (j = 0; j < UNIFONT_NUM_TEXTURES; j++)
+ unifontTextureLoaded[j] = 0;
+
+ SDL_free(unifontTexture);
+ SDL_free(unifontGlyph);
+}
+
+/* Unifont code end */
#endif
size_t utf8_length(unsigned char c)
@@ -78,6 +403,30 @@ char *utf8_advance(char *p, size_t distance)
return p;
}
+Uint32 utf8_decode(char *p, size_t len)
+{
+ Uint32 codepoint = 0;
+ size_t i = 0;
+ if (!len)
+ return 0;
+
+ for (; i < len; ++i)
+ {
+ if (i == 0)
+ codepoint = (0xff >> len) & *p;
+ else
+ {
+ codepoint <<= 6;
+ codepoint |= 0x3f & *p;
+ }
+ if (!*p)
+ return 0;
+ p++;
+ }
+
+ return codepoint;
+}
+
void usage()
{
SDL_Log("usage: testime [--font fontfile]\n");
@@ -105,34 +454,61 @@ void CleanupVideo()
#ifdef HAVE_SDL_TTF
TTF_CloseFont(font);
TTF_Quit();
+#else
+ unifont_cleanup();
#endif
}
+void _Redraw(int rendererID) {
+ SDL_Renderer * renderer = state->renderers[rendererID];
+ SDL_Rect drawnTextRect, cursorRect, underlineRect;
+ drawnTextRect = textRect;
+ drawnTextRect.w = 0;
-void _Redraw(SDL_Renderer * renderer) {
- int w = 0, h = textRect.h;
- SDL_Rect cursorRect, underlineRect;
-
- SDL_SetRenderDrawColor(renderer, 255,255,255,255);
+ SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);
SDL_RenderFillRect(renderer,&textRect);
-#ifdef HAVE_SDL_TTF
if (*text)
{
+#ifdef HAVE_SDL_TTF
SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, text, textColor);
- SDL_Rect dest = {textRect.x, textRect.y, textSur->w, textSur->h };
+ SDL_Texture *texture;
- SDL_Texture *texture = SDL_CreateTextureFromSurface(renderer,textSur);
+ /* Vertically center text */
+ drawnTextRect.y = textRect.y + (textRect.h - textSur->h) / 2;
+ drawnTextRect.w = textSur->w;
+ drawnTextRect.h = textSur->h;
+
+ texture = SDL_CreateTextureFromSurface(renderer,textSur);
SDL_FreeSurface(textSur);
- SDL_RenderCopy(renderer,texture,NULL,&dest);
+ SDL_RenderCopy(renderer,texture,NULL,&drawnTextRect);
SDL_DestroyTexture(texture);
- TTF_SizeUTF8(font, text, &w, &h);
- }
-#endif
+#else
+ char *utext = text;
+ Uint32 codepoint;
+ size_t len;
+ SDL_Rect dstrect;
- markedRect.x = textRect.x + w;
- markedRect.w = textRect.w - w;
+ dstrect.x = textRect.x;
+ dstrect.y = textRect.y + (textRect.h - 16 * UNIFONT_DRAW_SCALE) / 2;
+ dstrect.w = 16 * UNIFONT_DRAW_SCALE;
+ dstrect.h = 16 * UNIFONT_DRAW_SCALE;
+ drawnTextRect.y = dstrect.y;
+ drawnTextRect.h = dstrect.h;
+
+ while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))))
+ {
+ Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE;
+ dstrect.x += advance;
+ drawnTextRect.w += advance;
+ utext += len;
+ }
+#endif
+ }
+
+ markedRect.x = textRect.x + drawnTextRect.w;
+ markedRect.w = textRect.w - drawnTextRect.w;
if (markedRect.w < 0)
{
/* Stop text input because we cannot hold any more characters */
@@ -144,49 +520,88 @@ void _Redraw(SDL_Renderer * renderer) {
SDL_StartTextInput();
}
- cursorRect = markedRect;
+ cursorRect = drawnTextRect;
+ cursorRect.x += cursorRect.w;
cursorRect.w = 2;
- cursorRect.h = h;
+ cursorRect.h = drawnTextRect.h;
- SDL_SetRenderDrawColor(renderer, 255,255,255,255);
+ drawnTextRect.x += drawnTextRect.w;
+ drawnTextRect.w = 0;
+
+ SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);
SDL_RenderFillRect(renderer,&markedRect);
if (markedText[0])
{
#ifdef HAVE_SDL_TTF
+ SDL_Surface *textSur;
+ SDL_Texture *texture;
if (cursor)
{
char *p = utf8_advance(markedText, cursor);
char c = 0;
if (!p)
- p = &markedText[strlen(markedText)];
+ p = &markedText[SDL_strlen(markedText)];
c = *p;
*p = 0;
- TTF_SizeUTF8(font, markedText, &w, 0);
- cursorRect.x += w;
+ TTF_SizeUTF8(font, markedText, &drawnTextRect.w, NULL);
+ cursorRect.x += drawnTextRect.w;
*p = c;
}
- SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, markedText, textColor);
- SDL_Rect dest = {markedRect.x, markedRect.y, textSur->w, textSur->h };
- TTF_SizeUTF8(font, markedText, &w, &h);
- SDL_Texture *texture = SDL_CreateTextureFromSurface(renderer,textSur);
+ textSur = TTF_RenderUTF8_Blended(font, markedText, textColor);
+ /* Vertically center text */
+ drawnTextRect.y = textRect.y + (textRect.h - textSur->h) / 2;
+ drawnTextRect.w = textSur->w;
+ drawnTextRect.h = textSur->h;
+
+ texture = SDL_CreateTextureFromSurface(renderer,textSur);
SDL_FreeSurface(textSur);
- SDL_RenderCopy(renderer,texture,NULL,&dest);
+ SDL_RenderCopy(renderer,texture,NULL,&drawnTextRect);
SDL_DestroyTexture(texture);
+#else
+ int i = 0;
+ char *utext = markedText;
+ Uint32 codepoint;
+ size_t len;
+ SDL_Rect dstrect;
+
+ dstrect.x = drawnTextRect.x;
+ dstrect.y = textRect.y + (textRect.h - 16 * UNIFONT_DRAW_SCALE) / 2;
+ dstrect.w = 16 * UNIFONT_DRAW_SCALE;
+ dstrect.h = 16 * UNIFONT_DRAW_SCALE;
+ drawnTextRect.y = dstrect.y;
+ drawnTextRect.h = dstrect.h;
+
+ while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))))
+ {
+ Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE;
+ dstrect.x += advance;
+ drawnTextRect.w += advance;
+ if (i < cursor)
+ cursorRect.x += advance;
+ i++;
+ utext += len;
+ }
#endif
- underlineRect = markedRect;
- underlineRect.y += (h - 2);
- underlineRect.h = 2;
- underlineRect.w = w;
+ if (cursor > 0)
+ {
+ cursorRect.y = drawnTextRect.y;
+ cursorRect.h = drawnTextRect.h;
+ }
- SDL_SetRenderDrawColor(renderer, 0,0,0,0);
- SDL_RenderFillRect(renderer,&markedRect);
+ underlineRect = markedRect;
+ underlineRect.y = drawnTextRect.y + drawnTextRect.h - 2;
+ underlineRect.h = 2;
+ underlineRect.w = drawnTextRect.w;
+
+ SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);
+ SDL_RenderFillRect(renderer, &underlineRect);
}
- SDL_SetRenderDrawColor(renderer, 0,0,0,0);
+ SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);
SDL_RenderFillRect(renderer,&cursorRect);
SDL_SetTextInputRect(&markedRect);
@@ -201,7 +616,8 @@ void Redraw() {
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
SDL_RenderClear(renderer);
- _Redraw(renderer);
+ /* Sending in the window id to let the font renderers know which one we're working with. */
+ _Redraw(i);
SDL_RenderPresent(renderer);
}
@@ -259,6 +675,8 @@ int main(int argc, char *argv[]) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to find font: %s\n", TTF_GetError());
exit(-1);
}
+#else
+ unifont_init(fontname);
#endif
SDL_Log("Using font: %s\n", fontname);
@@ -288,6 +706,8 @@ int main(int argc, char *argv[]) {
Redraw();
break;
case SDLK_BACKSPACE:
+ /* Only delete text if not in editing mode. */
+ if (!markedText[0])
{
size_t textlen = SDL_strlen(text);
@@ -354,7 +774,7 @@ int main(int argc, char *argv[]) {
SDL_Log("text editing \"%s\", selected range (%d, %d)\n",
event.edit.text, event.edit.start, event.edit.length);
- strcpy(markedText, event.edit.text);
+ SDL_strlcpy(markedText, event.edit.text, SDL_TEXTEDITINGEVENT_TEXT_SIZE);
cursor = event.edit.start;
Redraw();
break;
diff --git a/Engine/lib/sdl/test/testlock.c b/Engine/lib/sdl/test/testlock.c
index 1106ec3bf..113ba0d4c 100644
--- a/Engine/lib/sdl/test/testlock.c
+++ b/Engine/lib/sdl/test/testlock.c
@@ -23,7 +23,7 @@
static SDL_mutex *mutex = NULL;
static SDL_threadID mainthread;
static SDL_Thread *threads[6];
-static volatile int doterminate = 0;
+static SDL_atomic_t doterminate;
/*
* SDL_Quit() shouldn't be used with atexit() directly because
@@ -45,7 +45,7 @@ void
terminate(int sig)
{
signal(SIGINT, terminate);
- doterminate = 1;
+ SDL_AtomicSet(&doterminate, 1);
}
void
@@ -54,7 +54,7 @@ closemutex(int sig)
SDL_threadID id = SDL_ThreadID();
int i;
SDL_Log("Process %lu: Cleaning up...\n", id == mainthread ? 0 : id);
- doterminate = 1;
+ SDL_AtomicSet(&doterminate, 1);
for (i = 0; i < 6; ++i)
SDL_WaitThread(threads[i], NULL);
SDL_DestroyMutex(mutex);
@@ -66,7 +66,7 @@ Run(void *data)
{
if (SDL_ThreadID() == mainthread)
signal(SIGTERM, closemutex);
- while (!doterminate) {
+ while (!SDL_AtomicGet(&doterminate)) {
SDL_Log("Process %lu ready to work\n", SDL_ThreadID());
if (SDL_LockMutex(mutex) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't lock mutex: %s", SDL_GetError());
@@ -82,7 +82,7 @@ Run(void *data)
/* If this sleep isn't done, then threads may starve */
SDL_Delay(10);
}
- if (SDL_ThreadID() == mainthread && doterminate) {
+ if (SDL_ThreadID() == mainthread && SDL_AtomicGet(&doterminate)) {
SDL_Log("Process %lu: raising SIGTERM\n", SDL_ThreadID());
raise(SIGTERM);
}
@@ -105,6 +105,8 @@ main(int argc, char *argv[])
}
atexit(SDL_Quit_Wrapper);
+ SDL_AtomicSet(&doterminate, 0);
+
if ((mutex = SDL_CreateMutex()) == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create mutex: %s\n", SDL_GetError());
exit(1);
diff --git a/Engine/lib/sdl/test/testmultiaudio.c b/Engine/lib/sdl/test/testmultiaudio.c
index 117ef2696..1b07ba9fc 100644
--- a/Engine/lib/sdl/test/testmultiaudio.c
+++ b/Engine/lib/sdl/test/testmultiaudio.c
@@ -25,7 +25,7 @@ typedef struct
{
SDL_AudioDeviceID dev;
int soundpos;
- volatile int done;
+ SDL_atomic_t done;
} callback_data;
callback_data cbd[64];
@@ -46,14 +46,14 @@ play_through_once(void *arg, Uint8 * stream, int len)
if (len > 0) {
stream += cpy;
SDL_memset(stream, spec.silence, len);
- cbd->done++;
+ SDL_AtomicSet(&cbd->done, 1);
}
}
void
loop()
{
- if(cbd[0].done) {
+ if (SDL_AtomicGet(&cbd[0].done)) {
#ifdef __EMSCRIPTEN__
emscripten_cancel_main_loop();
#endif
@@ -100,8 +100,7 @@ test_multi_audio(int devcount)
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(loop, 0, 1);
#else
- while (!cbd[0].done)
- {
+ while (!SDL_AtomicGet(&cbd[0].done)) {
#ifdef __ANDROID__
/* Empty queue, some application events would prevent pause. */
while (SDL_PollEvent(&event)){}
@@ -136,7 +135,7 @@ test_multi_audio(int devcount)
while (keep_going) {
keep_going = 0;
for (i = 0; i < devcount; i++) {
- if ((cbd[i].dev) && (!cbd[i].done)) {
+ if ((cbd[i].dev) && (!SDL_AtomicGet(&cbd[i].done))) {
keep_going = 1;
}
}
diff --git a/Engine/lib/sdl/test/testqsort.c b/Engine/lib/sdl/test/testqsort.c
new file mode 100644
index 000000000..48659f307
--- /dev/null
+++ b/Engine/lib/sdl/test/testqsort.c
@@ -0,0 +1,108 @@
+/*
+ Copyright (C) 1997-2016 Sam Lantinga
+
+ 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.
+*/
+
+#include "SDL_test.h"
+
+static int
+num_compare(const void *_a, const void *_b)
+{
+ const int a = *((const int *) _a);
+ const int b = *((const int *) _b);
+ return (a < b) ? -1 : ((a > b) ? 1 : 0);
+}
+
+static void
+test_sort(const char *desc, int *nums, const int arraylen)
+{
+ int i;
+ int prev;
+
+ SDL_Log("test: %s arraylen=%d", desc, arraylen);
+
+ SDL_qsort(nums, arraylen, sizeof (nums[0]), num_compare);
+
+ prev = nums[0];
+ for (i = 1; i < arraylen; i++) {
+ const int val = nums[i];
+ if (val < prev) {
+ SDL_Log("sort is broken!");
+ return;
+ }
+ prev = val;
+ }
+}
+
+int
+main(int argc, char *argv[])
+{
+ static int nums[1024 * 100];
+ static const int itervals[] = { SDL_arraysize(nums), 12 };
+ int iteration;
+ SDLTest_RandomContext rndctx;
+
+ if (argc > 1)
+ {
+ int success;
+ Uint64 seed = 0;
+ if (argv[1][0] == '0' && argv[1][1] == 'x')
+ success = SDL_sscanf(argv[1] + 2, "%llx", &seed);
+ else
+ success = SDL_sscanf(argv[1], "%llu", &seed);
+ if (!success)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n");
+ return 1;
+ }
+ if (seed <= 0xffffffff)
+ {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Seed must be equal or greater than 0x100000000.\n");
+ return 1;
+ }
+ SDLTest_RandomInit(&rndctx, (unsigned int)(seed >> 32), (unsigned int)(seed & 0xffffffff));
+ }
+ else
+ {
+ SDLTest_RandomInitTime(&rndctx);
+ }
+ SDL_Log("Using random seed 0x%08x%08x\n", rndctx.x, rndctx.c);
+
+ for (iteration = 0; iteration < SDL_arraysize(itervals); iteration++) {
+ const int arraylen = itervals[iteration];
+ int i;
+
+ for (i = 0; i < arraylen; i++) {
+ nums[i] = i;
+ }
+ test_sort("already sorted", nums, arraylen);
+
+ for (i = 0; i < arraylen; i++) {
+ nums[i] = i;
+ }
+ nums[arraylen-1] = -1;
+ test_sort("already sorted except last element", nums, arraylen);
+
+ for (i = 0; i < arraylen; i++) {
+ nums[i] = (arraylen-1) - i;
+ }
+ test_sort("reverse sorted", nums, arraylen);
+
+ for (i = 0; i < arraylen; i++) {
+ nums[i] = SDLTest_RandomInt(&rndctx);
+ }
+ test_sort("random sorted", nums, arraylen);
+ }
+
+ return 0;
+}
+
+/* vi: set ts=4 sw=4 expandtab: */
+
diff --git a/Engine/lib/sdl/test/testrendercopyex.c b/Engine/lib/sdl/test/testrendercopyex.c
index 856abf7d0..e34890245 100644
--- a/Engine/lib/sdl/test/testrendercopyex.c
+++ b/Engine/lib/sdl/test/testrendercopyex.c
@@ -45,7 +45,7 @@ quit(int rc)
}
SDL_Texture *
-LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)
+LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)
{
SDL_Surface *temp;
SDL_Texture *texture;
@@ -126,7 +126,7 @@ Draw(DrawState *s)
s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;
s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;
- SDL_RenderCopyEx(s->renderer, s->sprite, NULL, &s->sprite_rect, (double)s->sprite_rect.w, center, s->scale_direction);
+ SDL_RenderCopyEx(s->renderer, s->sprite, NULL, &s->sprite_rect, (double)s->sprite_rect.w, center, (SDL_RendererFlip)s->scale_direction);
SDL_SetRenderTarget(s->renderer, NULL);
SDL_RenderCopy(s->renderer, target, NULL, NULL);
diff --git a/Engine/lib/sdl/test/testshape.c b/Engine/lib/sdl/test/testshape.c
index 00750a970..476fac21e 100644
--- a/Engine/lib/sdl/test/testshape.c
+++ b/Engine/lib/sdl/test/testshape.c
@@ -71,6 +71,10 @@ int main(int argc,char** argv)
num_pictures = argc - 1;
pictures = (LoadedPicture *)SDL_malloc(sizeof(LoadedPicture)*num_pictures);
+ if (!pictures) {
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not allocate memory.");
+ exit(1);
+ }
for(i=0;inum_windows; ++i) {
+ SDL_Renderer *renderer = state->renderers[i];
+ SDL_RenderClear(renderer);
+ SDL_RenderPresent(renderer);
+ }
#ifdef __EMSCRIPTEN__
if (done) {
emscripten_cancel_main_loop();
@@ -122,7 +129,6 @@ main(int argc, char *argv[])
if (!state) {
return 1;
}
- state->skip_renderer = SDL_TRUE;
for (i = 1; i < argc;) {
int consumed;
@@ -140,6 +146,12 @@ main(int argc, char *argv[])
quit(2);
}
+ for (i = 0; i < state->num_windows; ++i) {
+ SDL_Renderer *renderer = state->renderers[i];
+ SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
+ SDL_RenderClear(renderer);
+ }
+
/* Main render loop */
done = 0;
#ifdef __EMSCRIPTEN__
diff --git a/Engine/lib/sdl/test/torturethread.c b/Engine/lib/sdl/test/torturethread.c
index 5719a7195..6b98a0a9f 100644
--- a/Engine/lib/sdl/test/torturethread.c
+++ b/Engine/lib/sdl/test/torturethread.c
@@ -21,7 +21,7 @@
#define NUMTHREADS 10
-static char volatile time_for_threads_to_die[NUMTHREADS];
+static SDL_atomic_t time_for_threads_to_die[NUMTHREADS];
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
static void
@@ -58,7 +58,7 @@ ThreadFunc(void *data)
}
SDL_Log("Thread '%d' waiting for signal\n", tid);
- while (time_for_threads_to_die[tid] != 1) {
+ while (SDL_AtomicGet(&time_for_threads_to_die[tid]) != 1) {
; /* do nothing */
}
@@ -92,7 +92,7 @@ main(int argc, char *argv[])
for (i = 0; i < NUMTHREADS; i++) {
char name[64];
SDL_snprintf(name, sizeof (name), "Parent%d", i);
- time_for_threads_to_die[i] = 0;
+ SDL_AtomicSet(&time_for_threads_to_die[i], 0);
threads[i] = SDL_CreateThread(ThreadFunc, name, (void*) (uintptr_t) i);
if (threads[i] == NULL) {
@@ -102,7 +102,7 @@ main(int argc, char *argv[])
}
for (i = 0; i < NUMTHREADS; i++) {
- time_for_threads_to_die[i] = 1;
+ SDL_AtomicSet(&time_for_threads_to_die[i], 1);
}
for (i = 0; i < NUMTHREADS; i++) {
diff --git a/Engine/source/.gitattributes b/Engine/source/.gitattributes
new file mode 100644
index 000000000..abf67ea1d
--- /dev/null
+++ b/Engine/source/.gitattributes
@@ -0,0 +1,5 @@
+*.cpp filter=tabspace
+*.h filter=tabspace
+*.l filter=tabspace
+*.y filter=tabspace
+*.mm filter=tabspace
diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake
index 44591dd94..30027e4cd 100644
--- a/Tools/CMake/torque3d.cmake
+++ b/Tools/CMake/torque3d.cmake
@@ -640,6 +640,7 @@ if (APPLE)
addFramework("CoreVideo")
#grrr damn you sdl!
addFramework("Carbon")
+ addFramework("AudioToolbox")
addLib("iconv")
#set a few arch defaults
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "OSX Architecture" FORCE)
From cf56764347fdb481070e594a7e6d839311c7ae7a Mon Sep 17 00:00:00 2001
From: "Thomas \"elfprince13\" Dickerson"
Date: Fri, 13 Jan 2017 10:45:52 -0500
Subject: [PATCH 07/26] didn't mean to include this for everyone
---
Engine/source/.gitattributes | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 Engine/source/.gitattributes
diff --git a/Engine/source/.gitattributes b/Engine/source/.gitattributes
deleted file mode 100644
index abf67ea1d..000000000
--- a/Engine/source/.gitattributes
+++ /dev/null
@@ -1,5 +0,0 @@
-*.cpp filter=tabspace
-*.h filter=tabspace
-*.l filter=tabspace
-*.y filter=tabspace
-*.mm filter=tabspace
From 2029e3eb2234e7175c4dae718617658bc12e86dd Mon Sep 17 00:00:00 2001
From: LukasPJ
Date: Sun, 15 Jan 2017 23:22:46 +0100
Subject: [PATCH 08/26] Make RenderPassManager call Parent::InitPersistFields
---
Engine/source/renderInstance/renderPassManager.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/Engine/source/renderInstance/renderPassManager.cpp b/Engine/source/renderInstance/renderPassManager.cpp
index f620a627b..3ed2671dc 100644
--- a/Engine/source/renderInstance/renderPassManager.cpp
+++ b/Engine/source/renderInstance/renderPassManager.cpp
@@ -124,6 +124,7 @@ RenderPassManager::RenderBinEventSignal& RenderPassManager::getRenderBinSignal()
void RenderPassManager::initPersistFields()
{
+ Parent::initPersistFields();
}
RenderPassManager::RenderPassManager()
From f50d46dffc7ccf382bb936c9ea90b4cced3c5723 Mon Sep 17 00:00:00 2001
From: LukasPJ
Date: Sun, 15 Jan 2017 23:23:55 +0100
Subject: [PATCH 09/26] Cleanup when deactivating light manager instead of
reinitializing
---
.../renderInstance/renderParticleMgr.cpp | 66 +++++++++++--------
1 file changed, 37 insertions(+), 29 deletions(-)
diff --git a/Engine/source/renderInstance/renderParticleMgr.cpp b/Engine/source/renderInstance/renderParticleMgr.cpp
index dcae9756c..ad0811f91 100644
--- a/Engine/source/renderInstance/renderParticleMgr.cpp
+++ b/Engine/source/renderInstance/renderParticleMgr.cpp
@@ -589,43 +589,51 @@ bool RenderParticleMgr::_initShader()
void RenderParticleMgr::_onLMActivate( const char*, bool activate )
{
- RenderPassManager *rpm = getRenderPass();
- if ( !rpm )
- return;
-
- // Hunt for the pre-pass manager/target
- RenderPrePassMgr *prePassBin = NULL;
- for( U32 i = 0; i < rpm->getManagerCount(); i++ )
+ if ( activate )
{
- RenderBinManager *bin = rpm->getManager(i);
- if( bin->getRenderInstType() == RenderPrePassMgr::RIT_PrePass )
+ RenderPassManager *rpm = getRenderPass();
+ if ( !rpm )
+ return;
+
+ // Hunt for the pre-pass manager/target
+ RenderPrePassMgr *prePassBin = NULL;
+ for( U32 i = 0; i < rpm->getManagerCount(); i++ )
{
- prePassBin = (RenderPrePassMgr*)bin;
- break;
+ RenderBinManager *bin = rpm->getManager(i);
+ if( bin->getRenderInstType() == RenderPrePassMgr::RIT_PrePass )
+ {
+ prePassBin = (RenderPrePassMgr*)bin;
+ break;
+ }
}
- }
- // If we found the prepass bin, set this bin to render very shortly afterwards
- // and re-add this render-manager. If there is no pre-pass bin, or it doesn't
- // have a depth-texture, we can't render offscreen.
- mOffscreenRenderEnabled = prePassBin && (prePassBin->getTargetChainLength() > 0);
- if(mOffscreenRenderEnabled)
- {
- rpm->removeManager(this);
- setRenderOrder( prePassBin->getRenderOrder() + 0.011f );
- rpm->addManager(this);
- }
+ // If we found the prepass bin, set this bin to render very shortly afterwards
+ // and re-add this render-manager. If there is no pre-pass bin, or it doesn't
+ // have a depth-texture, we can't render offscreen.
+ mOffscreenRenderEnabled = prePassBin && (prePassBin->getTargetChainLength() > 0);
+ if(mOffscreenRenderEnabled)
+ {
+ rpm->removeManager(this);
+ setRenderOrder( prePassBin->getRenderOrder() + 0.011f );
+ rpm->addManager(this);
+ }
- // Find the targets we use
- mPrepassTarget = NamedTexTarget::find( "prepass" );
- mEdgeTarget = NamedTexTarget::find( "edge" );
+ // Find the targets we use
+ mPrepassTarget = NamedTexTarget::find( "prepass" );
+ mEdgeTarget = NamedTexTarget::find( "edge" );
- // Setup the shader
- if ( activate )
+ // Setup the shader
_initShader();
- if ( mScreenQuadVertBuff.isNull() )
- _initGFXResources();
+ if ( mScreenQuadVertBuff.isNull() )
+ _initGFXResources();
+ }
+ else
+ {
+ mStencilClearSB = NULL;
+ mScreenQuadPrimBuff = NULL;
+ mScreenQuadVertBuff = NULL;
+ }
}
GFXStateBlockRef RenderParticleMgr::_getOffscreenStateBlock(ParticleRenderInst *ri)
From 11532e10cc406b42a898534fdca0de12d4f4e36e Mon Sep 17 00:00:00 2001
From: rextimmy
Date: Mon, 16 Jan 2017 15:35:25 +1000
Subject: [PATCH 10/26] Add log2 function to mMathFn.h
---
Engine/source/math/mMathFn.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Engine/source/math/mMathFn.h b/Engine/source/math/mMathFn.h
index 1855656e7..93596f63f 100644
--- a/Engine/source/math/mMathFn.h
+++ b/Engine/source/math/mMathFn.h
@@ -320,6 +320,11 @@ inline F32 mLog(const F32 val)
return (F32) log(val);
}
+inline F32 mLog2(const F32 val)
+{
+ return (F32) log2(val);
+}
+
inline F32 mExp(const F32 val)
{
return (F32) exp(val);
@@ -380,6 +385,10 @@ inline F64 mLog(const F64 val)
return (F64) log(val);
}
+inline F64 mLog2(const F64 val)
+{
+ return (F64) log2(val);
+}
inline F32 mCatmullrom(F32 t, F32 p0, F32 p1, F32 p2, F32 p3)
{
From f6d624be8f22c1d67bf6fd498fd4ee32d9b7e487 Mon Sep 17 00:00:00 2001
From: rextimmy
Date: Mon, 16 Jan 2017 15:36:52 +1000
Subject: [PATCH 11/26] Fix mipmap count and potential crash for non square
textures that are allocated with GBitmap class
---
Engine/source/gfx/bitmap/gBitmap.cpp | 5 ++++-
Engine/source/gfx/gfxTextureManager.cpp | 16 +---------------
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/Engine/source/gfx/bitmap/gBitmap.cpp b/Engine/source/gfx/bitmap/gBitmap.cpp
index e5ef6b407..9e20d6951 100644
--- a/Engine/source/gfx/bitmap/gBitmap.cpp
+++ b/Engine/source/gfx/bitmap/gBitmap.cpp
@@ -327,7 +327,10 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
mNumMipLevels++;
allocPixels += currWidth * currHeight * mBytesPerPixel;
- } while (currWidth != 1 && currHeight != 1);
+ } while (currWidth != 1 || currHeight != 1);
+
+ U32 expectedMips = mFloor(mLog2(mMax(in_width, in_height))) + 1;
+ AssertFatal(mNumMipLevels == expectedMips, "GBitmap::allocateBitmap: mipmap count wrong");
}
AssertFatal(mNumMipLevels <= c_maxMipLevels, "GBitmap::allocateBitmap: too many miplevels");
diff --git a/Engine/source/gfx/gfxTextureManager.cpp b/Engine/source/gfx/gfxTextureManager.cpp
index b656fcffd..781e0daa2 100644
--- a/Engine/source/gfx/gfxTextureManager.cpp
+++ b/Engine/source/gfx/gfxTextureManager.cpp
@@ -1085,21 +1085,7 @@ void GFXTextureManager::_validateTexParams( const U32 width, const U32 height,
// NOTE: Does this belong here?
if( inOutNumMips == 0 && !autoGenSupp )
{
- U32 currWidth = width;
- U32 currHeight = height;
-
- inOutNumMips = 1;
- do
- {
- currWidth >>= 1;
- currHeight >>= 1;
- if( currWidth == 0 )
- currWidth = 1;
- if( currHeight == 0 )
- currHeight = 1;
-
- inOutNumMips++;
- } while ( currWidth != 1 && currHeight != 1 );
+ inOutNumMips = mFloor(mLog2(mMax(width, height))) + 1;
}
}
}
From f02d0d6c4ee4b131ebf8ac65a7ee9ff666eb5b8b Mon Sep 17 00:00:00 2001
From: Areloch
Date: Mon, 16 Jan 2017 00:09:55 -0600
Subject: [PATCH 12/26] Hooks the splash window code up to the same image
loading code as the icon code, and also adds a check if it tries to load a
BMP for either(this is a bad format and really shouldn't be used for pretty
much anything).
Also includes a icon for the templates.
---
.../windowManager/sdl/sdlSplashScreen.cpp | 49 ++++++++++-
.../source/windowManager/sdl/sdlWindowMgr.cpp | 82 ++++++++++--------
Templates/Empty/game/core/torque.png | Bin 0 -> 1331 bytes
Templates/Full/game/core/torque.png | Bin 0 -> 1331 bytes
4 files changed, 92 insertions(+), 39 deletions(-)
create mode 100644 Templates/Empty/game/core/torque.png
create mode 100644 Templates/Full/game/core/torque.png
diff --git a/Engine/source/windowManager/sdl/sdlSplashScreen.cpp b/Engine/source/windowManager/sdl/sdlSplashScreen.cpp
index bf0931a9c..1cf2440af 100644
--- a/Engine/source/windowManager/sdl/sdlSplashScreen.cpp
+++ b/Engine/source/windowManager/sdl/sdlSplashScreen.cpp
@@ -22,7 +22,7 @@
#include "platform/platform.h"
#include "console/console.h"
-
+#include "gfx/bitmap/gBitmap.h"
#include "SDL.h"
#include "windowManager/sdl/sdlWindow.h"
@@ -36,7 +36,52 @@ bool Platform::displaySplashWindow( String path )
if(path.isEmpty())
return false;
- gSplashImage = SDL_LoadBMP(path);
+ Torque::Path iconPath = Torque::Path(path);
+
+ if (iconPath.getExtension() == String("bmp"))
+ {
+ Con::errorf("Unable to use bmp format images for the splash screen. Please use a different format.");
+ return false;
+ }
+
+ Resource img = GBitmap::load(iconPath);
+ if (img != NULL)
+ {
+ U32 pitch;
+ U32 width = img->getWidth();
+ bool hasAlpha = img->getHasTransparency();
+ U32 depth;
+
+ if (hasAlpha)
+ {
+ pitch = 4 * width;
+ depth = 32;
+ }
+ else
+ {
+ pitch = 3 * width;
+ depth = 24;
+ }
+
+ Uint32 rmask, gmask, bmask, amask;
+ if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+ {
+ S32 shift = hasAlpha ? 8 : 0;
+ rmask = 0xff000000 >> shift;
+ gmask = 0x00ff0000 >> shift;
+ bmask = 0x0000ff00 >> shift;
+ amask = 0x000000ff >> shift;
+ }
+ else
+ {
+ rmask = 0x000000ff;
+ gmask = 0x0000ff00;
+ bmask = 0x00ff0000;
+ amask = hasAlpha ? 0xff000000 : 0;
+ }
+
+ gSplashImage = SDL_CreateRGBSurfaceFrom(img->getAddress(0, 0), img->getWidth(), img->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
+ }
//now the pop-up window
if (gSplashImage)
diff --git a/Engine/source/windowManager/sdl/sdlWindowMgr.cpp b/Engine/source/windowManager/sdl/sdlWindowMgr.cpp
index 6157374dd..489377082 100644
--- a/Engine/source/windowManager/sdl/sdlWindowMgr.cpp
+++ b/Engine/source/windowManager/sdl/sdlWindowMgr.cpp
@@ -168,47 +168,55 @@ PlatformWindow *PlatformWindowManagerSDL::createWindow(GFXDevice *device, const
//Now, fetch our window icon, if any
Torque::Path iconPath = Torque::Path(Con::getVariable( "$Core::windowIcon" ));
- Resource bmp = GBitmap::load(iconPath);
- if (bmp != NULL)
+
+ if (iconPath.getExtension() == String("bmp"))
{
- U32 pitch;
- U32 width = bmp->getWidth();
- bool hasAlpha = bmp->getHasTransparency();
- U32 depth;
-
- if (hasAlpha)
+ Con::errorf("Unable to use bmp format images for the window icon. Please use a different format.");
+ }
+ else
+ {
+ Resource img = GBitmap::load(iconPath);
+ if (img != NULL)
{
- pitch = 4 * width;
- depth = 32;
- }
- else
- {
- pitch = 3 * width;
- depth = 24;
- }
+ U32 pitch;
+ U32 width = img->getWidth();
+ bool hasAlpha = img->getHasTransparency();
+ U32 depth;
- Uint32 rmask, gmask, bmask, amask;
- if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
- {
- S32 shift = hasAlpha ? 8 : 0;
- rmask = 0xff000000 >> shift;
- gmask = 0x00ff0000 >> shift;
- bmask = 0x0000ff00 >> shift;
- amask = 0x000000ff >> shift;
+ if (hasAlpha)
+ {
+ pitch = 4 * width;
+ depth = 32;
+ }
+ else
+ {
+ pitch = 3 * width;
+ depth = 24;
+ }
+
+ Uint32 rmask, gmask, bmask, amask;
+ if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
+ {
+ S32 shift = hasAlpha ? 8 : 0;
+ rmask = 0xff000000 >> shift;
+ gmask = 0x00ff0000 >> shift;
+ bmask = 0x0000ff00 >> shift;
+ amask = 0x000000ff >> shift;
+ }
+ else
+ {
+ rmask = 0x000000ff;
+ gmask = 0x0000ff00;
+ bmask = 0x00ff0000;
+ amask = hasAlpha ? 0xff000000 : 0;
+ }
+
+ SDL_Surface* iconSurface = SDL_CreateRGBSurfaceFrom(img->getAddress(0, 0), img->getWidth(), img->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
+
+ SDL_SetWindowIcon(window->mWindowHandle, iconSurface);
+
+ SDL_FreeSurface(iconSurface);
}
- else
- {
- rmask = 0x000000ff;
- gmask = 0x0000ff00;
- bmask = 0x00ff0000;
- amask = hasAlpha ? 0xff000000 : 0;
- }
-
- SDL_Surface* iconSurface = SDL_CreateRGBSurfaceFrom(bmp->getAddress(0, 0), bmp->getWidth(), bmp->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
-
- SDL_SetWindowIcon(window->mWindowHandle, iconSurface);
-
- SDL_FreeSurface(iconSurface);
}
if(device)
diff --git a/Templates/Empty/game/core/torque.png b/Templates/Empty/game/core/torque.png
new file mode 100644
index 0000000000000000000000000000000000000000..1023f2bb6655b4e5740ee9dbd56a2e4c2ac27594
GIT binary patch
literal 1331
zcmV-31ue_)p4!cG4G5pgl#
zAhXdy5XFU{3qgyx>Ozo$8!ePkTLhV=SS?N4Nt>6Ky!+m9(I!or`(9uAUPwI4ymxQT
zcfNDJbMAdWkL;b%3Bv!?KFt^C@ufMsl1lX)gckOOKTSPN1#!IXs3v+IEFRWI4{}qq
zR+w!%4*>I;j=3JQ5DEj|OGECN;xQuH8j|N4BzTMwrlDY$+F&27b3nZhz)hu)iVj|>P2n1l;sIZ#d
z-I`d)ECd4ZFgHyf50Bz*EY;Pz5zg@-H${Cb;`c`<>5X`z*@drbF>FLEtXQV6^%=o&
zO^=4s+`3wPZ)}oY)nm#I3;-XQWvt4Yuf48EVpz88Om
zGXEL5VwsrW!3+9a^xschrt=(MwyGWTk6-)ClGq5)+*}#>B441J(YWiv64_X)8(5XK
z3pw7ZN~AU0b>dPoNuj3D2p3qY8(5JhZtDpYc>8Nx3Qz~OgRCFFN(VXkU!(Uo7_yebuAS1RCaEio_HWY9nkb2+g&S7qfZt8vHy*iKjG8*#lGs
z90&l{5aY+O{48G}0U##?p3_d5*&CgpcXzj0R{)fEJ_-gjA1Qpl^e=lmIjoH2tw)GWTpPX=&2BuOE&Hz0D;5Kx59b&39ASvW^>S;6;m5Dwx(3G4_TjB@P=$QUA
pF#IVk{A1f~bTu@*AIj5e{{eIA^)eNAYt;Y%002ovPDHLkV1ikdVpISC
literal 0
HcmV?d00001
diff --git a/Templates/Full/game/core/torque.png b/Templates/Full/game/core/torque.png
new file mode 100644
index 0000000000000000000000000000000000000000..1023f2bb6655b4e5740ee9dbd56a2e4c2ac27594
GIT binary patch
literal 1331
zcmV-31ue_)p4!cG4G5pgl#
zAhXdy5XFU{3qgyx>Ozo$8!ePkTLhV=SS?N4Nt>6Ky!+m9(I!or`(9uAUPwI4ymxQT
zcfNDJbMAdWkL;b%3Bv!?KFt^C@ufMsl1lX)gckOOKTSPN1#!IXs3v+IEFRWI4{}qq
zR+w!%4*>I;j=3JQ5DEj|OGECN;xQuH8j|N4BzTMwrlDY$+F&27b3nZhz)hu)iVj|>P2n1l;sIZ#d
z-I`d)ECd4ZFgHyf50Bz*EY;Pz5zg@-H${Cb;`c`<>5X`z*@drbF>FLEtXQV6^%=o&
zO^=4s+`3wPZ)}oY)nm#I3;-XQWvt4Yuf48EVpz88Om
zGXEL5VwsrW!3+9a^xschrt=(MwyGWTk6-)ClGq5)+*}#>B441J(YWiv64_X)8(5XK
z3pw7ZN~AU0b>dPoNuj3D2p3qY8(5JhZtDpYc>8Nx3Qz~OgRCFFN(VXkU!(Uo7_yebuAS1RCaEio_HWY9nkb2+g&S7qfZt8vHy*iKjG8*#lGs
z90&l{5aY+O{48G}0U##?p3_d5*&CgpcXzj0R{)fEJ_-gjA1Qpl^e=lmIjoH2tw)GWTpPX=&2BuOE&Hz0D;5Kx59b&39ASvW^>S;6;m5Dwx(3G4_TjB@P=$QUA
pF#IVk{A1f~bTu@*AIj5e{{eIA^)eNAYt;Y%002ovPDHLkV1ikdVpISC
literal 0
HcmV?d00001
From 6a204f3528974f3efacd32b42a6328b012b9b521 Mon Sep 17 00:00:00 2001
From: Areloch
Date: Mon, 16 Jan 2017 00:16:17 -0600
Subject: [PATCH 13/26] Missed removing the old BMP splash for the new PNG one.
---
Templates/Empty/game/art/gui/splash.bmp | Bin 338576 -> 0 bytes
Templates/Empty/game/art/gui/splash.png | Bin 0 -> 11864 bytes
Templates/Empty/game/main.cs | 2 +-
Templates/Full/game/art/gui/splash.bmp | Bin 338576 -> 0 bytes
Templates/Full/game/art/gui/splash.png | Bin 0 -> 11864 bytes
Templates/Full/game/main.cs | 2 +-
6 files changed, 2 insertions(+), 2 deletions(-)
delete mode 100644 Templates/Empty/game/art/gui/splash.bmp
create mode 100644 Templates/Empty/game/art/gui/splash.png
delete mode 100644 Templates/Full/game/art/gui/splash.bmp
create mode 100644 Templates/Full/game/art/gui/splash.png
diff --git a/Templates/Empty/game/art/gui/splash.bmp b/Templates/Empty/game/art/gui/splash.bmp
deleted file mode 100644
index 47cb47f97e390125d04ee2fc9c4a53edee71a7ba..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 338576
zcmeI5d9)S9oyW-^ITM!mcn^52BC>fVITIt8GoF(upvgH&R9xmv50^X-U?D3Q&Qj0_0j#3I0n3s6Z$RkZYl|BQZ
z|D^&{AQT12wNP4;^`HV&ps4`4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xyih?8(YUiA_Avb0yO2R~tFV$n4@SVykG=hFWqP7LWM$Lvx~
zT7qT-slYueUXxzi)Q{hr;eWv)k~{)Ftf2-OWj+X4d{Okw&po8DOb{)*3iWBhI&v*K
zu55J}1guYE(2^h(fNKLBNXHGBgYO310D16+KstoMk!S>*Dk23kl({(xz<$^aYl~P_
zW?FKMTr2Z>YtynY0tIWN{}PYs;Ktt!X|goPuSU0e;%l56Bz4KK?u
zO#Bq>r~nn90--2Cu7%Q)tOpgK0!;&{Uwowg2UZ3Qz$m5Q+liS|}~adQbr>&{Tk2
zYbwEisQ?uSMFDaxl$K;Yr~nmcDnPC^mEgZrfC_}70J#=QOR^qRfC@AfAlI5o@LwuG
z1wv7PTnnWoSq~~e1)2(wYfUBiFBPByp(sGEh0>C&2Nj?KO$ErcrV{*@3Q&Pi6liem
z|M;N-RDcSEq5!!TN=vdHRDcRJ6(HA|O7LGQKm|fkfLsfuC0P$DKn0o#kZVmP_%9Wp
Y0--3-;2QqnhYC;uDiDkU@Am2Q|HxtSh5!Hn
diff --git a/Templates/Empty/game/art/gui/splash.png b/Templates/Empty/game/art/gui/splash.png
new file mode 100644
index 0000000000000000000000000000000000000000..333df9eb3950726e7eb4ebde5dfe034e8a0b1a6f
GIT binary patch
literal 11864
zcmZX41yoewx9=b*ARr?h(v5_44c#CENH>BsNDST5jfmvX-AK0xNOukmlG5Gvj{kM<
zdhgvk#p1+wcJFWh_6}Ep%3{4Fc?kl6u;k^WK7c?->A?3j+B4t?`{;ot@aKhzqO26?
z>EAo6tuP)qg6<%v0|S9DaQ=OfCYF5ffrF^d@=DUEe~`d0UQsSh+v$TqlpuL2adr3k
zgLDsXHM7T~%(S#TC97Ag@Omr12%37UZpZJuSb|#OSp$oXQuDh}q?BCDH?9DHX{G
zv*4?oEYbuC5*S7L!S$4aTB-S%>l&$e&N3;q(%;J&>R9a(?|PZ2GU}}o;E~MwGtr03<0O=tXI^$VzxtbCf
zI=d|
z^!H-5?}`MdMW0v7eAeN0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%_e!
zr-pIAia3x&jfn(4zXTpFmOdu7MZYE%hx(6>i8{}RpkDztQjMP&Qc}ssBd|ZtP
zBjN@p?e|O6)cQ7ec6JsmG+YS|(Zal?La`}+Zl&711CIxEn^bADR8aiug-&eTRuvcb
z?_Vy+!1YJg0OqAZ^3qVL3JK$Y{{!qCM1lYS
literal 0
HcmV?d00001
diff --git a/Templates/Empty/game/main.cs b/Templates/Empty/game/main.cs
index 87daf9770..44b333b87 100644
--- a/Templates/Empty/game/main.cs
+++ b/Templates/Empty/game/main.cs
@@ -29,7 +29,7 @@ $defaultGame = "scripts";
// Set profile directory
$Pref::Video::ProfilePath = "core/profile";
$Core::windowIcon = "core/torque.png";
-$Core::splashWindowImage = "art/gui/splash.bmp";
+$Core::splashWindowImage = "art/gui/splash.png";
function createCanvas(%windowTitle)
{
diff --git a/Templates/Full/game/art/gui/splash.bmp b/Templates/Full/game/art/gui/splash.bmp
deleted file mode 100644
index 47cb47f97e390125d04ee2fc9c4a53edee71a7ba..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 338576
zcmeI5d9)S9oyW-^ITM!mcn^52BC>fVITIt8GoF(upvgH&R9xmv50^X-U?D3Q&Qj0_0j#3I0n3s6Z$RkZYl|BQZ
z|D^&{AQT12wNP4;^`HV&ps4`4)>MN3QUNLuiUQ=Ce=WIY&6?XIpNlTKaNa2=%kPXM
zKR;#vkIQe*kij4Lhxg-)fIN8cL7$QF&pPW&nc0dJcl##?Ev5o71<19SBsDt#PVN1X
zy#$-Y-+e#Ow_m@Z_;&RFU{}X}T^-W~bxjxFp@ZfQA3T3V&w1iIYUo9Kj9fN$)O~{n
zAJNr4b>P5##kaF_ua1sA#kYU|-9>KryYB}&WI<^h1O#iQ5Y3?issiMisz}{_gKLAk
zjs%OY0%vQd5e=dOyDC7g?W#xpeqlBZW5bD~pOcWX2<$%c$7!fCI*ws1Ch6)Y
z5-p+vyC^`e?IK4#e_(!X^za)ka3+(C+wCDEex*ew*XntN&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