mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d9] Allow arbitrary backbuffer/adapter formats
It seems these aren't linked in the way the docs made out, this fixes a crash when starting some titles. Closes #1508
This commit is contained in:
parent
a9040c5cce
commit
6a8933cf31
@ -90,8 +90,10 @@ namespace dxvk {
|
||||
D3D9Format AdapterFormat,
|
||||
D3D9Format BackBufferFormat,
|
||||
BOOL bWindowed) {
|
||||
if (!IsSupportedBackBufferFormat(
|
||||
AdapterFormat, BackBufferFormat, bWindowed))
|
||||
if (!IsSupportedAdapterFormat(AdapterFormat, bWindowed))
|
||||
return D3DERR_NOTAVAILABLE;
|
||||
|
||||
if (!IsSupportedBackBufferFormat(BackBufferFormat, bWindowed))
|
||||
return D3DERR_NOTAVAILABLE;
|
||||
|
||||
return D3D_OK;
|
||||
|
@ -35,19 +35,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
bool IsSupportedBackBufferFormat(
|
||||
D3D9Format AdapterFormat,
|
||||
D3D9Format BackBufferFormat,
|
||||
BOOL Windowed) {
|
||||
if (!IsSupportedAdapterFormat(AdapterFormat, Windowed))
|
||||
return false;
|
||||
|
||||
return AdapterFormat == BackBufferFormat
|
||||
|| (AdapterFormat == D3D9Format::X8R8G8B8 && BackBufferFormat == D3D9Format::A8R8G8B8)
|
||||
|| (AdapterFormat == D3D9Format::X1R5G5B5 && BackBufferFormat == D3D9Format::A1R5G5B5);
|
||||
}
|
||||
|
||||
|
||||
bool IsSupportedBackBufferFormat(
|
||||
D3D9Format BackBufferFormat,
|
||||
BOOL Windowed) {
|
||||
|
@ -26,11 +26,6 @@ namespace dxvk {
|
||||
D3D9Format Format,
|
||||
BOOL Windowed);
|
||||
|
||||
bool IsSupportedBackBufferFormat(
|
||||
D3D9Format AdapterFormat,
|
||||
D3D9Format BackBufferFormat,
|
||||
BOOL Windowed);
|
||||
|
||||
bool IsSupportedBackBufferFormat(
|
||||
D3D9Format BackBufferFormat,
|
||||
BOOL Windowed);
|
||||
|
Loading…
x
Reference in New Issue
Block a user