Commit graph

542 commits

Author SHA1 Message Date
Sam Lantinga
29e0bf97e0 Improvements based on feedback from Anthony Williams 2011-01-25 17:40:06 -08:00
Sam Lantinga
7327ef6bb9 Fixed cross-compiling for Windows 2011-01-24 21:41:36 -08:00
Sam Lantinga
daecbfdc17 HAVE_GCC_ATOMICS covers the test and set 2011-01-21 21:45:55 -08:00
Sam Lantinga
2c31531800 Separated out the minimum functionality that we need from gcc for our spinlock fallback. 2011-01-21 21:42:04 -08:00
Sam Lantinga
68afef61c9 Fixed atomic intrinsic test 2011-01-21 21:35:43 -08:00
Sam Lantinga
a03da6f07a Fixed bug #945
The configure script was breaking the substitutions into multiple fragments, breaking them across the substitution for the build rules.  This of course totally hosed the process.

I switched to using a more modern usage of AC_OUTPUT and added a post-process step that appends the build rules to the Makefile.
2011-01-21 12:43:25 -08:00
Sam Lantinga
9d25ba272a Fixed bug #925
Changed "win32" to "windows"

--HG--
rename : include/SDL_config_win32.h => include/SDL_config_windows.h
rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h
rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c
rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c
rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h
rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c
rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c
rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c
rename : src/main/win32/version.rc => src/main/windows/version.rc
rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c
rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c
rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c
rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h
rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c
rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h
rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c
rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c
rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h
rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c
rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h
rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c
rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h
rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h
rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c
rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h
rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h
rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h
rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c
rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h
rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c
rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h
rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c
rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h
rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c
rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h
rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c
rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h
rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c
rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h
rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c
rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h
rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c
rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h
rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c
rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h
rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c
rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h
rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-20 18:04:05 -08:00
Sam Lantinga
6642f38cf1 SDL doesn't depend on GLU, and overwhelming feedback from the mailing list is that people don't want it included in SDL_opengl.h 2011-01-19 22:55:51 -08:00
Sam Lantinga
c4d74517e7 PS3 Linux is no more... 2011-01-19 22:25:40 -08:00
Sam Lantinga
008911fd8a Nobody has stepped up to maintain an svgalib driver. Bye bye! :) 2011-01-19 22:21:31 -08:00
Sam Lantinga
90a214c4e9 Nobody has stepped up to maintain a framebuffer console driver. Bye bye! :) 2011-01-19 22:18:45 -08:00
Sam Lantinga
f69bce6999 Fixed using the native iconv library 2011-01-19 15:28:01 -08:00
Sam Lantinga
7c85ff217e Fixed test for libiconv 2011-01-19 15:02:11 -08:00
Sam Lantinga
7c00f79cb1 Greg Jandl to SDL
I *think* the patch below works correctly: sdl-config gets the -march
flag and SDL builds fine. Perhaps there's a better way to get the
-march flag into both CFLAGS and SDL_FLAGS w/o dragging along more
cruft, but adding it to BASE_CFLAGS seemed the best bet to my eyes.
2011-01-19 00:07:43 -08:00
Sam Lantinga
b3dd448c5c Greg Jandl to SDL
I did some digging, and I think I've found a better solution. By
including some additional .m4 macros in the acinclude directory
(http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html,
http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html and
http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html)
then using the patch below (same as previous patch + one line change
to configure.in), SDL will build correctly out of the box.

The arch can then be overridden by --with-gcc-arch=<arch> (most will
probably want to build with i686 there for general distribution) or
--without-gcc-arch, to disable setting the arch all together.

On my Atom netbook, I get -march=PentiumPro by default, which works
great, as does --with-gcc-arch=i686.
2011-01-18 22:40:45 -08:00
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