Commit Graph

493 Commits

Author SHA1 Message Date
Gabriel Jacobo
a9dfd741a4 Actually functional, hopefully!, Xext test 2012-06-03 17:34:18 -03:00
Sam Lantinga
241a11738e Better test for Xext headers 2012-06-01 20:06:48 -04:00
Gabriel Jacobo
5791b11bc4 Fix test for Xext headers (bug 1498), now it should fail properly in systems with the old headers. 2012-06-01 19:42:15 -03: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
d558e90692 Fixed compile error with both new and old Xext headers (bug 1498) 2012-05-30 11:44:57 -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
93bd217847 Fixed bug 1429 - Compiling static library with -arch fails when linking showimage
We no longer need this ancient hack and it's causing problems when building shared libraries against SDL.
2012-02-28 21:58:36 -05:00
Sam Lantinga
d71e0546a9 Updated to SDL 2.0, and SDL 2.0 can now be installed coexisting with SDL 1.2
--HG--
rename : sdl-config.in => sdl2-config.in
rename : sdl.m4 => sdl2.m4
rename : sdl.pc.in => sdl2.pc.in
2012-01-22 17:21:00 -05:00
Sam Lantinga
5546f5ad65 Switched back to configure generating SDL_config.h
It was very confusing to have configure generate an SDL_config.h and then not have it be used when building on Mac OS X or Windows.  I'll just have to remember to use SDL_config_windows.h when building official releases that are supposed to be ABI compatible with Visual Studio.

--HG--
rename : include/SDL_config_generated.h.in => include/SDL_config.h.in
2012-01-19 01:55:51 -05:00
Sam Lantinga
6654546b2a Check for sem_timedwait(), which isn't available on some systems (including OpenBSD 2012-01-15 03:34:14 -05: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
296e78b65f Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Scott Percival 2011-07-03 06:41:51 PDT

This submission is aimed at making life easier for OpenGL ES capable devices
running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not
running Android). SDL's Pandora support already has the neccesary GLES-to-X11
glue code, however it's all ghetto'd off in Makefile.pandora and not very
flexible.

The patch:
- adds an awesome --enable-video-opengles option to configure
- re-modifies the opengles and opengles2 SDL_renderers to use function pointers
- no idea why this was removed?
- for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or
libGLESv2 at runtime
- links in libEGL.so at runtime - the old code made an assumption that
eglFunctions could be pulled from the active GLES library, PowerVR for one
doesn't let you do that with their libGLESv2
- allows you to pick which of GLES v1 or v2 to load via
SDL_GL_CONTEXT_MAJOR_VERSION

So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and
a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well,
everything that isn't those two, such as a Pandora, iOS or Android device. The
Pandora specific code should be kept intact (fingers crossed), and nothing
painfully drastic has been added to the SDL_renderers. The library loading
sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's
propensity to let developers get away with murder and PowerVR's alternative of
punishing every missed step.

The test apps work okay with GLES or GLES2 as the renderer. For some reason
alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out
a new set of X11 GLES drivers, so I'll try and investigate once I upgrade
those. Also, this patch adds things to configure.in, include/SDL_config.h.in
and test/configure.in. I didn't know what the policy was re. committing
generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry.

I think that's about everything, let me know if there's anything I've
overlooked.
2012-01-08 02:23:37 -05:00
Sam Lantinga
f5c28b2406 Fixes bug 1296 - SDL_SetVideoMode crashes because of unaligned MOVAPS instruction
t.grundner@goto3d.de 2011-09-01 03:59:17 PDT
I figured out what is going on. GCC 4.5.2 assumes the stack is 16 byte aligned
by default. Therefore there are no AND alignment corrections necessary if we
wish to align a stack variable to a 16 byte boundary. That is bad if your OS
ABI is not 16 byte aligned. Windows 32 bit stacks are 4 byte aligned. This
results in the above mentioned SIGSEGV. This is also no problem if I compile
both SDL.dll and my app with MingW because MinGW/GCC inserts a

        andl    $-16, %esp

