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
2a63a03e
Commit
2a63a03e
authored
Dec 14, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Dec 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: When changing display modes clip cursor to the requested display size.
parent
4d8135e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+21
-1
device.c
dlls/wined3d/device.c
+5
-0
No files found.
dlls/ddraw/tests/ddrawmodes.c
View file @
2a63a03e
...
...
@@ -146,7 +146,27 @@ static void setdisplaymode(int i)
modes
[
i
].
dwWidth
,
modes
[
i
].
dwHeight
,
U1
(
modes
[
i
].
ddpfPixelFormat
).
dwRGBBitCount
);
ok
(
DD_OK
==
rc
||
DDERR_UNSUPPORTED
==
rc
,
"SetDisplayMode returned: %x
\n
"
,
rc
);
if
(
DD_OK
==
rc
)
{
if
(
rc
==
DD_OK
)
{
RECT
r
,
scrn
,
virt
;
SetRect
(
&
virt
,
0
,
0
,
GetSystemMetrics
(
SM_CXVIRTUALSCREEN
),
GetSystemMetrics
(
SM_CYVIRTUALSCREEN
));
OffsetRect
(
&
virt
,
GetSystemMetrics
(
SM_XVIRTUALSCREEN
),
GetSystemMetrics
(
SM_YVIRTUALSCREEN
));
SetRect
(
&
scrn
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
));
trace
(
"Mode (%dx%d) [%dx%d] (%d %d)x(%d %d)
\n
"
,
modes
[
i
].
dwWidth
,
modes
[
i
].
dwHeight
,
scrn
.
right
,
scrn
.
bottom
,
virt
.
left
,
virt
.
top
,
virt
.
right
,
virt
.
bottom
);
ok
(
GetClipCursor
(
&
r
),
"GetClipCursor() failed
\n
"
);
/* ddraw sets clip rect here to the screen size, even for
multiple monitors */
ok
(
EqualRect
(
&
r
,
&
scrn
),
"Invalid clip rect: (%d %d) x (%d %d)
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
ok
(
ClipCursor
(
NULL
),
"ClipCursor() failed
\n
"
);
ok
(
GetClipCursor
(
&
r
),
"GetClipCursor() failed
\n
"
);
ok
(
EqualRect
(
&
r
,
&
virt
),
"Invalid clip rect: (%d %d) x (%d %d)
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
rc
=
IDirectDraw_RestoreDisplayMode
(
lpDD
);
ok
(
DD_OK
==
rc
,
"RestoreDisplayMode returned: %x
\n
"
,
rc
);
}
...
...
dlls/wined3d/device.c
View file @
2a63a03e
...
...
@@ -2254,6 +2254,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
LONG
ret
;
const
PixelFormatDesc
*
formatDesc
=
getFormatDescEntry
(
pMode
->
Format
);
RECT
clip_rc
;
TRACE
(
"(%p)->(%d,%p) Mode=%dx%dx@%d, %s
\n
"
,
This
,
iSwapChain
,
pMode
,
pMode
->
Width
,
pMode
->
Height
,
pMode
->
RefreshRate
,
debug_d3dformat
(
pMode
->
Format
));
...
...
@@ -2304,6 +2305,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
if
(
This
->
ddraw_window
)
MoveWindow
(
This
->
ddraw_window
,
0
,
0
,
pMode
->
Width
,
pMode
->
Height
,
TRUE
);
/* And finally clip mouse to our screen */
SetRect
(
&
clip_rc
,
0
,
0
,
pMode
->
Width
,
pMode
->
Height
);
ClipCursor
(
&
clip_rc
);
return
WINED3D_OK
;
}
...
...
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