Commit Graph

6769 Commits

Author SHA1 Message Date
Sam Lantinga
bac409c888 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
e987abc343 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
825261c067 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
12a80abc41 Fixed DualShock 4 controller config on Mac OS X. 2014-02-10 12:47:26 -05:00
Edward Rudd
b45413975a Fix Cmake so generated SOname matches autoconf's #. 2014-02-10 10:53:02 -05:00
Ryan C. Gordon
e450b2f9d9 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
acd58f19d8 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
802397a171 Removed unused function. 2014-02-10 01:43:01 -05:00
Ryan C. Gordon
c18be74a8e Replace testgamecontroller visualization mode with something more useful. 2014-02-10 01:41:58 -05:00
Ryan C. Gordon
87dd51b115 No need to use a render target here. 2014-02-09 15:20:41 -05:00
Sam Lantinga
1af9aa0b1e Updated SDL to version 2.0.2 2014-02-09 03:09:56 -08:00
Sam Lantinga
4cc159d3f4 Fixed the OUYA controller mapping on Windows 2014-02-09 03:09:04 -08:00
Sam Lantinga
45399df5d0 Added Windows entry for the bluetooth OUYA controller 2014-02-09 02:42:59 -08:00
Sam Lantinga
808c05198c 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
10deb7fb9f 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
96705398c1 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
aed28e46e6 Updated README-macosx.txt to note new minimum requirements, end of PowerPC. 2014-02-07 12:03:02 -05:00
Ryan C. Gordon
a18eec16cc Make non-Clang compilers happy. 2014-02-07 11:55:13 -05:00
Ryan C. Gordon
241fc337a8 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!
2014-02-07 11:52:35 -05:00
Edward Rudd
ca1ebb24b6 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
8c04aaf554 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
e7c7bbcd8d Added DualShock 4 game controller config for Windows, Mac, and Linux. 2014-02-06 21:28:11 -05:00
Ryan C. Gordon
326bcf7cef Fixed crash on Windows if haptic isn't initialized when controllers are added. 2014-02-06 21:26:41 -05:00
Ryan C. Gordon
1e6f86ee52 Fixed a typo. 2014-02-06 10:00:45 -05:00
Edward Rudd
52bef1a3cf 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
7123f71d3d fix indentation and spaces 2014-02-06 09:11:05 -05:00
Ryan C. Gordon
85219a6a5d Fixed return values on testhotplug mainline. 2014-02-06 07:38:41 -05:00
Ryan C. Gordon
fd7ded0e94 Fixed copyright date. 2014-02-06 07:38:04 -05:00
Ryan C. Gordon
97e15d4d3b Wired up haptic hotplugging for Windows DirectInput/XInput code. 2014-02-06 07:37:20 -05:00
Ryan C. Gordon
1aef91f898 Fixed memory leak. 2014-02-05 20:07:25 -05:00
Ryan C. Gordon
da6d0e63ea Make SDL_SYS_HapticMouse() count device indexes like HapticByDevIndex(). 2014-02-05 18:36:40 -05:00
Ryan C. Gordon
2ee4b430a5 Cleanup some vi footer comments, rename new PRIVATE_* funcs to MacHaptic_*. 2014-02-05 01:02:09 -05:00
Ryan C. Gordon
3985954d03 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
943e4dc475 add testdropfile to OS X Project 2014-02-04 18:21:39 -05:00
Edward Rudd
8c1b08595f Implement new backend methods for haptic and hot plugging on OS X 2014-02-04 18:17:16 -05:00
Edward Rudd
713a47ad24 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
5932071c34 implement new backend method for Haptics in dummy driver 2014-02-04 16:50:34 -05:00
Edward Rudd
e957be0dd8 Rework haptic backend to properly support hotplugging of haptic devices.
* currently only linux backend updated.
2014-02-04 15:44:09 -05:00
Edward Rudd
2d6feda57f allow safely quitting the hotplug test by pressing button 0 on the joystick 2014-02-04 15:40:51 -05:00
Brandon Schaefer
599d0d78f8 * Remove android based workaround, it is handled in SDL_EGL_GetProcAddress. 2014-02-04 12:28:35 -08:00
Ryan C. Gordon
bbe5c7aaee Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler(). 2014-02-04 11:38:40 -05:00
Edward Rudd
80dbd8ae39 testhotplug: Actually log the SDL_Error that occured on failures 2014-02-03 23:08:53 -05:00
Edward Rudd
48e9978f42 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
92a8ee88f0 add simple test showing off hotplugging of joysticks w/ haptic. 2014-02-03 22:52:18 -05:00
Ryan C. Gordon
7e414636ad 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
b16638a442 Fixed some compiler warnings from the latest Clang, cleaned up some things. 2014-02-03 14:45:38 -05:00
Ryan C. Gordon
1957b51ba0 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
f7d97a1c04 Unload Wayland libs if memory allocation fails during init. 2014-02-03 11:53:21 -05:00
Ryan C. Gordon
e8b47266fd Hooked up dynamic loading for Mir. 2014-02-03 11:52:54 -05:00
Ryan C. Gordon
8bb49ceaf5 Add Mir to configure script's summary output. 2014-02-03 11:14:25 -05:00