instruction right in the beginning of the main function. So at least the stack
of the thread calling the main function is 16 byte aligned. But as soon as I
start to use the SDL.dll from an application not compiled by MinGW there is no
ANDL safing my app.

However there is a GCC option that can change the default stack alignment:

        -mpreferred-stack-boundary=num

Setting num=2 assumes a the stack is aligned to a 4 byte boundary. This results
in GCC inserting the necessary

        andl    $-16, %esp

into SDL_FillRect. Rebuilding SDL with

       ./configure "CFLAGS=-mpreferred-stack-boundary=2 -g -O3"

solved the problem.

IMHO this should also be a problem on Solaris.

The following links contain further information:

http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options

http://www.agner.org/optimize/calling_conventions.pdf
2011-12-29 05:36:39 -05:00
Sam Lantinga
402034f43f Fixed the aux directory to be the one recognized by automake.
This isn't strictly needed by SDL, but it's a good example for other projects.
2011-11-17 00:43:44 -05:00
Ryan C. Gordon
1808d892fe Don't warn about multichar characters on BeOS/Haiku.
The system headers use them generously.
(transplanted from 825e1072eac6c950ca4f6e879a91ea199a282b2c)

--HG--
extra : transplant_source : %82%5E%10r%EA%C6%C9P%CAOn%87%9A%91%EA%19%9A%28%2B%2C
2011-10-13 16:35:25 -04:00
Ryan C. Gordon
ca3232dcd1 Enable -Wall by default.
Fixes Bugzilla #1284.

(But probably upsets buildbot.  :)  )
2011-10-11 22:04:51 -04:00
Ryan C. Gordon
0863dee582 1.3 API CHANGE: Add support for naming threads.
--HG--
extra : rebase_source : ae532d4b4d68ef86de0fc2cb6794a622e0841bce
2011-10-02 00:29:16 -04:00
Ryan C. Gordon
90ff13a669 Moved pthread spinlock check in with the rest of the pthread tests. 2011-09-21 03:08:00 -04:00
Ryan C. Gordon
0cbf1928f9 Fixed Win64 builds with MingW. 2011-09-11 03:35:46 -04:00
Ryan C. Gordon
caedc60d07 Removed legacy Mac OS X dlcompat code.
It was only needed for Mac OS X 10.0 through 10.2, so it seems silly to keep
 it around for SDL 1.3.

I'll leave it in the 1.2 branch for now, though.
2011-09-09 00:34:48 -04:00
Ryan C. Gordon
b2540abd8e Merged Mac OS X and iOS audio targets.
--HG--
rename : src/audio/macosx/SDL_coreaudio.c => src/audio/coreaudio/SDL_coreaudio.c
rename : src/audio/macosx/SDL_coreaudio.h => src/audio/coreaudio/SDL_coreaudio.h
2011-08-04 00:45:09 -04:00
Ryan C. Gordon
46bb3d8770 Implemented XAudio2 target for Windows (and Xbox360, theoretically!). 2011-08-04 01:07:09 -04:00
Ryan C. Gordon
6bd5c1b002 Reworked Windows waveOut code.
Implemented multi-device support, changed name to "winmm".

--HG--
rename : src/audio/windib/SDL_dibaudio.h => src/audio/winmm/SDL_winmm.h
2011-08-04 01:24:22 -04:00
Ryan C. Gordon
ac93bd6e55 Reworked Windows DirectSound code.
Now supports multiple devices, and uses DirectSound 8 instead of 5. Changed
name to "directsound" and renamed source directory.

--HG--
rename : src/audio/windx5/SDL_dx5audio.c => src/audio/directsound/SDL_directsound.c
rename : src/audio/windx5/SDL_dx5audio.h => src/audio/directsound/SDL_directsound.h
rename : src/audio/windx5/directx.h => src/audio/directsound/directx.h
2011-08-04 01:26:12 -04:00
Ryan C. Gordon
55419dbf19 Removed /dev/dsp DMA audio target. 2011-07-24 03:37:13 -07:00
Ryan C. Gordon
4b70200bf8 Work on systems without sa_sigaction. 2011-07-20 16:35:37 -07:00
Nathan Heisey
dfe639930e Implemented pthread spinlocks. 2011-06-22 10:33:48 +00:00
Ryan C. Gordon
8b1cf3db98 Updated configure.in to be compatible with autoconf 2.67.
Still works with autoconf 2.61 (what ships with Xcode 3).

