Commit graph

6589 commits

Author SHA1 Message Date
Philipp Wiesemann
4db223b3a1 Fixed spaces in license comment. 2013-11-23 18:34:27 +01:00
Philipp Wiesemann
8106c1a455 Removed include of no more needed header. 2013-11-23 18:29:36 +01:00
Gabriel Jacobo
23434404ae [Android] Fixes #2264, handle joystick open/closed state properly 2013-11-23 09:47:25 -03:00
Sam Lantinga
6ad1c0122c Fixed double-free of the window shape path 2013-11-23 02:02:29 -08:00
Gabriel Jacobo
d024ab8b10 Fixes compilation on Mingw. 2013-11-22 14:19:52 -03:00
Gabriel Jacobo
f21d3e7e2a OpenGL ES support for Windows 2013-11-22 13:24:53 -03:00
Gabriel Jacobo
239ba53a4c [Android] Fixes #2247, enable hardware acceleration by default.
Setting android:hardwareAccelerated="true" seems to fix some random behaviors
in certain devices like the XperiaE.

Ref: http://developer.android.com/guide/topics/graphics/hardware-accel.html
2013-11-22 10:26:28 -03:00
Ryan C. Gordon
a8fa54cfd7 Query version for X11 XInput2 multitouch separately from base XInput2. 2013-11-20 21:17:26 -05:00
Gabriel Jacobo
8e6405547d Clean up X11 OpenGL ES backend
If you really need to switch between OpenGL and GLES context types, just issue
a SDL_GL_UnloadLibrary manually.
2013-11-20 12:51:18 -03:00
Ryan C. Gordon
c843ed5545 Fixed SONAME lookup for runtime loading of shared libraries in CMake project.
Fixes Bugzilla #2249.

--HG--
extra : rebase_source : 5c636b43fb41bff6ecad963eafa6268d317403cd
2013-11-19 15:25:00 -05:00
Ryan C. Gordon
a047b562eb -fvisibility=hidden is no longer a requirement for dynamic X11.
We don't clash with Xlib symbols anymore.

--HG--
extra : rebase_source : 0efa50cb3e047dbfb0bdf0fd804a86c819305b83
2013-11-19 15:00:39 -05:00
Gabriel Jacobo
337a61cc3a Find the best EGL config available between those returned by eglChooseConfig
This existed in the old Android Java code, it got lost in the migration to the
commong EGL code.
2013-11-19 11:04:05 -03:00
Gabriel Jacobo
67b0e2ce38 Adds testgles2
Source code copied from: https://github.com/fantasydr/sdl-2.0-gles (thanks!)

Minor fixes, configure script changes done by me.
2013-11-19 10:56:38 -03:00
Gabriel Jacobo
c68f34799d [Android] Try to improve handling of DPAD|GAMEPAD + KEYBOARD devices
It seems some devices report themselves as DPAD or GAMEPAD and KEYBOARD as well,
and we need to route different keycodes to different parts of SDL.
2013-11-19 10:00:05 -03:00
Sam Lantinga
98ed49f28e Accidentally committed debug code 2013-11-18 20:22:36 -08:00
Sam Lantinga
5943722c97 Textures need to be freed before renderers 2013-11-18 20:21:45 -08:00
Philipp Wiesemann
42f34f61d6 Added missing resource release in test source. 2013-11-18 23:45:46 +01:00
Philipp Wiesemann
2d9c5027be Fixed unreachable return statement warning in gamecontroller source. 2013-11-18 23:43:15 +01:00
Philipp Wiesemann
6917b0dbe5 Fixed implicit function declaration warning in joystick source for Android. 2013-11-18 23:38:59 +01:00
Gabriel Jacobo
12551ee8d0 Fixes building for RPi using --no-undefined 2013-11-17 11:07:55 -03:00
Gabriel Jacobo
c92ccae933 Restore evdev sources to configure script 2013-11-17 10:41:16 -03:00
Sam Lantinga
2313fd3181 When the mouse is grabbed it's constrained to the client area, not the window frame. 2013-11-16 21:19:16 -08:00
Sam Lantinga
e29d5bd5db Fixed bug 2245 - add SDL_acos and SDL_asin
Sylvain

Here's some code to add arc cosine, and arc sin functions to SDL_stdlib.c
There are plainly written using SDL_atan.

--HG--
extra : rebase_source : 3c92b648c11366af38fac18df85eb7d5da6fe292
2013-11-16 18:56:02 -08:00
Ryan C. Gordon
0f4c048410 Turn off --no-undefined on OpenBSD again. Leave it on everywhere else for now. 2013-11-16 21:52:56 -05:00
Sam Lantinga
0a6b490596 Fixed bug 2232 - Version Mismatch in VS2013 Solution File
Joe LeVeque

