Commit graph

1158 commits

Author SHA1 Message Date
Philipp Wiesemann
eee2bcca85 Fixed unused local variable warning in test program source. 2013-12-25 00:04:31 +01:00
Philipp Wiesemann
99bebc64ce Fixed missing return warning in test program source. 2013-12-24 19:55:41 +01:00
Sam Lantinga
b2bb6f1da1 Changed testgamecontroller to wait for controllers to be reattached, the way testjoystick does. 2013-12-23 15:55:08 -08:00
Gabriel Jacobo
3308d271b5 Wayland support
Based on the original port to Wayland by: Joel Teichroeb, Benjamin Franzke, Scott Moreau, et al.

Additional changes in this commit, done by me:

* Wayland uses the common EGL framework
* EGL can now create a desktop OpenGL context
* testgl2 loads GL functions dynamically, no need to link to libGL anymore
* Assorted fixes to the Wayland backend

Tested on the Weston Compositor (v1.0.5) that ships with Ubuntu 13.10,
running Weston under X. Tests ran: testrendercopyex (all backends), testgl2, testgles2,testintersections
2013-12-14 20:18:43 -03:00
Sam Lantinga
37b1229722 Fixed bug 2294 - testdrawchessboard.c Sets the render color alpha to 0x0.
Brandon Schaefer

This means everything will render black if the software rendering backend selects a pixel format that supports alpha. So it seems best to at lease assume alpha is supported.
2013-12-11 21:13:45 -08:00
Gabriel Jacobo
b3fa9a3e55 [Android] Handle native thread finishing when not commanded from the Java side 2013-12-05 10:51:38 -03:00
Gabriel Jacobo
137f4aedc1 Adds SDL_GameControllerAddMappingsFromRW, updates controllermap
SDL_GameControllerAddMappingsFromFile is now a convenience macro.

controllermap can now skip bindings by pressing space or clicking/touching the
screen.
2013-12-03 12:01:28 -03:00
Gabriel Jacobo
9054b03edb Adds controllermap utility to test suite. 2013-12-02 19:35:04 -03:00
Philipp Wiesemann
10ad7c5969 Removed second return statement. 2013-11-23 18:37:36 +01:00
Gabriel Jacobo
f21d3e7e2a OpenGL ES support for Windows 2013-11-22 13:24:53 -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
Sam Lantinga
829e1a8d20 Fixed compile warning, thanks to Michael Pohoreski 2013-11-16 10:25:46 -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
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
Sam Lantinga
3a64a5a86d Turn off resizable flag by default, you can always pass the --resize command line option if you need it. 2013-11-11 02:00:58 -08:00
Gabriel Jacobo
dd726d96bf [Android] Fixes Bug 2041 - can't get SDL_QUIT event...
Thanks to Denis Bernard!

Also, changed the Android manifest so the app doesn't quit with orientation
changes, and made testgles.c exit properly on Android.
2013-11-06 11:23:24 -03:00
Sam Lantinga
3d37a0f6c9 Fixed bug 2190 - test/testdrawchessboard.c line endings
Joseph Carter
test/testdrawchessboard.c checks out of hg with DOS line endings on non-dos systems.  Fixed via:

perl -pi -e 's/\r//g' test/testdrawchessboard.c
2013-11-03 11:27:06 -08:00
Philipp Wiesemann
0bc9aaf406 Changed parameter name for gesture template save functions from "src" to "dst". 2013-11-02 12:07:21 +01:00
David Ludwig
59df93166d WinRT: merged with SDL 2.0.1 codebase 2013-10-27 21:26:46 -04:00
Andreas Schiffler
55dd456631 Fix error assert for negative cases of pixels_getPixelFormatName test 2013-10-21 23:17:37 -07:00
Sam Lantinga
a999af88e9 Fixed building using MinGW
Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
2013-10-17 23:02:29 -07:00
Sam Lantinga
308e51f9a2 Fixed compiling on Mac OS X, added a system RAM test 2013-10-17 11:56:33 -07:00
Sam Lantinga
2ba754fbe6 Fixed bug 2149 - Don't search for libusbhid except on BSD
Joseph Carter

There's a whole set of configure tests for BSD's libusbhid, and they only matter on BSD.  However, if you have the library on Linux, it gets pulled in as library bloat.  And it's bloat of the highest order since not a single function call to the library is ever made unless you're on a *BSD.
2013-10-13 19:49:45 -07:00
Edward Rudd
02263d4148 added simple Drag & drop test
--HG--
extra : rebase_source : e72b921485c5fc5ad1b7c7849802c020d49a06d3
2013-10-12 11:21:40 -04:00
Sam Lantinga
1c7ed8eef6 Updated SDL to version 2.0.1 2013-10-10 21:50:25 -07:00
Gabriel Jacobo
c51c4c0733 Adds gl_profile_mask to test framework, uses it in testgles 2013-10-10 00:49:57 -03:00
Gabriel Jacobo
dca7c7b00d Fixes testgles and testgl 2013-10-09 11:30:01 -03:00
Sam Lantinga
583198f72e Fixed bug 2132 - Tests may use invalid SDL_window pointers when windows are closed
norfanin

