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
5461d505
Commit
5461d505
authored
Dec 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Activate the depth-bpp difference.
parent
ccab10bd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
27 deletions
+42
-27
bitmap.c
dlls/gdi32/tests/bitmap.c
+1
-5
sysparams.c
dlls/user32/tests/sysparams.c
+3
-10
bitmap.c
dlls/winex11.drv/bitmap.c
+0
-2
desktop.c
dlls/winex11.drv/desktop.c
+0
-2
settings.c
dlls/winex11.drv/settings.c
+7
-4
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+31
-1
xrandr.c
dlls/winex11.drv/xrandr.c
+0
-1
xvidmode.c
dlls/winex11.drv/xvidmode.c
+0
-2
No files found.
dlls/gdi32/tests/bitmap.c
View file @
5461d505
...
...
@@ -1638,11 +1638,7 @@ static void test_select_object(void)
ok
(
hbm_old
!=
0
,
"SelectObject failed, BITSPIXEL: %d, created depth: %d
\n
"
,
bpp
,
depths
[
i
]);
SelectObject
(
hdc
,
hbm_old
);
}
else
{
if
(
bpp
==
24
&&
depths
[
i
]
==
32
)
{
todo_wine
ok
(
hbm_old
==
0
,
"SelectObject should fail. BITSPIXELS: %d, created depth: %d
\n
"
,
bpp
,
depths
[
i
]);
}
else
{
ok
(
hbm_old
==
0
,
"SelectObject should fail. BITSPIXELS: %d, created depth: %d
\n
"
,
bpp
,
depths
[
i
]);
}
ok
(
hbm_old
==
0
,
"SelectObject should fail. BITSPIXELS: %d, created depth: %d
\n
"
,
bpp
,
depths
[
i
]);
}
memset
(
&
bm
,
0xAA
,
sizeof
(
bm
));
...
...
dlls/user32/tests/sysparams.c
View file @
5461d505
...
...
@@ -2223,9 +2223,7 @@ static void test_WM_DISPLAYCHANGE(void)
continue
;
}
if
((
start_bpp
!=
test_bpps
[
i
]
||
(
test_bpps
[
i
]
==
32
&&
last_bpp
==
24
))
&&
!
(
test_bpps
[
i
]
==
24
&&
start_bpp
==
32
))
{
if
(
start_bpp
!=
test_bpps
[
i
])
{
todo_wine
ok
(
last_bpp
==
test_bpps
[
i
],
"Set bpp %d, but WM_DISPLAYCHANGE reported bpp %d
\n
"
,
test_bpps
[
i
],
last_bpp
);
}
else
{
ok
(
last_bpp
==
test_bpps
[
i
],
"Set bpp %d, but WM_DISPLAYCHANGE reported bpp %d
\n
"
,
test_bpps
[
i
],
last_bpp
);
...
...
@@ -2533,13 +2531,8 @@ static void test_EnumDisplaySettings(void)
hdc
=
GetDC
(
0
);
val
=
GetDeviceCaps
(
hdc
,
BITSPIXEL
);
if
(
devmode
.
dmBitsPerPel
==
32
&&
val
==
24
)
{
todo_wine
ok
(
devmode
.
dmBitsPerPel
==
val
,
"GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d
\n
"
,
val
,
devmode
.
dmBitsPerPel
);
}
else
{
ok
(
devmode
.
dmBitsPerPel
==
val
,
"GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d
\n
"
,
val
,
devmode
.
dmBitsPerPel
);
}
ok
(
devmode
.
dmBitsPerPel
==
val
,
"GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d
\n
"
,
val
,
devmode
.
dmBitsPerPel
);
val
=
GetDeviceCaps
(
hdc
,
NUMCOLORS
);
if
(
devmode
.
dmBitsPerPel
<=
8
)
{
...
...
dlls/winex11.drv/bitmap.c
View file @
5461d505
...
...
@@ -124,8 +124,6 @@ BOOL X11DRV_CreateBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, LPVOID bmBit
/* check if bpp is compatible with screen depth */
if
(
!
((
bitmap
.
bmBitsPixel
==
1
)
||
(
bitmap
.
bmBitsPixel
==
screen_bpp
)
||
(
bitmap
.
bmBitsPixel
==
24
&&
screen_bpp
==
32
)
||
/* FIXME: Not compatible */
(
bitmap
.
bmBitsPixel
==
32
&&
screen_bpp
==
24
)
||
/* FIXME: Not compatible */
(
bitmap
.
bmBitsPixel
==
16
&&
screen_bpp
==
15
)))
/* TODO: Confirm this */
{
ERR
(
"Trying to make bitmap with planes=%d, bpp=%d
\n
"
,
...
...
dlls/winex11.drv/desktop.c
View file @
5461d505
...
...
@@ -104,7 +104,6 @@ static int X11DRV_desktop_GetCurrentMode(void)
{
unsigned
int
i
;
DWORD
dwBpp
=
screen_bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
for
(
i
=
0
;
i
<
dd_mode_count
;
i
++
)
{
if
(
(
screen_width
==
dd_modes
[
i
].
dwWidth
)
&&
...
...
@@ -119,7 +118,6 @@ static int X11DRV_desktop_GetCurrentMode(void)
static
LONG
X11DRV_desktop_SetCurrentMode
(
int
mode
)
{
DWORD
dwBpp
=
screen_bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
if
(
dwBpp
!=
dd_modes
[
mode
].
dwBPP
)
{
FIXME
(
"Cannot change screen BPP from %d to %d
\n
"
,
dwBpp
,
dd_modes
[
mode
].
dwBPP
);
...
...
dlls/winex11.drv/settings.c
View file @
5461d505
...
...
@@ -44,7 +44,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11settings);
static
LPDDHALMODEINFO
dd_modes
=
NULL
;
static
unsigned
int
dd_mode_count
=
0
;
static
unsigned
int
dd_max_modes
=
0
;
static
const
unsigned
int
depths
[]
=
{
8
,
16
,
32
};
/* All Windows drivers seen so far either support 32 bit depths, or 24 bit depths, but never both. So if we have
* a 32 bit framebuffer, report 32 bit bpps, otherwise 24 bit ones.
*/
static
const
unsigned
int
depths_24
[]
=
{
8
,
16
,
24
};
static
const
unsigned
int
depths_32
[]
=
{
8
,
16
,
32
};
/* pointers to functions that actually do the hard stuff */
static
int
(
*
pGetCurrentMode
)(
void
);
...
...
@@ -92,7 +96,6 @@ void X11DRV_Settings_AddOneMode(unsigned int width, unsigned int height, unsigne
ERR
(
"Maximum modes (%d) exceeded
\n
"
,
dd_max_modes
);
return
;
}
if
(
dwBpp
==
24
)
dwBpp
=
32
;
if
(
bpp
==
0
)
bpp
=
dwBpp
;
info
->
dwWidth
=
width
;
info
->
dwHeight
=
height
;
...
...
@@ -115,7 +118,7 @@ void X11DRV_Settings_AddDepthModes(void)
int
i
,
j
;
int
existing_modes
=
dd_mode_count
;
DWORD
dwBpp
=
screen_bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
const
DWORD
*
depths
=
screen_bpp
==
32
?
depths_32
:
depths_24
;
for
(
j
=
0
;
j
<
3
;
j
++
)
{
...
...
@@ -360,7 +363,7 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
devmode
->
dmPelsWidth
,
devmode
->
dmPelsHeight
,
devmode
->
dmBitsPerPel
,
devmode
->
dmDisplayFrequency
,
handler_name
);
dwBpp
=
(
devmode
->
dmBitsPerPel
==
24
)
?
32
:
devmode
->
dmBitsPerPel
;
dwBpp
=
devmode
->
dmBitsPerPel
;
if
(
devmode
->
dmFields
&
DM_BITSPERPEL
)
def_mode
&=
!
dwBpp
;
if
(
devmode
->
dmFields
&
DM_PELSWIDTH
)
def_mode
&=
!
devmode
->
dmPelsWidth
;
if
(
devmode
->
dmFields
&
DM_PELSHEIGHT
)
def_mode
&=
!
devmode
->
dmPelsHeight
;
...
...
dlls/winex11.drv/x11drv_main.c
View file @
5461d505
...
...
@@ -492,7 +492,37 @@ static BOOL process_attach(void)
XFree
(
desktop_vi
);
}
screen_bpp
=
screen_depth
;
/* TODO */
switch
(
screen_depth
)
{
case
8
:
screen_bpp
=
8
;
break
;
case
15
:
/* Out tests suggest that windows does not support 15 bpp color depth.
* X11 does, what should we do with these situations?
*/
FIXME
(
"The X server is running at 15 bpp color depth
\n
"
);
screen_bpp
=
15
;
break
;
case
16
:
screen_bpp
=
16
;
break
;
case
24
:
/* This is not necessarily right. X11 always has 24 bits per pixel, but it can run
* with 24 bit framebuffers and 32 bit framebuffers. It doesn't make any difference
* for windowing, but gl applications can get visuals with alpha channels. So we
* should check the framebuffer and/or opengl formats available to find out what the
* framebuffer actually does
*/
screen_bpp
=
32
;
break
;
default:
FIXME
(
"Unexpected X11 depth %d bpp, what to report to app?
\n
"
,
screen_depth
);
screen_bpp
=
screen_depth
;
}
XInternAtoms
(
display
,
(
char
**
)
atom_names
,
NB_XATOMS
-
FIRST_XATOM
,
False
,
X11DRV_Atoms
);
...
...
dlls/winex11.drv/xrandr.c
View file @
5461d505
...
...
@@ -179,7 +179,6 @@ static LONG X11DRV_XRandR_SetCurrentMode(int mode)
unsigned
int
i
;
int
j
;
DWORD
dwBpp
=
screen_bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
wine_tsx11_lock
();
root
=
RootWindow
(
gdi_display
,
DefaultScreen
(
gdi_display
));
...
...
dlls/winex11.drv/xvidmode.c
View file @
5461d505
...
...
@@ -95,7 +95,6 @@ static int X11DRV_XF86VM_GetCurrentMode(void)
unsigned
int
i
;
DDHALMODEINFO
cmode
;
DWORD
dwBpp
=
screen_bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
TRACE
(
"Querying XVidMode current mode
\n
"
);
wine_tsx11_lock
();
...
...
@@ -114,7 +113,6 @@ static int X11DRV_XF86VM_GetCurrentMode(void)
static
LONG
X11DRV_XF86VM_SetCurrentMode
(
int
mode
)
{
DWORD
dwBpp
=
screen_bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
/* only set modes from the original color depth */
if
(
dwBpp
!=
dd_modes
[
mode
].
dwBPP
)
{
...
...
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