Commit Graph

8954 Commits (363c36781d48f07715b301dec82636feb5101a36)

Author SHA1 Message Date
Zach Reedy 363c36781d Fixed: Incorrect assumption that mouse button is released when window is allocated 2022-03-14 08:38:25 -07:00
Guus Waals 7495b98141 Make SDL_VIDEO_OPENGL_EGL optional on Android 2022-03-14 13:38:12 +01:00
Sylvain 0ad606b48d
Android: add comment to set render target to NULL when going to background (bug #4041) 2022-03-14 10:43:18 +01:00
Ozkan Sezer ecc1c871e6 SDL_endian.h: use endian predefs from newer gcc and clang versions.
Closes: https://github.com/libsdl-org/SDL/pull/5403
2022-03-14 10:10:40 +03:00
Ozkan Sezer ee6bfcdd66 SDL_blit_N.c: removed duplicated const (fixes bug #5401) 2022-03-13 20:56:42 +03:00
Ryan C. Gordon 3ab739afff
cmake: Make test code use proper C main functions.
Fixes #5021.
2022-03-13 12:10:52 -04:00
Ozkan Sezer 072db7b005 SDL_windowskeyboard.c (IME_IsTextInputShown): remove unused local vars. 2022-03-12 01:56:40 +03:00
SDL Wiki Bot 229297d97f Sync wiki -> header 2022-03-11 22:47:04 +00:00
Zach Reedy d14a126383
IME Composition Truncation + SDL_IsTextInputShown + SDL_ClearComposition (#5398)
* Fixes for IME Composition Truncation + Addition of SDL_ClearComposition, SDL_IsTextInputShown

* Fixed: Documentation and code style issues raised during code review.
2022-03-11 14:45:17 -08:00
Charlie Birks 9de97e19cc emscripten: Don't prevent default on filtered key events 2022-03-11 11:55:41 +00:00
Ozkan Sezer afb0606f5a minor os/2 clean-ups. 2022-03-10 18:50:10 +03:00
Ozkan Sezer 50575aa184 Makefile.os2: fixed setting OS2DEBUG in CFLAGS. 2022-03-10 18:50:10 +03:00
Cameron Gutman 677dc1015c rawinput: Fix double detection of gamepads on some 3rd party X360 wireless receivers
The name that the Raw Input joystick driver pulls from the HID stack comes
from USB string descriptors contained on the device. For official wireless
receivers, this always contains "Xbox 360 Wireless Receiver for Windows"
which matches the friendly name that WGI provides.

3rd party Xbox 360 wireless receivers may have different strings in their
USB string descriptors (one uses "XBOX 360 For Windows" instead). This
fails to match WGI's name and causes Raw Input and WGI to both report the
same gamepad.

Since wireless Xbox 360 controllers seem to have a consistent VID/PID
regardless of the adapter enumerating them, we can also match on that to
catch these.

The duplicate case reported to me was:
Controller (XBOX 360 For Windows) - 030000005e040000a102000000007200
Xbox 360 Wireless Receiver for Windows - 030000005e0400000000000000007701
2022-03-09 21:19:53 -08:00
Ozkan Sezer bf69868924 reduced a few ifdefs, fixed an unused warning if built w/o SDL_HAVE_YUV. 2022-03-10 01:55:04 +03:00
Jo Bates 01d38e7ade Make Win32 fullscreen and borderless windows minimizable 2022-03-09 14:08:12 -08:00
Sam Lantinga 09b652b70a Make sure the string properties are actually strings (thanks Nat!) 2022-03-09 13:54:23 -08:00
Sam Lantinga c6eef542ab Removed dead code 2022-03-09 13:48:31 -08:00
pionere 911ba8d343
hide impossible branch in D3D_UnlockTexture 2022-03-09 20:17:55 +01:00
Sylvain ea5b482bff
Remove unused warning 2022-03-09 15:38:36 +01:00
Sylvain 45833a148d
Prevent shadowing static variable '_this' with local paramter '_this' of SDL_CreateWindowTexture 2022-03-09 15:33:45 +01:00
Sylvain a4a80c8607
Fix variable may be uninitialized when used here [-Wconditional-uninitialized] 2022-03-09 15:21:55 +01:00
Sylvain 04256a5372
Fix compilation (see #5313) 2022-03-09 15:12:25 +01:00
pionere 0983fcee5e
fix memory leak in D3D11_CreateRenderer 2022-03-09 15:03:49 +01:00
pionere 3f8b450de2
extend the code hidden by SDL_HAVE_YUV 2022-03-09 15:03:30 +01:00
pionere ce1883e1e7
fix compile error with disabled SDL_HAVE_YUV (vita)
- UpdateTextureYUV is not defined if SDL_HAVE_YUV is not defined/zero
+ calling SDL_free suffice if the VITA_GXM_RenderData was just allocated
2022-03-09 15:02:44 +01:00
Sam Lantinga 14db417e12 Reenable getting the serial number on macOS
We filter now on game controllers, so we shouldn't hit the crash bug on random devices that this was working around.
2022-03-08 21:32:27 -08:00
Sam Lantinga c3ca3445bd Prefer HIDAPI on macOS, as that has extended functionality 2022-03-08 18:56:49 -08:00
Sam Lantinga 6a787619e6 Allow reading background events for MFi controllers 2022-03-08 18:42:13 -08:00
Sam Lantinga b064ad6ac5 Allow GL_ARB_texture_non_power_of_two environment variable to override OpenGL 2.0 check 2022-03-08 18:14:10 -08:00
Sam Lantinga 1b7669374e Fixed the SDL controller type for USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER 2022-03-08 09:58:24 -08:00
Mahyar Koshkouei 41e7d1baa6 Add SDL_GetDisplayDPI implementation on Emscripten
Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
2022-03-07 07:18:45 -05:00
Nick Cao f03215bc70 fix linking with SDL_PULSEAUDIO_SHARED=OFF and SDL_X11_SHARED=OFF 2022-03-07 12:55:50 +03:00
Cameron Gutman b2463a917c events: Add logging support for several missing event types 2022-03-06 15:02:53 -06:00
Sam Lantinga bdafe1e049 Fixed whitespace 2022-03-04 11:01:55 -08:00
Sam Lantinga 2e801b1ae7 Split long text input into multiple events if needed (thanks @zreedy!) 2022-03-04 10:50:16 -08:00
SDL Wiki Bot 232c3556ac Sync wiki -> header 2022-03-04 17:30:05 +00:00
Sam Lantinga ae73ea9c07 Clarified documentation for the trigger rumble API
Fixes https://github.com/libsdl-org/SDL/issues/5372
2022-03-04 09:27:46 -08:00
IOBYTE 13756b5c72 Add X1 and X2 button support to mouse test 2022-03-04 12:09:08 -05:00
Cameron Cawley 2f7b885df9 Fix 'potentially uninitialized local pointer variable' error in UWP builds 2022-02-28 09:04:33 -08:00
Cameron Cawley b7f8117d40 Build the standalone MSVC projects with GitHub Actions 2022-02-28 09:04:33 -08:00
Cameron Cawley 550b8377bc Combine the MSVC and UWP workflows 2022-02-28 09:04:33 -08:00
Cameron Cawley 98353533e5 riscos: Report keyboard repeat events 2022-02-24 09:11:33 -08:00
Sam Lantinga af40cb6f00 Added support for the Razer Huntsman Analog keyboard in controller mode 2022-02-23 15:49:10 -08:00
SDL Wiki Bot 669a7f8552 Sync wiki -> header 2022-02-23 16:18:05 +00:00
Ozkan Sezer 4a43321c81 cmake: Fix bug #5361.
src/joystick/*.c wasn't unconditionally added to source list even though
joystick is an SDL subsystem. Also removed the `SDL_JOYSTICK AND NOT APPLE`
condition from src/joystick/dummy/*.c source addition: the OSX unresolved
symbols issue, if it really is there, should be fixed separately.

Fixes https://github.com/libsdl-org/SDL/issues/5361, i.e. build failures
when SDL_JOYSTICK and SDL_HAPTIC are disabled.
2022-02-23 18:10:02 +03:00
Phillip Stephens 94d43186f2 GameCubeAdapter: Add suppport for all rumble modes
This adds support for all 3 of the gamecube controller's rumble modes
Rumble: 1
Stop: 0
StopHard: 2
This is useful for applications that need the full range of support
This also adds a hint to control rumble behavior, defaults 0 to maintain compatibility
2022-02-23 07:03:02 -08:00
Ryan C. Gordon b946e31ec8 video: Allow unaccelerated SDL_HINT_FRAMEBUFFER_ACCELERATION renderers.
If the app requested a specific renderer, even if it's not the optimal path,
let them have it, because they might want to render with a specific GPU API
on top of the framebuffer pixels.

This fixes DosBox-X crashing on startup, which forces the hint to "opengl".
2022-02-23 09:36:06 -05:00
Ryan C. Gordon 60ddb74cfe video: rework how we prepare a texture framebuffer.
Now we see if we can create an SDL_Renderer, and if that renderer reports
itself as "accelerated," and added some initial heuristics to the OpenGL
renderer to make better decisions about what qualifies as "accelerated."

This adds some FIXMEs that might be merely hypothetical, and removes the
old OpenGL checks from the video subsystem that probably weren't meaningful
in modern times. This will definitely need to improve the existing list
in the GL renderer, to catch things like llvmpipe, etc.

Reference issue #4624.
2022-02-23 09:36:06 -05:00
Wohlstand 08d27dfd7b SDL_openslES.c: Detect float support in runtime and use it
Allow using of the float output type on newer Android devices, but keep PCM16 output on older

Closes #5358
2022-02-22 08:31:14 -08:00
Ryan C. Gordon 293a0aa80e
opengl: If GL version >= 2.0, NPOT textures are supported, so favor them.
Fixes #5041.
2022-02-22 10:54:21 -05:00