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
ad22804e
Commit
ad22804e
authored
Sep 16, 2003
by
Alex Pasadyn
Committed by
Alexandre Julliard
Sep 16, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable resolution changes for D3D8 applications.
parent
a19b6aae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
58 deletions
+20
-58
directx.c
dlls/d3d8/directx.c
+20
-58
No files found.
dlls/d3d8/directx.c
View file @
ad22804e
...
...
@@ -26,8 +26,8 @@
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -44,39 +44,6 @@ enum x11drv_escape_codes
X11DRV_GET_FONT
,
/* get current X font for a DC */
};
#define NUM_MODES 20
static
const
int
modes
[
NUM_MODES
][
4
]
=
{
{
640
,
480
,
85
,
16
},
{
640
,
480
,
85
,
32
},
{
800
,
600
,
85
,
16
},
{
800
,
600
,
85
,
32
},
{
1024
,
768
,
85
,
16
},
{
1024
,
768
,
85
,
32
},
{
1152
,
864
,
85
,
16
},
{
1152
,
864
,
85
,
32
},
{
1280
,
768
,
85
,
16
},
{
1280
,
768
,
85
,
32
},
{
1280
,
960
,
85
,
16
},
{
1280
,
960
,
85
,
32
},
{
1280
,
1024
,
85
,
16
},
{
1280
,
1024
,
85
,
32
},
{
1600
,
900
,
85
,
16
},
{
1600
,
900
,
85
,
32
},
{
1600
,
1024
,
85
,
16
},
{
1600
,
1024
,
85
,
32
},
{
1600
,
1200
,
85
,
16
},
{
1600
,
1200
,
85
,
32
}
};
#define NUM_FORMATS 7
static
const
D3DFORMAT
device_formats
[
NUM_FORMATS
]
=
{
D3DFMT_P8
,
...
...
@@ -189,18 +156,14 @@ UINT WINAPI IDirect3D8Impl_GetAdapterModeCount (LPDIRECT3D8 iface,
}
if
(
Adapter
==
0
)
{
/* Display */
int
maxWidth
=
GetSystemMetrics
(
SM_CXSCREEN
);
int
maxHeight
=
GetSystemMetrics
(
SM_CYSCREEN
);
int
i
;
for
(
i
=
0
;
i
<
NUM_MODES
;
i
++
)
{
if
(
modes
[
i
][
0
]
>
maxWidth
||
modes
[
i
][
1
]
>
maxHeight
)
{
TRACE
(
"(%p}->(Adapter: %d) => %d
\n
"
,
This
,
Adapter
,
i
+
1
);
return
i
+
1
;
}
DEVMODEW
DevModeW
;
int
i
=
0
;
while
(
EnumDisplaySettingsExW
(
NULL
,
i
,
&
DevModeW
,
0
))
{
TRACE
(
"(%p}->(Adapter: %d) => %d
\n
"
,
This
,
Adapter
,
i
);
i
++
;
}
TRACE
(
"(%p}->(Adapter: %d) => %d
\n
"
,
This
,
Adapter
,
NUM_MODES
);
return
NUM_MODES
+
1
;
return
i
;
}
else
{
FIXME
(
"Adapter not primary display
\n
"
);
}
...
...
@@ -221,18 +184,17 @@ HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes (LPDIRECT3D8 iface,
if
(
Adapter
==
0
)
{
/* Display */
HDC
hdc
;
int
bpp
=
0
;
if
(
Mode
==
0
)
{
pMode
->
Width
=
GetSystemMetrics
(
SM_CXSCREEN
);
pMode
->
Height
=
GetSystemMetrics
(
SM_CYSCREEN
);
pMode
->
RefreshRate
=
85
;
/*FIXME: How to identify? */
bpp
=
32
;
}
else
if
(
Mode
<
(
NUM_MODES
+
1
))
{
pMode
->
Width
=
modes
[
Mode
-
1
][
0
];
pMode
->
Height
=
modes
[
Mode
-
1
][
1
];
pMode
->
RefreshRate
=
modes
[
Mode
-
1
][
2
];
bpp
=
modes
[
Mode
-
1
][
3
];
}
else
{
DEVMODEW
DevModeW
;
if
(
EnumDisplaySettingsExW
(
NULL
,
Mode
,
&
DevModeW
,
0
))
{
pMode
->
Width
=
DevModeW
.
dmPelsWidth
;
pMode
->
Height
=
DevModeW
.
dmPelsHeight
;
pMode
->
RefreshRate
=
D3DADAPTER_DEFAULT
;
bpp
=
DevModeW
.
dmBitsPerPel
;
}
else
{
TRACE
(
"Requested mode out of range %d
\n
"
,
Mode
);
return
D3DERR_INVALIDCALL
;
}
...
...
@@ -1044,7 +1006,7 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
/* If not windowed, need to go fullscreen, and resize the HWND to the appropriate */
/* dimensions */
if
(
!
pPresentationParameters
->
Windowed
)
{
#if
0
#if
1
DEVMODEW
devmode
;
HDC
hdc
;
int
bpp
=
0
;
...
...
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