Line 3 of SDL_VS2013.sln file reads "# Visual Studio 2012" instead of "# Visual Studio 2013" which causes Windows to associate the file with Visual Studio 2012, if installed, instead of Visual Studio 2013.
2013-11-16 12:11:19 -08:00
Sam Lantinga
2d61540445 Fixed up configure so it doesn't reference input/evdev anymore 2013-11-16 12:04:00 -08:00
Sam Lantinga
0a3e0e97d7 Fixed bug 2231 - Move src/input/evdev into src/core/linux
Ryan C. Gordon

To keep the directory layout sane, we should probably move this one piece of source to the linux catch-all directory, instead of making it look like this is part of an SDL "input" subsystem.

--HG--
rename : src/input/evdev/SDL_evdev.c => src/core/linux/SDL_evdev.c
rename : src/input/evdev/SDL_evdev.h => src/core/linux/SDL_evdev.h
2013-11-16 12:02:09 -08:00
Sam Lantinga
a890cb0b45 Fixed bug 2238 - Enable GCC atomics for clang
Marcus von Appen

clang provides support for optimized atomics.
The attached patch enables the cmake build system to take clang into account on checking for atomics.
2013-11-16 11:58:21 -08:00
Sam Lantinga
4bf40e4848 Fixed bug 2241 - SSE intrinsic in fillrect MMX path
norfanin

The MMX path in SDL_fillrect.c uses the SSE intrinsic _mm_stream_pi. The function or symbol provided by the compiler will not be present because the SSE header may not get included. The linker will complain about an undefined reference.

Since this is the only intrinsic used here (and someone forgot to create one for MOVQ), I think the MMX path can be removed completely. At least I don't see another way to move 64-bits from an MMX register to memory.
2013-11-16 11:54:16 -08:00
Sam Lantinga
5f79fe13d9 Added information on reporting bugs to the README.txt file 2013-11-16 10:27:46 -08:00
Sam Lantinga
829e1a8d20 Fixed compile warning, thanks to Michael Pohoreski 2013-11-16 10:25:46 -08:00
Sam Lantinga
7483f513d8 Better fix for bug 2207 - SDL_RenderSetViewport behavior is different/incorrect on OpenGL renderer vs DirectX renderer
At least, it works better here on my Mac. :)
2013-11-15 22:07:35 -08:00
Sam Lantinga
dd88bbb8d8 Added viewport test, contributed by Andreas Schiffler and improved by me and Ryan Gordon.
If it works correctly you should see a square moving from the upper left to the lower right, with a little yellow box at the top of the moving square.

You can pass --target as a command line option to have it use a render target instead of rendering directly to the screen.  The output should be identical in this case.
2013-11-15 22:05:26 -08:00
Sam Lantinga
6f14a76111 Added space in the common state structure for render targets 2013-11-15 22:01:58 -08:00
Ryan C. Gordon
e131dd96fb Fix viewport being upside down in OpenGL renderer.
Fixes Bugzilla #2207.

--HG--
extra : rebase_source : 1a31c7757418646fbba14b89482d4b9f11aafdc5
extra : amend_source : 3b77354d8d958923a94f3b40a6017fa3b08bf44a
2013-11-15 23:20:50 -05:00
Sam Lantinga
7b1c9df188 Fixed bug 2240 - On OS/X after calling SDL_SetWindowBordered right mouse clicks no longer register
philhassey

On OS/X after calling SDL_SetWindowBordered right mouse clicks no longer register.

Steps to Reproduce:

1. Open a windowed window on OS/X.  (With the border on.)

2. e.button.button will give values 1,2,3 depending on which mouse button I click.

3. Call SDL_SetWindowBordered to disable the border.

4. e.button.button will only give values 1,2.  3 (right mouse button) stops coming through.

Expected result:

I expect all mouse buttons to register.
2013-11-14 22:26:49 -08:00
Sam Lantinga
62ec6bf81c Backed out changeset e8f93c2ebda3 - it didn't actually do anything useful
--HG--
extra : rebase_source : d0465ebf6702a1152520fa9a6bfc2e10aac16711
2013-11-14 21:39:54 -08:00
Ryan C. Gordon
28264ed469 Turning --no-undefined back on, to see what platforms are still broken.
--HG--
extra : rebase_source : 4bc9c06b0fc9b97adf3d97517addb9d7a27501b3
2013-11-14 20:24:15 -05:00
Ryan C. Gordon
98ea92ba3e Fixed comment typo.
--HG--
extra : rebase_source : 9f8c814df15ce9f944f34dc6646dc6ab1141cf6c
2013-11-14 20:24:40 -05:00
Gabriel Jacobo
8570ce8dc5 Clean up the EGL related video backends (X11, Android, RPi) 2013-11-14 20:14:02 -03:00
Ryan C. Gordon
774a86c821 Apparently Haiku is removing /boot/common (thanks, scottmc!).
See http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-November/091877.html

--HG--
extra : rebase_source : ba62cd08f9b972bb14e1f7fbe350dd35e427743f
2013-11-14 14:45:00 -05:00
Ryan C. Gordon
1da87eaef8 Haiku: fixed uninitialized variable.
--HG--
extra : rebase_source : c5f25703a87bb8090bfa567cd3af215901c15a69
2013-11-14 14:42:20 -05:00
Apoorv Upreti
34944dab6b merged with repo 2013-11-14 22:35:28 +05:30
Ryan C. Gordon
30c46bacc8 Renamed things named after BeOS to be named after Haiku instead.
--HG--
rename : src/audio/baudio/SDL_beaudio.cc => src/audio/haiku/SDL_haikuaudio.cc
rename : src/audio/baudio/SDL_beaudio.h => src/audio/haiku/SDL_haikuaudio.h
rename : src/filesystem/beos/SDL_sysfilesystem.cc => src/filesystem/haiku/SDL_sysfilesystem.cc
rename : src/joystick/beos/SDL_bejoystick.cc => src/joystick/haiku/SDL_haikujoystick.cc
rename : src/loadso/beos/SDL_sysloadso.c => src/loadso/haiku/SDL_sysloadso.c
rename : src/main/beos/SDL_BApp.h => src/main/haiku/SDL_BApp.h
rename : src/main/beos/SDL_BeApp.cc => src/main/haiku/SDL_BeApp.cc
rename : src/main/beos/SDL_BeApp.h => src/main/haiku/SDL_BeApp.h
rename : src/power/beos/SDL_syspower.c => src/power/haiku/SDL_syspower.c
rename : src/timer/beos/SDL_systimer.c => src/timer/haiku/SDL_systimer.c
rename : src/video/bwindow/SDL_BWin.h => src/video/haiku/SDL_BWin.h
rename : src/video/bwindow/SDL_bclipboard.cc => src/video/haiku/SDL_bclipboard.cc
rename : src/video/bwindow/SDL_bclipboard.h => src/video/haiku/SDL_bclipboard.h
rename : src/video/bwindow/SDL_bevents.cc => src/video/haiku/SDL_bevents.cc
rename : src/video/bwindow/SDL_bevents.h => src/video/haiku/SDL_bevents.h
rename : src/video/bwindow/SDL_bframebuffer.cc => src/video/haiku/SDL_bframebuffer.cc
rename : src/video/bwindow/SDL_bframebuffer.h => src/video/haiku/SDL_bframebuffer.h
rename : src/video/bwindow/SDL_bkeyboard.cc => src/video/haiku/SDL_bkeyboard.cc
rename : src/video/bwindow/SDL_bkeyboard.h => src/video/haiku/SDL_bkeyboard.h
rename : src/video/bwindow/SDL_bmodes.cc => src/video/haiku/SDL_bmodes.cc
rename : src/video/bwindow/SDL_bmodes.h => src/video/haiku/SDL_bmodes.h
rename : src/video/bwindow/SDL_bopengl.cc => src/video/haiku/SDL_bopengl.cc
rename : src/video/bwindow/SDL_bopengl.h => src/video/haiku/SDL_bopengl.h
rename : src/video/bwindow/SDL_bvideo.cc => src/video/haiku/SDL_bvideo.cc
rename : src/video/bwindow/SDL_bvideo.h => src/video/haiku/SDL_bvideo.h
rename : src/video/bwindow/SDL_bwindow.cc => src/video/haiku/SDL_bwindow.cc
rename : src/video/bwindow/SDL_bwindow.h => src/video/haiku/SDL_bwindow.h
extra : rebase_source : afd5a42647878e283dbee3a666cef2214f0e7941
2013-11-14 11:51:24 -05:00
Apoorv Upreti
728572a414 Fixed visualtest build on VS2012
SDL2, SDL2main and SDL2test had to be added as dependencies to the testquit project to get it to build properly.
2013-11-14 22:19:07 +05:30
Gabriel Jacobo
6608608177 Adds joystick/udev troubleshooting information to README-linux.txt 2013-11-14 10:19:07 -03:00
Ryan C. Gordon
3c8712e3b9 Patched to compile on Haiku. 2013-11-14 01:00:08 -05:00
Ryan C. Gordon
39184a6ede Added SDL_DetachThread() API.
--HG--
extra : rebase_source : 0e37621bc7ae79dd3f15030e7131aa774ad8df82
2013-11-14 00:52:39 -05:00
Ryan C. Gordon
bcaa9c4c22 Started BeOS removal: merged BeOS thread and pthread code.
Haiku uses most of the standard pthread API, with a few #ifdefs where we
still need to fallback onto the old BeOS APIs.

BeOS, however, does not support pthreads (or maybe doesn't support it well),
so I'm unplugging support for the platform with this changeset. Be Inc went
out of business in 2001.

--HG--
extra : rebase_source : c7227f47193228c898cc997ebcf9bb00ead329e6
2013-11-13 22:35:26 -05:00
Sam Lantinga
cb3d7d3831 Diagonal flipping with RenderCopyEx
Ivan Rubinson

As it turns out, it was impossible to render a texture flipped diagonally (both vertically and horizontally) with one RenderCopyEx call.
With help from #SDL @ freenode, we came up with a fix.
2013-11-13 21:50:59 -08:00