Commit graph

7264 commits

Author SHA1 Message Date
Sam Lantinga
f656316b9f Recreate render target textures when the D3D device is being reset, and notify the application using the SDL_RENDER_TARGETS_RESET event when this happens. 2014-02-10 10:02:51 -08:00
Sam Lantinga
f81a5b5fbd Exposed the font character size and SDLTest_DrawCharacter() to make it easier to do custom debug text layout 2014-02-10 10:02:42 -08:00
Sam Lantinga
94d3b7fe80 Fixed bug where a window created fullscreen and hidden would get activated and "shown" but never actually be visible.
This is the case with the Steam In-Home Streaming client.
2014-02-10 10:02:18 -08:00
Ryan C. Gordon
b1c93506dd Fixed DualShock 4 controller config on Mac OS X.
--HG--
extra : rebase_source : 5e02300952b47b8252d4bb0474ad6d9f10ae8a14
2014-02-10 12:47:26 -05:00
Edward Rudd
20f44801d9 Fix Cmake so generated SOname matches autoconf's #.
--HG--
extra : rebase_source : 8aed06833632e488a600940bb54b212e69e5f1ec
extra : amend_source : e7f4179f3048af5092933c7bc2bbe77b7304daa0
2014-02-10 10:53:02 -05:00
Ryan C. Gordon
f4f293ae2a Make controllermap, etc, work on platforms with hardcoded window sizes.
This makes sure everything renders correctly, even if, say, an Android device
gives you a certain "window" size no matter what you ask for.
2014-02-10 11:29:48 -05:00
Gabriel Jacobo
fddd6a295f Backed out 51935d107921
The render target usage in controllermap is required if you are forced to use
the app at a different resolution than the one the art has been made for, for
example on Android, where you don't control the resolution.
(The coordinates for each button are hardcoded to the art size, and appear out
of place otherwise)
2014-02-10 09:26:22 -03:00
Ryan C. Gordon
a2021a76d6 Removed unused function. 2014-02-10 01:43:01 -05:00
Ryan C. Gordon
49fd59d20d Replace testgamecontroller visualization mode with something more useful. 2014-02-10 01:41:58 -05:00
Ryan C. Gordon
755c18bf87 No need to use a render target here. 2014-02-09 15:20:41 -05:00
Sam Lantinga
e49f7fcdf8 Updated SDL to version 2.0.2 2014-02-09 03:09:56 -08:00
Sam Lantinga
a1158f5747 Fixed the OUYA controller mapping on Windows 2014-02-09 03:09:04 -08:00
Sam Lantinga
283007aea7 Added Windows entry for the bluetooth OUYA controller 2014-02-09 02:42:59 -08:00
Sam Lantinga
245621ceb0 Possibly fixed bug 2250 - Cmake: SDL2 Doesn't install DLLs on Windows
ernest.lee

[Exec] CMake Error at cmake_install.cmake:151 (FILE):
[13:37:43][Exec]   file INSTALL cannot find
[13:37:43][Exec]   "C:/TeamCity/buildAgent/work/2e3d17a492e75daf/Build/libSDL2.so".

The cmake INSTALL project doesn't work because it uses Linux so shared library paths. Windows uses dlls and I think cygwin also uses dlls. I've included this patch. Can you check if it works?
2014-02-09 02:04:40 -08:00
Sam Lantinga
018d3e8094 Fixed bug 2385 - error: unknown type name 'IDirect3DDevice9'
Sandu Liviu Catalin

I'm unable to compile the latest SDL (directly from the repository) even though I disabled every DirectX option since I don't need DirectX.

I allways het these errors:
D:\DevLibs\SDL\src\render\direct3d\SDL_render_d3d.c:1897:1: error: unknown type name 'IDirect3DDevice9'
D:\DevLibs\SDL\src\render\direct3d\SDL_render_d3d.c:1898:25: error: unknown type name 'SDL_Renderer'
2014-02-09 01:56:41 -08:00
Sam Lantinga
46ee18a917 Fixed bug 2354 - [ES 2.0] SDL_RenderClear clears render target with wrong color
ny00

