Commit Graph

12386 Commits (c5cdaef6c34acfefcea57b2ea98c34c023924a83)

Author SHA1 Message Date
Sam Lantinga 31f464153d SDL_WINDOW_INPUT_GRABBED has been renamed SDL_WINDOW_MOUSE_GRABBED 2023-01-28 10:56:38 -08:00
Sam Lantinga e83c54f271 SDL_WINDOW_FULLSCREEN and SDL_WINDOW_FULLSCREEN_DESKTOP are now distinct flags 2023-01-28 10:56:38 -08:00
Sasha Szpakowski 67037f064b macOS: remove obsolete 10.7 and 10.8-specific code. 2023-01-27 20:46:38 -08:00
Sasha Szpakowski d293145ec9 macOS: include @1x display modes with the same point-size as @2x modes
Previously they were discarded because SDL didn't expose enough information for apps to differentiate between a low-dpi and high-dpi mode which had the same size in DPI-scaled points. Now the information is available in SDL_DisplayMode.

Fixes #3025.
2023-01-27 20:43:13 -08:00
Frank Praznik ba74e76e56 wayland: Correct mode values to use pixels instead of screen units
Fixes the Wayland backend to report the desktop mode dimensions in pixels instead of screen units, adjusts enumerated fullscreen resolutions to use the correct pixel values and scaling, and changes some nomenclature to reflect the terminology used in the new DPI system.
2023-01-27 14:51:08 -08:00
Sam Lantinga 0229091f37 Fixed build 2023-01-27 14:24:06 -08:00
Sam Lantinga 24fec13ac1 Add full high DPI information to SDL_DisplayMode
SDL_DisplayMode now includes the pixel size, the screen size and the relationship between the two. For example, a 4K display at 200% scale could have a pixel size of 3840x2160, a screen size of 1920x1080, and a display scale of 2.0.
2023-01-27 12:38:46 -08:00
Sylvain b23d20cd4d Android: display_mode scale: cast to do a float division 2023-01-27 08:17:20 -08:00
Frank Praznik fc5f363ff7 video: Send the new fullscreen size in screen coordinates
After successfully entering fullscreen, send the new fullscreen window dimensions in screen coordinates, not pixels, to avoid a unit mismatch.
2023-01-27 08:16:27 -08:00
Sam Lantinga c2d79cb411 Verify that clear ignores the viewport and test a logical size that isn't the same aspect ratio as the window 2023-01-26 16:10:13 -08:00
Sam Lantinga d9b53399fe Added an SDL render logical size test 2023-01-26 14:49:23 -08:00
Sam Lantinga c708ddd66f Added a SDL render viewport test 2023-01-26 13:58:59 -08:00
Sam Lantinga 1c83c1fadd Fixed build warnings in Xcode 2023-01-26 13:58:59 -08:00
Sam Lantinga b5e6d0eba9 Added testautomation to the Xcode project 2023-01-26 13:58:59 -08:00
Frank Praznik 56120a132d wayland: Remove duplicate code
Remove some duplicate code that was left behind when rearranging things during the new high-DPI support work.
2023-01-26 13:16:57 -08:00
Ryan C. Gordon 077725d0e3
wikiheaders: Fixed SDL2 wiki link. 2023-01-26 14:50:52 -05:00
Ryan C. Gordon 5f8b53820a
wikiheaders: Link to the SDL2 wiki in the preamble.
Fixes #6568.
2023-01-26 14:45:58 -05:00
Ryan C. Gordon 726d6f9422
wikiheaders: Allow markdown in the wikipreamble string.
Reference Issue #6568.
2023-01-26 14:45:57 -05:00
Frank Praznik b2cfcbdb64 wayland: Support new high-DPI system
- Adds support for scaled fullscreen modes
- General cleanup of scale factor setting and usage
2023-01-26 11:11:30 -08:00
Ozkan Sezer b462027c53 SDL_test_common.c: minor warning fix (SDL_AudioDeviceID is unsigned) 2023-01-26 22:05:47 +03:00
Sam Lantinga 364db52ca3 Moved testautomation data out of SDL_test library 2023-01-26 10:25:44 -08:00
Ozkan Sezer 742e356180 test/loopwavequeue.c: minor warning fix (SDL_AudioDeviceID is unsigned) 2023-01-26 18:15:20 +03:00
Ozkan Sezer be2afeec84 SDL_loadso.h: add missing SDLCALL to SDL_LoadFunction() 2023-01-26 18:01:10 +03:00
Jiří Malák 54540a82a0 SDL_atomic.h: Update SDL_CPUPauseInstruction for Watcom. (#7157)
Appropriate CPU directive can be used in #pragma aux so that it is not
necessary to hardcode instruction bytes.

(cherry picked from commit 507fc462db1ede9f3ca2c581809a7f1492ac1ff5)
2023-01-26 17:01:56 +03:00
Frank Praznik 6895e1700f video: Ensure that the closest returned video mode match always has a valid scale value 2023-01-25 20:18:45 -08:00
Sam Lantinga 5970311353 Fixed build using clang-cl on Windows 2023-01-25 14:46:09 -08:00
Ozkan Sezer 3bf86c0eca cmake: addititonal check for visibility attributes.
makes sure to detect unsupported configurations especially with new gcc
versions.
2023-01-26 01:32:32 +03:00
Sam Lantinga 13087405e0 Fixed clang documentation warnings
Don't warn about \threadsafety, which was added as custom documentation for SDL functions

Also removed -Wdocumentation-unknown-command, since that triggers on the e-mail addresses in the generated wayland protocol headers.
2023-01-25 14:25:13 -08:00
Anonymous Maarten 4ec3a5ac27 cmake: only add <LANG>_VISIBILITY_PRESET properties when compiler supports -fvisibility= 2023-01-25 22:27:47 +01:00
Sam Lantinga a37f2aed7e Hook up Android_ScreenDensity to convert pixels to screen coordinates on Android
Fixes https://github.com/libsdl-org/SDL/issues/7149
2023-01-25 13:06:42 -08:00
Sam Lantinga 9bbc402b81 Take the display scale into account in SDL_GetWindowSizeInPixels() 2023-01-25 13:06:42 -08:00
Sam Lantinga 162e40c982 Use densityDpi instead of density to more closely match what the UI scale is 2023-01-25 13:06:42 -08:00
Sam Lantinga 6dc135413a Create a static SDL_test library on Android 2023-01-25 13:06:42 -08:00
Anonymous Maarten 330ad80014 cocci: fix game pad event types 2023-01-25 22:02:31 +01:00
Ryan C. Gordon 79cca812cb
include: make SDL_RenderPresent thread safety notes less verbose.
Reference Issue #7140.
2023-01-25 13:15:34 -05:00
SDL Wiki Bot 43e3daace3 Sync SDL3 wiki -> header 2023-01-25 18:02:19 +00:00
Ryan C. Gordon 197340ea1c
Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
Ryan C. Gordon 01cba48d18
wikiheaders: Add a `\threadsafety` tag to document threading details.
Reference Issue #7140.
2023-01-25 12:59:25 -05:00
Sylvain 73dc327c84 Android get the display Density 2023-01-25 09:28:21 -08:00
Sam Lantinga 6a27188023 SDL_DisplayMode now represents physical pixels and has added a display scaling factor
Work in progress on https://github.com/libsdl-org/SDL/issues/7134
2023-01-25 09:26:59 -08:00
Sam Lantinga a1e101e898 Fixed formatting for Haiku cc files 2023-01-25 03:03:41 -08:00
Sam Lantinga 6240252736 Updated documentation with the SDL_WINDOW_ALLOW_HIGHDPI flag removal 2023-01-25 01:28:37 -08:00
Sam Lantinga 4696c9556b
SDL 3.0 is going to be high DPI aware and officially separates screen… (#7145)
* SDL 3.0 is going to be high DPI aware and officially separates screen coordinates from client pixel area

The public APIs to disable high DPI support have been removed

Work in progress on https://github.com/libsdl-org/SDL/issues/7134
2023-01-25 01:23:17 -08:00
Sylvain 78cc95e34e Rename internal GetDisplayDPI to GetDisplayPhysicalDPI 2023-01-25 00:04:00 -08:00
Sylvain 724d92fd65 Rename SDL_GetDisplayDPI to SDL_GetDisplayPhysicalDPI
to avoid confusion with logical DPI
2023-01-25 00:04:00 -08:00
Sam Lantinga d496d187c5 Document that the pitch value may be zero for surfaces that will be filled in by the application later.
Also verify that the pitch isn't zero for surfaces with valid pixels

Fixes https://github.com/libsdl-org/SDL/issues/7143
2023-01-24 22:51:16 -08:00
Ryan C. Gordon e3bada6fbd
wikiheaders: We never updated the config when we moved to include/SDL3. :O 2023-01-24 19:42:36 -05:00
Anonymous Maarten ecffa93f39 ci: test vita piglet/pvr gles support
ci: configure gl4es4vita

ci: test gles on pib AND pvr
2023-01-25 00:23:05 +01:00
Anonymous Maarten edf8db0466 cmake: removed unused code 2023-01-25 00:23:05 +01:00
Anonymous Maarten 5f995579e9 vita: add missing static libraries for using gles with pib 2023-01-25 00:23:05 +01:00