Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4b538567
Commit
4b538567
authored
Aug 11, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Validate the ramps also when not converting them to single values.
parent
72c121e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
xvidmode.c
dlls/winex11.drv/xvidmode.c
+10
-20
No files found.
dlls/winex11.drv/xvidmode.c
View file @
4b538567
...
@@ -386,35 +386,25 @@ static BOOL X11DRV_XF86VM_GetGammaRamp(LPDDGAMMARAMP ramp)
...
@@ -386,35 +386,25 @@ static BOOL X11DRV_XF86VM_GetGammaRamp(LPDDGAMMARAMP ramp)
static
BOOL
X11DRV_XF86VM_SetGammaRamp
(
LPDDGAMMARAMP
ramp
)
static
BOOL
X11DRV_XF86VM_SetGammaRamp
(
LPDDGAMMARAMP
ramp
)
{
{
Bool
ret
=
FALSE
;
#ifdef X_XF86VidModeSetGamma
#ifdef X_XF86VidModeSetGamma
XF86VidModeGamma
gamma
;
XF86VidModeGamma
gamma
;
if
(
xf86vm_major
<
2
||
!
usexvidmode
)
return
FALSE
;
/* no gamma control */
if
(
xf86vm_major
<
2
||
!
usexvidmode
)
return
FALSE
;
/* no gamma control */
if
(
!
ComputeGammaFromRamp
(
ramp
->
red
,
&
gamma
.
red
)
||
/* ramp validation */
!
ComputeGammaFromRamp
(
ramp
->
green
,
&
gamma
.
green
)
||
!
ComputeGammaFromRamp
(
ramp
->
blue
,
&
gamma
.
blue
))
return
FALSE
;
wine_tsx11_lock
();
#ifdef X_XF86VidModeSetGammaRamp
#ifdef X_XF86VidModeSetGammaRamp
else
if
(
xf86vm_use_gammaramp
)
if
(
xf86vm_use_gammaramp
)
{
Bool
ret
;
wine_tsx11_lock
();
ret
=
pXF86VidModeSetGammaRamp
(
gdi_display
,
DefaultScreen
(
gdi_display
),
256
,
ret
=
pXF86VidModeSetGammaRamp
(
gdi_display
,
DefaultScreen
(
gdi_display
),
256
,
ramp
->
red
,
ramp
->
green
,
ramp
->
blue
);
ramp
->
red
,
ramp
->
green
,
ramp
->
blue
);
wine_tsx11_unlock
();
return
ret
;
}
#endif
else
else
{
#endif
if
(
ComputeGammaFromRamp
(
ramp
->
red
,
&
gamma
.
red
)
&&
ret
=
pXF86VidModeSetGamma
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
gamma
);
ComputeGammaFromRamp
(
ramp
->
green
,
&
gamma
.
green
)
&&
wine_tsx11_unlock
();
ComputeGammaFromRamp
(
ramp
->
blue
,
&
gamma
.
blue
))
{
Bool
ret
;
wine_tsx11_lock
();
ret
=
pXF86VidModeSetGamma
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
gamma
);
wine_tsx11_unlock
();
return
ret
;
}
}
#endif
/* X_XF86VidModeSetGamma */
#endif
/* X_XF86VidModeSetGamma */
return
FALSE
;
return
ret
;
}
}
#endif
/* SONAME_LIBXXF86VM */
#endif
/* SONAME_LIBXXF86VM */
...
...
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