Commit Graph

5791 Commits

Author SHA1 Message Date
David Ludwig
49820874a9 WinRT: merged with latest, official, SDL 2.x sources (at rev. bea100d73d13) 2013-04-14 11:42:55 -04:00
David Ludwig
a46b1c6663 WinRT: added render-to-texture support for D3D 11.1, via SDL_SetRenderTarget 2013-04-13 23:03:46 -04:00
Ryan C. Gordon
1e6e7727c6 Added a data2 field to the SDL_RWops::hidden::unknown.
This shouldn't change the ABI, since this struct had space left in the union.
2013-04-13 20:43:32 -04:00
Andreas Schiffler
94f59c7e7c Add test coverage for SDL_SetWindowData and SDL_GetWindowData to Video suite 2013-04-13 09:45:39 -07:00
Ryan C. Gordon
a5ca62ea98 Fixed a typo (thanks, Ethan!). 2013-04-10 22:18:10 -04:00
Jørgen P. Tjernø
8405633512 Numlock & pause fix from Alfred.
Fix numlock and pause keys not being pressable on win32, they both report under
the same scancode, so use the VK to tell them apart
2013-04-10 14:11:26 -07:00
Ryan C. Gordon
f77b979436 More const_cast fixes for C++ apps using the public headers (thanks, Martin!). 2013-04-08 18:37:50 -04:00
David Ludwig
922323a1cd WinRT: added texture channel color-modulation support for D3D 11.1 2013-04-07 22:35:58 -04:00
Ryan C. Gordon
1a2d04cab5 Fixed another infinite recursion accident in stdlib. 2013-04-05 16:34:59 -04:00
Ryan C. Gordon
76435d933b Corrected some stdinc inline functions (thanks, Martin!).
qsort() returns void, so remove the "return" keyword, plus some C++
 const_casting magic.

 Fixes Bugzilla #1785.
2013-04-04 11:35:22 -04:00
Jørgen P. Tjernø
6337624232 Improve testgamecontroller output & robustness. 2013-04-03 16:48:23 -07:00
Jørgen P. Tjernø
7f8886048e Add 3 Logitech gamecontroller mappings for Mac OS X. 2013-04-03 16:48:20 -07:00
Ryan C. Gordon
7635069643 Fixed compiler warnings in Mac Xcode builds. 2013-04-03 11:58:04 -04:00
Ryan C. Gordon
f3c21ea99e Another attempt at fixing compiler warnings for SDLTest_SurfaceImage_t. 2013-04-03 11:49:25 -04:00
Ryan C. Gordon
5b551af664 Compiler warning fixes for Windows message box code. 2013-04-03 11:48:03 -04:00
Ryan C. Gordon
09c6b9cdfb Possibly fix compiler warnings, simplify SDLTest_SurfaceImage_t definition. 2013-04-03 11:38:05 -04:00
Ryan C. Gordon
d24b0148d6 Fixed compiler warnings. "leftFingerDown" doesn't need to be an SDL_FingerID. 2013-04-03 11:34:21 -04:00
Ryan C. Gordon
ccf4a46f60 Fixed infinite recursion (thanks, Rainer!). 2013-04-03 10:36:15 -04:00
Ryan C. Gordon
d6fda58241 Check for a NULL pointer dereference. 2013-04-02 23:17:33 -04:00
Jørgen P. Tjernø
9e99462c06 Add new controller mappings for Windows. 2013-04-02 18:09:30 -07:00
Andreas Schiffler
8de86784a7 Add input validation and null checking to SDL_Get/SetWindowData [reported by Joseph T.] 2013-04-02 08:38:52 -07:00
Sam Lantinga
e52fbd7243 Fixed bug 1780 - SDL_RWFromFile() sets an error on Android although a valid SDL_RWops pointer is returned.
Philipp Wiesemann

SDL_RWFromFile() sets an error to be queried with SDL_GetError() on Android although a valid SDL_RWops pointer is returned.

This happens if the fallback implemented in SDL_android.cpp is used to load compressed assets (see README.android in section "Loading assets") and results in a message like "java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed". I think this is confusing and not needed because the loading works as expected.

I attached a patch which changes SDL_android.cpp to not set an error if compressed assets are loaded. In this case also no Exception is queried and no additional string are created.
2013-04-02 07:57:37 -07:00
Sam Lantinga
d7e7bfe9ad Fixed bug 1779 - SDL's Android project template has old default icons from Android.
Philipp Wiesemann

SDL's Android project template has old default icons from Android while iOS project template has custom icons with SDL's logo.

There is a Wizard in the Android Developer Tools to create "Android Icon Sets". As an example I created icons from the iOS loading screen and attached them in a ZIP archive. They are named "ic_launcher.png" instead of "icon.png" because that is the new name used in Android projects. To use them the AndroidManifest.xml needs to be changed to have "@drawable/ic_launcher" instead of "@drawable/icon". I do not know why there was no icon created for ldpi. Maybe it is deprecated.
2013-04-02 07:55:25 -07:00
Sam Lantinga
01b8e5cc93 Fixed bug 1781 - SDL sets an error for the initial touch on Android.
Philipp Wiesemann

SDL sets an error to be queried with SDL_GetError() for the initial touch on Android.

Android_OnTouch() in SDL_androidtouch.c uses SDL_GetTouch() to check if a touch device was already added. SDL_GetTouch() sets the error "Unknown touch device" for an out of range access because touch devices are added after initial touch. I think this error is confusing because it always happens by design.

