Commit Graph

46 Commits (5dfa4043a3f6a4604c67c8b2bc7de9bef59977a1)

Author SHA1 Message Date
Ryan C. Gordon e061a92dc9 Some drag'and'drop improvements.
First: disable d'n'd events by default; most apps don't need these at all, and
if an app doesn't explicitly handle these, each drop on the window will cause
a memory leak if the events are enabled. This follows the guidelines we have
for SDL_TEXTINPUT events already.

Second: when events are enabled or disabled, signal the video layer, as it
might be able to inform the OS, causing UI changes or optimizations (for
example, dropping a file icon on a Cocoa app that isn't accepting drops will
cause macOS to show a rejection animation instead of the drop operation just
vanishing into the ether, X11 might show a different cursor when dragging
onto an accepting window, etc).

Third: fill in the drop event details in the test library and enable the
events in testwm.c for making sure this all works as expected.
2018-08-02 16:03:47 -04:00
Ozkan Sezer 08de74ec49 use the 'aborts' pragma of Watcom for SDL_NORETURN functions
SDL_ExitProcess(), SDL_AbortAssertion() and SDLTest_BailOut().

(Commit 303c1e0fb0cf for bug #4100 removed SDL_NORETURN from
SDL_ExitProcess() and SDL_AbortAssertion() in order to avoid
warnings from windows builds, but that's temporary I guess..)
2018-06-13 14:45:02 +03:00
Ozkan Sezer 3ea093cc85 SDL_test_fuzzer.c: fix strict aliasing warnings by using a union. 2018-02-25 10:15:00 +03:00
Sam Lantinga e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga 1c43705bab Fixed compiler warning 2017-12-09 13:05:56 -08:00
Sam Lantinga cf9236488a Fixed bug 3879 - add missing SDLCALL to SDLTest_TrackedMalloc & co.
Ozkan Sezer

The attached trivial patch adds missing SDLCALL to SDLTest_TrackedMalloc & co.
2017-10-13 09:50:04 -07:00
Sam Lantinga 22b6df511b Use the lower-case hex output to match other stack trace printouts 2017-10-12 14:46:28 -07:00
Sam Lantinga 7079195697 Fixed compiler warning 2017-10-12 14:44:54 -07:00
Sam Lantinga 5fc2017661 Fixed bug 3877 - missing SDLCALL in SDLTest_ExampleHitTestCallback
Ozkan Sezer

Following trivial patch adds missing SDLCALL to SDLTest_ExampleHitTestCallback()
2017-10-12 14:25:07 -07:00
Sam Lantinga 41a60394d0 Added missing file 2017-10-12 14:20:17 -07:00
Sam Lantinga 9c580e14c9 Added functions to query and set the SDL memory allocation functions:
SDL_GetMemoryFunctions()
    SDL_SetMemoryFunctions()
    SDL_GetNumAllocations()
2017-10-12 13:44:28 -07:00
Sam Lantinga f4f9e39f62 Fixed bug 3874 - Compiler warnings SDL_Surface.c and SDL_cocoakeyboard.m 2017-10-12 08:41:11 -07:00
Sam Lantinga 0fea9164eb Added an example for SDL_SetWindowHitTest() when you create a borderless resizable window. 2017-09-22 17:29:32 -07:00
Sam Lantinga e8059221bd Fixed bug 3806 - Fixes for MSVC compiler warnings
Simon Hug

These are the remaining compiler warnings I see in the current tip cb049cae7c3c.

- SDL_test_log.c defines _CRT_SECURE_NO_WARNINGS without checking if it was already set.

- SDL_windowskeyboard.c converts integers to pointers without going over the (U)INT_PTR types. That bothers MSVC.
2017-09-08 18:26:25 -07:00
Sam Lantinga 4657d9f33c We don't need to pass the renderer into SDLTest_CleanupTextDrawing() 2017-09-08 04:53:31 -07:00
Sam Lantinga 65c55fdd84 Fixed build 2017-09-08 04:38:46 -07:00
Sam Lantinga b0b3da7702 Added a function to clean up test text drawing 2017-09-08 04:14:05 -07:00
Sam Lantinga 9ca6292372 Added some missing render capability flags 2017-08-29 23:14:39 -07:00
Sam Lantinga c3d428d402 Fixed line breaks in verbose test logging output 2017-08-29 23:12:26 -07:00
Sam Lantinga 94e0f3e95b Added some debug messaging for previously unhandled events 2017-08-29 22:52:17 -07:00
Ryan C. Gordon ae667da638 Fixed a bunch of compiler warnings. 2017-08-29 15:52:49 -04:00
Sam Lantinga ded5b3a4b4 Fixed crash at shutdown if the window couldn't be created 2017-08-27 21:05:18 -07:00
Ryan C. Gordon 25e3a1ec90 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
2017-08-27 22:15:57 -04:00
Sam Lantinga b2e2bcc203 Added test debug logs for additional event types 2017-08-12 20:21:34 -07:00
Sam Lantinga 3c852360f6 Fixed bug 3646 - SDL_test_common.c: Add key bindings for testing SDL_SetWindowPosition
Eric Wasylishen

Alt-Up/Down/Left/Right switches between displays using SDL_WINDOWPOS_CENTERED_DISPLAY

Shift-Up/Down/Left/Right shifts the window by 100px
2017-08-11 10:42:26 -07:00
Ryan C. Gordon cff9e5a876 test: info now reports usable display bounds and DPI (thanks, Eric!).
Fixes Bugzilla #3652.
2017-05-18 16:29:10 -04:00
Philipp Wiesemann 33ff5bd148 Fixed typo in log message. 2017-02-03 23:30:29 +01:00
Sam Lantinga 800a72eb17 Switch stderr output to SDL_Log() so it shows up on Windows and mobile devices 2017-01-31 10:19:56 -08:00
Sam Lantinga 45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Ryan C. Gordon 232ae68864 Still more compiler warning fixes for various platforms. 2016-11-23 17:20:28 -05:00
Ryan C. Gordon 40c2a6fb55 Fixed more compiler warnings. 2016-11-23 11:49:26 -05:00
Sam Lantinga eaca3958ad Fixed bug 3494 - SDL_test_fuzzer.c fails compile since r10604
Ozkan Sezer

As of hg rev. 10604 (http://hg.libsdl.org/SDL/rev/4fe01fd25855),
SDL_test_fuzzer.c fails to build again
2016-11-20 21:24:09 -08:00
Sam Lantinga 818d1d3e80 Fixed bug 1646 - Warnings from clang with -Weverything 2016-11-15 01:30:08 -08:00
Sam Lantinga c1e292fcf8 Fixed build error with missing function prototype in the SDL_test_harness.h header 2016-11-13 23:09:42 -08:00
Sam Lantinga 57d01d7d67 Patch from Sylvain to fix clang warnings 2016-11-13 22:57:41 -08:00
Sam Lantinga 74e1dd4c6f Define _GNU_SOURCE when building SDL 2016-11-11 13:14:00 -08:00
Sam Lantinga 9dfe54006e We should be using a string constant for the strftime format string 2016-10-01 10:38:15 -07:00
Bastien Nocera 7edd2261e7 Fix "format not a string literal" errors
With GCC 6.1.

https://bugzilla.libsdl.org/show_bug.cgi?id=3375
2016-10-01 10:36:24 -07:00
Sam Lantinga f1e0b9af20 Added debug output for new window events 2016-09-29 16:10:08 -07:00
Philipp Wiesemann f4d33fcbba Fixed compile warnings in test library about formats strings not being literals.
Partially fixes Bugzilla #3375.
2016-06-25 19:40:44 +02:00
Philipp Wiesemann 1d1ba58f28 Fixed compile warnings about uninitialized variables in test library.
Found by buildbot.
2016-01-06 22:39:29 +01:00
Ryan C. Gordon 3bdaf4c611 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
This is currently implemented for X11, Cocoa, Windows, and DirectFB.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2016-01-05 02:46:10 -05:00
Sam Lantinga 68a3272852 Fixed sed error on Mac OS X and updated copyright on a few last files 2016-01-02 10:38:51 -08:00
Sam Lantinga 42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann 4679195dbf Fixed memory leak in test harness.
Found by Cppcheck.
2015-07-06 21:02:20 +02:00
Philipp Wiesemann 0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00