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
a6206836
Commit
a6206836
authored
Apr 18, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement IWineD3DDevice::EnumDisplayModes.
parent
d04f0507
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
device.c
dlls/wined3d/device.c
+20
-2
utils.c
dlls/wined3d/utils.c
+12
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-0
No files found.
dlls/wined3d/device.c
View file @
a6206836
...
...
@@ -1786,8 +1786,26 @@ HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface) {
}
HRESULT
WINAPI
IWineD3DDeviceImpl_EnumDisplayModes
(
IWineD3DDevice
*
iface
,
DWORD
Flags
,
UINT
Width
,
UINT
Height
,
WINED3DFORMAT
pixelformat
,
LPVOID
context
,
D3DCB_ENUMDISPLAYMODESCALLBACK
callback
)
{
FIXME
(
"This call is a d3d7 merge stub. It will be implemented later
\n
"
);
return
WINED3DERR_INVALIDCALL
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
DEVMODEW
DevModeW
;
int
i
;
TRACE
(
"(%p)->(%lx,%d,%d,%d,%p,%p)
\n
"
,
This
,
Flags
,
Width
,
Height
,
pixelformat
,
context
,
callback
);
for
(
i
=
0
;
EnumDisplaySettingsExW
(
NULL
,
i
,
&
DevModeW
,
0
);
i
++
)
{
/* Ignore some modes if a description was passed */
if
(
(
Width
>
0
)
&&
(
Width
!=
DevModeW
.
dmPelsWidth
))
continue
;
if
(
(
Height
>
0
)
&&
(
Height
!=
DevModeW
.
dmPelsHeight
))
continue
;
if
(
(
pixelformat
!=
WINED3DFMT_UNKNOWN
)
&&
(
D3DFmtGetBpp
(
NULL
,
pixelformat
)
!=
DevModeW
.
dmBitsPerPel
)
)
continue
;
TRACE
(
"Enumerating %ldx%ld@%s
\n
"
,
DevModeW
.
dmPelsWidth
,
DevModeW
.
dmPelsHeight
,
debug_d3dformat
(
pixelformat_for_depth
(
DevModeW
.
dmBitsPerPel
)));
if
(
callback
((
IUnknown
*
)
This
,
(
UINT
)
DevModeW
.
dmPelsWidth
,
(
UINT
)
DevModeW
.
dmPelsHeight
,
pixelformat_for_depth
(
DevModeW
.
dmBitsPerPel
),
60
.
0
,
context
)
==
DDENUMRET_CANCEL
)
return
D3D_OK
;
}
return
D3D_OK
;
}
HRESULT
WINAPI
IWineD3DDeviceImpl_SetDisplayMode
(
IWineD3DDevice
*
iface
,
UINT
iSwapChain
,
WINED3DDISPLAYMODE
*
pMode
)
{
...
...
dlls/wined3d/utils.c
View file @
a6206836
...
...
@@ -2041,3 +2041,15 @@ int D3DFmtMakeGlCfg(D3DFORMAT BackBufferFormat, D3DFORMAT StencilBufferFormat, i
}
#undef GLINFO_LOCATION
/* DirectDraw stuff */
WINED3DFORMAT
pixelformat_for_depth
(
DWORD
depth
)
{
switch
(
depth
)
{
case
8
:
return
D3DFMT_P8
;
break
;
case
15
:
return
WINED3DFMT_X1R5G5B5
;
break
;
case
16
:
return
WINED3DFMT_R5G6B5
;
break
;
case
24
:
return
WINED3DFMT_R8G8B8
;
break
;
case
32
:
return
WINED3DFMT_X8R8G8B8
;
break
;
default
:
return
WINED3DFMT_UNKNOWN
;
}
}
dlls/wined3d/wined3d_private.h
View file @
a6206836
...
...
@@ -1283,4 +1283,7 @@ struct IWineD3DPaletteImpl {
extern
const
IWineD3DPaletteVtbl
IWineD3DPalette_Vtbl
;
/* DirectDraw utility functions */
extern
WINED3DFORMAT
pixelformat_for_depth
(
DWORD
depth
);
#endif
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