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
870310b4
Commit
870310b4
authored
Feb 23, 2007
by
Jan Zerebecki
Committed by
Alexandre Julliard
Feb 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: replace #ifdef with if() for DEBUG_SINGLE_MODE.
parent
706bc26a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
34 deletions
+36
-34
directx.c
dlls/wined3d/directx.c
+36
-34
No files found.
dlls/wined3d/directx.c
View file @
870310b4
...
...
@@ -23,8 +23,10 @@
/* Compile time diagnostics: */
/* Uncomment this to force only a single display mode to be exposed: */
/*#define DEBUG_SINGLE_MODE*/
#ifndef DEBUG_SINGLE_MODE
/* Set to 1 to force only a single display mode to be exposed: */
#define DEBUG_SINGLE_MODE 0
#endif
#include "config.h"
...
...
@@ -1095,32 +1097,34 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad
if
(
Adapter
==
0
)
{
/* Display */
int
i
=
0
;
int
j
=
0
;
#if !defined( DEBUG_SINGLE_MODE )
DEVMODEW
DevModeW
;
while
(
EnumDisplaySettingsExW
(
NULL
,
j
,
&
DevModeW
,
0
))
{
j
++
;
switch
(
Format
)
{
case
WINED3DFMT_UNKNOWN
:
if
(
DevModeW
.
dmBitsPerPel
==
32
||
DevModeW
.
dmBitsPerPel
==
16
)
i
++
;
break
;
case
WINED3DFMT_X8R8G8B8
:
if
(
DevModeW
.
dmBitsPerPel
==
32
)
i
++
;
break
;
case
WINED3DFMT_R5G6B5
:
if
(
DevModeW
.
dmBitsPerPel
==
16
)
i
++
;
break
;
default:
/* Skip other modes as they do not match the requested format */
break
;
if
(
!
DEBUG_SINGLE_MODE
)
{
DEVMODEW
DevModeW
;
while
(
EnumDisplaySettingsExW
(
NULL
,
j
,
&
DevModeW
,
0
))
{
j
++
;
switch
(
Format
)
{
case
WINED3DFMT_UNKNOWN
:
if
(
DevModeW
.
dmBitsPerPel
==
32
||
DevModeW
.
dmBitsPerPel
==
16
)
i
++
;
break
;
case
WINED3DFMT_X8R8G8B8
:
if
(
DevModeW
.
dmBitsPerPel
==
32
)
i
++
;
break
;
case
WINED3DFMT_R5G6B5
:
if
(
DevModeW
.
dmBitsPerPel
==
16
)
i
++
;
break
;
default:
/* Skip other modes as they do not match the requested format */
break
;
}
}
}
else
{
i
=
1
;
j
=
1
;
}
#else
i
=
1
;
j
=
1
;
#endif
TRACE_
(
d3d_caps
)(
"(%p}->(Adapter: %d) => %d (out of %d)
\n
"
,
This
,
Adapter
,
i
,
j
);
return
i
;
}
else
{
...
...
@@ -1141,8 +1145,7 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
return
WINED3DERR_INVALIDCALL
;
}
if
(
Adapter
==
0
)
{
/* Display */
#if !defined( DEBUG_SINGLE_MODE )
if
(
Adapter
==
0
&&
!
DEBUG_SINGLE_MODE
)
{
/* Display */
DEVMODEW
DevModeW
;
int
ModeIdx
=
0
;
int
i
=
0
;
...
...
@@ -1207,18 +1210,17 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
return
WINED3DERR_INVALIDCALL
;
}
#else
TRACE_
(
d3d_caps
)(
"W %d H %d rr %d fmt (%x - %s) bpp %u
\n
"
,
pMode
->
Width
,
pMode
->
Height
,
pMode
->
RefreshRate
,
pMode
->
Format
,
debug_d3dformat
(
pMode
->
Format
),
DevModeW
.
dmBitsPerPel
);
}
else
if
(
DEBUG_SINGLE_MODE
)
{
/* Return one setting of the format requested */
if
(
Mode
>
0
)
return
WINED3DERR_INVALIDCALL
;
pMode
->
Width
=
800
;
pMode
->
Height
=
600
;
pMode
->
RefreshRate
=
WINED3DADAPTER_DEFAULT
;
pMode
->
RefreshRate
=
60
;
pMode
->
Format
=
(
Format
==
WINED3DFMT_UNKNOWN
)
?
WINED3DFMT_X8R8G8B8
:
Format
;
#endif
TRACE_
(
d3d_caps
)(
"W %d H %d rr %d fmt (%x - %s) bpp %u
\n
"
,
pMode
->
Width
,
pMode
->
Height
,
pMode
->
RefreshRate
,
pMode
->
Format
,
debug_d3dformat
(
pMode
->
Format
),
DevModeW
.
dmBitsPerPel
);
}
else
{
FIXME_
(
d3d_caps
)(
"Adapter not primary display
\n
"
);
}
...
...
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