From 36f5c9ad45e838a844e5f4a9b8412cecff8223db Mon Sep 17 00:00:00 2001 From: poly Date: Thu, 5 Mar 2015 01:27:38 -0800 Subject: [PATCH 1/2] [DX9] Push 32bit back buffer formats first, so windowed users don't get stuck using the first valid 16bit format. --- src/RageDisplay_D3D.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/RageDisplay_D3D.cpp b/src/RageDisplay_D3D.cpp index e97865f5fd..83935da881 100644 --- a/src/RageDisplay_D3D.cpp +++ b/src/RageDisplay_D3D.cpp @@ -294,18 +294,19 @@ D3DFORMAT FindBackBufferType(bool bWindowed, int iBPP) vector vBackBufferFormats; // throw all possibilities in here // When windowed, add all formats; otherwise add only formats that match dwBPP. - if( iBPP == 16 || bWindowed ) - { - vBackBufferFormats.push_back( D3DFMT_R5G6B5 ); - vBackBufferFormats.push_back( D3DFMT_X1R5G5B5 ); - vBackBufferFormats.push_back( D3DFMT_A1R5G5B5 ); - } if( iBPP == 32 || bWindowed ) { vBackBufferFormats.push_back( D3DFMT_R8G8B8 ); vBackBufferFormats.push_back( D3DFMT_X8R8G8B8 ); vBackBufferFormats.push_back( D3DFMT_A8R8G8B8 ); } + if( iBPP == 16 || bWindowed ) + { + vBackBufferFormats.push_back( D3DFMT_R5G6B5 ); + vBackBufferFormats.push_back( D3DFMT_X1R5G5B5 ); + vBackBufferFormats.push_back( D3DFMT_A1R5G5B5 ); + } + if( !bWindowed && iBPP != 16 && iBPP != 32 ) { From 5542d66e827e5837172f1fe3dbe8b04484baba2e Mon Sep 17 00:00:00 2001 From: poly Date: Thu, 5 Mar 2015 01:29:32 -0800 Subject: [PATCH 2/2] [DX9] Use hardware vertex processing rather than software. This gives a large speed boost, so unless there is a timing issue I don't see why this shouldn't be used. --- src/RageDisplay_D3D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RageDisplay_D3D.cpp b/src/RageDisplay_D3D.cpp index 83935da881..cbfcf72e19 100644 --- a/src/RageDisplay_D3D.cpp +++ b/src/RageDisplay_D3D.cpp @@ -352,7 +352,7 @@ RString SetD3DParams( bool &bNewDeviceOut ) D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, GraphicsWindow::GetHwnd(), - D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED, + D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED, &g_d3dpp, &g_pd3dDevice ); if( FAILED(hr) )