Skip to content

Commit

Permalink
support for dxvk
Browse files Browse the repository at this point in the history
  • Loading branch information
v.vorobev committed Nov 6, 2023
1 parent e744ef4 commit 4204579
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions M2TWEOP Code/d3d9/initDX.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,28 @@ void initDX9()
// Load dll

wchar_t path[MAX_PATH];
GetSystemDirectoryW(path, MAX_PATH);
GetCurrentDirectoryW(MAX_PATH, path);
std::wstring libPath = path;
libPath += L"\\d3d9.dll";
//GetCurrentDirectoryA(MAX_PATH,path);


libPath += L"\\d3d9_vk.dll";
d3d9dll = LoadLibraryW(libPath.c_str());
if (d3d9dll == NULL)
{
MessageBoxA(NULL, "Cannot find d3d9.dll in system directory!", "ATTENTION!", NULL);
exit(0);
GetSystemDirectoryW(path, MAX_PATH);
libPath = path;
libPath += L"\\d3d9.dll";

d3d9dll = LoadLibraryW(libPath.c_str());
if (d3d9dll == NULL)
{
MessageBoxA(NULL, "Cannot find d3d9.dll in system directory!", "ATTENTION!", NULL);
exit(0);
}
}

//GetCurrentDirectoryA(MAX_PATH,path);



/*DWORD err = GetLastError();
if (err)
{
Expand Down

0 comments on commit 4204579

Please sign in to comment.