Thanks to Frank Zago for this patch.
2011-06-04 15:26:02 -04: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
a9d41506c3 If we leave the default SDL_config.h in place, it'll override the one generated by configure when building from a different directory. Argh... 2011-03-12 13:28:56 -08:00
Sam Lantinga
0f3c139a87 We don't want to remove SDL_config.h since it's in source control now. 2011-03-11 14:24:35 -08:00
Sam Lantinga
3b97514dce Added support for the Xcursor library for color cursors 2011-03-11 13:56:53 -08:00
Sam Lantinga
5137fef264 Fixed the libraries linked with Visual Studio 2010, the msimg library isn't needed anymore. 2011-03-07 22:03:11 -08:00
Sam Lantinga
6053ae5234 OSF isn't supported anymore. 2011-02-28 09:09:13 -08:00
Sam Lantinga
303287a180 IRIX is not supported anymore. :) 2011-02-28 09:06:29 -08: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
e81d8928b6 Added a better way to include build rules in the Makefile
Cleaned up dependencies on generating SDL_revision.h
Fixed 'make install' if you are not building from a Mercurial repository
2011-02-18 11:19:34 -08:00
Sam Lantinga
86ccb87283 Fixed bug #1064 (configure still has --enable-stdio-redirect option) 2011-02-16 03:59:39 -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
7133afac5f Made it possible to disable the rendering subsystem with configure --disable-render 2011-02-08 10:04:09 -08:00
Sam Lantinga
8f205278b1 It's now possible to disable the fast atomic operations, at a huge performance penalty. 2011-02-07 22:57:33 -08:00
Sam Lantinga
8b3eb38df2 Updated the DirectFB support, from Couriersud
attached is a working directfb driver diff which works with the current
changes. There are a number of changes around it as well, e.g.
configure.in.

The directfb renderdriver right now still depends on a some "includes"
from src/video/directfb. That's why it is not yet moved to the new
render folder.
2011-02-05 16:07:10 -08:00
Sam Lantinga
31f1dceb0c Removed a bunch of X11 support that we no longer need. 2011-02-04 19:18:08 -08:00
Sam Lantinga
5897ef7d95 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
--HG--
rename : src/video/windows/SDL_d3drender.c => src/render/direct3d/SDL_d3drender.c
rename : src/video/SDL_renderer_gl.c => src/render/opengl/SDL_renderer_gl.c
rename : src/video/SDL_renderer_gles.c => src/render/opengles/SDL_renderer_gles.c
rename : src/video/SDL_renderer_sw.c => src/render/software/SDL_renderer_sw.c
2011-02-02 14:34:54 -08:00
Sam Lantinga
a47948aab0 Nobody is currently maintaining the QNX code, so removing it for now. 2011-02-01 21:40:03 -08:00
Sam Lantinga
372693d86f Removed more partially functional renderers
--HG--
extra : rebase_source : d00f0590e133604070f978762a6728b4afde02ca
2011-01-31 22:53:45 -08:00
Sam Lantinga
9c12618379 Removed partially functional renderers
--HG--
extra : rebase_source : 3fc2560c02393bf9e7c46360fc24f2585c9409be
2011-01-31 22:21:29 -08:00
Sam Lantinga
be54c8a0d5 This patch fixes the issue of configure generating broken Makefile
when .cc files are used due to bad sed substitution on multiple passes:
$(objects)/SDL_BeApp.lo:
$(objects)/SDL_BeApp.lo: ./src/main/beos/SDL_BeApp.c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS)  -c $< -o $@c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS)  -c $< -o $@

Signed-off-by: François Revol
2011-01-27 14:54:20 -08:00