src/video/SDL_video.c


Log

Author Commit Date CI Message
Eric Wasylishen 76392f4f 2023-01-11T19:45:01 Handle DPI scaling in SDL_GetWindowSurface Fixes DPI awareness of testdrawchessboard (previously, the surface was being created in points instead of pixels, resulting in the demo app only drawing in a corner of the screen on High-DPI displays) *_CreateWindowFramebuffer()/*_UpdateWindowFramebuffer(): are updated to use SDL_GetWindowSizeInPixels instead of SDL_GetWindowSize() or window->w/window->h. Most of the _CreateWindowFramebuffer backends are untested except for Windows. Fixes #7047 (cherry picked from commit 67c91353e01f6f2c0cc80c17eeddbad6def7cb01)
Sam Lantinga 2aa8525e 2023-06-10T09:29:09 Fixed build
Sam Lantinga 36033e38 2023-06-10T08:54:36 Make it clear that you can't mix 2D rendering and the window surface API Also added functions to query and destroy the window surface so you can switch between modes if you want. See https://github.com/pygame-community/pygame-ce/issues/2190 for more details.
Sam Lantinga 3f1fd5ab 2023-05-23T10:59:03 Updated source to match SDL function prototype style
Sam Lantinga 69644346 2023-05-20T11:09:36 Added the hint SDL_HINT_ENABLE_SCREEN_KEYBOARD to control whether the on-screen keyboard should be shown when text input is active Fixes https://github.com/libsdl-org/SDL/issues/7160
Sylvain 16c9bad7 2023-03-28T09:49:45 Safety fix: clear "_this->wakeup_window" when destroying the window (cherry picked from commit c838ccf0e3a330ebbcf433698b8f5370c6fa80d6)
Sylvain 6574e5eb 2023-03-28T09:48:58 Safety fix: clear "_this->current_glwin" when destroying the window (cherry picked from commit 0c048d98af449f1bc540e256c90eb792f1effff4)
Sylvain 4fa21ee5 2023-03-28T09:28:17 Fixed bug #7515 - Window still grabbed after destroying
Sam Lantinga 1bd9ebf5 2023-03-07T10:10:43 If we're not the current fullscreen window and we don't want to be fullscreen, don't touch the current video mode Fixes an assertion in qemu on macOS, which creates multiple hidden windows: 2023-03-07 09:56:55.304 qemu-system-i386[9931:2984587] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'NSWindowStyleMaskFullScreen cleared on a window outside of a full screen transition. Called from ( 0 AppKit 0x00000001968f77ac __25-[NSWindow setStyleMask:]_block_invoke + 140 1 AppKit 0x00000001968f76cc NSPerformVisuallyAtomicChange + 108 2 AppKit 0x00000001968f7580 -[NSWindow setStyleMask:] + 188 3 libSDL2-2.0.0.dylib 0x0000000106531328 Cocoa_SetWindowFullscreen + 568 4 libSDL2-2.0.0.dylib 0x0000000106501700 SDL_UpdateFullscreenMode + 1316 5 libSDL2-2.0.0.dylib 0x0000000106504270 SDL_SetWindowFullscreen_REAL + 328 6 libSDL2-2.0.0.dylib 0x000000010650117c SDL_FinishWindowCreation + 100 7 libSDL2-2.0.0.dylib 0x0000000106500998 SDL_CreateWindow_REAL + 1812 8 libSDL2-2.0.0.dylib 0x00000001063efd54 SDL_CreateWindow + 76 9 qemu-system-i386 0x00000001050aa600 sdl2_window_create + 192 10 qemu-system-i386 0x00000001050a9fa0 sdl2_2d_switch + 196 11 qemu-system-i386 0x0000000104e9c784 displaychangelistener_display_console + 524 12 qemu-system-i386 0x0000000104e9e36c register_displaychangelistener + 264 13 qemu-system-i386 0x00000001050ab6d0 sdl2_display_init + 304 14 qemu-system-i386 0x000000010505c870 qemu_init + 13380
Sam Lantinga e0e79419 2023-03-07T10:08:55 Fixed which window we check flags for when updating fullscreen mode
Bruce Mitchener 7d2012af 2023-02-10T13:51:16 emscripten: Update deprecated calls to EM_ASM*. `EM_ASM_` and `EM_ASM_INT_V` are calls that have been deprecated for a long time. Since the return value isn't used for the call to `EM_ASM_`, it can be replaced with `EM_ASM`. `EM_ASM_INT_V` is now (for the last few years) `EM_ASM_INT`. (cherry picked from commit a8e89f2567b9069c919f9b21996e0a46cd4bb679)
Sylvain 17515f4a 2023-02-04T15:51:37 Backport simplify flags PR #7220
Sam Lantinga 0479df53 2023-01-09T09:48:21 Updated copyright for 2023
Sam Lantinga c7097418 2022-12-12T20:26:17 Detect display change when fullscreen desktop windows move displays This happens when using Win+Alt+Left/Right on a resizable fullscreen desktop window on Windows (cherry picked from commit 650e16a8245f3fb5056fc7f6b398fb88244b3477)
Sam Lantinga ab479b49 2022-12-08T17:01:18 Make sure the display list is up to date for window placement
Sam Lantinga cfc7cac3 2022-12-08T12:43:23 Fixed memory leak when removing existing displays
Pierre Wendling d0bbfdbf 2022-12-01T16:07:03 Clang-Tidy fixes (#6725) (cherry picked from commit 3c501b963dd8f0605a6ce7978882df39ba76f9cd)
Sam Lantinga d87048fd 2022-11-30T14:37:34 Fixed crash if GetRectDisplayIndex() is called before SDL_VideoInit()
Sam Lantinga b8d85c69 2022-11-30T12:51:59 Update for SDL3 coding style (#6717) I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594 (cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
Sylvain Becker fb0ce375 2022-11-27T17:38:43 Cleanup add brace (#6545) * Add braces after if conditions * More add braces after if conditions * Add braces after while() conditions * Fix compilation because of macro being modified * Add braces to for loop * Add braces after if/goto * Move comments up * Remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements * More remove extra () in the 'return ...;' statements after merge * Fix inconsistent patterns are xxx == NULL vs !xxx * More "{}" for "if() break;" and "if() continue;" * More "{}" after if() short statement * More "{}" after "if () return;" statement * More fix inconsistent patterns are xxx == NULL vs !xxx * Revert some modificaion on SDL_RLEaccel.c * SDL_RLEaccel: no short statement * Cleanup 'if' where the bracket is in a new line * Cleanup 'while' where the bracket is in a new line * Cleanup 'for' where the bracket is in a new line * Cleanup 'else' where the bracket is in a new line (cherry picked from commit 6a2200823c66e53bd3cda4a25f0206b834392652 to reduce conflicts merging between SDL2 and SDL3)
Sylvain ddad901c 2022-11-17T10:43:45 Remove unneeded semicolon
Sam Lantinga fcc994e1 2022-11-16T17:39:55 ensure that SDL2 does not set conflicting window flags (thanks @pionere!)
Sylvain 1d7966df 2022-11-16T21:27:16 Remove un-needed check for NULL pointer. They were previously checked just before.
ulatekh ec58a817 2022-10-05T19:26:09 Fixes made in response to running a static code analyzer under MS Windows. Most of these are probably harmless, but the changes to SDL_immdevice.c and SDL_pixels.c appear to have fixed genuine bugs. SDL_audiocvt.c: By separating the calculation of the divisor, I got rid of the suspicion that dividing a double by an integer led to loss of precision. SDL_immdevice.c: Added a missing test, one that could have otherwise led to dereferencing a null pointer. SDL_events.c, SDL_gamecontroller.c, SDL_joystick.c, SDL_malloc.c, SDL_video.c: Made it clear the return values weren't used. SDL_hidapi_shield.c: The size is zero, so nothing bad would have happened, but the SDL_memset() was still being given an address outside of the array's range. SDL_dinputjoystick.c: Initialize local data, just in case IDirectInputDevice8_GetProperty() isn't guaranteed to write to it. SDL_render_sw.c: drawstate.viewport could be null (as seen on line 691). SDL.c: SDL_MostSignificantBitIndex32() could return -1, though I don't know if you want to cope with that (what I did) or SDL_assert() that it can't happen. SDL_hints.c: Replaced boolean tests on pointer values with comparisons to NULL. SDL_pixels.c: Looks like the switch is genuinely missing a break! SDL_rect_impl.h: The MacOS static checker pointed out issues with the X comparisons that were handled by assertions; I added assertions for the Y comparisons. SDL_yuv.c, SDL_windowskeyboard.c, SDL_windowswindow.c: Checked error-result returns.
Sam Lantinga 70656b13 2022-11-15T10:18:41 Don't recreate the window when creating a Metal renderer on an OpenGL window. It turns out that we can safely create a Metal view on an existing window, and that avoids issues with the window being recreated with the wrong orientation in iOS 16. Fixes https://github.com/libsdl-org/SDL/issues/6289
pionere dad8df3e 2022-11-14T08:20:31 video: check graphics flags the same way in SDL_RecreateWindow as in SDL_CreateWindow - single check to validate the graphics flags - check it before tearing down the window
pionere 5f2a1231 2022-11-13T08:00:03 video: check graphics flags the same way as the type flags
pionere 22354b41 2022-11-12T08:29:15 video: simplify window-type check in SDL_CreateWindow
pionere d09edcbc 2022-11-11T12:10:27 video: sync Metal_CreateView with GL_CreateContext and Vulkan_CreateSurface no need to check if _this->Metal_CreateView, since it is already checked in Re(create)Window
pionere b71d9274 2022-11-11T12:09:15 video: add NOT_AN_OPENGL_WINDOW define (similar to NOT_A_VULKAN_WINDOW)
pionere 36c6ed4b 2022-11-11T08:33:55 video: add SDL_DllNotSupported - add SDL_DllNotSupported and use it to sync the behavior of SDL_GL_LoadLibrary with SDL_Vulkan_LoadLibrary
pionere 29cafa9c 2022-11-10T08:23:16 add SDL_ContextNotSupported and validate flags in SDL_RecreateWindow similar to SDL_CreateWindow
Ryan C. Gordon 1008cc8e 2022-11-09T12:55:27 video: Add some braces to match SDL coding style.
pionere ac3349fa 2022-11-09T09:11:04 solve FIXMEs in SDL_video.c
Ryan C. Gordon 9e8d2f39 2022-10-27T13:54:53 video: Don't use texture framebuffer on Windows Subsystem for Linux. Reference Issue #6333.
Pierre Wendling f9785702 2022-09-18T13:22:07 N3DS: Deduce screen from window's display. This removes the need for a dedicated window creation flag.
Pierre Wendling 65527537 2021-03-30T04:32:39 N3DS port (squashed) A dedicated renderer using Citro3D would likely allow for better much better graphical performances.
Sylvain eac3d6d3 2022-10-04T10:46:42 SDL_video.c: fix variable 'i' may be uninitialized when used here "_this->name = bootstrap[i]->name;"
Sam Lantinga 9e3c4b9f 2022-10-03T17:50:01 Use the correct platform defines
Ryan C. Gordon a2c57573 2022-09-01T10:47:24 video: check for "software" with SDL_HINT_FRAMEBUFFER_ACCELERATION. We check for this value elsewhere but not in SDL_CreateWindowFramebuffer.
Sam Lantinga d744aafb 2022-09-15T01:00:12 Added support for simulated vsync in the renderer This kicks in if the platform doesn't support vsync directly, or if the present fails for some reason (e.g. minimized on some platforms) Fixes https://github.com/libsdl-org/SDL/issues/5134
Frank Praznik 69e4c770 2022-09-04T12:18:38 video: Make the mode switching function a NOP if mode switching is disabled Instead of wrapping individual calls to SDL_SetDisplayModeForDisplay(), just check the flag in the function itself and make it a NOP that cannot fail if the flag is set. Silences some errant "SDL video driver doesn't support changing display mode" log errors.
Ozkan Sezer 5ffede35 2022-09-06T19:56:29 Fix https://github.com/libsdl-org/SDL/issues/6191
Noel Berry 00452e47 2022-08-24T11:25:13 Adding SDL_GetWindowSizeInPixels for window size in pixels (#6112)
Frank Praznik cc9cc202 2022-08-13T16:43:15 video: Add video device quirk flags and apply them to the video subsystem Add quirk flags to the video device struct and add flags to allow video backend drivers to disable mode switching and disable unsetting the fullscreen mode when minimizing a window. As certain platforms can have multiple video backends compiled in at once, #ifdefs, as used by other platforms, aren't suitable as different backends on the same platform may not need the same quirks. This replaces the formerly dedicated 'disable_display_mode_switching' boolean as additional quirks are needed by the Wayland backend. Helper functions have also been added to simplify reading the flag states.
Sam Lantinga 7530bd74 2022-08-08T11:26:55 Fix right, bottom computation in `SDL_GetClosestPointOnRect` which should be exclusive, not inclusive
Sam Lantinga 98bac00d 2022-08-08T11:26:52 Add `SDL_GetPointDisplayIndex` and `SDL_GetRectDisplayIndex` and re-implement `SDL_GetWindowDisplayIndex` in terms of `SDL_GetRectDisplayIndex` - This allows looking up the display index for an arbitrary location rather than requiring an active window to do so. - This change also reimplements the fallback display lookup that found the display with center closest to the window's center to instead find the display rect edge closest to the window center (this was done in the almost identical display lookup used in SDL_windowsmodes.c, which now uses `SDL_GetPointDisplayIndex`). In practice this should almost never be hit as it requires the window's center to not be enclosed by any display rect.
Adam Butcher 0bcbdfe2 2022-06-23T16:10:41 video: dummy: Support evdev psuedo-device with no video.
Shootfast 60d1944e 2022-07-06T20:12:30 SDL_video: Added SDL_GL_FLOATBUFFERS to allow Cocoa GL contexts to use EDR
Francisco Javier Trujillo Mata 46f95a7a 2022-06-24T00:20:11 Create dummy PS2 Video driver
Ryan C. Gordon 20a76b0e 2022-07-25T23:06:58 video: removed unused devindex argument from bootstrap's create method.
Dean Herbert 6bcde52d 2022-07-24T20:19:16 Further adjust implementation of `Cocoa_GetWindowDisplayIndex` As discussed in PR review, there may be an off-chance that the index returned doesn't match up with SDL's display indexing. This change ensures that the indices match and adds a safety check for off-screen windows.
rohlem b085c182 2022-07-04T16:38:05 make SDL_SetTextInputRect take a pointer to const The documentation doesn't state that the argument is ever modified, and no implementation does so currently. This is a non-breaking change to guarantee as much to callers.
chalonverse f317d619 2022-07-01T13:59:14 Xbox GDKX support (#5869) * Xbox GDK support (14 squashed commits) * Added basic keyboard testing * Update readme * Code review fixes * Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
chalonverse 3b191580 2022-06-27T17:19:39 Windows GDK Support (#5830) * Added GDK * Simplfied checks in SDL_config_wingdk.h * Added testgdk sample * Added GDK readme * Fixed error in merge of SDL_windows.h * Additional GDK fixes * OpenWatcom should not export _SDL_GDKGetTaskQueue * Formatting fixes * Moved initialization code into SDL_GDKRunApp
Eric Wasylishen ab81a559 2022-06-07T02:01:27 Windows DPI scaling/highdpi support Adds hint "SDL_WINDOWS_DPI_SCALING" which can be set to "1" to change the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. This means windows will be appropriately sized, even when created on high-DPI displays with scaling. e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, will create a window with an 800x600 client area (in pixels). Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
Sam Lantinga 5669743a 2022-05-19T09:45:57 Make sure SDL_CaptureMouse() is only called on the main thread Windows handles mouse capture on a per-thread basis, and capture must be done on the thread used to create a window. Fixes https://github.com/libsdl-org/SDL/issues/5577
Sam Lantinga 0e6d4baa 2022-05-19T01:23:24 Fixed compile warning on gcc 11
Sam Lantinga e19a9a79 2022-05-18T15:29:59 Fixed a message box getting the mouse capture state out of sync
Cameron Cawley 0cca71a8 2022-05-18T22:12:05 Use SDLCALL for callbacks in public APIs
Sam Lantinga 06aca7ed 2022-05-18T10:09:24 Fixed warping back into the window when gaining focus with warp relative mode enabled
Alexander Kanavin adac3bd1 2022-05-03T12:31:50 video: restore ability to disable fb accel via hint Somewhere in code refactoring between .20 and .22 this check was lost, and so the hint had no effect anymore.
Michael Fitzmayer fbd230bb 2022-05-03T17:51:49 Add support for the Nokia N-Gage (#5597) * Add initial support for the Nokia N-Gage * N-Gage: disable clipping for the time being, issue needs to be resolved later * Move va_copy definition to SDL_internal.h * Move stdlib.h include to SDL_config_ngage.h, much cleaner this way * Remove redundant include, add HAVE_STDLIB_H * Revert "N-Gage: disable clipping for the time being, issue needs to be resolved later" This reverts commit 4f5f0fc36cc7f34fad05e45671dfa7b8dc32fd51. * N-Gage: fix clipping issue by providing proper math functions
Mirko Galimberti 76afb858 2022-04-25T10:35:56 Introduces Cocoa_GetWindowDisplayIndex. This enable a proper management for dpi when switching between retina and non-retina displays.
Frank Praznik 2b529461 2022-04-15T11:51:02 video: Don't minimize fullscreen windows on focus loss by default when mode switching is disabled When mode switching is disabled in a video backend, fullscreen windows are basically just fullscreen desktop windows with different internal scaling. As no mode switching occurs, there's no need to minimize them on focus loss by default. This can still be overridden by explicitly setting the internal hint for minimizing on focus loss. This has the side effect of fixing a bug on GNOME, where, when a fullscreen Wayland window has it's focus lost and restored via alt+tab followed by switching back to windowed mode, the top portion of the window won't end up being obstructed by GNOME's top bar.
Sam Lantinga 254fcc90 2022-04-18T09:03:14 Revert "video: Prefer Wayland over X11" This reverts commit 8ceba27d6291f1195e13608033ec439aec621fc6. SDL Wayland support is stable, but there are a number of issues with third-party software (NVIDIA drivers, libwayland event overflow, libdecor not handling plugin load failures, Steam overlay not working with Wayland, etc.) that make it better to default to X11 at this time. Games which would like to prefer wayland when available can use the following code before SDL_Init(): SDL_SetHint(SDL_HINT_VIDEODRIVER, "wayland,x11"); Fixes https://github.com/libsdl-org/SDL/issues/5527
Ryan C. Gordon c1336b21 2022-04-17T12:43:32 hints: Make SDL_VIDEODRIVER and SDL_AUDIODRIVER formal hints. They were just environment variables before. Fixes #5528.
pionere 01b14e14 2022-04-12T08:49:19 avoid NullPointer in SDL_GL_MakeCurrent
Frank Praznik 4d76c9cb 2022-03-25T20:35:07 video: wayland: Use wp-viewporter for fullscreen with non-native resolutions Wayland doesn't support mode switching, however Wayland compositors can support the wp_viewporter protocol, which allows for the mapping of arbitrarily sized buffer regions to output surfaces. Use this functionality, when available, for fullscreen output when using non-native display modes and/or when dealing with scaled desktops, which can incur significant overdraw without this extension. This also allows for the exposure of arbitrarily sized, emulated display modes, which can be useful for legacy compatability.
Ryan C. Gordon 4fe7b2cb 2022-03-24T11:00:43 static analysis: Fixed several complaints from codechecker. There are still some pending Objective-C specific issues. Reference issue #4600.
Charlie Birks 4b8d69a4 2022-03-22T17:09:44 Avoid trying to use texture framebuffers on emscripten
Sam Lantinga 34fd83ca 2022-03-22T06:50:10 Don't try to hide foreign windows when destroying the SDL window representation Fixes https://github.com/libsdl-org/SDL/issues/5432
Sam Lantinga e5f45455 2022-03-17T14:44:34 Added a hint to mark a foreign window as usable with OpenGL Fixes https://github.com/libsdl-org/SDL/issues/2942
Ethan Lee 0bf8ccfb 2022-02-08T22:15:11 video: Add a hint to allow Vulkan surfaces on foreign windows
Zach Reedy d14a1263 2022-03-11T17:45:17 IME Composition Truncation + SDL_IsTextInputShown + SDL_ClearComposition (#5398) * Fixes for IME Composition Truncation + Addition of SDL_ClearComposition, SDL_IsTextInputShown * Fixed: Documentation and code style issues raised during code review.
Sylvain 45833a14 2022-03-09T15:33:45 Prevent shadowing static variable '_this' with local paramter '_this' of SDL_CreateWindowTexture
Sylvain a4a80c86 2022-03-09T15:21:55 Fix variable may be uninitialized when used here [-Wconditional-uninitialized]
Cameron Cawley 2f7b885d 2022-02-28T16:30:34 Fix 'potentially uninitialized local pointer variable' error in UWP builds
Ryan C. Gordon b946e31e 2022-02-23T09:10:46 video: Allow unaccelerated SDL_HINT_FRAMEBUFFER_ACCELERATION renderers. If the app requested a specific renderer, even if it's not the optimal path, let them have it, because they might want to render with a specific GPU API on top of the framebuffer pixels. This fixes DosBox-X crashing on startup, which forces the hint to "opengl".
Ryan C. Gordon 60ddb74c 2022-02-02T12:19:37 video: rework how we prepare a texture framebuffer. Now we see if we can create an SDL_Renderer, and if that renderer reports itself as "accelerated," and added some initial heuristics to the OpenGL renderer to make better decisions about what qualifies as "accelerated." This adds some FIXMEs that might be merely hypothetical, and removes the old OpenGL checks from the video subsystem that probably weren't meaningful in modern times. This will definitely need to improve the existing list in the GL renderer, to catch things like llvmpipe, etc. Reference issue #4624.
pionere 60deadba 2022-01-17T17:22:30 re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory
pionere ebdd5366 2022-01-17T16:26:02 use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
pionere e11ba0f5 2022-01-08T12:03:57 do not load/unload opengl library when SDL_WINDOW_METAL flag is changed
Ryan C. Gordon 19ae71b2 2022-01-27T11:48:32 video: Don't add SDL_WINDOW_(METAL|OPENGL) to new windows if unsupported. Fixes #4656. (Better than the previous fix in 3044310518dbb2d4814b32c6521f332b8d69aae5.)
Ryan C. Gordon 30443105 2022-01-26T21:10:15 video: Don't add SDL_WINDOW_METAL to new windows if not using Cocoa or UIKit. Fixes #4656.
Ryan C. Gordon f37e4a94 2022-01-26T17:02:49 video: Don't check if we can use a "texture framebuffer" until needed. This prevents SDL from making an OpenGL context and maybe throwing it away immediately by default. It will now only do it when trying to request a window framebuffer directly, or creating an SDL_Renderer with the "software" backend, which makes that request itself. The way SDL decides if it should use a "texture framebuffer" needs dramatic updating, but this solves the immediate problem. Reference Issue #4624.
Ethan Lee 8ceba27d 2021-04-17T12:07:38 video: Prefer Wayland over X11
Mathieu Eyraud 2a0cde8f 2022-01-16T09:40:51 Always send SDL_WINDOWEVENT_SIZE_CHANGED when window is resized SDL_WINDOWEVENT_SIZE_CHANGED is now sent even if the resulting size of the window does not match the requested size.
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Ryan C. Gordon e4000c02 2021-12-31T10:30:51 video: SDL_GL_GetAttribute needs to operate on FBO 0. If a different FBO is bound, this would return incorrect results. Fixes #5082.
Erik Soma 71e3998d 2021-11-23T17:56:46 Make SDL_VideoInit cleanup when errors occur before video driver creation.
Sylvain 0445c13a 2021-11-22T16:49:17 Remove 'malloc' from comment
Sam Lantinga 98c98362 2021-11-10T11:04:51 Don't clobber the error in SDL_ShowMessageBox() if one has been set at the platform level Fixes https://github.com/libsdl-org/SDL/issues/4760
Sam Lantinga 6c4b4ee7 2021-11-10T09:41:43 Don't assert on API parameters This causes lots of spam in test automation and it's not clear it's useful to developers. If we need this level of validation, we should add a log category for it.
Sam Lantinga fed85778 2021-11-10T08:47:39 Update the orientation and display modes when the display settings change on Windows Fixes https://github.com/libsdl-org/SDL/issues/1061
Sam Lantinga d2f75636 2021-11-09T11:53:59 When making the window centered it should use windowed mode size since it doesn't affect fullscreen windows Fixes bug https://github.com/libsdl-org/SDL/issues/4750
Sam Lantinga fd79607e 2021-11-08T21:34:48 Added SDL_GetWindowMouseRect() Also guarantee that we won't get mouse movement outside the confining area, even if the OS implementation allows it (e.g. macOS)
Ethan Lee 4b42c05b 2021-11-08T13:52:48 video: Add SDL_SetWindowMouseRect. This API and implementation comes from the Unreal Engine branch of SDL, which originally called this "SDL_ConfineCursor". Some minor cleanup and changes for consistency with the rest of SDL_video, but there are two major changes: 1. The coordinate system has been changed so that `rect` is _window_ relative and not _screen_ relative, making it easier to implement without having global access to the display. 2. The UE version unset all rects when passing `NULL` as a parameter for `window`, this has been removed as it was an unused feature anyhow. Currently this is only implemented for X, but can be supported on Wayland and Windows at minimum too.
Cameron Cawley 25c71748 2020-02-13T21:55:08 Add a barebones RISC OS video driver
Cacodemon345 19dee1cd 2021-10-22T06:37:20 Add SDL_GetWindowICCProfile(). (#4314) * Add SDL_GetWindowICCProfile * Add new SDL display events * Implement ICC profile change event for macOS * Implement ICC profile notification for Windows * Fix SDL_GetWindowICCProfile() for X11 * Fix compile errors