Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
b4d58fe5
Commit
b4d58fe5
authored
14 years ago
by
Andrew Nguyen
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winex11.drv: Report a non-zero COLORRES capability value.
parent
5f7bbb2a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/gdi32/tests/dc.c
+40
-0
40 additions, 0 deletions
dlls/gdi32/tests/dc.c
dlls/winex11.drv/init.c
+9
-1
9 additions, 1 deletion
dlls/winex11.drv/init.c
with
49 additions
and
1 deletion
dlls/gdi32/tests/dc.c
+
40
−
0
View file @
b4d58fe5
...
...
@@ -556,6 +556,45 @@ static void test_boundsrect_invalid(void)
DeleteDC
(
hdc
);
}
static
void
test_desktop_colorres
(
void
)
{
HDC
hdc
=
GetDC
(
NULL
);
int
bitspixel
,
colorres
;
bitspixel
=
GetDeviceCaps
(
hdc
,
BITSPIXEL
);
ok
(
bitspixel
!=
0
,
"Expected to get valid BITSPIXEL capability value
\n
"
);
colorres
=
GetDeviceCaps
(
hdc
,
COLORRES
);
ok
(
colorres
!=
0
||
broken
(
colorres
==
0
),
/* Win9x */
"Expected to get valid COLORRES capability value
\n
"
);
if
(
colorres
)
{
switch
(
bitspixel
)
{
case
8
:
ok
(
colorres
==
18
,
"Expected COLORRES to be 18, got %d
\n
"
,
colorres
);
break
;
case
16
:
ok
(
colorres
==
16
,
"Expected COLORRES to be 16, got %d
\n
"
,
colorres
);
break
;
case
24
:
case
32
:
ok
(
colorres
==
24
,
"Expected COLORRES to be 24, got %d
\n
"
,
bitspixel
);
break
;
default:
ok
(
0
,
"Got unknown BITSPIXEL %d with COLORRES %d
\n
"
,
bitspixel
,
colorres
);
break
;
}
}
DeleteDC
(
hdc
);
}
START_TEST
(
dc
)
{
test_savedc
();
...
...
@@ -565,4 +604,5 @@ START_TEST(dc)
test_DC_bitmap
();
test_DeleteDC
();
test_boundsrect_invalid
();
test_desktop_colorres
();
}
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/init.c
+
9
−
1
View file @
b4d58fe5
...
...
@@ -235,6 +235,15 @@ INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
return
text_caps
;
case
CLIPCAPS
:
return
CP_REGION
;
case
COLORRES
:
/* The observed correspondence between BITSPIXEL and COLORRES is:
* BITSPIXEL: 8 -> COLORRES: 18
* BITSPIXEL: 16 -> COLORRES: 16
* BITSPIXEL: 24 -> COLORRES: 24
* (note that depth_to_bpp never chooses a bpp of 24)
* BITSPIXEL: 32 -> COLORRES: 24 */
return
(
screen_bpp
<=
8
)
?
18
:
(
screen_bpp
==
32
)
?
24
:
screen_bpp
;
case
RASTERCAPS
:
return
(
RC_BITBLT
|
RC_BANDING
|
RC_SCALING
|
RC_BITMAP64
|
RC_DI_BITMAP
|
RC_DIBTODEV
|
RC_BIGFONT
|
RC_STRETCHBLT
|
RC_STRETCHDIB
|
RC_DEVBITS
|
...
...
@@ -258,7 +267,6 @@ INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
case
SIZEPALETTE
:
return
palette_size
;
case
NUMRESERVED
:
case
COLORRES
:
case
PHYSICALWIDTH
:
case
PHYSICALHEIGHT
:
case
PHYSICALOFFSETX
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment