Sam Lantinga
13c3adb1fd
Fixed black screen on Steam Link
2016-10-13 02:09:37 -07:00
Philipp Wiesemann
12f1d2d7dc
Removed empty statements in tests.
2016-10-12 23:36:49 +02:00
Philipp Wiesemann
3e00b2acf9
Fixed compiling of three test programs with C++.
2016-10-09 20:31:32 +02:00
Sam Lantinga
a6c4b433cd
Modified the custom cursor test to be able to load BMP files as cursors
2016-10-04 04:08:02 -07:00
Sam Lantinga
5c21fe25e1
Fixed bug 3318 - testime.c enhancement with GNU Unifont support
...
Simon Hug
I'm proposing some changes to the IME test program test/testime.c. The patch includes support for the GNU Unifont hex file, making the SDL_ttf dependency optional. There were also one or two bugs that prevented the text and underline from showing up poperly.
2016-10-01 12:43:14 -07:00
Sam Lantinga
d563a8bfd7
Fixed bug 3319 - Getting the POSIX out of testqsort.c
...
Simon Hug
There's a call to the POSIX function random in test/testqsort.c. Naturally, Windows doesn't do that. The attached patch changes the call to the SDLtest framework random functions and adds some seed control.
Looking at SDLTest_RandomInitTime, I just want to say that 'srand((unsigned int)time(NULL)); a=rand(); srand(clock()); b=rand();' is an absolutely terrible way to initialize a seed on Windows because of its terrible LCG.
2016-10-01 12:33:26 -07:00
Sam Lantinga
d1c4b0533b
Fixed bug 3322 - Missing error checking in testaudioinfo and testaudiohotplug
...
Simon Hug
The two tests test/testaudioinfo.c and test/testaudiohotplug.c are missing error checking when they call SDL_GetAudioDeviceName. This function can return NULL which the tests pass straight to SDL_Log.
2016-10-01 12:29:55 -07:00
Philipp Wiesemann
9335a5b22f
Fixed compiling of three test programs with C++.
2016-09-21 23:06:38 +02:00
Philipp Wiesemann
0510ab75b3
Fixed log message in audio capture test program.
2016-08-30 21:16:04 +02:00
Ryan C. Gordon
3a61ba8a90
testaudiocapture: ask for way more output samples.
...
Fixes Emscripten builds on Chrome for Android.
2016-08-12 22:50:48 -04:00
Ryan C. Gordon
15f5e2ffcb
testaudiocapture: open capture device to same spec as output device.
...
...since our resampler is still terrible (sorry!).
2016-08-09 16:57:49 -04:00
Ryan C. Gordon
32f2f907e8
testaudiocapture: use capture device buffer queueing, for better test coverage.
2016-08-06 02:48:00 -04:00
Ryan C. Gordon
41e101f785
testaudiocapture: don't use fullscreen for the window.
2016-08-06 02:45:51 -04:00
Ryan C. Gordon
f32e1a4671
testaudiocapture: made test app interactive.
...
(hold down mouse/finger to record, then it plays back what it heard. Repeat.)
2016-08-03 00:31:08 -04:00
Ryan C. Gordon
1b81d1bf07
testaudiocapture: Make a simple green/red window when recording/playing.
2016-08-02 19:17:51 -04:00
Ryan C. Gordon
ceae704649
testaudiocapture: Let specific devices be opened.
2016-08-02 13:38:56 -04:00
Ryan C. Gordon
5b2b9fb1f8
audio: Initial bits to enable audio capture support.
2016-08-01 00:18:56 -04:00
Brandon Schaefer
9db1333999
Tests: Would be wise to compile this
2016-07-13 09:41:43 -07:00
Brandon Schaefer
49143c57e9
Tests: Somehow tabs leaked in...
2016-07-13 07:39:01 -07:00
Brandon Schaefer
409cdc5f26
Tests: Add a manual test for a custom cursor (Taken from the API docs)
2016-07-13 07:34:06 -07:00
Brandon Schaefer
a5a929a55d
Tests: Mir needs the window to swap at lease 1 frame for the cursor to show. So render in testwm2
2016-07-13 07:07:46 -07:00
Philipp Wiesemann
5bb52655db
Fixed three source comments in tests.
2016-06-28 21:15:16 +02:00
Philipp Wiesemann
0619020de6
Added a simple test case for SDL_sscanf() to tests.
...
It fails on platforms where SDL's custom implementation is used.
Relates to Bugzilla #3341 .
2016-06-28 21:14:11 +02:00
Philipp Wiesemann
d231148b56
Fixed crash in shape test program if memory allocation failed.
2016-05-10 21:13:58 +02:00
Philipp Wiesemann
5bca661e1e
Fixed error return values in filesystem test program.
2016-05-10 21:12:48 +02:00
Philipp Wiesemann
48c993965d
Fixed memory leak in game controller test program.
2016-05-05 22:05:21 +02:00
Philipp Wiesemann
b47f52e9c8
Added missing error return in test program.
2016-04-14 21:10:08 +02:00
Philipp Wiesemann
167819be2c
Removed not needed SDL_WINDOW_SHOWN from chessboard test program.
2016-03-28 21:02:30 +02:00
Philipp Wiesemann
69630ccfed
Fixed compiling IME test program with HAVE_SDL_TTF on C89 compilers.
2016-03-10 21:00:27 +01:00
Philipp Wiesemann
f7f9aa434c
Removed unnecessary include statement in test program.
2016-03-10 21:00:13 +01:00
Ryan C. Gordon
3373009f25
A simple test program for SDL_qsort().
2016-03-10 01:50:43 -05:00
Philipp Wiesemann
f2c6a9e9d1
Fixed compile warnings about unused variables in IME test program.
2016-03-03 20:11:43 +01:00
Philipp Wiesemann
3a4c0b8a4f
Replaced strlen() with SDL_strlen() in IME test program.
2016-03-02 20:24:43 +01:00
Ryan C. Gordon
15cec4cfce
Mac: Implemented SDL_GetDisplayDPI (thanks, Kirill!).
...
Fixes Bugzilla #3223 .
2016-01-07 14:02:37 -05:00
Ryan C. Gordon
e83e190025
Added SDL_DROPBEGIN and SDL_DROPCOMPLETE events, plus window IDs for drops.
...
This allows an app to know when a set of drops are coming in a grouping of
some sort (for example, a user selected multiple files and dropped them all
on the window with a single drag), and when that set is complete.
This also adds a window ID to the drop events, so the app can determine to
which window a given drop was delivered. For application-level drops (for
example, you launched an app by dropping a file on its icon), the window ID
will be zero.
2016-01-05 01:42:00 -05:00
Ryan C. Gordon
4711bc9d8b
Added SDL_DROPTEXT event, for dragging and dropping string data.
...
This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2016-01-05 02:26:45 -05:00
Ryan C. Gordon
34581fedd1
Added SDL_GetDisplayUsableBounds().
2016-01-04 23:52:40 -05:00
Ryan C. Gordon
0e7135739a
Remove almost all instances of "volatile" keyword.
...
As Tiffany pointed out in Bugzilla, volatile is not useful for thread safety:
https://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/
Some of these volatiles didn't need to be, some were otherwise protected by
spinlocks or mutexes, and some got moved over to SDL_atomic_t data, etc.
Fixes Bugzilla #3220 .
2016-01-03 06:50:50 -05:00
Sam Lantinga
255c182471
Updated copyright to 2016
2016-01-02 10:10:34 -08:00
Philipp Wiesemann
20f4ae2fb8
Fixed a comment in two test programs.
2015-12-25 13:41:23 +01:00
Sam Lantinga
c47561fe68
Fixed whitespace in testspriteminimal.c
2015-12-24 06:11:05 -08:00
Sam Lantinga
17a35ec885
Fixed mapping third party XBox controllers that have the trigger axis all the way in until they are pulled and get updated values.
2015-12-18 18:49:23 -08:00
Philipp Wiesemann
3e38a72ac9
Fixed outdated information in README for test programs.
...
Two programs were removed some time ago and one was renamed.
2015-12-07 21:43:16 +01:00
Philipp Wiesemann
efcbc7ceb9
Changed comment in test program to avoid confusion.
...
There is a library called SDL_sound which is not used here.
2015-12-06 17:50:51 +01:00
Philipp Wiesemann
632b32ec5a
Fixed comment in filesystem test program.
2015-12-04 22:12:36 +01:00
Philipp Wiesemann
f1d3b82092
Fixed compile error in timer test program if PRIu64 not available.
2015-12-01 22:24:04 +01:00
Philipp Wiesemann
8f5f197236
Fixed compile warning in IME test program.
2015-12-01 22:22:58 +01:00
Philipp Wiesemann
f2375a7774
Fixed filesystem test program to compile with older versions of C.
2015-12-01 22:21:29 +01:00
Philipp Wiesemann
9677d33467
Replaced tabs with spaces in test programs.
2015-11-25 21:39:28 +01:00
Ryan C. Gordon
87c985cd18
Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID().
2015-11-14 12:35:45 -05:00
Philipp Wiesemann
0b442eb2d8
Fixed freeing uninitialized pointers on failure cleanup in tests.
2015-10-07 21:16:59 +02:00
Alex Szpakowski
4a556c4c01
Added initial support for MFi game controllers on iOS.
2015-09-20 23:08:36 -03:00
Ryan C. Gordon
4785ff74f2
Added copyright information on test/sample.wav; the mystery is solved! :)
2015-09-18 16:22:23 -04:00
Philipp Wiesemann
16c3694035
Added missing SDL_Quit() in test program.
2015-08-09 20:01:01 +02:00
Ryan C. Gordon
210c2bec08
testdisplayinfo.c forgot to SDL_Quit() at the end.
2015-08-07 01:00:14 -04:00
Philipp Wiesemann
e859cd05af
Fixed comment in test program.
2015-07-15 21:10:38 +02:00
Ryan C. Gordon
13cafe01a0
Added test/testdisplayinfo.c
2015-07-14 21:28:26 -04:00
Philipp Wiesemann
99c2ebb8b1
Fixed comment in test program.
2015-06-16 20:27:01 +02:00
Philipp Wiesemann
3834b61647
Fixed not needed calculation in test program.
2015-06-04 17:52:27 +02:00
Ryan C. Gordon
be1231750c
testmessage: Try Unicode chars in the title, too.
2015-05-31 23:53:10 -04:00
Ryan C. Gordon
c311fafac8
testmessage.c should report when message boxes were closed.
2015-05-31 22:27:46 -04:00
Ryan C. Gordon
a0719e44ef
Fixed memory leaks in testfilesystem.c (thanks, Nitz!).
...
Fixes Bugzilla #2991 .
2015-05-31 21:50:50 -04:00
Sam Lantinga
c03e66f608
Fixed X11 build, added code to print initial modifiers to checkkeys
2015-05-28 09:52:48 -07:00
Ryan C. Gordon
906a4d69c1
Stack hint should look for 0, not -1, and not care about environment variables.
2015-05-26 21:19:23 -04:00
Ryan C. Gordon
bd539b9ed1
Added a hint to specify new thread stack size (thanks, Gabriel!).
...
Fixes Bugzilla #2019 .
(we'll do a better fix when we break the API in SDL 2.1.)
2015-05-26 21:13:27 -04:00
Ryan C. Gordon
97bb9113e9
Make dot easier to see in testrelative.
2015-05-26 11:32:06 -04:00
Sam Lantinga
78f2198e6c
Updated the copyright year to 2015
2015-05-26 06:27:46 -07:00
Sam Lantinga
37547897ee
Fixed bug 2989 - Memory loss in clipboard_testClipboardTextFunctions
2015-05-26 06:16:43 -07:00
Philipp Wiesemann
89eb93d305
Removed redundant NULL check in test program.
2015-05-21 21:27:53 +02:00
Philipp Wiesemann
951d768224
Changed clean-up order in test program.
2015-05-21 21:25:32 +02:00
Philipp Wiesemann
dbd2fc4f33
Fixed undefined key access in test program.
2015-05-21 21:25:14 +02:00
Philipp Wiesemann
a96660cbde
Added missing loop cancel for Emscripten in test programs.
2015-05-18 21:21:14 +02:00
Philipp Wiesemann
8c5b82840a
Fixed compiling test program with Emscripten.
2015-05-18 21:17:13 +02:00
Philipp Wiesemann
adceb46138
Fixed handling only one event per frame in test program.
2015-05-18 21:12:16 +02:00
Philipp Wiesemann
dc0241fc19
Fixed implicit function declaration in test program.
2015-05-06 21:09:33 +02:00
Ryan C. Gordon
d4eb1ea6a2
checkkeys: report SDL_TEXTEDITING events.
2015-05-01 01:19:00 -04:00
Ryan C. Gordon
8e60ed9d07
checkkeys: Readded the KEYUP event test.
2015-05-01 01:12:48 -04:00
Ryan C. Gordon
44708540f3
Cleanups in the joystick code.
...
Removed some redundant state and other confusions.
Fixes Bugzilla #2738 .
2015-03-24 13:52:01 -04:00
Philipp Wiesemann
7b6434ad97
Updated test program for Emscripten.
2015-03-23 20:21:45 +01:00
Ryan C. Gordon
4b56f12266
Immediately minimize the goofy window in testaudiohotplug.
2015-03-19 22:20:12 -04:00
Ryan C. Gordon
8dc3028044
Initial work on audio device hotplug support.
...
This fills in the core pieces and fully implements it for Mac OS X.
Most other platforms, at the moment, will report a disconnected device if
it fails to write audio, but don't notice if the system's device list changed
at all.
2015-03-16 02:11:39 -04:00
Philipp Wiesemann
cb8c446d69
Updated name of assert type in test program.
2015-03-15 19:25:10 +01:00
Philipp Wiesemann
2b26e95343
Removed redundant include statements from test programs.
...
The needed header files are already included with SDL.h. Still including them in
the test programs is confusing because it somehow suggests they would be needed.
2015-02-18 21:31:21 +01:00
Philipp Wiesemann
5ac1343c94
Fixed compile warning about unused variable in wave test program.
2015-02-15 11:33:39 +01:00
Philipp Wiesemann
4c8d5e20a7
Fixed test programs for joystick not exiting on events after first disconnect.
...
Exit was broken since the main loop extraction needed for Emscripten support
because the former local but now global variables were not reset correctly.
2015-02-12 21:40:53 +01:00
Philipp Wiesemann
0a22818c0d
Fixed bug 2873 - Joystick test won't reload after reattach
...
lectem
-plug in the joystick
-start testjoystick 0
-unplug
-replug
The joystick is detected but doesn't enter the loop anymore since done==SDL_TRUE
2015-02-10 20:40:03 +01:00
Philipp Wiesemann
f45215f76a
Fixed compiling test with older C.
2015-02-10 20:31:05 +01:00
Philipp Wiesemann
0405296f1c
Fixed bug 2866 - testrelative.c: patch to make the orange box wrap around
...
Eric Wasylishen
Here's a patch to make the 'testrelative' demo program more useful: it just makes the orange rectangle wrap around. Previously, the orange cursor would just disappear off screen if you move the mouse a lot in one direction, so it was hard to tell if relative mouse mode was still working.
2015-02-07 22:40:36 +01:00
Philipp Wiesemann
ace64af532
Fixed two warnings about initialized but unused local variables in tests.
2015-01-16 23:03:14 +01:00
Philipp Wiesemann
313c38e43f
Removed missing test program from Makefile.
2014-12-25 22:47:04 +01:00
Philipp Wiesemann
024f1a0155
Fixed compile errors in example programs.
2014-12-25 21:42:56 +01:00
Ryan C. Gordon
e9afc9c6e2
Maybe actually patched to compile this time?
2014-12-24 22:22:35 -05:00
Ryan C. Gordon
2197ac814d
Really patched to compile this time?
2014-12-24 13:21:28 -05:00
Ryan C. Gordon
13699c157c
Patched to compile.
2014-12-24 13:16:27 -05:00
Ryan C. Gordon
9a4c98c6f9
Maybe patched to compile on Windows for real now?
2014-12-24 02:12:16 -05:00
Ryan C. Gordon
5f91cafa6c
Patched to compile on Windows.
2014-12-24 02:06:38 -05:00
Ryan C. Gordon
c6db647a88
Patched to compile on non-Emscripten targets.
2014-12-24 02:01:12 -05:00
Ryan C. Gordon
a9626cb76e
Initial merge of Emscripten port!
...
With this commit, you can compile SDL2 with Emscripten
( http://emscripten.org/ ), and make your SDL-based C/C++ program
into a web app.
This port was due to the efforts of several people, including: Charlie Birks,
Sathyanarayanan Gunasekaran, Jukka Jylänki, Alon Zakai, Edward Rudd,
Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)
2014-12-18 00:19:52 -05:00
Philipp Wiesemann
8ff1310094
Removed unused includes and functions from test program.
2014-12-12 21:51:30 +01:00
Philipp Wiesemann
2e4bd2c43c
Replaced sqrt() with SDL_sqrt() in test program.
2014-12-12 21:02:46 +01:00