Commit graph

82 commits

Author SHA1 Message Date
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
Sam Lantinga
7a208f2d77 Fixed bug 3797 - configure check for float.h
Ozkan Sezer

Cmake checks for float.h, but configure does not:  the attached patch
adds float.h to checked headers in configury, and it adds the missing
HAVE_FLOAT_H macro to SDL_config.h.cmake and SDL_config.h.in.

In SDL_config_macosx.h and SDL_config_windows.h, defined HAVE_FLOAT_H
as 1, where I know that it's true.
2017-09-06 01:14:23 -07:00
Sam Lantinga
51b14ba255 Fixed check for Mac OS X 10.11+ SDK (thanks Edward Rudd!) 2017-08-29 08:27:23 -07:00
Sam Lantinga
adfae6e9ba MAC_OS_X_VERSION_MAX_REQUIRED isn't actually set in recent Xcode versions 2017-08-29 02:32:53 -07:00
Sam Lantinga
8e5f46fa1d Fixed building with an older Mac OS X SDK 2017-08-28 20:52:05 -07:00
Sam Lantinga
ebe9688dd9 Vulkan support on Mac OS X introduces a link time dependency (CAMetalLayer) on 10.11 and newer 2017-08-28 19:32:08 -07:00
Sam Lantinga
15cb6b4932 Be clear that disabling Vulkan surface support disables the entire SDL Vulkan integration 2017-08-28 00:11:38 -07:00
Ryan C. Gordon
a566435db1 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.

--HG--
extra : rebase_source : cb3bb332146125366b5242c0d7444f44638733d9
extra : amend_source : c72ebb6d3a92efc3fdd085ce3b6d4b1d7f573cc9
2017-08-27 22:15:57 -04:00
Sam Lantinga
c1277f268e Updated config headers to override the base SDL_config.h if both are included 2017-02-20 10:55:33 -08:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
91e0a1d094 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Ryan C. Gordon
b007cfea84 X11: Add Xdbe support to message boxes (thanks, Melker!).
Without this, message boxes with a lot of text will noticibly flicker as
you mouse over buttons.

Fixes Bugzilla #2343.
2015-05-28 00:30:21 -04:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Sam Lantinga
b3e4782510 Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
Sam Lantinga
5acb7c63d1 Added SDL_round(), contributed by Benoit Pierre - thanks! 2014-08-16 23:23:15 -07:00
Sam Lantinga
276b7efecd Added SDL_sqrtf(), SDL_tan(), SDL_tanf() 2014-06-07 18:20:01 -07: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
de59025dac We don't need to check for snprintf() anymore, we don't use it.
SDL_snprintf() is built on vsnprintf() where available.

--HG--
extra : rebase_source : fef7988e29ab9293c7ae9ba3cff3f86c7e59e345
2013-11-24 23:36:15 -05:00
Ryan C. Gordon
3003efb88d Added SDL_vsscanf().
--HG--
extra : rebase_source : 088d093790a7ed95d73c307523587e95c8356f4b
2013-11-24 23:35:38 -05:00
Ryan C. Gordon
924207a299 Hook up SDL_acos and SDL_asin properly. 2013-12-09 15:17:20 -05:00
Ryan C. Gordon
2b9a2802b2 Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module.
--HG--
extra : rebase_source : c1fac232063443a2880e64f1abda85e0bdb2e710
2013-08-20 19:57:11 -04:00
Jørgen P. Tjernø
b01b128353 Mac: Codify SDK and OS requirements, and clean up.
This #errors if you're using an SDK or deployment target that is less
than 10.6 and 10.5, respectively, and cleans up uses of
MAC_OS_X_VERSION_MIN_REQUIRED and MAC_OS_X_VERSION_MAX_ALLOWED according
to those requirements.
2013-07-23 17:38:59 -07:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
Sam Lantinga
831e12e08b Fixed building SDL under Xcode 2013-02-11 11:09:55 -08:00
Sam Lantinga
71f9f9517c Don't build with X11 by default since it's not included with the latest versions of Mac OS X. Cocoa is the preferred path here. 2012-12-11 12:03:00 -08:00
Ryan C. Gordon
5570852b58 Fixed building on Mac OS X with Xcode 4.4 (OS X 10.8 SDK).
I think you'll need to install Xquartz, the external-but-official replacement
 for Apple's X11, to get the Xlib headers: http://support.apple.com/kb/HT5293

