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
ccab10bd
Commit
ccab10bd
authored
Dec 16, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Distinguish between bpp and depth.
parent
126e5d2c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
14 deletions
+19
-14
bitmap.c
dlls/winex11.drv/bitmap.c
+4
-4
desktop.c
dlls/winex11.drv/desktop.c
+2
-2
init.c
dlls/winex11.drv/init.c
+1
-1
settings.c
dlls/winex11.drv/settings.c
+3
-2
winpos.c
dlls/winex11.drv/winpos.c
+1
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+3
-0
xrandr.c
dlls/winex11.drv/xrandr.c
+2
-2
xvidmode.c
dlls/winex11.drv/xvidmode.c
+2
-2
No files found.
dlls/winex11.drv/bitmap.c
View file @
ccab10bd
...
...
@@ -123,10 +123,10 @@ 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_
depth
)
||
(
bitmap
.
bmBitsPixel
==
24
&&
screen_
depth
==
32
)
||
/* FIXME: Not compatible */
(
bitmap
.
bmBitsPixel
==
32
&&
screen_
depth
==
24
)
||
/* FIXME: Not compatible */
(
bitmap
.
bmBitsPixel
==
16
&&
screen_
depth
==
15
)))
/* TODO: Confirm this */
(
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
"
,
bitmap
.
bmPlanes
,
bitmap
.
bmBitsPixel
);
...
...
dlls/winex11.drv/desktop.c
View file @
ccab10bd
...
...
@@ -103,7 +103,7 @@ static int X11DRV_resize_desktop( unsigned int width, unsigned int height )
static
int
X11DRV_desktop_GetCurrentMode
(
void
)
{
unsigned
int
i
;
DWORD
dwBpp
=
screen_
depth
;
DWORD
dwBpp
=
screen_
bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
for
(
i
=
0
;
i
<
dd_mode_count
;
i
++
)
{
...
...
@@ -118,7 +118,7 @@ static int X11DRV_desktop_GetCurrentMode(void)
static
LONG
X11DRV_desktop_SetCurrentMode
(
int
mode
)
{
DWORD
dwBpp
=
screen_
depth
;
DWORD
dwBpp
=
screen_
bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
if
(
dwBpp
!=
dd_modes
[
mode
].
dwBPP
)
{
...
...
dlls/winex11.drv/init.c
View file @
ccab10bd
...
...
@@ -202,7 +202,7 @@ INT X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
case
DESKTOPVERTRES
:
return
virtual_screen_rect
.
bottom
-
virtual_screen_rect
.
top
;
case
BITSPIXEL
:
return
screen_
depth
;
return
screen_
bpp
;
case
PLANES
:
return
1
;
case
NUMBRUSHES
:
...
...
dlls/winex11.drv/settings.c
View file @
ccab10bd
...
...
@@ -86,7 +86,7 @@ LPDDHALMODEINFO X11DRV_Settings_SetHandlers(const char *name,
void
X11DRV_Settings_AddOneMode
(
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
bpp
,
unsigned
int
freq
)
{
LPDDHALMODEINFO
info
=
&
(
dd_modes
[
dd_mode_count
]);
DWORD
dwBpp
=
screen_
depth
;
DWORD
dwBpp
=
screen_
bpp
;
if
(
dd_mode_count
>=
dd_max_modes
)
{
ERR
(
"Maximum modes (%d) exceeded
\n
"
,
dd_max_modes
);
...
...
@@ -114,8 +114,9 @@ void X11DRV_Settings_AddDepthModes(void)
{
int
i
,
j
;
int
existing_modes
=
dd_mode_count
;
DWORD
dwBpp
=
screen_
depth
;
DWORD
dwBpp
=
screen_
bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
for
(
j
=
0
;
j
<
3
;
j
++
)
{
if
(
depths
[
j
]
!=
dwBpp
)
...
...
dlls/winex11.drv/winpos.c
View file @
ccab10bd
...
...
@@ -895,7 +895,7 @@ void X11DRV_handle_desktop_resize( unsigned int width, unsigned int height )
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVATE
,
NULL
);
data
->
lock_changes
--
;
ClipCursor
(
NULL
);
SendMessageTimeoutW
(
HWND_BROADCAST
,
WM_DISPLAYCHANGE
,
screen_
depth
,
SendMessageTimeoutW
(
HWND_BROADCAST
,
WM_DISPLAYCHANGE
,
screen_
bpp
,
MAKELPARAM
(
width
,
height
),
SMTO_ABORTIFHUNG
,
2000
,
NULL
);
EnumWindows
(
update_windows_on_desktop_resize
,
(
LPARAM
)
&
resize_data
);
...
...
dlls/winex11.drv/x11drv.h
View file @
ccab10bd
...
...
@@ -531,6 +531,7 @@ extern Visual *visual;
extern
Window
root_window
;
extern
unsigned
int
screen_width
;
extern
unsigned
int
screen_height
;
extern
unsigned
int
screen_bpp
;
extern
unsigned
int
screen_depth
;
extern
RECT
virtual_screen_rect
;
extern
unsigned
int
text_caps
;
...
...
dlls/winex11.drv/x11drv_main.c
View file @
ccab10bd
...
...
@@ -70,6 +70,7 @@ Screen *screen;
Visual
*
visual
;
unsigned
int
screen_width
;
unsigned
int
screen_height
;
unsigned
int
screen_bpp
;
unsigned
int
screen_depth
;
RECT
virtual_screen_rect
;
Window
root_window
;
...
...
@@ -491,6 +492,8 @@ static BOOL process_attach(void)
XFree
(
desktop_vi
);
}
screen_bpp
=
screen_depth
;
/* TODO */
XInternAtoms
(
display
,
(
char
**
)
atom_names
,
NB_XATOMS
-
FIRST_XATOM
,
False
,
X11DRV_Atoms
);
if
(
TRACE_ON
(
synchronous
))
XSynchronize
(
display
,
True
);
...
...
dlls/winex11.drv/xrandr.c
View file @
ccab10bd
...
...
@@ -178,9 +178,9 @@ static LONG X11DRV_XRandR_SetCurrentMode(int mode)
short
rate
;
unsigned
int
i
;
int
j
;
DWORD
dwBpp
=
screen_
depth
;
DWORD
dwBpp
=
screen_
bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
wine_tsx11_lock
();
root
=
RootWindow
(
gdi_display
,
DefaultScreen
(
gdi_display
));
sc
=
pXRRGetScreenInfo
(
gdi_display
,
root
);
...
...
dlls/winex11.drv/xvidmode.c
View file @
ccab10bd
...
...
@@ -94,7 +94,7 @@ static int X11DRV_XF86VM_GetCurrentMode(void)
int
dotclock
;
unsigned
int
i
;
DDHALMODEINFO
cmode
;
DWORD
dwBpp
=
screen_
depth
;
DWORD
dwBpp
=
screen_
bpp
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
TRACE
(
"Querying XVidMode current mode
\n
"
);
...
...
@@ -113,7 +113,7 @@ static int X11DRV_XF86VM_GetCurrentMode(void)
static
LONG
X11DRV_XF86VM_SetCurrentMode
(
int
mode
)
{
DWORD
dwBpp
=
screen_
depth
;
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