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
b4d58fe5
Commit
b4d58fe5
authored
Jun 15, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jun 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Report a non-zero COLORRES capability value.
parent
5f7bbb2a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
dc.c
dlls/gdi32/tests/dc.c
+40
-0
init.c
dlls/winex11.drv/init.c
+9
-1
No files found.
dlls/gdi32/tests/dc.c
View file @
b4d58fe5
...
@@ -556,6 +556,45 @@ static void test_boundsrect_invalid(void)
...
@@ -556,6 +556,45 @@ static void test_boundsrect_invalid(void)
DeleteDC
(
hdc
);
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
)
START_TEST
(
dc
)
{
{
test_savedc
();
test_savedc
();
...
@@ -565,4 +604,5 @@ START_TEST(dc)
...
@@ -565,4 +604,5 @@ START_TEST(dc)
test_DC_bitmap
();
test_DC_bitmap
();
test_DeleteDC
();
test_DeleteDC
();
test_boundsrect_invalid
();
test_boundsrect_invalid
();
test_desktop_colorres
();
}
}
dlls/winex11.drv/init.c
View file @
b4d58fe5
...
@@ -235,6 +235,15 @@ INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
...
@@ -235,6 +235,15 @@ INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
return
text_caps
;
return
text_caps
;
case
CLIPCAPS
:
case
CLIPCAPS
:
return
CP_REGION
;
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
:
case
RASTERCAPS
:
return
(
RC_BITBLT
|
RC_BANDING
|
RC_SCALING
|
RC_BITMAP64
|
RC_DI_BITMAP
|
return
(
RC_BITBLT
|
RC_BANDING
|
RC_SCALING
|
RC_BITMAP64
|
RC_DI_BITMAP
|
RC_DIBTODEV
|
RC_BIGFONT
|
RC_STRETCHBLT
|
RC_STRETCHDIB
|
RC_DEVBITS
|
RC_DIBTODEV
|
RC_BIGFONT
|
RC_STRETCHBLT
|
RC_STRETCHDIB
|
RC_DEVBITS
|
...
@@ -258,7 +267,6 @@ INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
...
@@ -258,7 +267,6 @@ INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
case
SIZEPALETTE
:
case
SIZEPALETTE
:
return
palette_size
;
return
palette_size
;
case
NUMRESERVED
:
case
NUMRESERVED
:
case
COLORRES
:
case
PHYSICALWIDTH
:
case
PHYSICALWIDTH
:
case
PHYSICALHEIGHT
:
case
PHYSICALHEIGHT
:
case
PHYSICALOFFSETX
:
case
PHYSICALOFFSETX
:
...
...
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