Commit graph

6573 commits

Author SHA1 Message Date
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
Gabriel Jacobo
ee3f8b15d5 [Windows] Fixes bug #1555, handle ALT+F4 on Windows 2013-11-13 11:18:37 -03:00
Gabriel Jacobo
f2f5160c17 Updated androidbuild.sh to enable parallel builds and ndk-build parameters 2013-11-13 09:41:21 -03:00
Gabriel Jacobo
b56cb32879 Added a few notes from Ryan's email to README-linux.txt 2013-11-12 11:31:13 -03:00
Gabriel Jacobo
4b230bc503 Linux README explaining build vs runtime, and build deps for Ubuntu 13.04
Build dependencies list for Ubuntu 13.04 provided by Ryan.
2013-11-12 11:28:42 -03:00
Sam Lantinga
daa66511ed Retain the high dpi flag when recreating the window (e.g when creating a renderer context) 2013-11-12 02:18:52 -08:00
Sam Lantinga
526e6bca4b Fixed build error with SDK < 10.7 2013-11-12 02:04:12 -08:00
Sam Lantinga
2fd1fa27a4 We still want to generally minimize on focus loss, but not when we're in a fullscreen space on Mac OS X. 2013-11-12 02:02:12 -08:00
Sam Lantinga
3434d21851 Added a hint SDL_HINT_VIDEO_FULLSCREEN_SPACES to specify that windows go fullscreen into their own spaces on Mac OS X. 2013-11-12 01:52:54 -08:00
Sam Lantinga
f4b58499d6 Fullscreen space naming cleanup to avoid confusion with normal fullscreen mode 2013-11-12 00:32:29 -08:00
Sam Lantinga
ac5eb506cb Made sure the window had the correct border when manually being brought back from fullscreen mode. 2013-11-11 23:42:43 -08:00
Sam Lantinga
a8db006c34 Fixed assertion when quickly toggling from fullscreen back to fullscreen:
"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'backgroundWindows not nil in enterFullScreenTransitionWithOptions:animated:activatingIt:'"

To reproduce this, run testsprite2, press Alt-Enter once, again while it's animating to fullscreen, and then again while it's animating out of fullscreen.
2013-11-11 22:43:05 -08:00
Sam Lantinga
4626135c4a Fixed window resizing when entering and leaving fullscreen mode 2013-11-11 21:38:11 -08:00
Sam Lantinga
a4664a4c91 Fixed assertion failure when minimizing a fullscreen window. 2013-11-11 21:21:18 -08:00
Sam Lantinga
3b89675355 Fixed bug 2212 - SDL_SetTextInputRect has no effect on iOS
philhassey

Overview: While SDL_SetTextInputRect works perfectly to move my window out of the way of the virtual keyboard using SDL2/Android, on iOS this function has no effect.

Steps to Reproduce: Call SDL_SetTextInputRect with a rect near the bottom of the screen before calling SDL_StartTextInput.

Actual Results: The iOS virtual keyboard is displayed after calling SDL_StartTextInput, but the screen is not shifted to reveal the TextInputRect region.

Expected Results: The screen should be shifted to reveal the TextInputRect region (like with SDL2/Android.)

This patch implements SDL_SetTextInputRect for uikit/iOS.

It sets up notification handlers to respond to changes in the display of the keyboard.  These handlers then change the frame of the view so it is moved out of the way of the keyboard as per SetTextInputRect.
2013-11-11 20:51:19 -08:00
Sam Lantinga
71bc289b76 Properly handle toggling fullscreen state when another fullscreen state change is in progress. 2013-11-11 20:42:59 -08:00
Gabriel Jacobo
79a3cc3e4b [X11] Fix up compilation when EGL headers are not present. 2013-11-11 19:17:32 -03:00