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
36420d22
Commit
36420d22
authored
Oct 24, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Add error checks around every XF86VidMode call.
parent
a3a1f4e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
xvidmode.c
dlls/winex11.drv/xvidmode.c
+11
-10
No files found.
dlls/winex11.drv/xvidmode.c
View file @
36420d22
...
...
@@ -203,19 +203,20 @@ void X11DRV_XF86VM_Init(void)
/* see if XVidMode is available */
wine_tsx11_lock
();
ok
=
pXF86VidModeQueryExtension
(
gdi_display
,
&
xf86vm_event
,
&
xf86vm_error
);
if
(
ok
)
{
wine_tsx11_unlock
();
if
(
!
ok
)
return
;
X11DRV_expect_error
(
gdi_display
,
XVidModeErrorHandler
,
NULL
);
ok
=
pXF86VidModeQueryVersion
(
gdi_display
,
&
xf86vm_major
,
&
xf86vm_minor
);
if
(
X11DRV_check_error
())
ok
=
FALSE
;
}
if
(
ok
)
{
if
(
X11DRV_check_error
()
||
!
ok
)
return
;
#ifdef X_XF86VidModeSetGammaRamp
if
(
xf86vm_major
>
2
||
(
xf86vm_major
==
2
&&
xf86vm_minor
>=
1
))
{
X11DRV_expect_error
(
gdi_display
,
XVidModeErrorHandler
,
NULL
);
pXF86VidModeGetGammaRampSize
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
xf86vm_gammaramp_size
);
if
(
X11DRV_check_error
())
xf86vm_gammaramp_size
=
0
;
if
(
xf86vm_gammaramp_size
==
256
)
xf86vm_use_gammaramp
=
TRUE
;
}
...
...
@@ -223,12 +224,12 @@ void X11DRV_XF86VM_Init(void)
/* retrieve modes */
if
(
usexvidmode
&&
root_window
==
DefaultRootWindow
(
gdi_display
))
{
X11DRV_expect_error
(
gdi_display
,
XVidModeErrorHandler
,
NULL
);
ok
=
pXF86VidModeGetAllModeLines
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
nmodes
,
&
real_xf86vm_modes
);
else
ok
=
FALSE
;
/* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */
if
(
X11DRV_check_error
()
||
!
ok
)
return
;
}
wine_tsx11_unlock
();
if
(
!
ok
)
return
;
else
return
;
/* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */
TRACE
(
"XVidMode modes: count=%d
\n
"
,
nmodes
);
...
...
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