Commit graph

70 commits

Author SHA1 Message Date
Sylvain Becker
4acf3c3cb4 Readability: remove const-qualifation from function declaration
const-qualification of parameters only has an effect in function definitions
2019-10-30 15:43:49 +01:00
Sam Lantinga
2d0a540be2 Better fix for iOS build 2019-10-17 17:51:49 -07:00
Ryan C. Gordon
fc251a1d25 dynapi: Deal with failure cases better, other fixes.
Fixes Bugzilla #4803.

--HG--
extra : rebase_source : e61e03dd4f7a0046baff2d653c4f533ed6766012
2019-10-14 12:41:06 -04:00
Ozkan Sezer
0806aa2d53 minor build fixes. 2019-07-31 00:05:28 +03:00
Ryan C. Gordon
5d5c2d3c44 assert: Another attempt to quiet compiler warnings. 2019-06-14 22:29:13 -04:00
Ryan C. Gordon
171a98db60 assert: Possibly fixing compiler warning on Android. 2019-06-14 21:39:51 -04:00
Ryan C. Gordon
e6f2a420e7 assert: Fixed some compiler warnings. 2019-06-12 15:35:06 -04:00
Ryan C. Gordon
dc9780679d assert: mark SDL_ExitProcess as SDL_NORETURN again.
Put in a hack to (hopefully) make MingW happy.

Fixes Bugzilla #4100.

--HG--
extra : rebase_source : c40bcd9feb71b38c277d690e611d211b9f629a2b
2019-06-11 21:57:30 -04:00
Sam Lantinga
0f77e6c119 Use _Exit() when available 2019-04-23 07:59:31 -07:00
Charlie Birks
04d9fd58ed Emscripten: use UTF8ToString instead of Pointer_stringify 2019-01-29 12:19:03 +00:00
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
Ozkan Sezer
5b1c603dbc use the 'aborts' pragma of Watcom for SDL_NORETURN functions
SDL_ExitProcess(), SDL_AbortAssertion() and SDLTest_BailOut().

