Sam Lantinga
6bb0c2a5c2
Added documentation for some scancodes
2022-10-14 06:33:38 -07:00
Sam Lantinga
91ff88451b
Disable "The key you just pressed is not recognized by SDL." message by default
2022-10-13 23:56:17 -07:00
Sam Lantinga
139192140c
Fixed reported cases of "Keyboard layout unknown" messages
...
In all cases they were using SDL_SCANCODE_TABLE_XFREE86_2 with some keycodes remapped or fewer than expected keycodes. This adds a sanity check that catches all of them and gives them the right scancode table.
2022-10-13 23:23:55 -07:00
Sam Lantinga
2c1923859a
Don't remove entries from an existing scancode keymap
...
If we can't find the X11 keysym, it's likely that either the keysym is NoSymbol, in which case we won't hit it anyway, or it's been mapped to a character, in which case the existing mapping is correct for the scancode and the character will be reflected in the keycode mapping.
2022-10-13 22:50:57 -07:00
Sam Lantinga
99f2a50394
X11 scancode mapping cleanup
...
* Consolidated scancode mapping tables into a single location for all backends
* Verified that the xfree86_scancode_table2 is largely identical to the Linux scancode table
* Updated the Linux scancode table with the latest kernel keycodes (still unmapped)
* Route X11 keysym -> scancode mapping through the linux scancode table (which a few hand-written exceptions), which will allow mappings to automatically get picked up as they are added in the Linux scancode table
* Disabled verbose reporting of missing keysym mappings, we have enough data for now
2022-10-13 22:41:47 -07:00
Cameron Gutman
f5afb7d11a
directfb: Fix return type of DirectFB_RenderPresent()
2022-10-13 18:44:15 -05:00
Sam Lantinga
fc73386f45
Fixed the mapping from raw joystick values to the expected [SDL_JOYSTICK_AXIS_MIN, SDL_JOYSTICK_AXIS_MAX] range. (thanks Tas!)
...
The original code mapped incorrectly from [min, max] to [-32768, 32512], the upper bound being SDL_JOYSTICK_AXIS_MAX - 255 instead of SDL_JOYSTICK_AXIS_MAX.
2022-10-12 21:44:50 -07:00
Pierre Wendling
5b9608e08c
Remove D3D9 workarounds for Watcom.
...
The linked PRs have been merged since May.
2022-10-12 17:55:37 +03:00
Ryan C. Gordon
2d7816e358
dynapi: Disable support for API call logging by default.
...
We can manually enable it if necessary, but it bloats the library to
leave it on just in case.
Fixes #6381 .
2022-10-12 09:59:31 -04:00
Sylvain
f69e004d01
Android default to dynamic API disabled (see #6381 )
2022-10-12 13:58:41 +02:00
Sylvain
f6ff87788a
Android default to dynamic API disabled (see #6381 )
2022-10-12 13:55:14 +02:00
Desour
6836273d14
Use XIWarpPointer if compiled with xinput2
...
Co-authored-by: Andrei E <andreien@proton.me>
2022-10-11 16:43:24 -07:00
Ethan Lee
be2cb00066
wayland: Check for the input handle before checking the keyboard handle
2022-10-11 11:16:52 -04:00
Sam Lantinga
df1bd07dee
d3d12: actually execute the pending commands before processing resize
...
This makes sure all the resources are in the expected state
Fix the D3D12 case in https://github.com/libsdl-org/SDL/issues/6376
2022-10-11 07:25:27 -07:00
Frank Praznik
0b88e609bc
wayland: Raise wl_seat maximum version to 8
...
Version 8 is required for supporting axis_value120 high-resolution scroll events.
2022-10-11 09:15:21 -04:00
zhailiangliang
41c718edca
Fix memory leak in PSP_CreateTexture
2022-10-10 22:36:55 -07:00
happyharryh
6f224e4d9f
Made timestamp_us of sensor events increase monotonically for Nintendo controllers
2022-10-10 22:33:19 -07:00
Pierre Wendling
8117bfe5d1
PS2: Ignore warnings from toolchain headers.
...
The `gsInline.h` header creates `Wdeclaration-after-statement` warnings.
2022-10-10 22:31:16 -07:00
Pierre Wendling
5ddac7e026
PSP: Fix type mismatch warnings.
2022-10-10 22:31:16 -07:00
Pierre Wendling
c1317175b4
PSP: Fix Wformat
warnings.
2022-10-10 22:31:16 -07:00
Pierre Wendling
669532d529
PSP: Remove dead code.
...
Fixes unused variable warning.
2022-10-10 22:31:16 -07:00
Ryan C. Gordon
17322e2be6
dynapi: Optionally log every call into the SDL API.
...
This will only log things going through dynapi, which means it won't
do anything if dynapi is disabled for a given build, but also things
that call the `*_REAL` version of an API won't log either (which is
to say, if an internal piece of SDL calls a public API, it won't log
it, but if an application calls that same entry point, it will).
Since this just inserts a different function pointer, unless you
explicitly request this at runtime, it won't add any overhead, and,
of course, the entire thing can be turned off with a single #define
so it doesn't even add extra unused code to the shared library if
the kill switch is flipped.
2022-10-10 13:17:07 -04:00
Sam Lantinga
4507083503
Fixed build
2022-10-10 09:39:55 -07:00
Sam Lantinga
680d0f043a
Added support for undefined or centered position for shaped windows
...
Fixes https://github.com/libsdl-org/SDL/issues/6359
2022-10-10 09:27:26 -07:00
Pierre Wendling
43a2b0b1e5
N3DS: Use macro to correct axis.
...
Using `(value * SDL max) / 3DS max` allows for marginally better
accuracy compared to `value * (SDL max / 3DS max)`.
2022-10-10 08:50:59 -07:00
Pierre Wendling
49c25b1daf
N3DS: Fix PrivateSensorUpdate call.
...
A new timestamp parameter was added in 2c51874.
2022-10-10 08:50:59 -07:00
Pierre Wendling
cb1972b3ba
N3DS: ZL and ZR should be considered as triggers.
...
Previously they were considered as clicking stick.
2022-10-10 08:50:59 -07:00
Pierre Wendling
86a8714fea
N3DS: Refactor joystick module to avoid globals.
2022-10-10 08:50:59 -07:00
Pierre Wendling
392f3882d0
N3DS: Use SDL_Sensor instead of Joystick sensors.
2022-10-10 08:50:59 -07:00
Pierre Wendling
efc93e6851
N3DS: Don't set num_display
by hand.
...
Doing so creates 2 empty displays at the beginning of the list.
2022-10-10 08:50:59 -07:00
Pierre Wendling
83ec6062af
N3DS: Move gfxInit and hidInit from main to video.
2022-10-10 08:50:59 -07:00
Pierre Wendling
266014faa7
N3DS: Use SDL_Touch instead of the Joystick touch.
2022-10-10 08:50:59 -07:00
Pierre Wendling
f9785702a6
N3DS: Deduce screen from window's display.
...
This removes the need for a dedicated window creation flag.
2022-10-10 08:50:59 -07:00
Pierre Wendling
46a13ad97a
N3DS: NEON is likely not supported.
2022-10-10 08:50:59 -07:00
Pierre Wendling
af2bc2ed0e
N3DS: Use osSetSpeedupEnable instead of PTMSYSM.
2022-10-10 08:50:59 -07:00
Pierre Wendling
03bbbcd85e
N3DS: Use CreateJoystickGUIDForName.
2022-10-10 08:50:59 -07:00
Pierre Wendling
2b2693ae90
N3DS: Use asprintf instead of snprintf.
2022-10-10 08:50:59 -07:00
Pierre Wendling
655275378d
N3DS port (squashed)
...
A dedicated renderer using Citro3D would likely allow for better
much better graphical performances.
2022-10-10 08:50:59 -07:00
Sam Lantinga
61b5360e17
Only check to see if the ICC profile changes when the display changes or we gain focus
...
Fixes https://github.com/libsdl-org/SDL/issues/6366
2022-10-10 08:29:05 -07:00
Sam Lantinga
f99fc3268e
d3d12: fixed window resize handling
...
Fixes https://github.com/libsdl-org/SDL/issues/6355
2022-10-09 11:42:39 -07:00
Sam Lantinga
490c20f93f
d3d12: reset the vertex buffer size when it is released
2022-10-09 09:57:55 -07:00
Sam Lantinga
efdb390caa
Disable the HIDAPI Wii driver by default as it doesn't work with the dolphinbar
2022-10-09 09:11:33 -07:00
Frank Praznik
6391ad970c
wayland: Factor out common libdecor frame commit code
...
The pattern of:
libdecor_state_new()
libdecor_frame_commit()
libdecor_state_free()
was used in several places. Factor it out into a common function.
2022-10-09 08:50:54 -07:00
Frank Praznik
b0a9396b00
wayland: Remove XDG surface geometry calls
...
These were needed to fix some buggy behavior regarding committing old buffer sizes when entering fullscreen that has since been corrected. Remove them.
2022-10-09 08:50:54 -07:00
Guldoman
b91ddbc3e2
wayland: null-terminate drop data
2022-10-09 08:48:34 -07:00
Anonymous Maarten
eb8eb621b1
SDL_x11modes: fix -Wunused-variable
2022-10-08 23:41:07 +02:00
Anonymous Maarten
01498d3acf
SDL_render_psp.c: fix -Wshadow
...
Emitted by PSP's gcc
2022-10-08 23:41:07 +02:00
Anonymous Maarten
4298e79887
SDL_offscreenframebuffer.c: fix format '%d' expecting int instead of Uint32
...
Emitted by Nintendo 3DS's gcc (fix is same as used by ngage)
2022-10-08 23:41:07 +02:00
Anonymous Maarten
b51a88a95c
SDL_malloc.c: fix variable 'used' set but not used
...
Emitted by clang-cl
2022-10-08 23:41:07 +02:00
Anonymous Maarten
5c150ddc2f
SDL_mslibc.c: fix unknown pragma ignored [-Wunknown-pragmas]
...
Emitted by clang-cl
2022-10-08 23:41:07 +02:00