mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user