I attached a patch which removes the call to SDL_GetTouch() and only uses SDL_AddTouch() which does the check (if already added) again and does not set an error (if not added yet).
2013-04-02 07:51:23 -07:00
Sam Lantinga
d7bd3b7307 Fixed bug 1782 - SDL_opengl.h header disabled on FreeBSD
q66

The SDL_opengl.h header contains this:

#ifdef __FreeBSD__  /* !!! FIXME: temp compiler warning fix... */
#define NO_SDL_GLEXT 1
#endif

However, I can't seem to find what kind of compiler warning it was and it makes it unusable to use on FreeBSD. If I comment out these lines on my machine, everything works fine - I use FreeBSD 9-STABLE (x86_64, gcc and clang both, the same in a x86 chroot). All I could find is that this was causing an error on FreeBSD 8, but I can't test that on my machine (maybe if I set up some FreeBSD 8 chroot).

I set up a 8.2 chroot and investigated the problem. Apparently this issue was fixed in Mesa 7.6 (and in Git, June 4 2009, but it didn't get into 7.5). By the time those lines were added, FreeBSD contained the libGL port version 7.4.4, which suffered from the issue, but on April 2012 the version was updated to 7.6, which is available for FreeBSD 8 and FreeBSD 9 alike, which means those three lines should be safe to remove (it'll work fine for everyone with sufficiently up to date ports).
2013-04-01 23:15:21 -07:00
David Ludwig
50a881d724 WinRT: removed a bit of unused code from the D3D 11.1 renderer 2013-04-02 00:21:01 -04:00
David Ludwig
0c6e5ad1a9 WinRT: added rotation support to SDL_RenderCopyEx via D3D 11.1 2013-04-02 00:09:49 -04:00
David Ludwig
c2e89ec462 WinRT: implemented SDL_RenderCopyEx, w/ SDL_RendererFlip support, in D3D 11.1 2013-04-01 22:33:37 -04:00
David Ludwig
3ca7578363 WinRT: implemented SDL_RenderReadPixels in Direct3D 11.1 2013-04-01 21:34:47 -04:00
David Ludwig
44e81071eb WinRT: made WinRT path retrieval be available in both UCS-2 and UTF-8 flavors 2013-04-01 21:33:06 -04:00
Gabriel Jacobo
72c6e6bf7f Backed out changeset: a500a9dbfb41 2013-04-01 13:21:23 -03:00
Gabriel Jacobo
4741e6bc5b Backed out changeset: a713101e1d25 2013-04-01 13:21:08 -03:00
Gabriel Jacobo
b19f55242a Backed out changeset: 9cef1005df5f 2013-04-01 13:20:22 -03:00
Ryan C. Gordon
d619a9a9ee Changed audio subsystem's OpenDevice interface to return -1 on error.
This lets us 'return SDL_SetError("whatever");' on one line.

 Fixes Bugzilla #1778.
2013-03-31 13:05:40 -04:00
Ryan C. Gordon
16cdc59bab Make SDL_SetError and friends unconditionally return -1.
This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
2013-03-31 12:48:50 -04:00
David Ludwig
2a3066f606 WinRT: removed code that unnecessarily set a blank D3D 11.1 texture's contents 2013-03-31 11:44:50 -04:00
David Ludwig
b80d430b5c WinRT: added SDL_LockTexture and SDL_UnlockTexture support to the D3D 11.1 renderer 2013-03-31 11:16:31 -04:00
Ryan C. Gordon
171ad2ddcd Corrected function signature on SDL_strtod_inline() (thanks, Axel!).
Fixes Bugzilla #1774.
2013-03-29 21:29:57 -04:00
Ryan C. Gordon
879c663159 Haiku no longer #defines __BEOS__, so check for it too (thanks, Axel!).
Fixes Bugzilla #1773.
2013-03-29 21:25:02 -04:00
Ryan C. Gordon
2bcbb0d199 Patched test apps to compile with C89 compilers (thanks, Axel!).
Fixes Bugzilla #1772.
2013-03-29 21:21:48 -04:00
Ryan C. Gordon
cf94d2de94 Don't use __builtin_clz() on gcc2. (thanks, Axel!)
Fixes Bugzilla #1771.
2013-03-29 21:16:30 -04:00
Ryan C. Gordon
a9eb1f14ea Fixed compiler warnings with SDL_FORCE_INLINE on gcc2. (Thanks, Axel!)
Fixes Bugzilla #1770.
2013-03-29 21:13:16 -04:00
Sam Lantinga
85198ba1f3 The Haiku port is being actively maintained by Axel Dörfler 2013-03-26 22:26:07 -07:00
Sam Lantinga
af4d292e15 Fixed compiler error with Cygwin 2013-03-26 05:09:09 -07:00
Sam Lantinga
1297d17733 Fixed compiler warning with Cygwin 2013-03-26 05:08:57 -07:00
Sam Lantinga
dbb5bc19c3 SDL message box improvements from Dan Thompson 2013-03-26 04:57:29 -07:00
Sam Lantinga
5ffbff4132 Added support for the GameStop Gamepad 2013-03-25 12:04:16 -07:00
Sam Lantinga
77bba91132 Added GUIDs for Bluetooth devices, using the same algorithm as the Linux code.
Reformatted the code so it was easier to step through using gdb.
2013-03-25 11:38:30 -07:00
David Ludwig
f6c8097c65 WinRT: added point drawing support to the Direct3D 11.1 rendering backend 2013-03-24 21:57:40 -04:00
David Ludwig
2fef732bf6 WinRT: added line drawing support to the Direct3D 11.1 rendering backend 2013-03-24 21:19:26 -04:00