Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e426fa9c
Commit
e426fa9c
authored
Aug 20, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Try harder to get usable RandR screen resources.
parent
28a9b393
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
xrandr.c
dlls/winex11.drv/xrandr.c
+20
-8
No files found.
dlls/winex11.drv/xrandr.c
View file @
e426fa9c
...
...
@@ -53,8 +53,9 @@ MAKE_FUNCPTR(XRRFreeOutputInfo)
MAKE_FUNCPTR
(
XRRFreeScreenResources
)
MAKE_FUNCPTR
(
XRRGetCrtcInfo
)
MAKE_FUNCPTR
(
XRRGetOutputInfo
)
MAKE_FUNCPTR
(
XRRGetScreenResources
)
MAKE_FUNCPTR
(
XRRSetCrtcConfig
)
static
typeof
(
XRRGetScreenResources
)
*
xrandr_get_screen_resources
;
static
typeof
(
XRRGetScreenResources
)
*
pXRRGetScreenResourcesCurrent
;
static
RRMode
*
xrandr12_modes
;
#endif
...
...
@@ -96,6 +97,7 @@ static int load_xrandr(void)
LOAD_FUNCPTR
(
XRRFreeScreenResources
)
LOAD_FUNCPTR
(
XRRGetCrtcInfo
)
LOAD_FUNCPTR
(
XRRGetOutputInfo
)
LOAD_FUNCPTR
(
XRRGetScreenResources
)
LOAD_FUNCPTR
(
XRRSetCrtcConfig
)
r
=
2
;
#endif
...
...
@@ -267,7 +269,7 @@ static int xrandr12_get_current_mode(void)
XRRCrtcInfo
*
crtc_info
;
int
i
,
ret
=
-
1
;
if
(
!
(
resources
=
xrandr_get_screen_resources
(
gdi_display
,
root_window
)))
if
(
!
(
resources
=
pXRRGetScreenResourcesCurrent
(
gdi_display
,
root_window
)))
{
ERR
(
"Failed to get screen resources.
\n
"
);
return
0
;
...
...
@@ -312,7 +314,7 @@ static LONG xrandr12_set_current_mode( int mode )
mode
=
mode
%
xrandr_mode_count
;
if
(
!
(
resources
=
xrandr_get_screen_resources
(
gdi_display
,
root_window
)))
if
(
!
(
resources
=
pXRRGetScreenResourcesCurrent
(
gdi_display
,
root_window
)))
{
ERR
(
"Failed to get screen resources.
\n
"
);
return
DISP_CHANGE_FAILED
;
...
...
@@ -352,12 +354,22 @@ static int xrandr12_init_modes(void)
int
ret
=
-
1
;
int
i
,
j
;
if
(
!
(
resources
=
xrandr_get_screen_resources
(
gdi_display
,
root_window
)))
if
(
!
(
resources
=
pXRRGetScreenResourcesCurrent
(
gdi_display
,
root_window
)))
{
ERR
(
"Failed to get screen resources.
\n
"
);
return
ret
;
}
if
(
!
resources
->
ncrtc
)
{
pXRRFreeScreenResources
(
resources
);
if
(
!
(
resources
=
pXRRGetScreenResources
(
gdi_display
,
root_window
)))
{
ERR
(
"Failed to get screen resources.
\n
"
);
return
ret
;
}
}
if
(
!
resources
->
ncrtc
||
!
(
crtc_info
=
pXRRGetCrtcInfo
(
gdi_display
,
resources
,
resources
->
crtcs
[
0
]
)))
{
pXRRFreeScreenResources
(
resources
);
...
...
@@ -450,12 +462,12 @@ void X11DRV_XRandR_Init(void)
if
(
ret
>=
2
&&
(
major
>
1
||
(
major
==
1
&&
minor
>=
2
)))
{
if
(
major
>
1
||
(
major
==
1
&&
minor
>=
3
))
xrandr_get_screen_resources
=
wine_dlsym
(
xrandr_handle
,
"XRRGetScreenResourcesCurrent"
,
NULL
,
0
);
if
(
!
xrandr_get_screen_resources
)
xrandr_get_screen_resources
=
wine_dlsym
(
xrandr_handle
,
"XRRGetScreenResources"
,
NULL
,
0
)
;
pXRRGetScreenResourcesCurrent
=
wine_dlsym
(
xrandr_handle
,
"XRRGetScreenResourcesCurrent"
,
NULL
,
0
);
if
(
!
pXRRGetScreenResourcesCurrent
)
pXRRGetScreenResourcesCurrent
=
pXRRGetScreenResources
;
}
if
(
!
xrandr_get_screen_resources
||
xrandr12_init_modes
()
<
0
)
if
(
!
pXRRGetScreenResourcesCurrent
||
xrandr12_init_modes
()
<
0
)
#endif
xrandr10_init_modes
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment