mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 21:17:45 +00:00
Merged default into iOS-improvements
This commit is contained in:
@@ -58,6 +58,6 @@ typedef enum
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_video_h */
|
||||
#endif /* _SDL_blendmode_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -131,6 +131,6 @@ extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_system_h */
|
||||
#endif /* _SDL_filesystem_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -43,7 +43,7 @@ extern "C" {
|
||||
* \file SDL_gamecontroller.h
|
||||
*
|
||||
* In order to use these functions, SDL_Init() must have been called
|
||||
* with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
|
||||
* with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system
|
||||
* for game controllers, and load appropriate drivers.
|
||||
*
|
||||
* If you would like to receive controller updates while the application
|
||||
|
||||
@@ -347,6 +347,9 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
/**
|
||||
* \brief Structure that represents a haptic direction.
|
||||
*
|
||||
* This is the direction where the force comes from,
|
||||
* instead of the direction in which the force is exerted.
|
||||
*
|
||||
* Directions can be specified by:
|
||||
* - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
|
||||
* - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
|
||||
@@ -555,7 +558,7 @@ typedef struct SDL_HapticPeriodic
|
||||
Uint16 period; /**< Period of the wave. */
|
||||
Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
|
||||
Sint16 offset; /**< Mean value of the wave. */
|
||||
Uint16 phase; /**< Horizontal shift given by hundredth of a degree. */
|
||||
Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */
|
||||
|
||||
/* Envelope */
|
||||
Uint16 attack_length; /**< Duration of the attack. */
|
||||
|
||||
@@ -492,6 +492,36 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
|
||||
|
||||
/**
|
||||
* \brief A variable that dictates what SDL_GetPrefPath() returns in WinRT apps.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* * "local" - Use the app's 'local' folder to store data.
|
||||
* * "roaming" - Use the app's 'roaming' folder to store data.
|
||||
* On Windows Phone 8.0, this setting is not supported due to
|
||||
* limitations in the OS itself. Attempts to use this (via
|
||||
* SDL_GetPrefPath()) on Windows Phone 8.0 will fail, with
|
||||
* SDL_GetPrefPath() returning NULL. (Windows Phone 8.1 does,
|
||||
* however, support roaming folders.)
|
||||
* * "old" - Use the app's 'local' folder on Windows Phone, and 'roaming'
|
||||
* on non-Phone versions of WinRT. This mimics behavior found
|
||||
* in SDL 2.0.3's implementation of SDL_GetPrefPath() for WinRT
|
||||
* (and was changed for SDL 2.0.4, further details of which are
|
||||
* in the "Caveats" section of SDL's
|
||||
* [WinRT README file](README-winrt.md).
|
||||
*
|
||||
* The default is to use the app's "local" folder.
|
||||
*
|
||||
* Details on 'local' verses 'roaming' folders can be found on MSDN, in
|
||||
* the documentation for WinRT's Windows.Storage.ApplicationData class,
|
||||
* (available at http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata ).
|
||||
*
|
||||
* The application's local and roaming paths may, alternatively, be retrieved
|
||||
* via the SDL_WinRTGetFSPathUTF8() and SDL_WinRTGetFSPathUNICODE() functions,
|
||||
* which are defined in SDL_system.h.
|
||||
*/
|
||||
#define SDL_HINT_WINRT_PREF_PATH_ROOT "SDL_WINRT_PREF_PATH_ROOT"
|
||||
|
||||
/**
|
||||
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
|
||||
*
|
||||
|
||||
@@ -87,7 +87,7 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Open a joystick for use.
|
||||
* The index passed as an argument refers tothe N'th joystick on the system.
|
||||
* The index passed as an argument refers to the N'th joystick on the system.
|
||||
* This index is the value which will identify this joystick in future joystick
|
||||
* events.
|
||||
*
|
||||
|
||||
@@ -371,7 +371,7 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
|
||||
* \param rect A pointer to the rectangle of pixels to update, or NULL to
|
||||
* update the entire texture.
|
||||
* \param pixels The raw pixel data.
|
||||
* \param pitch The number of bytes between rows of pixel data.
|
||||
* \param pitch The number of bytes in a row of pixel data, including padding between lines.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
|
||||
@@ -71,7 +71,7 @@ void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *as
|
||||
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Explicitely pass without checking an assertion condition. Updates assertion counter.
|
||||
* \brief Explicitly pass without checking an assertion condition. Updates assertion counter.
|
||||
*
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*/
|
||||
|
||||
@@ -51,9 +51,9 @@ extern "C" {
|
||||
*
|
||||
* \param surface Surface used in comparison
|
||||
* \param referenceSurface Test Surface used in comparison
|
||||
* \param allowable_error Allowable difference (squared) in blending accuracy.
|
||||
* \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.
|
||||
*
|
||||
* \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
|
||||
* \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
|
||||
*/
|
||||
int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
|
||||
|
||||
|
||||
@@ -70,27 +70,27 @@ extern "C" {
|
||||
/* ---------- Function Prototypes ------------- */
|
||||
|
||||
/**
|
||||
* /brief Initialize the CRC context
|
||||
* \brief Initialize the CRC context
|
||||
*
|
||||
* Note: The function initializes the crc table required for all crc calculations.
|
||||
*
|
||||
* /param crcContext pointer to context variable
|
||||
* \param crcContext pointer to context variable
|
||||
*
|
||||
* /returns 0 for OK, -1 on error
|
||||
* \returns 0 for OK, -1 on error
|
||||
*
|
||||
*/
|
||||
int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
|
||||
|
||||
|
||||
/**
|
||||
* /brief calculate a crc32 from a data block
|
||||
* \brief calculate a crc32 from a data block
|
||||
*
|
||||
* /param crcContext pointer to context variable
|
||||
* /param inBuf input buffer to checksum
|
||||
* /param inLen length of input buffer
|
||||
* /param crc32 pointer to Uint32 to store the final CRC into
|
||||
* \param crcContext pointer to context variable
|
||||
* \param inBuf input buffer to checksum
|
||||
* \param inLen length of input buffer
|
||||
* \param crc32 pointer to Uint32 to store the final CRC into
|
||||
*
|
||||
* /returns 0 for OK, -1 on error
|
||||
* \returns 0 for OK, -1 on error
|
||||
*
|
||||
*/
|
||||
int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
|
||||
@@ -102,11 +102,11 @@ int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf,
|
||||
|
||||
|
||||
/**
|
||||
* /brief clean up CRC context
|
||||
* \brief clean up CRC context
|
||||
*
|
||||
* /param crcContext pointer to context variable
|
||||
* \param crcContext pointer to context variable
|
||||
*
|
||||
* /returns 0 for OK, -1 on error
|
||||
* \returns 0 for OK, -1 on error
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ extern "C" {
|
||||
/**
|
||||
* Initializes the fuzzer for a test
|
||||
*
|
||||
* /param execKey Execution "Key" that initializes the random number generator uniquely for the test.
|
||||
* \param execKey Execution "Key" that initializes the random number generator uniquely for the test.
|
||||
*
|
||||
*/
|
||||
void SDLTest_FuzzerInit(Uint64 execKey);
|
||||
@@ -318,7 +318,7 @@ Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL
|
||||
/**
|
||||
* Returns integer in range [min, max] (inclusive).
|
||||
* Min and max values can be negative values.
|
||||
* If Max in smaller tham min, then the values are swapped.
|
||||
* If Max in smaller than min, then the values are swapped.
|
||||
* Min and max are the same value, that value will be returned.
|
||||
*
|
||||
* \param min Minimum inclusive value of returned random number
|
||||
|
||||
@@ -78,9 +78,9 @@ extern "C" {
|
||||
/* ---------- Function Prototypes ------------- */
|
||||
|
||||
/**
|
||||
* /brief initialize the context
|
||||
* \brief initialize the context
|
||||
*
|
||||
* /param mdContext pointer to context variable
|
||||
* \param mdContext pointer to context variable
|
||||
*
|
||||
* Note: The function initializes the message-digest context
|
||||
* mdContext. Call before each new use of the context -
|
||||
@@ -90,11 +90,11 @@ extern "C" {
|
||||
|
||||
|
||||
/**
|
||||
* /brief update digest from variable length data
|
||||
* \brief update digest from variable length data
|
||||
*
|
||||
* /param mdContext pointer to context variable
|
||||
* /param inBuf pointer to data array/string
|
||||
* /param inLen length of data array/string
|
||||
* \param mdContext pointer to context variable
|
||||
* \param inBuf pointer to data array/string
|
||||
* \param inLen length of data array/string
|
||||
*
|
||||
* Note: The function updates the message-digest context to account
|
||||
* for the presence of each of the characters inBuf[0..inLen-1]
|
||||
@@ -105,10 +105,10 @@ extern "C" {
|
||||
unsigned int inLen);
|
||||
|
||||
|
||||
/*
|
||||
* /brief complete digest computation
|
||||
/**
|
||||
* \brief complete digest computation
|
||||
*
|
||||
* /param mdContext pointer to context variable
|
||||
* \param mdContext pointer to context variable
|
||||
*
|
||||
* Note: The function terminates the message-digest computation and
|
||||
* ends with the desired message digest in mdContext.digest[0..15].
|
||||
|
||||
Reference in New Issue
Block a user