Sam Lantinga
457ca3995c
Added SDL_GetWindowSafeArea()
...
Fixes https://github.com/libsdl-org/SDL/issues/3243
2024-07-23 17:06:04 -07:00
Sam Lantinga
c4eac60000
SDL_GetClipboardData() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
9de8cb888a
SDL_GetFullscreenDisplayModes() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Sam Lantinga
9758e102bc
SDL_GetDisplays() follows the SDL_GetStringRule
2024-07-19 12:22:03 -07:00
Amir
5db08b86ca
Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"
...
https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.
2024-07-17 14:09:11 -07:00
Ryan C. Gordon
d40b89dff6
clipboard: SDL_GetPrimarySelectionText() now follows the SDL_GetStringRule.
...
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Ryan C. Gordon
158fc459f1
clipboard: SDL_GetClipboardText() now follows the SDL_GetStringRule.
...
Reference Issue #10229 .
2024-07-16 16:44:36 -04:00
Sam Lantinga
027671bedb
SDL_GetWindowOpacity() directly returns the opacity instead of using an out parameter.
...
Fixes https://github.com/libsdl-org/SDL/issues/10286
2024-07-16 09:36:11 -07:00
Sam Lantinga
58270ef3f2
Finished renaming functions in SDL_system.h
2024-07-16 09:35:49 -07:00
Sam Lantinga
54366181c3
Rename functions in SDL_system.h to match SDL 3.0 naming convention
...
Fixes https://github.com/libsdl-org/SDL/issues/10277
2024-07-15 16:27:48 -07:00
Sam Lantinga
1162a1cb8e
Added SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED and SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED
2024-07-12 18:09:14 -07:00
Sam Lantinga
5bf6bc4d7d
Renamed SDL_Get/SetProperty() to SDL_Get/SetPointerProperty()
...
This is consistent with the naming for the functions that affect other data types
Fixes https://github.com/libsdl-org/SDL/issues/10241
2024-07-12 10:41:02 -07:00
Sam Lantinga
2ba76dbe80
Simplified SDL_Surface
...
SDL_Surface has been simplified and internal details are no longer in the public structure.
The `format` member of SDL_Surface is now an enumerated pixel format value. You can get the full details of the pixel format by calling `SDL_GetPixelFormatDetails(surface->format)`. You can get the palette associated with the surface by calling SDL_GetSurfacePalette(). You can get the clip rectangle by calling SDL_GetSurfaceClipRect().
SDL_PixelFormat has been renamed SDL_PixelFormatDetails and just describes the pixel format, it does not include a palette for indexed pixel types.
SDL_PixelFormatEnum has been renamed SDL_PixelFormat and is used instead of Uint32 for API functions that refer to pixel format by enumerated value.
SDL_MapRGB(), SDL_MapRGBA(), SDL_GetRGB(), and SDL_GetRGBA() take an optional palette parameter for indexed color lookups.
2024-07-10 00:48:18 -07:00
Sam Lantinga
4fa5196820
Revert "Switch pixel format loss fields to number of bits"
...
This reverts commit 3c90b1c1f6 .
It turns out this is problematic for sdl2-compat. We're investigating a more complete separation between SDL2 and SDL3 surfaces, but in the meantime, I'll fix the breakage.
2024-07-07 19:41:05 -07:00
Sam Lantinga
3c90b1c1f6
Switch pixel format loss fields to number of bits
...
This makes more sense and handles pixel formats with > 8 bits per channel
Fixes https://github.com/libsdl-org/SDL/issues/10168
2024-07-06 11:37:16 -07:00
Frank Praznik
74cc06db1b
Remove the SDL_EVENT_WINDOW_TAKE_FOCUS event
...
This was added by the Unreal Engine to handle the input focus for popups and dialogs, window types for which SDL3 has built-in, cross-platform support.
This was only ever implemented in X11, and the only purpose was to hint that a client application may want to call the SDL_SetWindowInputFocus() function, which has since been removed, rendering it pointless now.
2024-07-03 15:08:21 -04:00
Sam Lantinga
e8dbbf8380
Renamed SDLK_a-z to SDLK_A-Z
...
Made the symbols uppercase for consistency with the other SDLK_* constants, but the values are still lowercase.
2024-07-01 13:56:49 -07:00
Sam Lantinga
d9dc4b320a
The keycode in key events is the base, unmodified, keycode for the current keyboard layout
2024-07-01 13:56:49 -07:00
Anonymous Maarten
9601d98e7f
SDL_test: always use symbols with 64-suffix from DbgHelp
2024-07-01 20:49:40 +02:00
Sam Lantinga
b37b94453c
Fixed multi-window test programs not quitting when windows are closed
2024-06-25 10:17:52 -07:00
Sam Lantinga
0804598b5d
Added a font glyph for missing characters
2024-06-24 20:32:03 -07:00
Sam Lantinga
2f5b20fcb5
Updated based on feedback from @JKaniarz
2024-06-24 11:49:15 -07:00
Sam Lantinga
a938e2b979
Replaced test framework random code with SDL random functions
2024-06-24 11:49:15 -07:00
Sam Lantinga
90034b16dc
The keycode in key events is affected by modifiers by default.
...
This behavior can be customized with SDL_HINT_KEYCODE_OPTIONS.
2024-06-22 00:19:06 -07:00
Sam Lantinga
0dd579d40d
Removed SDL_Keysym
2024-06-21 22:06:08 -07:00
Frank Praznik
2f276a2eea
video: Expose HDR metadata per-window
...
Moves the HDR properties from the display to be per-window, and adds the frog_color protocol to enable HDR under Wayland.
2024-06-20 15:55:07 -04:00
Ryan C. Gordon
38f0214e8a
audio: Refer to audio devices to "playback" and "recording".
...
Fixes #9619 .
2024-06-15 01:08:12 -04:00
Sam Lantinga
80a907e0e6
Backed out the viewport and cliprect changes in 9fb5a9ccac
...
This ended up being lots of application code churn without any real benefit in practice.
2024-06-12 19:25:15 -07:00
Sam Lantinga
9fb5a9ccac
Use floating point values for viewport, clip rectangle, and texture sizes
...
These are integer values internally, but the API has been changed to make it easier to mix other render code with querying those values.
Fixes https://github.com/libsdl-org/SDL/issues/7519
2024-06-12 10:18:39 -07:00
Sam Lantinga
a0d1445ccb
Replaced SDL_GetRendererInfo() with SDL_GetRendererName()
...
The texture formats are available via the SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER property
Fixes https://github.com/libsdl-org/SDL/issues/9851
2024-06-03 21:10:58 -07:00
Anonymous Maarten
a919774fe4
Build with -Wfloat-conversion + fix all warnings
2024-06-03 21:33:29 +00:00
Sam Lantinga
4954690828
Fixed warning C4244: '=': conversion from 'double' to 'float', possible loss of data
2024-05-30 07:44:00 -07:00
Sam Lantinga
d141827895
Fixed positioning a window with undefined position on a specific display
2024-05-28 12:06:48 -07:00
Sam Lantinga
c74886ab00
Added SDL_SetWindowAspectRatio() and SDL_GetWindowAspectRatio()
...
Fixes https://github.com/libsdl-org/SDL/issues/1573
2024-05-28 11:52:31 -07:00
Ryan C. Gordon
3364aff757
main: Make the main callback return value symbols smaller (thanks, @Lzard!).
...
Reference #9901 .
2024-05-27 16:03:45 -04:00
L zard
06aa02453a
Tests: Use the main callback code macros
2024-05-27 09:22:07 -07:00
Ryan C. Gordon
cf2874080f
mouse: Move mouse button state from a Uint32 to a formal typedef.
...
Reference Issue #9812 .
2024-05-26 13:23:21 -04:00
Ryan C. Gordon
13b18e3c41
test: Moved some Uint32 bitfields over to typedefs.
...
Reference Issue #9812 .
2024-05-26 13:23:21 -04:00
Anonymous Maarten
2123b84fbe
SDL_test: add --hide-cursor to help
2024-05-21 22:56:29 +02:00
Dragon-Baroque
05fb91c7b4
TESTWM : Option and Keyboard action to ShowCursor and HideCursor
...
In include/SDL3/SDL_test_common.h
Add flag hide_cursor
In src/test/SDL_test_common.c
Handle option --hide-cursor to SDL_HideCursor
Handle Ctrl-h toggle to SDL_HideCursor and SDL_ShowCursor
2024-05-21 13:49:35 -07:00
Anonymous Maarten
18225f7bb5
libSDL3_test: don't remove windows and renders when quiting
...
This fixes a "DEBUG: Parameter 'texture' is invalid" message when exiting testcamera.
2024-05-17 14:39:29 +02:00
Sam Lantinga
4609af618a
Updated logging functions for SDL3 naming convention
2024-05-16 10:22:15 -07:00
Sam Lantinga
17520c2e6e
Removed SDL_RendererFlags
...
The flags parameter has been removed from SDL_CreateRenderer() and SDL_RENDERER_PRESENTVSYNC has been replaced with SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER during window creation and SDL_PROP_RENDERER_VSYNC_NUMBER after renderer creation.
SDL_SetRenderVSync() now takes additional values besides 0 and 1.
The maximum texture size has been removed from SDL_RendererInfo, replaced with SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER.
2024-05-13 15:06:11 -07:00
Sam Lantinga
b959203c9b
Use SDL_WindowFlags appropriately in SDL test code
2024-05-13 09:08:44 -07:00
Ozkan Sezer
e909c0360f
remove most of SDL_OutOfMemory() calls where SDL is the allocator.
...
Since commit 447b508a77 , SDL_malloc,
SDL_calloc, and SDL_realloc already calls SDL_OutOfMemory().
2024-05-08 20:00:50 +03:00
Sam Lantinga
04be04c338
Removed mostly unused SDL_errorcode
2024-05-07 15:45:06 -07:00
Brick
9c2e4f52e6
Fixed misuse of entry->size in SDL_TrackAllocation
...
entry->size is the size of the allocation, not the number of stack frames
2024-04-15 11:47:18 -10:00
Anonymous Maarten
07b7ec68eb
Add SDLTest_CompareMemory function to compare memory ranges
2024-04-15 03:05:05 -10:00
Sam Lantinga
5fa87e29e7
Removed SDL_RENDERER_ACCELERATED and SDL_RENDERER_SOFTWARE
...
These flags are unnecessary and have always been a source of confusion.
2024-04-04 13:30:49 -07:00
Cameron Gutman
f14fb979c1
Remove legacy SDL2 input grab API
2024-03-24 16:53:23 -07:00