17 Commits

Author SHA1 Message Date
Ryan C. Gordon
20a76b0e3e
video: removed unused devindex argument from bootstrap's create method. 2022-07-26 00:19:52 -04:00
Cameron Cawley
347659e8cf riscos: Ensure that last_mouse_buttons is initialised correctly 2022-05-25 14:26:36 -07:00
Cameron Cawley
cb43eb43f8 riscos: Ensure the mouse focus is set when creating the window 2022-05-25 14:26:36 -07:00
Cameron Cawley
6eda520f64 riscos: Add a basic implementation of SDL_ShowCursor() 2022-05-25 14:26:36 -07:00
Simon McVittie
412ceb84d4 video: Only check major version in SDL_GetWindowWMInfo
Since #5602, SDL is intended to have the same ABI across the whole
major-version 2 cycle, so we should not check that the minor version
matches the one that was used to compile an application.

There are two checks that could make sense here.

The first check is that the major version matches the expected major
version. This is usually unnecessary and is not usually done (if we're
calling into the wrong library we'll likely crash anyway), but since we
have the information, we might as well continue to use it.

The second check is whether the version provided by the caller is
equal to or greater than a threshold version at which additional fields
were added to the struct. If it is, we should populate those fields;
if it is not, then we cannot. This is only useful on platforms where
additional fields have genuinely been added during the lifetime of
SDL 2, like Windows and DirectFB (but not X11).

This commit changes the first check to be consistent about only looking
at the minor version, while leaving the second check using SDL_VERSIONNUM
(which will be removed or widened in SDL 3, but it's fine for now).

Resolves: https://github.com/libsdl-org/SDL/issues/5711
Fixes: cd7c2f1 "Switch versioning scheme to be the same as GLib and Flatpak"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-24 08:56:23 -07:00
Pierre Wendling
501a499180 Add clang-format on/off comments where necessary.
Comments were added in places where INDENT-ON/OFF comments are. Places
like stdlib's asm don't need it as clang-format doesn't try to indent it.
2022-05-19 01:31:29 -07:00
Cameron Cawley
98353533e5 riscos: Report keyboard repeat events 2022-02-24 09:11:33 -08:00
Sam Lantinga
120c76c84b Updated copyright for 2022 2022-01-03 09:40:21 -08:00
Cameron Cawley
4d3da5b75b riscos: Disable the mouse pointer for now 2021-10-30 21:25:01 -07:00
Cameron Cawley
1c256b892e riscos: Fix enumerating screen modes 2021-10-30 21:25:01 -07:00
Cameron Cawley
5a3c97f3a3 riscos: Fix detection of the current mode 2021-10-30 21:25:01 -07:00
Cameron Cawley
53b3db0c5d Handle the KMOD_SCROLL modifier on RISC OS 2021-10-30 21:25:01 -07:00
Cameron Cawley
1268984edc Implement mouse input on RISC OS 2021-10-30 21:25:01 -07:00
Cameron Cawley
f7f54f0d04 Implement keyboard input on RISC OS
Partially based on a patch from http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fautobuilder%2Flibraries%2Fsdl%2Flibsdl2%2F&rev=7174#a6401c766f408f1ea356e6977894cc6a5
Currently lacks support for mapping scancodes to keycodes.
2021-10-30 21:25:01 -07:00
Cameron Cawley
f8a8ca3e1f Support proper mode switching on RISC OS 2021-10-30 21:25:01 -07:00
Cameron Cawley
fe9bb74764 riscos: Refactor framebuffer code 2021-10-30 21:25:01 -07:00
Cameron Cawley
25c71748ad Add a barebones RISC OS video driver 2021-10-30 21:25:01 -07:00