Update NXDK SDL to 2.0.22#13
Open
Quantx wants to merge 4449 commits into
Open
Conversation
- no need to keep the error in a static variable - always print the error code - reduce the required stack-size - reduce the number of snprintf calls (and code size)
According to MSDN, we can also get SIZE_MAXHIDE and SIZE_MAXSHOW, based on state changes to other windows. It's not clear under what circumstances this will happen (I saw some docs indicating it may require multiple application windows), but it doesn't seem right to treat them as RESTORED.
Here's an IRC dump that hopefully explains the issue this fixes: > I'm debugging something odd where, for a libre game, unvanquished.net (a FPS), relative mouse input in fullscreen is buggy > it's like, working mostly ok, but it has a weird performance/cleanup bug > after some time in relative mouse input mode, some time as low as 15s, usually more, the SDL sends A LOT of relative mouse input per frame > almost all of which have xrel==0 && yrel==0 > by A LOT, I mean that after ~1min, it's usually in the thousands per frame > each frame, a while ( SDL_PollEvent( &e)) loop reads the inputs, but it seems SDL is not clearing the list. > one way to clear the list is to open the in-game console or menu, which switches the input mode to absolute, then close it which gets a working relative input mode (for some time at least) > I've shown the issue to be present with SDL2.0.20 but not with 2.0.14 on my system > some other players on Arch Linux (SDL2.0.20) report a possibly related issue, where some keys seem to be pressed at random > I've did some bisection on SDL master, and I've found that there are actually two commits involved, one breaking it totally (no input at all), and one fixing it partially (with the problem described above) First related commit that breaks it totally: commit 82793ac Author: Sam Lantinga <slouken@libsdl.org> Date: Thu Oct 14 14:26:21 2021 -0700 Fixed mouse warping while in relative mode We should get a mouse event with an absolute position and no relative motion and shouldn't change the OS cursor position at all Second related commit, that halfway fixes it: commit 31f8c3e Author: Sam Lantinga <slouken@libsdl.org> Date: Thu Jan 6 11:27:44 2022 -0800 Fixed event pump starvation if the application frequently pushes its own events Reverting the first commit did fix the issue for me, but would probably reintroduce the bug it was fixing(?). This patch should fix it for everyone hopefully. DaemonEngine/Daemon#600 is the upstream bug, and contains some early investigation.
…lscreen, and shown. Fixes libsdl-org#5371
CMake 3.19 fails to compile Objective-C with that property set Fixes libsdl-org#5418
…er the mouse should be constrained to the center of the window or the whole window in relative mode. For further info about the pros and cons, check out the discussion in libsdl-org#5271
The Java code needs the native functions to be implemented, even if they're not surfaced via the C API. Fixes libsdl-org#5326
This reverts commit ed7840a.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Largely a straightforward update. The joystick API had a bunch of extra functions added which the Xbox doesn't support. I've added placeholder functions for all of these which return an error code since they're unsupported on the Xbox. Minor API changes to the Audio and Video drivers.
The only real issue is with the threads implementation between the current NXDK-SDL version and 2.0.22 as there are a number of changes. NXDK-SDL seems to piggyback on the Windows threads implementation, and I'm not super familiar with the Xbox's threading implementation so I'd appreciate if someone else could take a look at that.