Commit graph

11807 commits

Author SHA1 Message Date
Anonymous Maarten 9cf34908a1 cmake: pass VERSION to project() + don't use SDL_VERSION 2023-01-31 01:59:21 +01:00
Anonymous Maarten 3aa456dead cmake: remove MSCOS_RPATH related FIXME
The Macos CI does not show any warnings, so assume it's fixed
2023-01-31 01:59:21 +01:00
Bruno Sanches 7c085862e1 SDL_Video.h - audio driver
I believe you intend to say "video driver", not audio driver
2023-01-30 08:13:16 -08:00
Sylvain d66f27376e Prevent setting an error "invalid display" when the parameter displayID hasn't been set. 2023-01-30 10:57:51 +01:00
Sam Lantinga b07f8e987b Fixed checking the return values of SDL_AddBasicVideoDisplay() and SDL_AddVideoDisplay()
Also fixed Wayland and Windows usage of SDL_DelVideoDisplay()

https://github.com/libsdl-org/SDL/issues/7192
2023-01-29 21:58:15 -08:00
Sam Lantinga 1ffc09c6e6 Changed SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED to be the same value as SDL_EVENT_WINDOW_SIZE_CHANGED so SDL2 applications continue to work as expected. 2023-01-29 21:37:51 -08:00
Sam Lantinga de766fdcd7 Fixed Haiku build 2023-01-29 21:35:45 -08:00
SDL Wiki Bot 87af6c0019 Sync SDL3 wiki -> header 2023-01-30 03:26:14 +00:00
Sam Lantinga 22c69bccdf Displays are now referenced by instance ID instead of index 2023-01-29 19:25:15 -08:00
Anonymous Maarten 758c0dd6d8 Rename mouse BUTTON(DOWN|UP) event to BUTTON_(DOWN|UP) 2023-01-29 19:24:48 -08:00
Sylvain 413376cdb3 migration: replace SDL_DisplayMode w and h by screen_w and screen_h 2023-01-29 12:19:09 -08:00
Frank Praznik e22f5ed7d3 wayland: Check that all required dynamic symbols have been successfully resolved at init time
Ensure that all hard dependencies are resolved when dynamically loading the libraries required for the Wayland backend and fail gracefully if a required module was not initialized successfully.
2023-01-29 11:23:08 -08:00
Sasha Szpakowski 90795291e4 Remove SDL_GL/Metal/Vulkan_GetDrawableSize().
SDL_GetWindowSizeInPixels supersedes those functions.
2023-01-29 11:20:33 -08:00
Sasha Szpakowski 0d0a34f79f iOS: fix the desktop display mode's display scale property. 2023-01-29 11:11:46 -08:00
Frank Praznik a67b441a10 wayland: Send a pixel sized change event when the drawable size changes 2023-01-28 18:37:15 -08:00
Aaron Barany 4667d65f77 Fixes for building on Mac with OpenGL disabled. 2023-01-28 17:24:25 -08:00
Sam Lantinga df7639f100 Call SDL_OnWindow* handlers after the event has been delivered
This guarantees that events which trigger other events will happen in dependency order, instead of being reversed.
2023-01-28 15:56:02 -08:00
Sam Lantinga 432af82a88 Don't deliver window events while it's being destroyed 2023-01-28 15:56:02 -08:00
Sam Lantinga bf4095359c Removed duplicated window size events, and added SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED 2023-01-28 15:56:02 -08:00
Sasha Szpakowski af0ec13fc3 iOS: fix display modes to have accurate pixel sizes and screen scales. 2023-01-28 15:48:08 -08:00
SDL Wiki Bot 8814bedc3b Sync SDL3 wiki -> header 2023-01-28 18:57:14 +00:00
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 507fc462db)
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