Some of the tests keep using the pointers of a destroyed SDL_Window when the common event handling handled the close event. The event handler itself does not NULL the pointer after the destruction.

The attached patch adds a loop in the handler that will assign NULL to the destroyed window. It also adds checks to some of the tests so they skip those windows by checking for NULL.
2013-10-05 19:09:03 -07:00
Sam Lantinga
75add55896 Report an error if creating a render target fails 2013-10-03 21:41:09 -07:00
David Ludwig
d8672afbe4 WinRT: made testthread log output via SDL_Log
- this will allow output to be read via Visual C++'s Output pane
2013-08-20 21:55:13 -04:00
David Ludwig
88461d442a WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45)
--HG--
rename : README.iOS => README-ios.txt
2013-08-12 22:29:55 -04:00
Philipp Wiesemann
0b13b79137 Corrected comment in test program. 2013-08-10 23:07:28 +02:00
Ryan C. Gordon
c35c4a6f18 Replaced SDL_HAPTIC_SQUARE with SDL_HAPTIC_LEFTRIGHT.
We needed a bit, so we're hoping no one needs this effect, especially when
it's fairly close to SDL_HAPTIC_SINE, we hope.

SDL_HAPTIC_LEFTRIGHT maps to XInput's functionality, so this removes the SINE
code for the XInput driver to keep things clean.

This also makes the simplified Rumble API use SDL_HAPTIC_LEFTRIGHT if
SDL_HAPTIC_SINE isn't available, to keep XInput working.

When we break the ABI, and can extend the supported capabilities field from
a Uint16, we'll add SDL_HAPTIC_SQUARE back in.

This patch is based on work by Ethan Lee.
2013-08-10 13:38:09 -04:00
Andreas Schiffler
84e0884077 Update video_getSetWindowSize for windows 2013-08-08 22:10:00 -07:00
Andreas Schiffler
7067bff470 Fix Bug 2021: Win32: Stack overflow due to recursive SDL_LogOutput on SDL_LogError without console; fix off-by-one error in SDLtest test suite 2013-08-08 21:29:30 -07:00
Philipp Wiesemann
1baa9e9bda Changed test program to be more compatible C. 2013-07-27 21:11:12 +02:00
Philipp Wiesemann
6b494e5eeb Removed unused variable from test program. 2013-07-27 21:07:07 +02:00
Philipp Wiesemann
69e8c3f950 Removed unused parameter in test program. 2013-07-27 21:05:04 +02:00
Philipp Wiesemann
c03703d90d Corrected words in comments of test programs. 2013-07-27 21:02:50 +02:00
Sam Lantinga
17482012af Added example of using the software renderer and window surface API, contributed by Nitin Jain. 2013-07-27 03:48:23 -07:00
Sam Lantinga
e2a14cf5dd Updated the copyright year for the test programs 2013-07-25 09:51:21 -07:00
Philipp Wiesemann
e44d24ff29 Removed unused variables to fix warnings in test program. 2013-07-24 22:19:01 +02:00
Sam Lantinga
6f83bd0e2a Finished updating testoverlay2 for the new API and added it to the Visual Studio 2010 projects 2013-07-23 12:46:22 -07:00
Sam Lantinga
32188834b5 Updated blend semantics so blending uses the following formula:
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
    dstA = srcA + (dstA * (1-srcA))
This allows proper compositing semantics without requiring premultiplied alpha.

Needs full unit test coverage and bug fixes!
2013-07-23 08:06:49 -07:00
Sam Lantinga
fe2bb8805e Fixed bug 1973 - test/Makefile.in fails on Mac OS X with X11 enabled...
Ryan C. Gordon

If you have the X11 SDK installed on Mac OS X, you'll build with X11 support, but the Makefile doesn't build anything but the Cocoa testnative code for Mac OS X, which is fine, but then testnative fails to link because testnative.h enables the X11 support based on the SDL config header.

Building the testnativex11.c code on Mac OS X doesn't work because you need to explicitly link with "-L/usr/X11/lib -lX11" if this code is enabled, but you can't link with that by default because the X11 SDK might be missing.

So this needs a little configure magic to do the right thing (or forcibly disabling X11 support on Mac OS X in testnative.h).
2013-07-21 12:47:47 -07:00
Philipp Wiesemann
32e6f653b6 Replaced use of malloc()/free() with SDL_malloc()/SDL_free() in test program. 2013-07-20 21:51:53 +02:00
Philipp Wiesemann
62c31ff5c3 Removed not needed SDL_WINDOW_SHOWN from test programs.
See bug #1667.
2013-07-20 21:47:16 +02:00
Philipp Wiesemann
74e5c8cffd Replaced use of strcmp() with SDL_strcmp() in tests. 2013-07-20 21:39:54 +02:00
Sam Lantinga
87baf66d18 Re-enabled other messagebox tests, moved the SDL_Init() call as late as possible to show the circumstances where it's needed. 2013-07-14 12:16:10 -07:00
Sam Lantinga
26c456e4ff Added testing of messagebox with a parent window 2013-07-14 11:57:45 -07:00