summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-03-16Fixed Visual Studio buildSam Lantinga2-1/+3
2019-03-16Fixed iOS buildSam Lantinga1-0/+6
2019-03-16Fixed Mac OS X buildSam Lantinga1-8/+8
2019-03-16Fixed configure error if pkg modules aren't availableSam Lantinga2-96/+16
2019-03-16emscripten: force resize event when pixel ratio changesSebastian Krzyszkowiak1-1/+11
Without this, applications can't react to changed canvas size on window zoom.
2019-03-16Fixed bug 4450 - SDL_mouse.c fails to compile with CMake generated Visual ↵Sam Lantinga1-0/+3
Studio files if SDL_VIDEO_VULKAN 0/undefined Max Waine SDL_mouse.c, if compiled for Windows, requires GetDoubleClickTime to compile (available from winuser.h). Without Vulkan present this fails to compile as the include chain for winuser.h is the following. SDL_mouse.c -> SDL_sysvideo.h -> SDL_vulkan_internal.h -> SDL_windows.h -> windows.h -> winuser.h. Problem is that SDL_vulkan_internal.h doesn't include SDL_windows.h if Vulkan isn't present, so under MinGW/GCC it will give a -Wimplicit-function-declaration warning for GetDoubleClickTime, and under MSVC fails to compile completely. The solution to this would be to simplify the include chain: including SDL_windows.h under the same condition as GetDoubleClickTime (#ifdef __WIN32__) in SDL_mouse.c (or another file that isn't quite so indirectly included).
2019-03-16Fixed bug 4511 - SDL_gamecontrollerdb Mapping for Sony Playstation USB ↵Sam Lantinga1-2/+3
controller Renaud Lepage Simply submitting a new mapping.
2019-02-14Fixed DualShock 3 mappingSilent1-1/+1
2019-03-16Fixed bug 4525 - Fix crash in ALSA_HotplugThread caused by bad return value ↵Sam Lantinga1-1/+1
check Anthony Pesch Fix snd_device_name_hint return value check According to the ALSA documentation, snd_device_name_hint returns 0 on success, otherwise a negative error code. The code previously only considered -1 to be an error, which let other error codes through resulting in a segfault when hints (which was NULL) was dereferenced
2019-03-16Fixed bug 4544 - SDL2.m4 SDL2.framework patch made it impossible to fail ↵Sam Lantinga1-1/+1
detection Stian Skjelstad check if $sdl_framework is set, before checking if directory exists Patch that was merged here https://hg.libsdl.org/SDL/rev/9befd0acb9ef made it impossible for the SDL2 detection to fail, since one of the if statements fails to check if a variable is set or not. if test -d $sdl_framework; then can evaluate to true in some shells. I guess it falls into undefined behaviour when looking at the POSIX standard.
2019-03-16Fixed CVE-2019-7635 and bug 4498 - Heap-Buffer Overflow in Blit1to4 ↵Sam Lantinga1-3/+24
pertaining to SDL_blit_1.c Petr Pisar The root cause is that the POC BMP file declares 3 colors used and 4 bpp palette, but pixel at line 28 and column 1 (counted from 0) has color number 3. Then when the image loaded into a surface is passed to SDL_DisplayFormat(), in order to convert it to a video format, a used bliting function looks up a color number 3 in a 3-element long color bliting map. (The map obviously has the same number entries as the surface format has colors.) Proper fix should refuse broken BMP images that have a pixel with a color index higher than declared number of "used" colors. Possibly more advanced fix could try to relocate the out-of-range color index into a vacant index (if such exists).
2019-03-16Fix polling left trigger reporting right trigger's values.Jimb Esser1-0/+2
2019-03-16Fix DirectInput error codes being lostJimb Esser1-2/+2
2019-03-12hidapi: Add support for Wii U/Switch USB GameCube controller adapter.Ethan Lee13-175/+723
Note that a single USB device is responsible for all 4 joysticks, so a large rewrite of the DeviceDriver functions was necessary to allow a single device to produce multiple joysticks.
2019-03-16Fixed bug 4452 - Please replace AC_HELP_STRING with AS_HELP_STRINGSam Lantinga1-92/+92
Hugh McMaster AC_HELP_STRING is deprecated and is considered an obsolete macro in autoconf 2.69. Please replace AC_HELP_STRING with AS_HELP_STRING.
2019-03-16Added missing PKG_CONFIG macrosSam Lantinga2-617/+1181
2019-02-03Use host system pkg-config when (cross-)compiling and convert to ↵Hugh McMaster1-218/+116
PKG_CHECK_MODULES Fixes Bug 3575
2019-03-16Fix compiler warnings.Ryan C. Gordon2-4/+3
2019-03-15testgesture: Add dependency to SDLtest to Visual Studio project.Ryan C. Gordon1-0/+6
2019-03-15testgesture: cleaned up code formatting, etc.Ryan C. Gordon1-195/+196
2019-03-15testgesture: minor cleanups.Ryan C. Gordon1-7/+1
2019-03-15test: Moved testgesture.c over to the common SDLtest framework.Ryan C. Gordon1-41/+45
2019-03-15events: Disable all the signal-handling code on platforms without support.Ryan C. Gordon1-19/+31
So on Windows, for example, this mostly becomes a few empty functions.
2019-03-15events: Let arbitrary signals to simulate iOS/Android backgrounding events.Ryan C. Gordon6-48/+165
This lets you build a custom embedded device that roughly offers the "this process is going to the background NOW" semantics of SDL on a mobile device.
2019-03-15events: Make debug logging of the event queue a hint instead of an #ifdef.Ryan C. Gordon4-57/+128
This makes it easy to toggle it on when debugging a new platform (or just getting more visibility into an app) without having to rebuild SDL.
2019-03-13KMSDRM: valid file descriptors could positive or 0. -1 is invalid. (Bug 4530)Sylvain Becker1-2/+2
2019-03-13Android: minor comment updateSylvain Becker1-1/+1
2019-03-13Android: check SDL is initialized before sending the eventSylvain Becker1-1/+6
Avoid error message: SDLActivity thread ends (error=Video subsystem has not been initialized)
2019-03-12[iOS DAC] Fix touch events getting from SDL2 to source2.Sam Lantinga1-0/+21
2019-03-12Fixed initial display orientation at Android app startSam Lantinga3-15/+25
2019-03-12HIDAPI: fix bug that caused non-HID class parts of composite devices to have ↵Sam Lantinga1-5/+12
windows HID functions called on them.
2019-03-12Fixed bug 4513 - Wayland, fix crash when remove event is sent (from ↵Sylvain Becker1-1/+4
Sebastian Krzyszkowiak)
2019-03-12SDL_EVDEV_kbd_init: uninitialized data for ioctl (Bug 4530)Sylvain Becker1-1/+1
Only two chars are used but the full prototype is: int tioclinux(struct tty_struct *tty, unsigned long arg) ==5010== Syscall param ioctl(TIOCLINUX) points to uninitialised byte(s) ==5010== at 0x53E73C7: ioctl (syscall-template.S:78) ==5010== by 0x4A887DA: SDL_EVDEV_Init (SDL_evdev.c:163) ==5010== by 0x4A7D157: KMSDRM_VideoInit (SDL_kmsdrmvideo.c:509) ==5010== by 0x497D959: SDL_VideoInit_REAL (SDL_video.c:529) ==5010== by 0x487ACBC: SDL_InitSubSystem_REAL (SDL.c:171) ==5010== by 0x487B052: SDL_Init_REAL (SDL.c:256) ==5010== by 0x488F7D6: SDL_Init (SDL_dynapi_procs.h:85)
2019-03-12Fixed bug 4542 - Image flipped vertically when rendering on textureSylvain Becker3-1/+7
Have to recompute viewport because projection/glOrtho is different wether rendering is on target texture or not
2019-03-11SDL_MouseQuit(): clear mouse->cur_cursor (Bug 4530)Sylvain Becker1-0/+1
2019-03-11KMSDRM: missing return value in VideoInit() (Bug 4530)Sylvain Becker1-0/+2
2019-03-11KMSDRM: change calls free() to SDL_free() (Bug 4529)Sylvain Becker1-2/+2
2019-02-23Un-activate some routine on mips because they are slowers (Bug 4503)Sylvain Becker1-7/+52
2019-02-22BlitNtoN BlitNtoNKey: remove non-aligned word read/store (bpp 3<->4) (Bug 4503)Sylvain Becker1-229/+78
Mips and (old) ARM doesn't allow word read/write when adress isn't 4bytes aligned. So just remove that.
2019-02-19raspberry: expose second display.Ryan C. Gordon1-13/+30
This lets apps see and choose between both an HDMI and DSI-connected display, such as a television and the Pi Foundation's official touchscreen. It only exposes the second display if the hardware reports that it is connected.
2019-02-18Fix windows buildSylvain Becker1-29/+30
2019-02-18Fix bug 4053: Blit issues on Big Endian CPUSylvain Becker1-8/+158
2019-02-18Fixed bug 4500 - Heap-Buffer Overflow in Map1toN pertaining to SDL_pixels.cSam Lantinga1-0/+4
Petr Pisar The reproducer has these data in BITMAPINFOHEADER: biSize = 40 biBitCount = 8 biClrUsed = 131075 SDL_LoadBMP_RW() function passes biBitCount as a color depth to SDL_CreateRGBSurface(), thus 256-color pallete is allocated. But then biClrUsed colors are read from a file and stored into the palette. SDL_LoadBMP_RW should report an error if biClrUsed is greater than 2^biBitCount.
2019-02-17Fix invalid memory access and optimise Blit_3or4_to_3or4__*Sylvain Becker1-9/+63
Fix invalid write at last pixel of the surface: when surface has no padding (pitch == w * bpp) and bpp is 3 with Blit, no colorkey, and NO_ALPHA same or inverse rgb triplet Optimise by using int32 access: BGR24 -> ARGB8888 : faster x1.897875 (362405 -> 190953) RGB24 -> ABGR8888 : faster x1.660416 (363304 -> 218803) ABGR8888 -> RGB24 : faster x1.686319 (334962 -> 198635) ARGB8888 -> BGR24 : faster x1.691868 (324524 -> 191814) BGR24 -> RGB888 : faster x1.678459 (326811 -> 194709) BGR888 -> RGB24 : faster x1.731772 (327724 -> 189242) RGB24 -> BGR888 : faster x1.690989 (328916 -> 194511) RGB888 -> BGR24 : faster x1.698333 (326175 -> 192056)
2019-02-09Better naming for the blit permutation variablesSylvain Becker1-80/+81
2019-02-09Faster blit colorkey or not, applied to bpp: 3->4 and 4->3Sylvain Becker1-4/+133
===== BlitNtoNKey ======== ABGR8888 -> BGR24 : faster x3 (2168709 -> 562738) ABGR8888 -> RGB24 : faster x3 (2165055 -> 567458) ARGB8888 -> BGR24 : faster x3 (2169109 -> 564338) ARGB8888 -> RGB24 : faster x3 (2165266 -> 567081) BGR24 -> ABGR8888 : faster x3 (2997675 -> 891636) BGR24 -> ARGB8888 : faster x3 (2985449 -> 892028) BGR24 -> BGR888 : faster x3 (2961611 -> 891913) BGR24 -> BGRA8888 : faster x3 (3116305 -> 891534) BGR24 -> BGRX8888 : faster x3 (3179654 -> 896978) BGR24 -> RGB888 : faster x3 (2968191 -> 895112) BGR24 -> RGBA8888 : faster x3 (2998428 -> 893147) BGR24 -> RGBX8888 : faster x3 (2976529 -> 914853) BGR888 -> BGR24 : faster x3 (2161906 -> 563921) BGR888 -> RGB24 : faster x3 (2168228 -> 566634) BGRA8888 -> BGR24 : faster x4 (2270501 -> 561873) BGRA8888 -> RGB24 : faster x3 (2163179 -> 567330) BGRX8888 -> BGR24 : faster x3 (2162911 -> 562322) BGRX8888 -> RGB24 : faster x3 (2169617 -> 570927) RGB24 -> ABGR8888 : faster x3 (2977061 -> 925975) RGB24 -> ARGB8888 : faster x3 (2978148 -> 923680) RGB24 -> BGR888 : faster x3 (3001413 -> 935074) RGB24 -> BGRA8888 : faster x3 (2959003 -> 924096) RGB24 -> BGRX8888 : faster x3 (2965240 -> 927100) RGB24 -> RGB888 : faster x3 (2983921 -> 926063) RGB24 -> RGBA8888 : faster x3 (2963908 -> 925457) RGB24 -> RGBX8888 : faster x3 (2967957 -> 931700) RGB888 -> BGR24 : faster x3 (2173299 -> 563226) RGB888 -> RGB24 : faster x3 (2218374 -> 566164) RGBA8888 -> BGR24 : faster x3 (2166355 -> 561381) RGBA8888 -> RGB24 : faster x3 (2170322 -> 566729) RGBX8888 -> BGR24 : faster x3 (2168524 -> 564072) RGBX8888 -> RGB24 : faster x3 (2163680 -> 566956) ===== BlitNtoN ======== BGR24 -> BGRA8888 : faster x3 (2458958 -> 797557) BGR24 -> BGRX8888 : faster x3 (2486085 -> 797745) BGR24 -> RGBA8888 : faster x3 (2422116 -> 797637) BGR24 -> RGBX8888 : faster x3 (2454426 -> 799085) BGRA8888 -> BGR24 : faster x4 (2468206 -> 524486) BGRA8888 -> RGB24 : faster x4 (2463581 -> 525561) BGRX8888 -> BGR24 : faster x4 (2583355 -> 524468) BGRX8888 -> RGB24 : faster x4 (2477242 -> 524284) RGB24 -> BGRA8888 : faster x2 (2453414 -> 818415) RGB24 -> BGRX8888 : faster x3 (2414915 -> 800863) RGB24 -> RGBA8888 : faster x3 (2461114 -> 798148) RGB24 -> RGBX8888 : faster x3 (2400922 -> 799203) RGBA8888 -> BGR24 : faster x4 (2494472 -> 526428) RGBA8888 -> RGB24 : faster x4 (2462260 -> 526791) RGBX8888 -> BGR24 : faster x4 (2541115 -> 524390) RGBX8888 -> RGB24 : faster x4 (2469059 -> 525416)
2019-02-08Fix wrong access and simplifySylvain Becker1-15/+5
2019-02-07Some simplification of previous commitSylvain Becker1-47/+22
2019-02-07Faster blit with CopyAlpha, no ColorKeySylvain Becker1-9/+41
Applied to following formats: ABGR8888 -> BGRA8888 : faster x3 (2727179 -> 704761) ABGR8888 -> RGBA8888 : faster x3 (2707808 -> 705309) ARGB8888 -> BGRA8888 : faster x3 (2745371 -> 712437) ARGB8888 -> RGBA8888 : faster x3 (2746230 -> 705236) BGRA8888 -> ABGR8888 : faster x3 (2745026 -> 707045) BGRA8888 -> ARGB8888 : faster x3 (2752760 -> 727373) BGRA8888 -> RGBA8888 : faster x3 (2769544 -> 704607) RGBA8888 -> ABGR8888 : faster x3 (2725058 -> 706669) RGBA8888 -> ARGB8888 : faster x3 (2704866 -> 707132) RGBA8888 -> BGRA8888 : faster x3 (2710351 -> 704615)
2019-02-07Code factorization of the pixel format permutationSylvain Becker1-108/+73