SDL_RenderClear clears a render target with the wrong color, if the opengles2 renderer driver is used and the target texture's format is SDL_PIXELFORMAT_ARGB8888.

The bug is *not* reproduced if SDL_PIXELFORMAT_ABGR8888 is used as the texture format (the first from the renderer's list).
It is further not reproduced using any of the following renderer drivers: opengl, opengles (apparently powered by Gallium3D), software.
Finally, the correct color can be drawn using SDL_RenderFillRect (instead of SDL_RenderClear).

A few details about the current setup:
- OS: Ubuntu 12.04 for x86_64
- GPU: GeForce GTX 460
- GPU driver version: 331.20-0ubuntu1~xedgers~precise1 (from the xorg-edgers PPA)


---

Seth Williams

Sam,

It appears that the clear just needs to take the render target format into consideration.

Seth.
2014-02-09 01:49:01 -08:00
Ryan C. Gordon
07a02fa6a0 Updated README-macosx.txt to note new minimum requirements, end of PowerPC. 2014-02-07 12:03:02 -05:00
Ryan C. Gordon
5fea7acdd4 Make non-Clang compilers happy. 2014-02-07 11:55:13 -05:00
Ryan C. Gordon
e288488534 Tell Clang's static analysis that SDL_assert() is an assertion handler.
This lets it know, for example, that when you do this...

    SDL_assert(ptr != NULL);

...that (ptr) is definitely not NULL at this point in the program, for the
sake of static analysis. While a buggy program could definitely trigger this
assertion, Clang assumes your assertion check is covering it and won't
report possible NULL dereferences after this point.

Since SDL_assert might continue if the user clicks "ignore", without this
change Clang would notice you checked for NULL (meaning that NULL is a real
possibility here) and still wrote code outside of that test branch that
dereferences the pointer, and thus would always trigger false positives.

Static analysis is fun!

--HG--
extra : rebase_source : 2402b4ad23f780f4690b404dfd331f9977effe94
2014-02-07 11:52:35 -05:00
Edward Rudd
b299b73be1 slight adjustment to the hot plug test to allow it to be run with hap tics disabled 2014-02-07 09:35:33 -05:00
Edward Rudd
f08ead552b ignore hot plugs in mac haptic layer IF hap tics hasn't been initialized. 2014-02-07 09:35:13 -05:00
Ryan C. Gordon
c9e81d515a Added DualShock 4 game controller config for Windows, Mac, and Linux. 2014-02-06 21:28:11 -05:00
Ryan C. Gordon
6d0308a33f Fixed crash on Windows if haptic isn't initialized when controllers are added. 2014-02-06 21:26:41 -05:00
Ryan C. Gordon
f9cfc5f8da Fixed a typo. 2014-02-06 10:00:45 -05:00
Edward Rudd
7629872a1f Fix device counting in HapticMouse and JoystickOpen routines. 0 is the first item in the list not the last 2014-02-06 09:35:44 -05:00
Edward Rudd
c593f2045c fix indentation and spaces 2014-02-06 09:11:05 -05:00
Ryan C. Gordon
a2debb00d3 Fixed return values on testhotplug mainline. 2014-02-06 07:38:41 -05:00
Ryan C. Gordon
b012f2f251 Fixed copyright date. 2014-02-06 07:38:04 -05:00
Ryan C. Gordon
441bde12ca Wired up haptic hotplugging for Windows DirectInput/XInput code. 2014-02-06 07:37:20 -05:00
Ryan C. Gordon
884709423e Fixed memory leak. 2014-02-05 20:07:25 -05:00
Ryan C. Gordon
cece2c2b93 Make SDL_SYS_HapticMouse() count device indexes like HapticByDevIndex(). 2014-02-05 18:36:40 -05:00
Ryan C. Gordon
2757186774 Cleanup some vi footer comments, rename new PRIVATE_* funcs to MacHaptic_*. 2014-02-05 01:02:09 -05:00
Ryan C. Gordon
e11eb2b184 SDL_pixels.h needs SDL_stdinc.h for SDL_FOURCC #define (thanks, Dmitry!).
Fixes Bugzilla #2384.
2014-02-05 00:34:26 -05:00
Edward Rudd
4325bf478a add testdropfile to OS X Project
--HG--
extra : rebase_source : 117218f4581fb34babfa059a70a75e73ffd0c933
2014-02-04 18:21:39 -05:00
Edward Rudd
00970c2034 Implement new backend methods for haptic and hot plugging on OS X 2014-02-04 18:17:16 -05:00
Edward Rudd
832dfd827e add testhotplug to OS X test project and set target OS version to 10.5 for tests. 2014-02-04 18:16:52 -05:00
Edward Rudd
e9fa1c76be implement new backend method for Haptics in dummy driver
--HG--
extra : rebase_source : c4bfcf6d0283900051058989d633eae1eeeeb2c1
2014-02-04 16:50:34 -05:00
Edward Rudd
f4141728b7 Rework haptic backend to properly support hotplugging of haptic devices.
* currently only linux backend updated.

--HG--
extra : rebase_source : ef39ed7c749a66ed5a261cf63a88b4e80a7afc88
2014-02-04 15:44:09 -05:00
Edward Rudd
0f21a3fc45 allow safely quitting the hotplug test by pressing button 0 on the joystick
--HG--
extra : rebase_source : 9efb5a80803409ed4ae754c133b03e5051620a68
2014-02-04 15:40:51 -05:00
Brandon Schaefer
4f1f0f7a6c * Remove android based workaround, it is handled in SDL_EGL_GetProcAddress. 2014-02-04 12:28:35 -08:00
Ryan C. Gordon
cd64be14c5 Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler().
--HG--
extra : rebase_source : 46c4eb0b9b5aaf0f97ccf21036a0462a585b3ba8
2014-02-04 11:38:40 -05:00
Edward Rudd
c174c3f279 testhotplug: Actually log the SDL_Error that occured on failures 2014-02-03 23:08:53 -05:00
Edward Rudd
6c52055fd6 add logging for the case when haptic is not detected on the joystick as well. 2014-02-03 23:01:19 -05:00
Edward Rudd
1e7e71be86 add simple test showing off hotplugging of joysticks w/ haptic.
--HG--
extra : rebase_source : 89ded9c8f4d99dc64497d7ff82a7811cf40ace3c
2014-02-03 22:52:18 -05:00
Ryan C. Gordon
40b7982b26 Removed -force_cpusubtype_ALL cflag from Mac builds.
This was for PowerPC G3 (!) compatibility, and Clang doesn't even recognize
 the flag anymore.
2014-02-03 14:47:48 -05:00
Ryan C. Gordon
2ffc05f7d8 Fixed some compiler warnings from the latest Clang, cleaned up some things. 2014-02-03 14:45:38 -05:00
Ryan C. Gordon
2b76b6f34d Temporarily default Wayland and Mir to disabled, for 2.0.2 release.
We'll flip the default back to enabled right after 2.0.2 is finalized, and
try to declare them stable and ready by 2.0.3.

Those that have an interest in supporting them in 2.0.2 can manually enable
 them in the configure script with --enable-video-wayland and/or
 --enable-video-mir.
2014-02-03 11:59:17 -05:00
Ryan C. Gordon
c0acfb60f8 Unload Wayland libs if memory allocation fails during init. 2014-02-03 11:53:21 -05:00
Ryan C. Gordon
5704cde18b Hooked up dynamic loading for Mir. 2014-02-03 11:52:54 -05:00
Ryan C. Gordon
1e8a90f615 Add Mir to configure script's summary output. 2014-02-03 11:14:25 -05:00