add some dx checking routines to the dx plugin + some minor stuff

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5466 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
luisr142004
2010-05-23 02:29:23 +00:00
parent 782d9111e5
commit 1648b84f08
12 changed files with 202 additions and 106 deletions

View File

@ -16,6 +16,7 @@
// http://code.google.com/p/dolphin-emu/
#include "Common.h"
#include "StringUtil.h"
#include "D3DBase.h"
#include "D3DUtil.h"
@ -187,6 +188,25 @@ const int TS[6][2] =
{D3DTSS_ALPHAARG2, D3DTA_DIFFUSE },
};
bool DXCheck( std::wstring& msg )
{
std::wstring dll =
#ifdef _DEBUG
StringFromFormat( _T("d3dx9d_%d.dll"), D3DX_SDK_VERSION);
#else
StringFromFormat( _T("d3dx9_%d.dll"), D3DX_SDK_VERSION);
#endif
HINSTANCE hDll = LoadLibrary(dll.c_str());
if( !hDll )
{
msg = _T("Please make sure that you have the latest version of DirectX 9.0c correctly installed.");
return false;
} else
msg = _T("DirectX9 is up to date and ready to be used!");
FreeLibrary( hDll );
return true;
}
static LPDIRECT3DPIXELSHADER9 ps_old = NULL;
static LPDIRECT3DVERTEXSHADER9 vs_old = NULL;