(Commit c8b4a5166613 for bug #4100 removed SDL_NORETURN from
SDL_ExitProcess() and SDL_AbortAssertion() in order to avoid
warnings from windows builds, but that's temporary I guess..)
2018-06-13 14:45:02 +03:00
Sam Lantinga
fd446f0973 Progress fixing bug 4100 - errors and warnings after changeset 11917
Ozkan Sezer 2018-03-02 20:02:37 UTC
http://hg.libsdl.org/SDL/rev/5ce3f8bf8381 resulted in an error and
two warnings when compiled with mingw.

1.  Error from SDL_windowstaskdialog.h:
In file included from src/video/windows/SDL_windowsmessagebox.c:29:0:
src/video/windows/SDL_windowstaskdialog.h:23:54: error: expected ')' before 'HWND'

This is fixed by removing unnecessary annotations:

2.  Warning from SDL_assert.c:
src/SDL_assert.c: In function 'SDL_ExitProcess':
src/SDL_assert.c:138:1: warning: 'noreturn' function does return

Indeed ExitProcess() is prototyped with DECLSPEC_NORETURN, but
TerminateProcess() is not.  This can be rectified by adding an
exit() call in there. Do NOTE, however, that requires building
with a libc:

3.  Warning from SDL_windowsmessagebox.c:
src/video/windows/SDL_windowsmessagebox.c: In function 'WIN_ShowMessageBox':
src/video/windows/SDL_windowsmessagebox.c:513:9: warning: 'nCancelButton' may be used uninitialized in this function

My lazy solution was manually initializing nCancelButton to 0.
2018-03-02 22:53:25 -08:00
Ryan C. Gordon
c1f36d1993 windows: Restore patches for Task Dialogs and TerminateProcess().
2.0.8 has shipped, these can live in revision control now!
2018-03-02 14:10:25 -05:00
Ryan C. Gordon
df5f306a61 Back out Task Dialog and TerminateProcess patches for 2.0.8.
These can return to revision control once we ship.

--HG--
extra : histedit_source : a1e341365f4443905266d727b2005654ef1dcb8a%2Ca77cd7cf6988f57299c7e4e4b2f95afbc6ba6c5e
2018-02-28 10:39:41 -05:00
Ryan C. Gordon
0135882d92 assert: Use TerminateProcess() on Windows, vs ExitProcess (thanks, Jack!).
"What I have done is use TerminateProcess rather than ExitProcess.
ExitProcess will cause Microsoft's leak detection to continue, TerminateProcess
won't. It is also technically wrong to use ExitProcess in the case of aborting
the application.

Jack Powell
Twitter @jack9267"
2018-02-28 01:23:49 -05:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
65cba5bab4 Fixed bug 3883 - SDL_assert / SDL_PromptAssertion in TTY mode does not accept options ("abriA")
shoerbaffen

fgets can read a newline and SDL_strcmp will never return zero.
2017-10-15 21:21:19 -07:00
Sam Lantinga
67823aa306 Fixed bug 3744 - missing SDLCALL in several functions
Ozkan Sezer

The attached patch adds missing SDLCALL to several functions, so that
they properly match the headers as intended.
2017-08-13 21:06:52 -07:00
Ryan C. Gordon
453b9b12f4 assert: Better Emscripten support.
(Better than nothing, that is.)

Fixes Bugzilla #3459.
2017-05-19 14:51:03 -04:00
Ryan C. Gordon
056fecc8ee assert: allow assertions to work on platforms without threads.
Partially fixes Bugzilla #3459.
2017-05-19 12:54:17 -04:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
f69c47aaea Fixed bug 1646 - Warnings from clang with -Weverything 2016-11-15 01:30:08 -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
a7d2ebb8d6 Integrated David Ludwig's support for Windows RT 2014-03-09 11:36:47 -07:00
Ryan C. Gordon
cd64be14c5 Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler().
--HG--
extra : rebase_source : 46c4eb0b9b5aaf0f97ccf21036a0462a585b3ba8
2014-02-04 11:38:40 -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
Ryan C. Gordon
8c143ffe40 Removed SDL_AssertionsInit(). It's a no-op, let's keep it that way. :) 2013-08-07 11:00:44 -07: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
David Ludwig
643b3f0a30 WinRT: merged with the latest official SDL source 2012-12-16 22:02:01 -05:00
Ryan C. Gordon
ec4cfa8c73 SDL_assertion messages use "\n" instead of "\r\n" on non-Windows platforms. 2012-12-16 14:46:16 -05:00
David Ludwig
77dbd7ef65 WinRT: build fix for SDL_assert.c 2012-11-04 13:26:53 -05:00
Sam Lantinga
61980fd438 Switched assert system to use new message box functionality 2012-10-30 19:00:43 -07:00
Sam Lantinga
f380ecb137 Removed executable bit from source files 2012-09-27 14:35:28 -07:00
Ryan C. Gordon
d9a8305bda SDL_ExitProcess() was ignoring exit code parameter. 2012-04-09 23:55:43 -04:00
Sam Lantinga
9033bb050f Make sure that we use consistent configuration options on platforms like Windows so that command line builds and IDE builds have ABI compatibility.
Make sure we don't clobber SDL_revision.h when building from Mercurial

--HG--
rename : include/SDL_config.h.in => include/SDL_config_generated.h.in
2012-01-14 13:21:19 -05:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Ryan C. Gordon
a5bb3d3f60 Mac OS X: Fixed build when compiling without Cocoa support.
Thanks to Martin Gerhardy for the patch!
2011-11-06 17:05:48 -05:00
Ryan C. Gordon
590a060f3b Assert code's stdio interface was reading from the wrong variable.
Thanks to Frank Zago for the catch.
2011-06-03 16:03:10 -04:00
Ryan C. Gordon
b94f23a46d Removed assertion list terminator (just do it like a normal linked list). 2011-04-19 14:12:56 -04:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
b4497865bd Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
I think this also fixes the bug relating to non-latin characters in filenames, since UNICODE wasn't defined in SDL_rwops.c

--HG--
rename : src/SDL_android.cpp => src/core/android/SDL_android.cpp
rename : src/SDL_android.h => src/core/android/SDL_android.h
2011-01-24 21:20:30 -08:00