Commit Graph

5150 Commits

Author SHA1 Message Date
Sam Lantinga
9e7894efac Added support for the PowerA - Super Mario Controller 2019-10-22 10:27:30 -07:00
Sam Lantinga
4a25a099a0 Fixed the location of controller_type.h in the Visual Studio project 2019-10-22 10:26:49 -07:00
Sam Lantinga
7bf6c887c7 Fixed the location of controller_type.h in the Visual Studio project 2019-10-22 10:25:55 -07:00
Ozkan Sezer
9530ccba0f SDL_endian.h: Use endian.h for OpenBSD.
Patch from OpenBSD CVS, authored by Donovan Watteau.
2019-10-21 22:22:28 +03:00
Ozkan Sezer
7c7801f166 Fix typo with __MIPSEB__ preprocessor check (bug #4836.)
Patch from Simon Howard
2019-10-21 10:20:25 +03:00
Ryan C. Gordon
9ececeeaa4 cpuinfo: Use a better default alignment value (thanks, Simon!).
Fixes Bugzilla #4835.
2019-10-20 22:17:59 -04:00
Sam Lantinga
cdc7181e6d Don't try to use the Xbox HID protocol with the NVIDIA Shield controllers 2019-10-19 01:54:02 -07:00
Sylvain Becker
336a75491e remove warning prototype SDL_ExitProcess() 2019-10-19 09:23:40 +02:00
Ozkan Sezer
9c14c789ad updated includes for _exit() 2019-10-18 23:10:00 +03:00
Sylvain Becker
24bee6e5e2 Add internal function SDL_EGL_GetVersion() 2019-10-18 21:47:30 +02:00
Sam Lantinga
b060b2eadd Fixed whitespace 2019-10-18 08:56:54 -07:00
Sylvain Becker
412ab7e1aa Fixed bug 4829 - Sensor events incorrectly disabled 2019-10-18 14:23:37 +02:00
Sylvain Becker
e5bd20030d Android: enable eglGetProcAddress (bug #4040, bug #4794) 2019-10-18 14:08:07 +02:00
Sylvain Becker
03f27a3a75 Add robustness getting the EGL version (see bug #4040) 2019-10-18 13:27:58 +02:00
Ryan C. Gordon
3ecce84749 egl: adjust how we load symbols in SDL_EGL_GetProcAddress.
Use eglGetProcAddress for everything on EGL >= 1.5. Try SDL_LoadFunction first
for EGL <= 1.4 in case it's a core symbol, and as a fallback if
eglGetProcAddress fails. Finally, for EGL <= 1.4, fallback to
eglGetProcAddress to catch extensions not exported from the shared library.

(Maybe) Fixes Bugzilla #4794.
2019-10-18 00:07:32 -04:00
Sam Lantinga
4f304fd88c Added support for the BDA PS4 Fightpad 2019-10-17 18:07:52 -07:00
Sam Lantinga
a1349d4627 Build fix for the build fix 2019-10-17 17:51:36 -07:00
Sam Lantinga
097b9c3084 Better fix for iOS build 2019-10-17 17:51:49 -07:00
Sam Lantinga
8984d25bfa Fixed build on iOS 2019-10-17 17:47:27 -07:00
Sam Lantinga
bf9092cf4a Removed unused variable 2019-10-17 17:47:11 -07:00
Sam Lantinga
b3470f04b1 Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to control whether Nintendo Switch controllers use their button labels or button positions for game controller button reporting. 2019-10-17 17:32:47 -07:00
Sam Lantinga
e6ac16ef2f Added support for third party Nintendo Switch controllers that don't support the full protocol 2019-10-17 16:59:05 -07:00
Sam Lantinga
43c5f62d44 Merged latest data from Steam 2019-10-17 16:14:17 -07:00
Alex Szpakowski
216f5b98ac metal: Fix compilation when using older Apple SDKs (bug #4828). 2019-10-17 18:48:58 -03:00
Ryan C. Gordon
6be83e6141 emscripten: Patched to compile (thanks, Caleb!).
Fixes Bugzilla #4827.
2019-10-16 13:54:35 -04:00
Sam Lantinga
1b4de45d05 Fixed bug 4785 - SDL_CreateRGBSurface creates 1-bit surfaces with zero pitch
Sylvain

Seems to be a regression in this commit: https://hg.libsdl.org/SDL/rev/7fdbffd47c0e
SDL_CalculatePitch() was using format->BytesPerPixel, now it uses SDL_BYTESPERPIXEL().

The underlying issue is that "surface->format->BytesPerPixel" is *not* always the same as SDL_BYTESPERPIXEL(format);
BytesPerPixel defined as format->BytesPerPixel = (bpp + 7) / 8;
vs
#define SDL_BYTESPERPIXEL(format)  ... (format & 0xff)

Because of SDL_pixels.h format definitions, one is giving a BytesPP 1, the other 0.
2019-10-16 08:45:54 -07:00
Ryan C. Gordon
ed7483f82c x11: On macOS, look for X11 install in /opt/X11 instead of /usr/X11R6.
This is where Apple installs XQuartz now (and apparently, the compatibility
symlink at /usr/X11R6 can be missing).

Fixes Bugzilla #4706.
2019-10-15 22:36:08 -04:00
Ryan C. Gordon
02a2ec986f video: Make sure SDL_FillRects()'s fill_function isn't used unitialized. 2019-10-15 14:55:09 -04:00
Ryan C. Gordon
eb066a716c include: Removed a FIXME comment.
Using (1 << 14) instead of 0x4000 might be clearer for the maintainer, but
it makes it harder to look up these flags when debugging an app. The value
has to be written once by one person, the has to be read by tons of people
over and over.
2019-10-15 14:17:32 -04:00
Ryan C. Gordon
9f636be8c0 video: Removed unused variables. 2019-10-15 14:04:43 -04:00
Ryan C. Gordon
e23067eab2 video: speed up SDL_FillRect[s] slightly (thanks, Jakub!).
"This patch does the following:

* Instead of SDL_FillRects calling SDL_FillRect in a loop the opposite
happens -- SDL_FillRect (a specific case) calls SDL_FillRects (a general case)
with a count of 1

* The switch/case block is moved out of the loop -- it modifies the color
once and stores the fill routine in a pointer which is then used throughout
the loop"

Fixes Bugzilla #4674.
2019-10-15 14:03:01 -04:00
Ryan C. Gordon
e9c1e1269c test: Fixed wrong verbose flag check (thanks, watcom.hecht!).
Fixes Bugzilla #4826.
2019-10-15 12:02:19 -04:00
Ryan C. Gordon
16dee35cfe windows: Remove /ARCH:SSE option from x64 Visual Studio builds.
Fixes Bugzilla #4561.
2019-10-15 09:07:12 -04:00
Ryan C. Gordon
aa0a6518a2 test: Fixed compiler warning on Visual Studio. 2019-10-15 08:54:25 -04:00
Cameron Gutman
31ee4d3d81 Reduce delay to 1 ms in SDL_WaitEventTimeout() and SDL_WaitEvent()
The 10 ms delay effectively caps input polling at 100 Hz and rendering
at 100 FPS if applications use these functions in their event loop. The
delay may also lead to dropped frames even at 60 FPS due if they are
unlucky enough to hit the delay and rendering takes longer than 6 ms.
2018-11-03 15:46:42 -07:00
Sam Lantinga
526b9bdf1c Backed out changeset b0241180cdc5
Better commit incoming!
2019-10-14 22:41:27 -07:00
Ryan C. Gordon
cd8652d8f3 events: SDL_WaitEvent()'s polling loop now sleeps 1ms instead of 10ms.
Fixes Bugzilla #4356.
2019-10-15 01:13:44 -04:00
Ryan C. Gordon
d5e378d198 cocoa: Implement SDL_WINDOW_ALWAYS_ON_TOP support (thanks, Gabriel!).
Fixes Bugzilla #4809.
2019-10-15 00:59:10 -04:00
Ryan C. Gordon
ec04110d8e dynapi: Deal with failure cases better, other fixes.
Fixes Bugzilla #4803.
2019-10-14 12:41:06 -04:00
Sylvain Becker
fe20c35be8 Fixed race condition when scaling Touch events, and changing the renderer
target.
Always read the output size of the main renderer.
(similar to bug 2107)
2019-10-14 16:40:46 +02:00
Alex Szpakowski
074f6a512d macOS: Fix the initial window background not being black since macOS 10.14.2 or so, when OpenGL is used (bug #4810). Also fixes "CGContext: invalid context 0x0" errors when an OpenGL window is created (bug #4470). 2019-10-14 00:51:53 -03:00
Alex Szpakowski
009226c61e macOS: Fix non-highdpi OpenGL contexts not scaling properly in macOS 10.15 (bug 4810 and 4822). 2019-10-13 21:39:20 -03:00
Sylvain Becker
72660a51dd Fixed bug 4825 - SDL Renderer OpenGL: Buffer overflow (SDL_RENDERCMD_DRAW_LINES) 2019-10-13 20:52:52 +02:00
Alex Szpakowski
f8bdefe1b5 macOS: Fix asserts in SDL_Render's metal scissor code when the window is resized. 2019-10-13 15:18:28 -03:00
Alex Szpakowski
1773da89f9 macOS: Fix a new issue in 10.15 where the window decorations don't always get restored after SDL_SetWindowFullscreen(window, 0). 2019-10-13 12:16:40 -03:00
Sylvain Becker
3b0dcaf474 Fixed bug 4797 - SDL fails to compile with Mesa Master (thanks Michael Olbrich!)
fix building with Mesa 19.2

With Mesa 19.2 building fails with:

/include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr'

The same type is defined in include/SDL_opengl.h for OpenGL and the two
headers should not be included at the same time.
This was just never noticed because the same header guard '__gl_h_' was
used. This was changed in Mesa. The result is this error.

Fix this the same way GLES2 already handles this: Don't include the GLES
header when the OpenGL header was already included.
(https://hg.libsdl.org/SDL/rev/6a3670d6108d)
2019-10-12 18:47:56 +02:00
Sylvain Becker
e5198bd29d Remove 'Enum' suffixes (bug 4813) 2019-10-11 06:18:24 +02:00
Sylvain Becker
a0934a23fd Fixed bug 4813 - Give enums their own name
* SDL_PIXELTYPE_
* SDL_BITMAPORDER_
* SDL_PACKEDORDER_
* SDL_ARRAYORDER_
* SDL_PACKEDLAYOUT_
* SDLK_
* SDL_LOG_CATEGORY_
2019-10-10 17:40:00 +02:00
Sylvain Becker
97901b9f97 Fixed bug 4820 - SDL assumes RW_SEEK_SET == SEEK_SET 2019-10-10 17:21:46 +02:00
Ryan C. Gordon
a747106c97 linux: If D-Bus isn't available on the system, don't keep trying to load it.
Fixes Bugzilla #4476.
2019-10-09 19:38:16 -04:00