Commit graph

109 commits

Author SHA1 Message Date
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
Alex Szpakowski
fdce275074 Merged default into iOS-improvements
--HG--
branch : iOS-improvements
2014-08-20 17:20:22 -03:00
Sam Lantinga
cf85a26a30 Fixed 2680 - OSX: Replace NSAutoreleasePool with @autoreleasepool
Tim McDaniel

This patch replaces all use of NSAutoreleasePool with the Apple recommended @autoreleasepool.  @autoreleasepool is supposedly more efficient, and since it is scope based it can't be accidentally not released.
2014-08-17 15:07:00 -07:00
Alex Szpakowski
9e4e1cac69 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
--HG--
branch : iOS-improvements
2014-08-06 03:24:16 -03:00
Alex Szpakowski
c351e27667 Misc. iOS code improvements.
- Use @autoreleasepool instead of NSAutoReleasePool.

- Code style fixups.

--HG--
branch : iOS-improvements
2014-07-14 16:50:25 -03:00
Sam Lantinga
bdb4ce60cd Fixed bug 2631 - Mac: minor code cleanup
Alex Szpakowski

Some minor changes to the Mac-specific backend code:

- Fixed up some code style issues (mostly brace style inconsistencies).

- Fixed a compiler warning in SDL_cocoaevents.m.

- Removed some useless code now that the 10.7 SDK is required to build SDL.

- Removed Gestalt(gestaltSystemVersion, ...) call and switched to NSAppKitVersionNumber for version checking code. Using Gestalt with gestaltSystemVersion will give 0x1090 in Mac OS 10.10+, and the whole Gestalt function was deprecated in Mac OS 10.8.
2014-07-07 12:48:25 -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
d83e91f738 Fixed iOS build 2014-03-15 19:30:52 -07:00
Sam Lantinga
82a301e171 Added missing copyright notices 2014-03-13 21:21:26 -07: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
Sam Lantinga
d36265107b Backed out use of @autorelease keyword for now, since it's not supported by older Xcode versions. 2013-02-11 17:39:52 -08:00
stopiccot
929560081c Replaced manual NSAutoreleasePool handing with @autorelease 2013-01-06 19:04:53 +03: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