Commit graph

727 commits

Author SHA1 Message Date
Sam Lantinga
b0e0f61c7e Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Changed the CAS return value to bool, so it's efficient with OSAtomicCompareAndSwap32Barrier()
Added an atomic test adapted from code by Michael Davidsaver
2011-01-16 15:16:39 -08:00
Sam Lantinga
1bc8fe69ce Updated the atomic API for better use cases 2011-01-15 12:41:59 -08:00
Sam Lantinga
124315bff4 I am using SDL 1.3 on FreeBSD. I found two problems.
(1) SDL_atomic dummy version in SDL 1.3 is not used.
Because src/atomic/dummy/*.c are not used.

(2) Typo in src/joystick/bsd/SDL_sysjoystick.c.

Thanks,
IWATSUKI Hiroyuki
2011-01-01 19:50:50 -08:00
Sam Lantinga
44eb5de93d Fixed compiling with mingw32/64 2010-09-19 16:46:56 -07:00
Sam Lantinga
d8303d3f7a Added atan implementation from uClibc 2010-08-29 16:51:48 -07:00
Sam Lantinga
21e184b0bb Added atan2 implementation from uClibc 2010-08-29 16:05:34 -07:00
Sam Lantinga
7c463932c2 Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows
--HG--
rename : VisualC/SDL.sln => VisualC/SDL_VS2005.sln
2010-08-22 13:45:56 -07:00
Sam Lantinga
238acbd53d Merged Jim's Google Summer of Code work from SDL-gsoc2010_gesture 2010-08-22 12:07:55 -07:00
Jim Grandpre
a4c4851398 Fixed some Gesture bugs 2010-08-02 00:14:53 -04:00
Sam Lantinga
4f5f86477a For consistency, swapped line order 2010-07-28 22:24:13 -07:00
Sam Lantinga
dc048bcb73 Added dynamic loading of XFixes and XDamage on Mac OS X 2010-07-28 22:22:08 -07:00
Sam Lantinga
d8e7cebd11 Merged Sunny's XRender changes from SDL-gsoc2010_xrender 2010-07-28 00:54:23 -07:00
Sam Lantinga
8d14ec12cc Andrey A.
I made a video driver GAPI/RAW for WinCE (SDL-1.3).
RAW mode has a priority, and also, GAPI mode works with environment
"SDL_VIDEO_RENDERER=gapi" and for RAW mode "SDL_VIDEO_RENDERER=raw".

I checked the work on the screens of VGA, WVGA, QVGA, WQVGA, HVGA,
 + tested all modes with WindowsMobile Emulator.

Also, correctly draws the pointer position and the scale of the pointer
for VGA/WVGA modes,
correctly draws top left position for DM orientation screen, and
portrait/landscape/square geometry the screen also correct.

Also, I added a small fix for GDI fullscreen mode.

Patch for latest revision SDL-1.3 in an attachment.
Also added small path for mingw32ce build.
2010-07-27 21:31:28 -07:00
jimtla
c1e63cf801 Fixed x11 compile bugs. 2010-07-22 08:12:28 +04:00
Sunny Sachanandani
4ded0f623c Integrate XFixes and XDamage into the build system. 2010-07-19 20:05:53 +05:30
Ryan C. Gordon
799e5c6cbe Add XShape test to configure scripts. 2010-07-13 02:43:10 -04:00
Sam Lantinga
feac47e6de Make sure SDL gets installed to the correct prefix for the new cross-compiler tools. 2010-07-05 12:41:28 -07:00
Sunny Sachanandani
b4651b2a51 Modified configure.in to allow building with Xrender. Fixed all problems that prevented compilation.
Builds fine now :)
2010-05-31 13:27:27 +05:30
Sam Lantinga
dc6629fa52 Fixed Eric's changes to allow building from the command line. 2010-05-09 10:00:33 -07:00
Sam Lantinga
e2adaf166a Fixed bug #968
Andrey      2010-03-07 07:57:14 PST

mingw32ce-build small fix
2010-03-10 15:07:20 +00:00
Sam Lantinga
d2ca31944f Fixed bug #943
Ozkan Sezer      2010-02-06 12:31:06 PST

Hi:

Here are some small fixes for compiling SDL against mingw-w64.
(see http://mingw-w64.sourceforge.net/ .  Despite the name, it
supports both win32 and win64.)

src/audio/windx5/directx.h and src/video/windx5/directx.h (both
SDL-1.2 and SDL-1.3.)  I get compilation errors about some union
not having a member named u1 and alike, because of other system
headers being included before this one and them already defining
DUMMYUNIONNAME and stuff. This header probably assumes that those
stuff are defined in windef.h, but mingw-w64 headers define them
in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to
the top of the file.

src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) :
The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric
because _beginthreadex returns uintptr_t, not unsigned long which
is 32 bits in win64. Changing the return type to uintptr_t fixes
it.

video/SDL_blit.h (and configure.in) (SDL-1.3-only) :  MinGW-w64
uses msvcrt version of _aligned_malloc and _aligned_free and
they are defined in intrin.h (similar to VC).  Adding proper
ifdefs fixes it. (Notes about macros to check: __MINGW32__ is
defined for both mingw.org and for mingw-w64 for both win32 and
win64, __MINGW64__ is only defined for _WIN64, so __MINGW64__
can't be used to detect mingw-w64: including _mingw.h and then
checking for __MINGW64_VERSION_MAJOR does the trick.)

SDL_win32video.h (SDL-1.3-only) :  Tweaked the VINWER definition
and location in order to avoid multiple redefinition warnings.

Hope these are useful. Thanks.
2010-03-10 15:02:58 +00:00
Sam Lantinga
9d79206973 Fixed bug #935
Patrice Mandin

Hello,

I originally added pth support for threads in SDL 1.2 because on the Atari
platform we did not have any thread library.

I think pth support could be removed from SDL 1.3 for two reasons:

- Atari platform removed

- pth does not provides real (preemptive) threads, because it is user space,
and expect the application to call one of its function to give CPU to another
thread. So it is not exactly useful for applications, that expect threads to
run simultaneously.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404452
2010-01-24 20:47:20 +00:00
Sam Lantinga
7613e183a7 Removed obsolete checks for ipod Linux
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404434
2010-01-18 14:58:58 +00:00
Sam Lantinga
e84dac760c Fixed bug #930
The PS2 video driver is obsolete and not going to be updated unless someone wants to maintain it.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404431
2010-01-18 14:27:30 +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
Couriersud
370aa2835f Fix detection of directfb.h
- AC_CHECK_HEADER wants CPPFLAGS

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404390
2010-01-11 21:46:59 +00:00
Ryan C. Gordon
f30bac45d2 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404374
2010-01-10 05:06:03 +00:00
Ryan C. Gordon
065e14eb5d Merged r4784:4785 from branches/SDL-1.2: Mac OS X linker command line fixes.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404373
2010-01-10 04:42:45 +00:00
Sam Lantinga
80c18796d0 Made the comment more readable
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404372
2010-01-07 04:39:44 +00:00
Ryan C. Gordon
ce3dc43435 Removed comment referring to previously-removed CD-ROM subsystem.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404370
2010-01-06 21:04:11 +00:00
Sam Lantinga
63e191d64d Removed the obsolete SDL 1.2 GAPI driver
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404364
2010-01-06 07:39:09 +00:00
Sam Lantinga
eca7769600 Fixed bug #915
GNU-isms should be avoided wherever possible for portability, please avoid the use of GNU-isms in your code, this may be problematic when using this library in projects which use non-GNU-compliant compilers.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404354
2009-12-30 19:38:08 +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
Ryan C. Gordon
791f5dbce4 Implemented SDL_setenv(), moved SDL_putenv() to compat.
Fixes Bugzilla #779.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404330
2009-12-16 10:59:51 +00:00
Sam Lantinga
29601c280b Added SDL_GetCPUCount() to see how many cores are available.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404328
2009-12-16 06:53:53 +00:00
Sam Lantinga
15e287332f Fixed bug #878
Jack Jansen      2009-11-05 14:20:22 PST

I'm building "fat" SDL 1.3 libraries for MacOSX, but now I am running into the
issue that audio does not work on PowerPC macintoshes if you build the library
on an Intel.

The problem is that configure hard-codes the byteorder, which is then stored in
SDL_config.h

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404162
2009-11-09 04:13:51 +00:00
Sam Lantinga
303b14025b Adam Strzelecki to SDL
Actually after my patch commited in r4928 MinGW configure seems to generate broken Makefile due MSYS bash bug. (Attaching cure/patch below)

The problem is that:

TEST=`echo 'one\\
two\\
three\\'`
echo "$TEST"

Should echo:
one\
two\
three\

Does it on Linux, Mac.. all UNIX but not on MSYS (MinGW) which outputs:
one\two\three\
(new lines removed, probably it doesn't like backslashes)
Probably this bug should be submitted to MSYS team, but not waiting till MSYS gets it fixed (they have very slow release cycles) here goes simple cure...

My patch simply replaces single quoted SED rules where we needed newlien injection with double quoted ones.

Tested on Mac, Linux & MinGW. Please review it ASAP coz this may be showstopper for everybody compiling with MinGW.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404139
2009-10-28 04:27:50 +00:00
Sam Lantinga
7df7cdde39 Merged improvements to SDL_SoftStretch() from SDL 1.2
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404113
2009-10-18 17:49:40 +00:00
Sam Lantinga
14343daa51 We don't need dlvsym() for ALSA anymore, yay!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404075
2009-10-13 07:02:19 +00:00
Sam Lantinga
e1e9af7e0e Only show the dynamic audio libraries if we'll be dynamically loading them
Fixed DirectFB dynamic loading to use find_lib
Converted tabs to spaces

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404073
2009-10-13 06:49:29 +00:00
Sam Lantinga
7361b514e2 Simplify and improve dynamic library detection, taken from SDL_image
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404071
2009-10-13 06:40:08 +00:00
Sam Lantinga
b38f6c957a Debian patch: 050_altivec_detection.diff
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404070
2009-10-13 06:33:46 +00:00
Sam Lantinga
069b183a08 Missed converting PULSE to PULSEAUDIO
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404068
2009-10-13 05:30:29 +00:00
Sam Lantinga
c1665b6a55 A better solution to making the default build optimization -O3
Cygwin32 autoconf complains about c.m4 ... of course. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404054
2009-10-11 10:38:38 +00:00
Mike Gorchak
67242517ca Added phrender library linkage for QNX target.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404044
2009-10-10 15:22:16 +00:00
Sam Lantinga
89229aae60 Fixed bug #833
Fixed errors with older autoconf

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404028
2009-10-10 09:58:24 +00:00
Sam Lantinga
e1d8dd9b8a Use test instead of [ because that's an m4 quote character
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404000
2009-10-10 05:27:59 +00:00
Sam Lantinga
952edb3958 Fixed bug #828
Added support for --disable-dependency-tracking to configure.in

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403992
2009-10-08 09:07:58 +00:00