|
ec0204d2
|
2022-06-06T14:38:26
|
|
x11: Don't use GetXftDPI() when XRandR can tell us the DPI per-output.
Fixes #5764.
|
|
a236bf4f
|
2022-06-06T02:13:37
|
|
x11: Hook up display hotplug notifications.
Obviously this needs XRandR support.
Fixes #4977.
|
|
12f15aaa
|
2022-04-27T10:03:32
|
|
fix build
|
|
05bd225a
|
2022-04-26T23:14:44
|
|
x11: If XRandR isn't available, add a generic display.
We can get _some_ of the info we need out of standard Xlib and report a
single display (which might actually be multiple physical displays mushed
into a single desktop). This is better than nothing, but you should really
just build with XRandR support and get a better X server. :)
|
|
ccc70e64
|
2022-04-26T23:14:21
|
|
x11: Fixed some compiler warnings.
|
|
7d7ec9c9
|
2022-04-26T16:41:28
|
|
x11: Remove XVidMode and Xinerama support.
Fixes #1782.
|
|
1c7bf478
|
2022-03-31T10:09:02
|
|
x11: Ignore BadValue for extremely small XRRSetScreenSize resolutions.
Reference Issue #4840.
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
b4aeaa30
|
2021-11-22T11:20:52
|
|
Use SDL_calloc / SDL_free
|
|
d31251b0
|
2021-11-21T22:30:48
|
|
use SDL's functions version inplace of libc version
|
|
d5fe9c30
|
2021-08-24T14:18:47
|
|
x11: Log a warning if we decide to use XVidMode.
Reference issue #1782.
|
|
25cd749a
|
2021-08-12T15:12:04
|
|
x11: Don't change mode if we are already in the correct mode
If we are already in the desired mode, changing it is a no-op at best,
and harmful at worst: on Xwayland, it sometimes happens that we disable
the crtc and cannot re-enable it.
Resolves: https://github.com/libsdl-org/SDL/issues/4630
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
b033cd0d
|
2021-07-31T16:01:48
|
|
Fixed XSync sequence to match other cases where we set the X11 error handler
|
|
4c7825f6
|
2021-07-31T18:27:14
|
|
x11: XSync while trying to catch XRRSetScreenSize error.
Reference issue #4561
|
|
d0effadf
|
2021-07-31T15:56:30
|
|
x11: Don't let XRRSetScreenSize fire a BadMatch error.
This is a workaround and not a proper fix, but this is possibly complicated,
and possibly a corner case, so this will do for 2.0.16, if not the
foreseeable future.
Reference issue #4561
|
|
16e3bfe8
|
2021-06-28T11:29:16
|
|
SetDisplayMode: Call XRRSetScreenSize before setting CRTC config
X11_SetDisplayMode currently calls X11_XRRSetCrtcConfig alone. This results
in the monitor's viewport getting changed, but the underlying screen dimensions
stay the same.
The spec indicates that RRSetCrtcConfig only changes the crtc mode and has no effect
on the screen dimensions, only mentioning that the new crtc must fit entirely within the
screen size. For the size to change, RRSetScreenSize also needs to be called.
This affects Metro Exodus on Linux, when changing the resolution in the in-game settings
Metro gets stuck in a loop waiting for the size of its vulkan surface to change. Because
XRRSetScreenSize is not called the screen size is never changed, the vulkan surface dimensions
do not change, and Metro hangs forever watching for a surface size update that will
never come.
This change disables the CRTC, calls XRRSetScreenSize, and then updates the
CRTC configuration. This fixes changing the resolution from the Metro settings.
Tested with:
Metro Exodus, Portal 2
|
|
4522cb1d
|
2021-05-25T03:17:03
|
|
Changing variable from float to int, this way we can check it's value without having to do an unnecessary conversion. Then do explicit conversions later on if we need.
|
|
c289bad9
|
2021-03-22T11:22:31
|
|
In x11, GetDisplayDPI can give incorrect or unusable DPI information. Using XGetDefaults to get the Xft DPI if it's available and returning that. This could allow you to figure out DPI scale.
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
93ccdee8
|
2020-12-23T13:47:49
|
|
Fixed bug 5404 - stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf
Cameron Cawley
stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf
The default implementation is based on the one used in the Windows RT video driver.
|
|
76980e30
|
2020-10-08T16:42:20
|
|
Added events for dynamically connecting and disconnecting displays, with an iOS implementation
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
c5429bd9
|
2017-11-04T22:06:40
|
|
Fixed bug 3939 - Remove static vm_error and vm_event from SDL_x11modes.c
tomwardio
Remove static int vm_error and vm_event, use local variables instead.
This fixes unused variable errors when compiling with SDL_VIDEO_DRIVER_X11_XINERAMA undefined.
src/video/x11/SDL_x11modes.c:505:22: error: unused variable 'vm_error' [-Werror,-Wunused-variable]
src/video/x11/SDL_x11modes.c:505:12: error: unused variable 'vm_event' [-Werror,-Wunused-variable]
|
|
0782f9be
|
2017-09-05T08:24:38
|
|
Fixed bug 3273 - Fix for slow video subsystem initialization when using XRandR.
Mart?n Golini
I'm having a very slow initialization of the video subsystem that locks the window creation for about 500 ms ( tested in at least 4 different systems ). What i found is that X11_InitModes_XRandR is using XRRGetScreenResources, that explicitly ask to poll the hardware for changes. This is not really necessary since if the data is already available you can use XRRGetScreenResourcesCurrent.
I attached a tentative patch that fix this issue. With the patch there's no lock when the subsystem is initialized and the window creation is instant in my applications. The patch only uses XRRGetScreenResourcesCurrent in X11_InitModes_XRandR but it could be potentially used in X11_GetDisplayModes and X11_SetDisplayMode.
|
|
17453d49
|
2017-08-21T23:44:46
|
|
x11: Move screen_w/h inside the only ifdef they are referenced in to avoid compiler warnings
|
|
082f32d1
|
2017-08-02T10:28:13
|
|
Fixed bug 3722 - Fall back to xinerama/xvidmode if xrandr modes initialization fails
Levi Bard
In some environments, xrandr modes initialization can fail even though xrandr support is present and of a sufficient version.
(The one I encountered was an AWS instance running a virtual display)
The attached patch allows SDL to keep trying other methods if xrandr modes initialization fails (still subject to SDL_VIDEO_X11_REQUIRE_XRANDR).
|
|
61a3ba30
|
2017-01-07T17:09:14
|
|
Replaced a few single-line "//" comments.
|
|
9d042052
|
2017-01-04T09:33:47
|
|
x11: deal with xrandr display size in millimeters being zero.
Xquartz on macOS reports a zero size, which leads to a division by zero here.
|
|
45b774e3
|
2017-01-01T18:33:28
|
|
Updated copyright for 2017
|
|
57d01d7d
|
2016-11-13T22:57:41
|
|
Patch from Sylvain to fix clang warnings
|
|
74e1dd4c
|
2016-11-11T13:14:00
|
|
Define _GNU_SOURCE when building SDL
|
|
d7800312
|
2016-11-06T09:30:06
|
|
Fixed bug 3476 - round() needs _GNU_SOURCE on some old systems
Ozkan Sezer
On systems with old glibc, such mine with glibc-2.8, the following warning
is issued and is fixed easily by defining _GNU_SOURCE:
/home/me/SDL2-2.0.5/src/video/x11/SDL_x11modes.c: In function 'CalculateXRandRRefreshRate':
/home/me/SDL2-2.0.5/src/video/x11/SDL_x11modes.c:263: warning: implicit declaration of function 'round'
/home/me/SDL2-2.0.5/src/video/x11/SDL_x11modes.c:263: warning: incompatible implicit declaration of built-in function 'round'
|
|
27d4f099
|
2016-10-07T23:40:44
|
|
Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
|
|
0250eb3c
|
2016-10-01T14:16:04
|
|
Fixed bug 3134 - CalculateXRandRRefreshRate() returns incorrect refresh rate due to floating point truncation.
Michael
In SDL_x11modes.c the CalculateXRandRRefreshRate() function performs integer math on values that may return fractional results. This causes a value that would be calculated as 59.99972... to be returned as 59. In Linux the xrandr command returns 60Hz for this particular display mode yet SDL returns 59Hz.
I suggest this function be updated to correctly round the result of the calculation instead of truncating the result.
|
|
81235118
|
2016-05-20T22:14:40
|
|
X11: Fixed missing error message if SDL_GetDisplayDPI() failed.
|
|
eeb89999
|
2016-01-05T05:22:35
|
|
Patched to compile.
|
|
7605ccf6
|
2016-01-05T02:29:16
|
|
Use SDL's stdinc functions instead of C runtime calls.
|
|
c3114975
|
2016-01-04T23:52:40
|
|
Added SDL_GetDisplayUsableBounds().
|
|
81209acb
|
2016-01-04T23:44:27
|
|
x11: Let apps specify that video init should fail if XRandR is unavailable.
Notably: it sets the error string to inform you that your custom SDL is built
without xrandr support, which apparently has been a support issue for
Unreal Engine 4 developers.
|
|
42065e78
|
2016-01-02T10:10:34
|
|
Updated copyright to 2016
|
|
18c7d6df
|
2015-12-29T02:16:14
|
|
XRandR: fixed primary output detection logic (thanks, "winterknight"!).
Fixes Bugzilla #3185.
|
|
32147ba7
|
2015-12-05T17:08:07
|
|
X11: Fixed memory leak when initializing multiple screens.
|
|
5224dfcc
|
2015-11-17T12:15:35
|
|
X11: Let XRandR respect multiple screens (DISPLAY=:0.0 vs :0.1, etc).
|
|
c67213f3
|
2015-08-07T01:02:35
|
|
X11: Fixed XRandR display detection.
Previously this only worked on X11 when Xinerama was carrying the weight.
Fixes Bugzilla #3062.
|
|
ca468042
|
2015-08-07T00:59:31
|
|
X11: Fixed a memory leak when adding duplicate display modes.
|
|
dc2e9ba1
|
2015-07-29T17:19:04
|
|
Fix build.
|
|
51c72e10
|
2015-07-29T17:19:02
|
|
Add X11 implementation of SDL_GetDisplayDPI.
|
|
1e3c28ac
|
2015-06-30T15:00:48
|
|
X11: Added a test for a weird X11 error we get with Xinerama, rarely.
|
|
0e45984f
|
2015-06-21T17:33:46
|
|
Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
|
|
2c4a6ea0
|
2015-05-26T06:27:46
|
|
Updated the copyright year to 2015
|
|
b72938c8
|
2015-04-20T12:22:44
|
|
Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.
Fixes Bugzilla #2944.
|
|
fe6c797c
|
2015-04-10T23:30:31
|
|
Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
|
|
b88ca1b4
|
2015-02-10T16:28:56
|
|
the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here.
Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture.
More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
|
|
203ea981
|
2015-01-26T17:46:39
|
|
X11: Don't delay delivery of focus events unless we just changed vidmodes.
Normally there's a 200 millisecond delay on all focus events in case there
was a vidmode change, now we note the last vidmode change and only impose this
delay if a change happened extremely recently.
Thanks to Epic Games for reporting this issue.
|
|
b48e54aa
|
2015-01-26T22:00:29
|
|
Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation
Jonas Kulla
The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.
I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
|
|
70438be2
|
2014-12-03T10:55:23
|
|
WinRT: fixed bug whereby SDL would override an app's default orientation
WinRT apps can set a default, preferred orientation via a .appxmanifest file.
SDL was overriding this on app startup, and making the app use all possible
orientations (landscape and portrait).
Thanks to Eric Wing for the heads up on this!
|
|
9c398852
|
2014-11-22T22:20:40
|
|
Corrected header file documentation comment.
|
|
29eb6e9b
|
2014-10-15T18:33:43
|
|
[X11] Obey DISPLAY environment variable when selecting screen (Steaphan Greene)
Discussed in bug #2192, tested with Xvfb in dual head configuration.
|
|
24c86b55
|
2014-09-11T19:24:42
|
|
[X11] Reconcile logical keyboard state with physical state on FocusIn
since the window system doesn't do it for us like other platforms.
This prevents sticky keys and missed keys when going in and out
of focus, for example Alt would appear to stick if switching away
from an SDL app with Alt-Tab and had to be pressed again.
CR: Sam
|
|
afe14829
|
2014-06-25T00:43:10
|
|
Fixed bug 2556 - add compilation flag -Wshadow
Sylvain
here's the full patch for Blit + RLE.
|
|
3dcb451f
|
2014-04-09T21:29:19
|
|
Added a README file regarding WinRT support
To note, this file is currently formatted with CRLF line endings, rather than
LF, to allow the file to be viewed with Notepad.
|
|
58edac3e
|
2014-02-02T00:53:27
|
|
Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
|
|
f848adff
|
2013-11-29T10:06:08
|
|
Improve Android pause/resume behavior.
|
|
7e1289af
|
2013-11-24T23:56:17
|
|
Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.
|
|
493fadd5
|
2013-11-08T14:04:35
|
|
Fixed spot where SDL was assuming that two displays having the same origin means they're the same display. Changed it to check for the same extents instead.
(Sam actually wrote this, I'm just reviewing and checking it in.)
|
|
a2bd8970
|
2013-10-18T01:36:41
|
|
Don't supply duplicate X11 symbols inside SDL.
Fixes static linking when something else also uses X11.
|
|
1e49b1ed
|
2013-08-21T09:47:10
|
|
OCD fixes: Adds a space after /* (glory to regular expressions!)
|
|
695344d1
|
2013-08-21T09:43:09
|
|
OCD fixes: Adds a space before */
|
|
dad42067
|
2013-08-12T11:13:50
|
|
Fixes #2022, do not resume on Android when surfaceChanged
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.
Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
|
|
1ad936eb
|
2013-08-11T19:56:43
|
|
Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow()
Rainer Deyke
I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
|