--HG--
extra : rebase_source : 1133063622575e0981aacb6cb1f42f4cf57958b2
2012-08-09 15:43:39 -04:00
Ryan C. Gordon
2096895aed Patched to compile on Mac OS X with Xcode (Unix configure already worked). 2012-07-11 20:40:02 -04:00
Sam Lantinga
094f01bc9e Updated Mac OS X and iOS projects 2012-06-21 10:41:25 -04:00
Dimitris Zenios
f39fe05937 1.Fixed a memory leak inside XInput2 code
2.Replaced XKeycodeToKeysym with XkbKeycodeToKeysym since XKeycodeToKeysym is deprecated in newer X11 version
3.Rewrote testime.c since it was disabled after SDL_compat.c removal
4.Take into account common arguments also in testrelative.c
2012-05-31 19:23:30 +03:00
Dimitris Zenios
497b8deec4 1.Moved all xinput2 functionality to its own file
2.Implement touch events using Xinput2.Leave evtouch as a fallback when xinput2 is not supported
2012-05-31 13:37:02 +03:00
Sam Lantinga
0dbd4213ad Fixed define for consistency 2012-05-30 11:45:09 -04:00
Sam Lantinga
6accd81680 Initial support for XInput2 by Dimitris Zenios
1.initial work on XInput2 support
2.Implemented relative mouse motion when XInput2 is enabled
3.Created a test app to test relative mouse motion
4.Fixed Bug #1498
2012-05-30 11:25:35 -04:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
5c01c4797c SDL 1.3 requires a 64-bit type for the platform. 2011-03-25 13:47:49 -07:00
Sam Lantinga
73b501d88c Dynamically load the Xinerama and xf86vmode extensions
This fixes a few bugs with different distributions:
http://bugs.freedesktop.org/show_bug.cgi?id=17431
http://bugs.gentoo.org/show_bug.cgi?id=246177
2011-02-28 09:01:53 -08:00
Sam Lantinga
e4a0db291e Re-added the 3DNow! and AltiVec instruction support. 2011-02-22 21:44:36 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
0314fd4e0f Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support. 2011-02-11 14:51:04 -08:00
Sam Lantinga
9c12618379 Removed partially functional renderers
--HG--
extra : rebase_source : 3fc2560c02393bf9e7c46360fc24f2585c9409be
2011-01-31 22:21:29 -08:00
Sam Lantinga
065e4e3f9d Fixed bug #1100
Test the video features with #if instead of #ifdef
2011-01-24 17:38:18 -08:00
Andreas Schiffler
d1159d9a1b Fix incorrect shape include and add HAVE_ATAN and HAVE_ATAN2 for OSX builds.
--
user: Andreas Schiffler <aschiffler@ferzkopp.net>
branch 'default'
changed include/SDL_config_macosx.h
changed src/video/cocoa/SDL_cocoashape.m
2010-11-16 07:03:26 -08:00
Ryan C. Gordon
799e5c6cbe Add XShape test to configure scripts. 2010-07-13 02:43:10 -04:00
Sam Lantinga
4d3df8b3e3 Fixed bug #926
Updated copyright to LGPL version 2.1 and year 2010

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404453
2010-01-24 21:10:53 +00:00
Sam Lantinga
803375d590 Allow configure to override assertion settings, but by default this comes from the build optimization level.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404405
2010-01-13 08:06:32 +00:00
Sam Lantinga
e50ab3b341 The config sets the default assertion level so people can override it for their own use in application code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404400
2010-01-13 07:25:28 +00:00
Sam Lantinga
a8a1ac9acd First pass at Ryan's assertion code, minor tweaks to come.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404398
2010-01-13 06:47:17 +00:00
Sam Lantinga
0624fd8333 Added support for querying the number of CPUs available on Linux. This also happens to work on Mac OS X.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404335
2009-12-17 03:04:04 +00:00