Sam Lantinga
af32a2f4cd
Updated copyright for 2019
2019-01-04 22:01:14 -08:00
Ryan C. Gordon
637cfa5d6b
Small stack allocations fall back to malloc if they're unexpectedly large.
...
--HG--
branch : SDL-ryan-batching-renderer
2018-10-22 20:50:32 -04:00
Sam Lantinga
346af016a5
Updated copyright for 2018
2018-01-03 10:03:25 -08:00
Sam Lantinga
73a2b9ace8
Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits
...
Simon Hug
When RWops seeks with fseek or fseeko it uses the types long or off_t which can be 32 bits on some platforms. stdio_seek does not check if the 64-bit integer for the offset fits into a 32-bit integer. Offsets equal or larger than 2 GiB will have implementation-defined behavior and failure states would be very confusing to debug.
The attached patch adds range checking by using the macros from limits.h for long type and some bit shifting for off_t because POSIX couldn't be bothered to specify min and max macros.
It also defines HAVE_FSEEKI64 in SDL_config_windows.h so that the Windows function gets picked up automatically with the default config.
And there's an additional error message for when ftell fails.
2017-09-09 08:36:37 -07:00
Ryan C. Gordon
fca3874ab4
Fixed a bunch of compiler warnings.
...
--HG--
extra : rebase_source : a2c94cfaf300f4d9f5b7855489ed05c8e23de9fd
2017-08-29 15:52:49 -04:00
Ryan C. Gordon
cd85821b16
rwops: Fixed 64-bit file i/o on QNX.
2017-08-15 16:30:26 -04:00
Sam Lantinga
b3ecc4942c
Fixed compiler warnings on Visual Studio 2013
2017-08-12 00:04:46 -07:00
Sam Lantinga
d2a8798688
Fixed Android build
2017-08-11 23:54:06 -07:00
Sam Lantinga
846a2035b2
Fixed bug 3292 - SDL_rwops and 64-bit file I/O
...
Juha Niemimä
On AmigaOS 4 platform with Newlib 'C' library, there is a problem with failing fseeko64. This seemed to be caused by using fopen instead of fopen64.
2017-08-11 21:16:33 -07:00
Sam Lantinga
5c88b8141c
Added an API SDL_LoadFile_RW() to load all the data from an SDL data stream, and a convenience macro SDL_LoadFile() to load all the data from a file.
2017-08-09 11:58:38 -07:00
Sam Lantinga
1b24bfad38
Updated copyright for 2017
2017-01-01 18:33:28 -08:00
Sam Lantinga
7ee8dda270
Updated copyright to 2016
2016-01-02 10:10:34 -08:00
Sam Lantinga
56b58afdbe
Updated the copyright year to 2015
2015-05-26 06:27:46 -07:00
Sam Lantinga
7b215e8685
The NaCL mount/unmount functions need to be in SDL_system.h and specific to NaCL
2014-06-08 12:05:17 -07:00
Gabriel Jacobo
c330e8e9e2
Chrome's Native Client backend implementation
2014-06-06 15:45:59 -03:00
Dimitris Zenios
873297a269
__ANDROID__ is the correct macro to check for an android system.ANDROID is only defined in NDK build system (.mk) and not in the standalone NDK.
2014-05-05 22:21:26 +03:00
Sam Lantinga
a7d2ebb8d6
Integrated David Ludwig's support for Windows RT
2014-03-09 11:36:47 -07:00
Sam Lantinga
211b54deef
Fixed line endings on WinRT source code
2014-03-09 11:06:11 -07:00
Ryan C. Gordon
2ffc05f7d8
Fixed some compiler warnings from the latest Clang, cleaned up some things.
2014-02-03 14:45:38 -05:00
Sam Lantinga
d7940a513e
Fixed bug 2374 - Update copyright for 2014...
...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon
82edee6971
Make internal SDL sources include SDL_internal.h instead of SDL_config.h
...
The new header will include SDL_config.h, but allows for other global stuff.
--HG--
extra : rebase_source : ddf4a4c0dc2c554b98c82700798f343cd91b16e3
2013-11-24 23:56:17 -05:00
David Ludwig
59df93166d
WinRT: merged with SDL 2.0.1 codebase
2013-10-27 21:26:46 -04:00
Sam Lantinga
a999af88e9
Fixed building using MinGW
...
Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
2013-10-17 23:02:29 -07:00
David Ludwig
88461d442a
WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45)
...
--HG--
rename : README.iOS => README-ios.txt
2013-08-12 22:29:55 -04:00
Sam Lantinga
08dfaaa2e6
Christoph Mallon: Remove pointless if (x) before SDL_free(x)
2013-08-29 08:29:21 -07:00
Philipp Wiesemann
663e2c37ae
Fixed implicit function declaration for SDL_AndroidGetInternalStoragePath().
2013-06-02 14:13:21 +02:00
Sam Lantinga
0cb6385637
File style cleanup for the SDL 2.0 release
2013-05-18 14:17:52 -07:00
David Ludwig
6a01cdf7f3
WinRT: merged with latest, official, SDL 2.x sources
2013-04-21 12:38:44 -04:00
Sam Lantinga
eb97bff0bd
Fixed bug 1802 - NULL pointer dereference in SDL_AllocRW() if out of memory.
...
Philipp Wiesemann
There is a NULL pointer dereference in SDL_AllocRW() if the system is out of memory. The "type" field is always written. This may be fixed with an early return.
Or an else{} or not writing the field and using slower SDL_calloc().
This fault was recently introduced (http://hg.libsdl.org/SDL/rev/681820ca0e78 ).
2013-04-17 01:32:06 -07:00
David Ludwig
41ce3814e2
WinRT: merged with latest, official, SDL 2.x sources (at rev. bea100d73d13)
2013-04-14 11:42:55 -04:00
Ryan C. Gordon
4f438b70a2
Make SDL_SetError and friends unconditionally return -1.
...
This lets us change things like this...
if (Failed) {
SDL_SetError("We failed");
return -1;
}
...into this...
if (Failed) {
return SDL_SetError("We failed");
}
Fixes Bugzilla #1778 .
2013-03-31 12:48:50 -04:00
Sam Lantinga
3afbe992d5
Removed Nintendo DS support since nobody has volunteered to maintain it for over a year.
2013-03-17 09:44:58 -07:00
Andreas Schiffler
42a673ce23
Fix bug 122 - SDL_RWops bug fixes: set RWops.type field, add input validation, add test coverage
2013-03-13 08:35:03 -07:00
Andreas Schiffler
6a2bff0cd1
Fix bug 1560 - SDL_RWFromConstMem write operation returns -1 but should return 0.
2013-03-12 09:10:37 -07:00
David Ludwig
52fd9b7f71
WinRT: build fixes
2013-02-23 20:12:14 -05:00
David Ludwig
776ebe3bda
WinRT: merged with latest, official, SDL 2.x code
2013-02-23 20:01:46 -05:00
Sam Lantinga
95dcfa4c28
Happy New Year!
2013-02-15 08:47:44 -08:00
DavidLudwig
6db1ac4bad
Merged with latest official SDL sources.
2012-11-12 13:25:44 -05:00
Sam Lantinga
caf0404b85
Added SDL_ReadU8() and SDL_WriteU8() for consistency with the rest of the API.
2012-11-04 23:44:13 -08:00
DavidLudwig
5939e8424f
Merge with latest, official SDL code
2012-11-04 09:46:59 -05:00
Ryan C. Gordon
175397ca41
Fixed symbol typo.
2012-11-03 22:46:03 -04:00
Sam Lantinga
e3403d3a25
Fixed compiling fseek64o on Linux systems
2012-10-22 15:35:19 -07:00
Sam Lantinga
9bd6a89040
Added an API to get the size of a file - WARNING! ABI CHANGE!
2012-11-03 18:43:36 -07:00
Sam Lantinga
2ee48c6885
Try opening relative path files from internal storage.
...
I'm not falling back to external storage because the application should be
aware of whether external storage is available and choose whether or not to
use it.
2012-11-02 03:08:40 -07:00
Sam Lantinga
1f23677ce4
Try opening the file path directly before hitting the asset system.
2012-11-02 00:35:48 -07:00
David Ludwig
8eb16c7d58
reverted a minor, unnecessary change in SDL_rwops.c that was done with regards to WinRT compilation
2012-10-17 21:50:49 -04:00
David Ludwig
54b4201aa0
Got a bare-bones version of SDL compiling for Windows RT. Dummy drivers are used in some places. Very little Windows-specific code (from the Win32 version of SDL) is used.
2012-10-17 21:43:20 -04:00
Sam Lantinga
f380ecb137
Removed executable bit from source files
2012-09-27 14:35:28 -07:00
Ryan C. Gordon
5c732d6324
Removed Windows CE support from SDL 2.0.
...
It's a long-dead platform, and we don't have any way to build for, test, or
maintain it, so there's no sense in doing acrobatics to support it.
If you need Windows CE support, use SDL 1.2. If you need Windows Phone support,
send SDL 2.0 patches for the newer Windows Mobile platform.
2012-09-15 10:59:39 -04:00
Ryan C. Gordon
82ebf2d4ff
Fixed some minor compiler warnings.
...
--HG--
extra : rebase_source : 9466732b4e5ab87e92e8eb9e2377aa5405bdc23b
2012-07-20 13:33:15 -04:00