Fix my silly code ...

This commit is contained in:
Robert Krawczyk 2016-01-28 18:17:43 +01:00
parent a72a762a8c
commit ca6ccbacd3
7 changed files with 1583 additions and 1583 deletions

View file

@ -1,79 +1,79 @@
#include "stdafx.h" #include "stdafx.h"
#include "Context.h" #include "Context.h"
void MainContext::EnableAutoFix() void MainContext::EnableAutoFix()
{ {
std::string exe_name = ModuleNameA(NULL); std::string exe_name = ModuleNameA(NULL);
std::transform(exe_name.begin(), exe_name.end(), exe_name.begin(), std::tolower); std::transform(exe_name.begin(), exe_name.end(), exe_name.begin(), std::tolower);
if (exe_name == "game.exe" || exe_name == "game.dat") if (exe_name == "game.exe" || exe_name == "game.dat")
{ {
autofix = RESIDENT_EVIL_4; autofix = RESIDENT_EVIL_4;
PrintLog("AutoFix for \"Resident Evil 4\" enabled"); PrintLog("AutoFix for \"Resident Evil 4\" enabled");
} }
if (exe_name == "kb.exe") if (exe_name == "kb.exe")
{ {
autofix = KINGS_BOUNTY_LEGEND; autofix = KINGS_BOUNTY_LEGEND;
PrintLog("AutoFix for \"Kings Bounty: Legend\" enabled"); PrintLog("AutoFix for \"Kings Bounty: Legend\" enabled");
} }
if (exe_name == "ffxiiiimg.exe") if (exe_name == "ffxiiiimg.exe")
{ {
autofix = FINAL_FANTASY_XIII; autofix = FINAL_FANTASY_XIII;
PrintLog("AutoFix for \"Final Fantasy XIII\" enabled"); PrintLog("AutoFix for \"Final Fantasy XIII\" enabled");
} }
} }
const std::map<const MainContext::AutoFixes, const uint32_t> MainContext::behaviorflags_fixes = const std::map<const MainContext::AutoFixes, const uint32_t> MainContext::behaviorflags_fixes =
{ {
{ RESIDENT_EVIL_4, D3DCREATE_SOFTWARE_VERTEXPROCESSING }, { RESIDENT_EVIL_4, D3DCREATE_SOFTWARE_VERTEXPROCESSING },
{ KINGS_BOUNTY_LEGEND, D3DCREATE_MIXED_VERTEXPROCESSING }, { KINGS_BOUNTY_LEGEND, D3DCREATE_MIXED_VERTEXPROCESSING },
}; };
void MainContext::FixBehaviorFlagConflict(const DWORD flags_in, DWORD* flags_out) void MainContext::FixBehaviorFlagConflict(const DWORD flags_in, DWORD* flags_out)
{ {
if (flags_in & D3DCREATE_SOFTWARE_VERTEXPROCESSING) if (flags_in & D3DCREATE_SOFTWARE_VERTEXPROCESSING)
{ {
*flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_MIXED_VERTEXPROCESSING); *flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_MIXED_VERTEXPROCESSING);
*flags_out |= D3DCREATE_SOFTWARE_VERTEXPROCESSING; *flags_out |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
} }
else if (flags_in & D3DCREATE_MIXED_VERTEXPROCESSING) else if (flags_in & D3DCREATE_MIXED_VERTEXPROCESSING)
{ {
*flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING); *flags_out &= ~(D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING);
*flags_out |= D3DCREATE_MIXED_VERTEXPROCESSING; *flags_out |= D3DCREATE_MIXED_VERTEXPROCESSING;
} }
else if (flags_in & D3DCREATE_HARDWARE_VERTEXPROCESSING) else if (flags_in & D3DCREATE_HARDWARE_VERTEXPROCESSING)
{ {
*flags_out &= ~(D3DCREATE_MIXED_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING); *flags_out &= ~(D3DCREATE_MIXED_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING);
*flags_out |= D3DCREATE_HARDWARE_VERTEXPROCESSING; *flags_out |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
} }
} }
bool MainContext::ApplyBehaviorFlagsFix(DWORD* flags) bool MainContext::ApplyBehaviorFlagsFix(DWORD* flags)
{ {
if (AutoFixes::NONE) return false; if (autofix == AutoFixes::NONE) return false;
auto && fix = behaviorflags_fixes.find(autofix); auto && fix = behaviorflags_fixes.find(autofix);
if (fix != behaviorflags_fixes.end()) if (fix != behaviorflags_fixes.end())
{ {
FixBehaviorFlagConflict(fix->second, flags); FixBehaviorFlagConflict(fix->second, flags);
return true; return true;
} }
return false; return false;
} }
bool MainContext::ApplyVertexBufferFix(UINT& Length, DWORD& Usage, DWORD& FVF, D3DPOOL& Pool) bool MainContext::ApplyVertexBufferFix(UINT& Length, DWORD& Usage, DWORD& FVF, D3DPOOL& Pool)
{ {
if (AutoFixes::NONE) return false; if (autofix == AutoFixes::NONE) return false;
// Final Fantasy XIII // Final Fantasy XIII
if (autofix == FINAL_FANTASY_XIII) if (autofix == FINAL_FANTASY_XIII)
{ {
if (Length == 358400 && FVF == 0 && Pool == D3DPOOL_MANAGED) { Usage = D3DUSAGE_DYNAMIC; Pool = D3DPOOL_DEFAULT; } if (Length == 358400 && FVF == 0 && Pool == D3DPOOL_MANAGED) { Usage = D3DUSAGE_DYNAMIC; Pool = D3DPOOL_DEFAULT; }
return true; return true;
} }
return false; return false;
} }

View file

@ -1,303 +1,303 @@
#include "stdafx.h" #include "stdafx.h"
#include "Wrapper.h" #include "Wrapper.h"
#include "Context.h" #include "Context.h"
#include "IDirect3D9.h" #include "IDirect3D9.h"
MainContext context; MainContext context;
Config::Config() Config::Config()
{ {
std::string inifile = FullPathFromPath(inifilename); std::string inifile = FullPathFromPath(inifilename);
CSimpleIniW ini; CSimpleIniW ini;
ini.LoadFile(inifile.c_str()); ini.LoadFile(inifile.c_str());
u32 config_version = ini.GetLongValue(L"Version", L"Config"); u32 config_version = ini.GetLongValue(L"Version", L"Config");
if (config_version != CONFIG_VERSION) if (config_version != CONFIG_VERSION)
{ {
// save file and reload // save file and reload
ini.Reset(); ini.Reset();
#define SETTING(_type, _func, _var, _section, _defaultval) \ #define SETTING(_type, _func, _var, _section, _defaultval) \
ini.Set##_func(L#_section, L#_var, _defaultval) ini.Set##_func(L#_section, L#_var, _defaultval)
#include "Settings.h" #include "Settings.h"
#undef SETTING #undef SETTING
ini.SetLongValue(L"Version", L"Config", CONFIG_VERSION); ini.SetLongValue(L"Version", L"Config", CONFIG_VERSION);
ini.SaveFile(inifile.c_str()); ini.SaveFile(inifile.c_str());
ini.Reset(); ini.Reset();
ini.LoadFile(inifile.c_str()); ini.LoadFile(inifile.c_str());
} }
#define SETTING(_type, _func, _var, _section, _defaultval) \ #define SETTING(_type, _func, _var, _section, _defaultval) \
_var = ini.Get##_func(L#_section, L#_var) _var = ini.Get##_func(L#_section, L#_var)
#include "Settings.h" #include "Settings.h"
#undef SETTING #undef SETTING
} }
MainContext::MainContext() MainContext::MainContext()
{ {
LogFile("OneTweakNG.log"); LogFile("OneTweakNG.log");
if(config.GetAutoFix()) EnableAutoFix(); if(config.GetAutoFix()) EnableAutoFix();
MH_Initialize(); MH_Initialize();
MH_CreateHook(D3D9DLL::Get().Direct3DCreate9, HookDirect3DCreate9, reinterpret_cast<void**>(&TrueDirect3DCreate9)); MH_CreateHook(D3D9DLL::Get().Direct3DCreate9, HookDirect3DCreate9, reinterpret_cast<void**>(&TrueDirect3DCreate9));
MH_EnableHook(D3D9DLL::Get().Direct3DCreate9); MH_EnableHook(D3D9DLL::Get().Direct3DCreate9);
MH_CreateHook(CreateWindowExA, HookCreateWindowExA, reinterpret_cast<void**>(&TrueCreateWindowExA)); MH_CreateHook(CreateWindowExA, HookCreateWindowExA, reinterpret_cast<void**>(&TrueCreateWindowExA));
MH_EnableHook(CreateWindowExA); MH_EnableHook(CreateWindowExA);
MH_CreateHook(CreateWindowExW, HookCreateWindowExW, reinterpret_cast<void**>(&TrueCreateWindowExW)); MH_CreateHook(CreateWindowExW, HookCreateWindowExW, reinterpret_cast<void**>(&TrueCreateWindowExW));
MH_EnableHook(CreateWindowExW); MH_EnableHook(CreateWindowExW);
MH_CreateHook(SetWindowLongA, HookSetWindowLongA, reinterpret_cast<void**>(&TrueSetWindowLongA)); MH_CreateHook(SetWindowLongA, HookSetWindowLongA, reinterpret_cast<void**>(&TrueSetWindowLongA));
MH_EnableHook(SetWindowLongA); MH_EnableHook(SetWindowLongA);
MH_CreateHook(SetWindowLongW, HookSetWindowLongW, reinterpret_cast<void**>(&TrueSetWindowLongW)); MH_CreateHook(SetWindowLongW, HookSetWindowLongW, reinterpret_cast<void**>(&TrueSetWindowLongW));
MH_EnableHook(SetWindowLongW); MH_EnableHook(SetWindowLongW);
} }
MainContext::~MainContext() MainContext::~MainContext()
{ {
while (::ShowCursor(TRUE) <= 0); while (::ShowCursor(TRUE) <= 0);
} }
IDirect3D9 * WINAPI MainContext::HookDirect3DCreate9(UINT SDKVersion) IDirect3D9 * WINAPI MainContext::HookDirect3DCreate9(UINT SDKVersion)
{ {
IDirect3D9* d3d9 = context.TrueDirect3DCreate9(SDKVersion); IDirect3D9* d3d9 = context.TrueDirect3DCreate9(SDKVersion);
if (d3d9) if (d3d9)
{ {
return new hkIDirect3D9(d3d9); return new hkIDirect3D9(d3d9);
} }
return d3d9; return d3d9;
} }
bool MainContext::BehaviorFlagsToString(DWORD BehaviorFlags, std::string* BehaviorFlagsString) bool MainContext::BehaviorFlagsToString(DWORD BehaviorFlags, std::string* BehaviorFlagsString)
{ {
#define BF2STR(x) if (BehaviorFlags & x) BehaviorFlagsString->append(#x" "); #define BF2STR(x) if (BehaviorFlags & x) BehaviorFlagsString->append(#x" ");
BF2STR(D3DCREATE_ADAPTERGROUP_DEVICE); BF2STR(D3DCREATE_ADAPTERGROUP_DEVICE);
BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT); BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT);
BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX); BF2STR(D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX);
BF2STR(D3DCREATE_DISABLE_PRINTSCREEN); BF2STR(D3DCREATE_DISABLE_PRINTSCREEN);
BF2STR(D3DCREATE_DISABLE_PSGP_THREADING); BF2STR(D3DCREATE_DISABLE_PSGP_THREADING);
BF2STR(D3DCREATE_ENABLE_PRESENTSTATS); BF2STR(D3DCREATE_ENABLE_PRESENTSTATS);
BF2STR(D3DCREATE_FPU_PRESERVE); BF2STR(D3DCREATE_FPU_PRESERVE);
BF2STR(D3DCREATE_HARDWARE_VERTEXPROCESSING); BF2STR(D3DCREATE_HARDWARE_VERTEXPROCESSING);
BF2STR(D3DCREATE_MIXED_VERTEXPROCESSING); BF2STR(D3DCREATE_MIXED_VERTEXPROCESSING);
BF2STR(D3DCREATE_SOFTWARE_VERTEXPROCESSING); BF2STR(D3DCREATE_SOFTWARE_VERTEXPROCESSING);
BF2STR(D3DCREATE_MULTITHREADED); BF2STR(D3DCREATE_MULTITHREADED);
BF2STR(D3DCREATE_NOWINDOWCHANGES); BF2STR(D3DCREATE_NOWINDOWCHANGES);
BF2STR(D3DCREATE_PUREDEVICE); BF2STR(D3DCREATE_PUREDEVICE);
BF2STR(D3DCREATE_SCREENSAVER); BF2STR(D3DCREATE_SCREENSAVER);
#undef BF2STR #undef BF2STR
if (BehaviorFlagsString->back() == ' ') if (BehaviorFlagsString->back() == ' ')
BehaviorFlagsString->pop_back(); BehaviorFlagsString->pop_back();
return false; return false;
} }
bool MainContext::ApplyPresentationParameters(D3DPRESENT_PARAMETERS* pPresentationParameters) bool MainContext::ApplyPresentationParameters(D3DPRESENT_PARAMETERS* pPresentationParameters)
{ {
if (pPresentationParameters) if (pPresentationParameters)
{ {
if (config.GetTrippleBuffering()) if (config.GetTrippleBuffering())
{ {
pPresentationParameters->BackBufferCount = 3; pPresentationParameters->BackBufferCount = 3;
} }
if (config.GetMultisample() > 0) if (config.GetMultisample() > 0)
{ {
pPresentationParameters->SwapEffect = D3DSWAPEFFECT_DISCARD; pPresentationParameters->SwapEffect = D3DSWAPEFFECT_DISCARD;
pPresentationParameters->MultiSampleType = (D3DMULTISAMPLE_TYPE)config.GetMultisample(); pPresentationParameters->MultiSampleType = (D3DMULTISAMPLE_TYPE)config.GetMultisample();
pPresentationParameters->MultiSampleQuality = 0; pPresentationParameters->MultiSampleQuality = 0;
PrintLog("MultiSampleType %u, MultiSampleQuality %u", pPresentationParameters->MultiSampleType, pPresentationParameters->MultiSampleQuality); PrintLog("MultiSampleType %u, MultiSampleQuality %u", pPresentationParameters->MultiSampleType, pPresentationParameters->MultiSampleQuality);
} }
if (config.GetPresentationInterval() != -1) if (config.GetPresentationInterval() != -1)
{ {
pPresentationParameters->PresentationInterval = config.GetPresentationInterval(); pPresentationParameters->PresentationInterval = config.GetPresentationInterval();
PrintLog("PresentationInterval: PresentationInterval set to %u", pPresentationParameters->PresentationInterval); PrintLog("PresentationInterval: PresentationInterval set to %u", pPresentationParameters->PresentationInterval);
} }
if (config.GetBorderless()) if (config.GetBorderless())
{ {
SetWindowPos(pPresentationParameters->hDeviceWindow, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING); SetWindowPos(pPresentationParameters->hDeviceWindow, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING);
if (config.GetForceWindowedMode()) if (config.GetForceWindowedMode())
{ {
pPresentationParameters->SwapEffect = D3DSWAPEFFECT_FLIP; pPresentationParameters->SwapEffect = D3DSWAPEFFECT_FLIP;
pPresentationParameters->Windowed = TRUE; pPresentationParameters->Windowed = TRUE;
pPresentationParameters->FullScreen_RefreshRateInHz = 0; pPresentationParameters->FullScreen_RefreshRateInHz = 0;
} }
PrintLog("ForceWindowedMode: Windowed set to TRUE"); PrintLog("ForceWindowedMode: Windowed set to TRUE");
} }
if (config.GetHideCursor()) while (::ShowCursor(FALSE) >= 0); // ShowCursor < 0 -> hidden if (config.GetHideCursor()) while (::ShowCursor(FALSE) >= 0); // ShowCursor < 0 -> hidden
return true; return true;
} }
return false; return false;
} }
bool MainContext::CheckWindow(HWND hWnd) bool MainContext::CheckWindow(HWND hWnd)
{ {
std::unique_ptr<wchar_t[]> className(new wchar_t[MAX_PATH]); std::unique_ptr<wchar_t[]> className(new wchar_t[MAX_PATH]);
std::unique_ptr<wchar_t[]> windowName(new wchar_t[MAX_PATH]); std::unique_ptr<wchar_t[]> windowName(new wchar_t[MAX_PATH]);
GetClassNameW(hWnd, className.get(), MAX_PATH); GetClassNameW(hWnd, className.get(), MAX_PATH);
GetWindowTextW(hWnd, windowName.get(), MAX_PATH); GetWindowTextW(hWnd, windowName.get(), MAX_PATH);
PrintLog("HWND 0x%p: ClassName \"%ls\", WindowName: \"%ls\"", hWnd, className.get(), windowName.get()); PrintLog("HWND 0x%p: ClassName \"%ls\", WindowName: \"%ls\"", hWnd, className.get(), windowName.get());
bool classname = config.GetWindowClass().compare(className.get()) == 0; bool classname = config.GetWindowClass().compare(className.get()) == 0;
bool windowname = config.GetWindowName().compare(windowName.get()) == 0; bool windowname = config.GetWindowName().compare(windowName.get()) == 0;
bool always = config.GetAllWindows(); bool always = config.GetAllWindows();
return classname || windowname || always; return classname || windowname || always;
} }
void MainContext::ApplyWndProc(HWND hWnd) void MainContext::ApplyWndProc(HWND hWnd)
{ {
if (config.GetAlwaysActive()) if (config.GetAlwaysActive())
{ {
context.oldWndProc = (WNDPROC)context.TrueSetWindowLongA(hWnd, GWLP_WNDPROC, (LONG_PTR)context.WindowProc); context.oldWndProc = (WNDPROC)context.TrueSetWindowLongA(hWnd, GWLP_WNDPROC, (LONG_PTR)context.WindowProc);
} }
} }
void MainContext::ApplyBorderless(HWND hWnd) void MainContext::ApplyBorderless(HWND hWnd)
{ {
if (config.GetBorderless()) if (config.GetBorderless())
{ {
LONG_PTR dwStyle = GetWindowLongPtr(hWnd, GWL_STYLE); LONG_PTR dwStyle = GetWindowLongPtr(hWnd, GWL_STYLE);
LONG_PTR dwExStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE); LONG_PTR dwExStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
DWORD new_dwStyle = dwStyle & ~WS_OVERLAPPEDWINDOW; DWORD new_dwStyle = dwStyle & ~WS_OVERLAPPEDWINDOW;
DWORD new_dwExStyle = dwExStyle & ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST); DWORD new_dwExStyle = dwExStyle & ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
context.TrueSetWindowLongW(hWnd, GWL_STYLE, new_dwStyle); context.TrueSetWindowLongW(hWnd, GWL_STYLE, new_dwStyle);
context.TrueSetWindowLongW(hWnd, GWL_EXSTYLE, new_dwExStyle); context.TrueSetWindowLongW(hWnd, GWL_EXSTYLE, new_dwExStyle);
int cx = GetSystemMetrics(SM_CXSCREEN); int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN); int cy = GetSystemMetrics(SM_CYSCREEN);
SetWindowPos(hWnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSENDCHANGING); SetWindowPos(hWnd, HWND_TOP, 0, 0, cx, cy, SWP_SHOWWINDOW | SWP_NOCOPYBITS | SWP_NOSENDCHANGING);
PrintLog("HWND 0x%p: Borderless dwStyle: %lX->%lX", hWnd, dwStyle, new_dwStyle); PrintLog("HWND 0x%p: Borderless dwStyle: %lX->%lX", hWnd, dwStyle, new_dwStyle);
PrintLog("HWND 0x%p: Borderless dwExStyle: %lX->%lX", hWnd, dwExStyle, new_dwExStyle); PrintLog("HWND 0x%p: Borderless dwExStyle: %lX->%lX", hWnd, dwExStyle, new_dwExStyle);
MessageBeep(MB_ICONASTERISK); MessageBeep(MB_ICONASTERISK);
} }
} }
LRESULT CALLBACK MainContext::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK MainContext::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
switch (uMsg) switch (uMsg)
{ {
case WM_ACTIVATE: case WM_ACTIVATE:
switch (LOWORD(wParam)) switch (LOWORD(wParam))
{ {
case WA_ACTIVE: case WA_ACTIVE:
case WA_CLICKACTIVE: case WA_CLICKACTIVE:
while (::ShowCursor(FALSE) >= 0); while (::ShowCursor(FALSE) >= 0);
break; break;
case WA_INACTIVE: case WA_INACTIVE:
if (context.config.GetAlwaysActive()) if (context.config.GetAlwaysActive())
return TRUE; return TRUE;
while (::ShowCursor(TRUE) < 0); while (::ShowCursor(TRUE) < 0);
break; break;
} }
case WM_ACTIVATEAPP: case WM_ACTIVATEAPP:
if (context.config.GetAlwaysActive()) if (context.config.GetAlwaysActive())
return TRUE; return TRUE;
} }
return CallWindowProc(context.oldWndProc, hWnd, uMsg, wParam, lParam); return CallWindowProc(context.oldWndProc, hWnd, uMsg, wParam, lParam);
} }
LONG WINAPI MainContext::HookSetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong) LONG WINAPI MainContext::HookSetWindowLongA(HWND hWnd, int nIndex, LONG dwNewLong)
{ {
if (context.config.GetBorderless()) if (context.config.GetBorderless())
{ {
DWORD olddwNewLong = dwNewLong; DWORD olddwNewLong = dwNewLong;
if (nIndex == GWL_STYLE) if (nIndex == GWL_STYLE)
{ {
dwNewLong &= ~WS_OVERLAPPEDWINDOW; dwNewLong &= ~WS_OVERLAPPEDWINDOW;
PrintLog("SetWindowLongA dwStyle: %lX->%lX", olddwNewLong, dwNewLong); PrintLog("SetWindowLongA dwStyle: %lX->%lX", olddwNewLong, dwNewLong);
} }
if (nIndex == GWL_EXSTYLE) if (nIndex == GWL_EXSTYLE)
{ {
dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST); dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
PrintLog("SetWindowLongA dwExStyle: %lX->%lX", olddwNewLong, dwNewLong); PrintLog("SetWindowLongA dwExStyle: %lX->%lX", olddwNewLong, dwNewLong);
} }
} }
return context.TrueSetWindowLongA(hWnd, nIndex, dwNewLong); return context.TrueSetWindowLongA(hWnd, nIndex, dwNewLong);
} }
LONG WINAPI MainContext::HookSetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong) LONG WINAPI MainContext::HookSetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong)
{ {
if (context.config.GetBorderless()) if (context.config.GetBorderless())
{ {
DWORD olddwNewLong = dwNewLong; DWORD olddwNewLong = dwNewLong;
if (nIndex == GWL_STYLE) if (nIndex == GWL_STYLE)
{ {
dwNewLong &= ~WS_OVERLAPPEDWINDOW; dwNewLong &= ~WS_OVERLAPPEDWINDOW;
PrintLog("SetWindowLongW dwStyle: %lX->%lX", olddwNewLong, dwNewLong); PrintLog("SetWindowLongW dwStyle: %lX->%lX", olddwNewLong, dwNewLong);
} }
if (nIndex == GWL_EXSTYLE) if (nIndex == GWL_EXSTYLE)
{ {
dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST); dwNewLong &= ~(WS_EX_OVERLAPPEDWINDOW | WS_EX_TOPMOST);
PrintLog("SetWindowLongW dwExStyle: %lX->%lX", olddwNewLong, dwNewLong); PrintLog("SetWindowLongW dwExStyle: %lX->%lX", olddwNewLong, dwNewLong);
} }
} }
return context.TrueSetWindowLongW(hWnd, nIndex, dwNewLong); return context.TrueSetWindowLongW(hWnd, nIndex, dwNewLong);
} }
HWND WINAPI MainContext::HookCreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam) HWND WINAPI MainContext::HookCreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{ {
HWND hWnd = context.TrueCreateWindowExA(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); HWND hWnd = context.TrueCreateWindowExA(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
if (!hWnd) if (!hWnd)
{ {
PrintLog("CreateWindowExA failed"); PrintLog("CreateWindowExA failed");
return hWnd; return hWnd;
} }
if (context.CheckWindow(hWnd)) if (context.CheckWindow(hWnd))
{ {
context.ApplyWndProc(hWnd); context.ApplyWndProc(hWnd);
context.ApplyBorderless(hWnd); context.ApplyBorderless(hWnd);
} }
return hWnd; return hWnd;
} }
HWND WINAPI MainContext::HookCreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam) HWND WINAPI MainContext::HookCreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{ {
HWND hWnd = context.TrueCreateWindowExW(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); HWND hWnd = context.TrueCreateWindowExW(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
if (!hWnd) if (!hWnd)
{ {
PrintLog("CreateWindowExW failed"); PrintLog("CreateWindowExW failed");
return hWnd; return hWnd;
} }
if (context.CheckWindow(hWnd)) if (context.CheckWindow(hWnd))
{ {
context.ApplyWndProc(hWnd); context.ApplyWndProc(hWnd);
context.ApplyBorderless(hWnd); context.ApplyBorderless(hWnd);
} }
return hWnd; return hWnd;
} }

View file

@ -1,148 +1,148 @@
// wrapper for IDirect3D9 in d3d9.h // wrapper for IDirect3D9 in d3d9.h
// generated using wrapper_gen.rb // generated using wrapper_gen.rb
#include "stdafx.h" #include "stdafx.h"
#include "Context.h" #include "Context.h"
#include "IDirect3D9.h" #include "IDirect3D9.h"
#include "IDirect3DDevice9.h" #include "IDirect3DDevice9.h"
#define IDirect3D9_PrintLog(format, ...) //PrintLog(format, __VA_ARGS__); #define IDirect3D9_PrintLog(format, ...) //PrintLog(format, __VA_ARGS__);
hkIDirect3D9::hkIDirect3D9(IDirect3D9 *pIDirect3D9) { hkIDirect3D9::hkIDirect3D9(IDirect3D9 *pIDirect3D9) {
PrintLog(__FUNCTION__); PrintLog(__FUNCTION__);
m_pWrapped = pIDirect3D9; m_pWrapped = pIDirect3D9;
} }
hkIDirect3D9::~hkIDirect3D9() hkIDirect3D9::~hkIDirect3D9()
{ {
PrintLog(__FUNCTION__); PrintLog(__FUNCTION__);
} }
HRESULT APIENTRY hkIDirect3D9::QueryInterface(REFIID riid, void** ppvObj) { HRESULT APIENTRY hkIDirect3D9::QueryInterface(REFIID riid, void** ppvObj) {
PrintLog(__FUNCTION__); PrintLog(__FUNCTION__);
return m_pWrapped->QueryInterface(riid, ppvObj); return m_pWrapped->QueryInterface(riid, ppvObj);
} }
ULONG APIENTRY hkIDirect3D9::AddRef() { ULONG APIENTRY hkIDirect3D9::AddRef() {
PrintLog(__FUNCTION__); PrintLog(__FUNCTION__);
return m_pWrapped->AddRef(); return m_pWrapped->AddRef();
} }
ULONG APIENTRY hkIDirect3D9::Release() { ULONG APIENTRY hkIDirect3D9::Release() {
ULONG ref_count = m_pWrapped->Release(); ULONG ref_count = m_pWrapped->Release();
PrintLog(__FUNCTION__ " return = %lu", ref_count); PrintLog(__FUNCTION__ " return = %lu", ref_count);
if (ref_count == 0) delete this; if (ref_count == 0) delete this;
return ref_count; return ref_count;
} }
HRESULT APIENTRY hkIDirect3D9::RegisterSoftwareDevice(void* pInitializeFunction) { HRESULT APIENTRY hkIDirect3D9::RegisterSoftwareDevice(void* pInitializeFunction) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->RegisterSoftwareDevice(pInitializeFunction); return m_pWrapped->RegisterSoftwareDevice(pInitializeFunction);
} }
UINT APIENTRY hkIDirect3D9::GetAdapterCount() { UINT APIENTRY hkIDirect3D9::GetAdapterCount() {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterCount(); return m_pWrapped->GetAdapterCount();
} }
HRESULT APIENTRY hkIDirect3D9::GetAdapterIdentifier(UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) { HRESULT APIENTRY hkIDirect3D9::GetAdapterIdentifier(UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) {
PrintLog(__FUNCTION__); PrintLog(__FUNCTION__);
HRESULT rt = m_pWrapped->GetAdapterIdentifier(Adapter, Flags, pIdentifier); HRESULT rt = m_pWrapped->GetAdapterIdentifier(Adapter, Flags, pIdentifier);
if (context.config.GetAdapter() && SUCCEEDED(rt) && pIdentifier) if (context.config.GetAdapter() && SUCCEEDED(rt) && pIdentifier)
{ {
pIdentifier->VendorId = context.config.GetVendorId(); pIdentifier->VendorId = context.config.GetVendorId();
pIdentifier->DeviceId = context.config.GetDeviceId(); pIdentifier->DeviceId = context.config.GetDeviceId();
} }
return rt; return rt;
} }
UINT APIENTRY hkIDirect3D9::GetAdapterModeCount(UINT Adapter, D3DFORMAT Format) { UINT APIENTRY hkIDirect3D9::GetAdapterModeCount(UINT Adapter, D3DFORMAT Format) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterModeCount(Adapter, Format); return m_pWrapped->GetAdapterModeCount(Adapter, Format);
} }
HRESULT APIENTRY hkIDirect3D9::EnumAdapterModes(UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) { HRESULT APIENTRY hkIDirect3D9::EnumAdapterModes(UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->EnumAdapterModes(Adapter, Format, Mode, pMode); return m_pWrapped->EnumAdapterModes(Adapter, Format, Mode, pMode);
} }
HRESULT APIENTRY hkIDirect3D9::GetAdapterDisplayMode(UINT Adapter, D3DDISPLAYMODE* pMode) { HRESULT APIENTRY hkIDirect3D9::GetAdapterDisplayMode(UINT Adapter, D3DDISPLAYMODE* pMode) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterDisplayMode(Adapter, pMode); return m_pWrapped->GetAdapterDisplayMode(Adapter, pMode);
} }
HRESULT APIENTRY hkIDirect3D9::CheckDeviceType(UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed) { HRESULT APIENTRY hkIDirect3D9::CheckDeviceType(UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
if (context.config.GetForceWindowedMode()) bWindowed = TRUE; if (context.config.GetForceWindowedMode()) bWindowed = TRUE;
return m_pWrapped->CheckDeviceType(Adapter, DevType, AdapterFormat, BackBufferFormat, bWindowed); return m_pWrapped->CheckDeviceType(Adapter, DevType, AdapterFormat, BackBufferFormat, bWindowed);
} }
HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormat(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) { HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormat(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceFormat(Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat); return m_pWrapped->CheckDeviceFormat(Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat);
} }
HRESULT APIENTRY hkIDirect3D9::CheckDeviceMultiSampleType(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) { HRESULT APIENTRY hkIDirect3D9::CheckDeviceMultiSampleType(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceMultiSampleType(Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels); return m_pWrapped->CheckDeviceMultiSampleType(Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels);
} }
HRESULT APIENTRY hkIDirect3D9::CheckDepthStencilMatch(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) { HRESULT APIENTRY hkIDirect3D9::CheckDepthStencilMatch(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDepthStencilMatch(Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat); return m_pWrapped->CheckDepthStencilMatch(Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat);
} }
HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormatConversion(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) { HRESULT APIENTRY hkIDirect3D9::CheckDeviceFormatConversion(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->CheckDeviceFormatConversion(Adapter, DeviceType, SourceFormat, TargetFormat); return m_pWrapped->CheckDeviceFormatConversion(Adapter, DeviceType, SourceFormat, TargetFormat);
} }
HRESULT APIENTRY hkIDirect3D9::GetDeviceCaps(UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) { HRESULT APIENTRY hkIDirect3D9::GetDeviceCaps(UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetDeviceCaps(Adapter, DeviceType, pCaps); return m_pWrapped->GetDeviceCaps(Adapter, DeviceType, pCaps);
} }
HMONITOR APIENTRY hkIDirect3D9::GetAdapterMonitor(UINT Adapter) { HMONITOR APIENTRY hkIDirect3D9::GetAdapterMonitor(UINT Adapter) {
IDirect3D9_PrintLog(__FUNCTION__); IDirect3D9_PrintLog(__FUNCTION__);
return m_pWrapped->GetAdapterMonitor(Adapter); return m_pWrapped->GetAdapterMonitor(Adapter);
} }
HRESULT APIENTRY hkIDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface) { HRESULT APIENTRY hkIDirect3D9::CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface) {
PrintLog(__FUNCTION__); PrintLog(__FUNCTION__);
DWORD OriginalBehaviorFlags = BehaviorFlags; DWORD OriginalBehaviorFlags = BehaviorFlags;
std::string BehaviorFlagsString; std::string BehaviorFlagsString;
context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString); context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString);
PrintLog("BehaviorFlags: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str()); PrintLog("BehaviorFlags: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str());
if (context.config.GetBehaviorFlags() > 0) if (context.config.GetBehaviorFlags() > 0)
{ {
BehaviorFlags = context.config.GetBehaviorFlags(); BehaviorFlags = context.config.GetBehaviorFlags();
PrintLog("Advanced Mode: BehaviorFlags set"); PrintLog("Advanced Mode: BehaviorFlags set");
} }
else else
{ {
context.ApplyBehaviorFlagsFix(&BehaviorFlags); context.ApplyBehaviorFlagsFix(&BehaviorFlags);
} }
if (hFocusWindow == NULL) hFocusWindow = pPresentationParameters->hDeviceWindow; if (hFocusWindow == NULL) hFocusWindow = pPresentationParameters->hDeviceWindow;
context.ApplyPresentationParameters(pPresentationParameters); context.ApplyPresentationParameters(pPresentationParameters);
HRESULT hr = m_pWrapped->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface); HRESULT hr = m_pWrapped->CreateDevice(Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface);
if (SUCCEEDED(hr) && ppReturnedDeviceInterface && *ppReturnedDeviceInterface) if (SUCCEEDED(hr) && ppReturnedDeviceInterface && *ppReturnedDeviceInterface)
{ {
hkIDirect3DDevice9* pIDirect3DDevice9 = new hkIDirect3DDevice9(*ppReturnedDeviceInterface); hkIDirect3DDevice9* pIDirect3DDevice9 = new hkIDirect3DDevice9(*ppReturnedDeviceInterface);
*ppReturnedDeviceInterface = pIDirect3DDevice9; *ppReturnedDeviceInterface = pIDirect3DDevice9;
} }
if (OriginalBehaviorFlags != BehaviorFlags) if (OriginalBehaviorFlags != BehaviorFlags)
{ {
std::string BehaviorFlagsString; std::string BehaviorFlagsString;
context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString); context.BehaviorFlagsToString(BehaviorFlags, &BehaviorFlagsString);
PrintLog("BehaviorFlags changed: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str()); PrintLog("BehaviorFlags changed: %08X %s", BehaviorFlags, BehaviorFlagsString.c_str());
} }
return hr; return hr;
} }

File diff suppressed because it is too large Load diff

View file

@ -1,135 +1,135 @@
// wrapper for IDirect3DDevice9 in d3d9.h // wrapper for IDirect3DDevice9 in d3d9.h
// generated using wrapper_gen.rb // generated using wrapper_gen.rb
#pragma once #pragma once
#include "d3d9.h" #include "d3d9.h"
interface hkIDirect3DDevice9 : public IDirect3DDevice9 { interface hkIDirect3DDevice9 : public IDirect3DDevice9 {
IDirect3DDevice9* m_pWrapped; IDirect3DDevice9* m_pWrapped;
public: public:
hkIDirect3DDevice9(IDirect3DDevice9 *pIDirect3DDevice9); hkIDirect3DDevice9(IDirect3DDevice9 *pIDirect3DDevice9);
~hkIDirect3DDevice9(); ~hkIDirect3DDevice9();
// original interface // original interface
STDMETHOD(QueryInterface)(REFIID riid, void** ppvObj); STDMETHOD(QueryInterface)(REFIID riid, void** ppvObj);
STDMETHOD_(ULONG, AddRef)(); STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)(); STDMETHOD_(ULONG, Release)();
STDMETHOD(TestCooperativeLevel)(); STDMETHOD(TestCooperativeLevel)();
STDMETHOD_(UINT, GetAvailableTextureMem)(); STDMETHOD_(UINT, GetAvailableTextureMem)();
STDMETHOD(EvictManagedResources)(); STDMETHOD(EvictManagedResources)();
STDMETHOD(GetDirect3D)(IDirect3D9** ppD3D9); STDMETHOD(GetDirect3D)(IDirect3D9** ppD3D9);
STDMETHOD(GetDeviceCaps)(D3DCAPS9* pCaps); STDMETHOD(GetDeviceCaps)(D3DCAPS9* pCaps);
STDMETHOD(GetDisplayMode)(UINT iSwapChain, D3DDISPLAYMODE* pMode); STDMETHOD(GetDisplayMode)(UINT iSwapChain, D3DDISPLAYMODE* pMode);
STDMETHOD(GetCreationParameters)(D3DDEVICE_CREATION_PARAMETERS *pParameters); STDMETHOD(GetCreationParameters)(D3DDEVICE_CREATION_PARAMETERS *pParameters);
STDMETHOD(SetCursorProperties)(UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap); STDMETHOD(SetCursorProperties)(UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap);
STDMETHOD_(void, SetCursorPosition)(int X, int Y, DWORD Flags); STDMETHOD_(void, SetCursorPosition)(int X, int Y, DWORD Flags);
STDMETHOD_(BOOL, ShowCursor)(BOOL bShow); STDMETHOD_(BOOL, ShowCursor)(BOOL bShow);
STDMETHOD(CreateAdditionalSwapChain)(D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain); STDMETHOD(CreateAdditionalSwapChain)(D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain);
STDMETHOD(GetSwapChain)(UINT iSwapChain, IDirect3DSwapChain9** pSwapChain); STDMETHOD(GetSwapChain)(UINT iSwapChain, IDirect3DSwapChain9** pSwapChain);
STDMETHOD_(UINT, GetNumberOfSwapChains)(); STDMETHOD_(UINT, GetNumberOfSwapChains)();
STDMETHOD(Reset)(D3DPRESENT_PARAMETERS* pPresentationParameters); STDMETHOD(Reset)(D3DPRESENT_PARAMETERS* pPresentationParameters);
STDMETHOD(Present)(CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion); STDMETHOD(Present)(CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion);
STDMETHOD(GetBackBuffer)(UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer); STDMETHOD(GetBackBuffer)(UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer);
STDMETHOD(GetRasterStatus)(UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus); STDMETHOD(GetRasterStatus)(UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus);
STDMETHOD(SetDialogBoxMode)(BOOL bEnableDialogs); STDMETHOD(SetDialogBoxMode)(BOOL bEnableDialogs);
STDMETHOD_(void, SetGammaRamp)(UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp); STDMETHOD_(void, SetGammaRamp)(UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp);
STDMETHOD_(void, GetGammaRamp)(UINT iSwapChain, D3DGAMMARAMP* pRamp); STDMETHOD_(void, GetGammaRamp)(UINT iSwapChain, D3DGAMMARAMP* pRamp);
STDMETHOD(CreateTexture)(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle); STDMETHOD(CreateTexture)(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateVolumeTexture)(UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle); STDMETHOD(CreateVolumeTexture)(UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateCubeTexture)(UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle); STDMETHOD(CreateCubeTexture)(UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle);
STDMETHOD(CreateVertexBuffer)(UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle); STDMETHOD(CreateVertexBuffer)(UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle);
STDMETHOD(CreateIndexBuffer)(UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle); STDMETHOD(CreateIndexBuffer)(UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle);
STDMETHOD(CreateRenderTarget)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); STDMETHOD(CreateRenderTarget)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(CreateDepthStencilSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); STDMETHOD(CreateDepthStencilSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(UpdateSurface)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint); STDMETHOD(UpdateSurface)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint);
STDMETHOD(UpdateTexture)(IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture); STDMETHOD(UpdateTexture)(IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture);
STDMETHOD(GetRenderTargetData)(IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface); STDMETHOD(GetRenderTargetData)(IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface);
STDMETHOD(GetFrontBufferData)(UINT iSwapChain, IDirect3DSurface9* pDestSurface); STDMETHOD(GetFrontBufferData)(UINT iSwapChain, IDirect3DSurface9* pDestSurface);
STDMETHOD(StretchRect)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter); STDMETHOD(StretchRect)(IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter);
STDMETHOD(ColorFill)(IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color); STDMETHOD(ColorFill)(IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color);
STDMETHOD(CreateOffscreenPlainSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); STDMETHOD(CreateOffscreenPlainSurface)(UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle);
STDMETHOD(SetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget); STDMETHOD(SetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget);
STDMETHOD(GetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget); STDMETHOD(GetRenderTarget)(DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget);
STDMETHOD(SetDepthStencilSurface)(IDirect3DSurface9* pNewZStencil); STDMETHOD(SetDepthStencilSurface)(IDirect3DSurface9* pNewZStencil);
STDMETHOD(GetDepthStencilSurface)(IDirect3DSurface9** ppZStencilSurface); STDMETHOD(GetDepthStencilSurface)(IDirect3DSurface9** ppZStencilSurface);
STDMETHOD(BeginScene)(); STDMETHOD(BeginScene)();
STDMETHOD(EndScene)(); STDMETHOD(EndScene)();
STDMETHOD(Clear)(DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil); STDMETHOD(Clear)(DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil);
STDMETHOD(SetTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix); STDMETHOD(SetTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
STDMETHOD(GetTransform)(D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix); STDMETHOD(GetTransform)(D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix);
STDMETHOD(MultiplyTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix); STDMETHOD(MultiplyTransform)(D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
STDMETHOD(SetViewport)(CONST D3DVIEWPORT9* pViewport); STDMETHOD(SetViewport)(CONST D3DVIEWPORT9* pViewport);
STDMETHOD(GetViewport)(D3DVIEWPORT9* pViewport); STDMETHOD(GetViewport)(D3DVIEWPORT9* pViewport);
STDMETHOD(SetMaterial)(CONST D3DMATERIAL9* pMaterial); STDMETHOD(SetMaterial)(CONST D3DMATERIAL9* pMaterial);
STDMETHOD(GetMaterial)(D3DMATERIAL9* pMaterial); STDMETHOD(GetMaterial)(D3DMATERIAL9* pMaterial);
STDMETHOD(SetLight)(DWORD Index, CONST D3DLIGHT9* pLight); STDMETHOD(SetLight)(DWORD Index, CONST D3DLIGHT9* pLight);
STDMETHOD(GetLight)(DWORD Index, D3DLIGHT9* pLight); STDMETHOD(GetLight)(DWORD Index, D3DLIGHT9* pLight);
STDMETHOD(LightEnable)(DWORD Index, BOOL Enable); STDMETHOD(LightEnable)(DWORD Index, BOOL Enable);
STDMETHOD(GetLightEnable)(DWORD Index, BOOL* pEnable); STDMETHOD(GetLightEnable)(DWORD Index, BOOL* pEnable);
STDMETHOD(SetClipPlane)(DWORD Index, CONST float* pPlane); STDMETHOD(SetClipPlane)(DWORD Index, CONST float* pPlane);
STDMETHOD(GetClipPlane)(DWORD Index, float* pPlane); STDMETHOD(GetClipPlane)(DWORD Index, float* pPlane);
STDMETHOD(SetRenderState)(D3DRENDERSTATETYPE State, DWORD Value); STDMETHOD(SetRenderState)(D3DRENDERSTATETYPE State, DWORD Value);
STDMETHOD(GetRenderState)(D3DRENDERSTATETYPE State, DWORD* pValue); STDMETHOD(GetRenderState)(D3DRENDERSTATETYPE State, DWORD* pValue);
STDMETHOD(CreateStateBlock)(D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB); STDMETHOD(CreateStateBlock)(D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB);
STDMETHOD(BeginStateBlock)(); STDMETHOD(BeginStateBlock)();
STDMETHOD(EndStateBlock)(IDirect3DStateBlock9** ppSB); STDMETHOD(EndStateBlock)(IDirect3DStateBlock9** ppSB);
STDMETHOD(SetClipStatus)(CONST D3DCLIPSTATUS9* pClipStatus); STDMETHOD(SetClipStatus)(CONST D3DCLIPSTATUS9* pClipStatus);
STDMETHOD(GetClipStatus)(D3DCLIPSTATUS9* pClipStatus); STDMETHOD(GetClipStatus)(D3DCLIPSTATUS9* pClipStatus);
STDMETHOD(GetTexture)(DWORD Stage, IDirect3DBaseTexture9** ppTexture); STDMETHOD(GetTexture)(DWORD Stage, IDirect3DBaseTexture9** ppTexture);
STDMETHOD(SetTexture)(DWORD Stage, IDirect3DBaseTexture9* pTexture); STDMETHOD(SetTexture)(DWORD Stage, IDirect3DBaseTexture9* pTexture);
STDMETHOD(GetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue); STDMETHOD(GetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue);
STDMETHOD(SetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value); STDMETHOD(SetTextureStageState)(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value);
STDMETHOD(GetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue); STDMETHOD(GetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue);
STDMETHOD(SetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value); STDMETHOD(SetSamplerState)(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value);
STDMETHOD(ValidateDevice)(DWORD* pNumPasses); STDMETHOD(ValidateDevice)(DWORD* pNumPasses);
STDMETHOD(SetPaletteEntries)(UINT PaletteNumber, CONST PALETTEENTRY* pEntries); STDMETHOD(SetPaletteEntries)(UINT PaletteNumber, CONST PALETTEENTRY* pEntries);
STDMETHOD(GetPaletteEntries)(UINT PaletteNumber, PALETTEENTRY* pEntries); STDMETHOD(GetPaletteEntries)(UINT PaletteNumber, PALETTEENTRY* pEntries);
STDMETHOD(SetCurrentTexturePalette)(UINT PaletteNumber); STDMETHOD(SetCurrentTexturePalette)(UINT PaletteNumber);
STDMETHOD(GetCurrentTexturePalette)(UINT *PaletteNumber); STDMETHOD(GetCurrentTexturePalette)(UINT *PaletteNumber);
STDMETHOD(SetScissorRect)(CONST RECT* pRect); STDMETHOD(SetScissorRect)(CONST RECT* pRect);
STDMETHOD(GetScissorRect)(RECT* pRect); STDMETHOD(GetScissorRect)(RECT* pRect);
STDMETHOD(SetSoftwareVertexProcessing)(BOOL bSoftware); STDMETHOD(SetSoftwareVertexProcessing)(BOOL bSoftware);
STDMETHOD_(BOOL, GetSoftwareVertexProcessing)(); STDMETHOD_(BOOL, GetSoftwareVertexProcessing)();
STDMETHOD(SetNPatchMode)(float nSegments); STDMETHOD(SetNPatchMode)(float nSegments);
STDMETHOD_(float, GetNPatchMode)(); STDMETHOD_(float, GetNPatchMode)();
STDMETHOD(DrawPrimitive)(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount); STDMETHOD(DrawPrimitive)(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount);
STDMETHOD(DrawIndexedPrimitive)(D3DPRIMITIVETYPE, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount); STDMETHOD(DrawIndexedPrimitive)(D3DPRIMITIVETYPE, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount);
STDMETHOD(DrawPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride); STDMETHOD(DrawPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
STDMETHOD(DrawIndexedPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride); STDMETHOD(DrawIndexedPrimitiveUP)(D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
STDMETHOD(ProcessVertices)(UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags); STDMETHOD(ProcessVertices)(UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags);
STDMETHOD(CreateVertexDeclaration)(CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl); STDMETHOD(CreateVertexDeclaration)(CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl);
STDMETHOD(SetVertexDeclaration)(IDirect3DVertexDeclaration9* pDecl); STDMETHOD(SetVertexDeclaration)(IDirect3DVertexDeclaration9* pDecl);
STDMETHOD(GetVertexDeclaration)(IDirect3DVertexDeclaration9** ppDecl); STDMETHOD(GetVertexDeclaration)(IDirect3DVertexDeclaration9** ppDecl);
STDMETHOD(SetFVF)(DWORD FVF); STDMETHOD(SetFVF)(DWORD FVF);
STDMETHOD(GetFVF)(DWORD* pFVF); STDMETHOD(GetFVF)(DWORD* pFVF);
STDMETHOD(CreateVertexShader)(CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader); STDMETHOD(CreateVertexShader)(CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader);
STDMETHOD(SetVertexShader)(IDirect3DVertexShader9* pShader); STDMETHOD(SetVertexShader)(IDirect3DVertexShader9* pShader);
STDMETHOD(GetVertexShader)(IDirect3DVertexShader9** ppShader); STDMETHOD(GetVertexShader)(IDirect3DVertexShader9** ppShader);
STDMETHOD(SetVertexShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount); STDMETHOD(SetVertexShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
STDMETHOD(GetVertexShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount); STDMETHOD(GetVertexShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount);
STDMETHOD(SetVertexShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount); STDMETHOD(SetVertexShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
STDMETHOD(GetVertexShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount); STDMETHOD(GetVertexShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount);
STDMETHOD(SetVertexShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount); STDMETHOD(SetVertexShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
STDMETHOD(GetVertexShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount); STDMETHOD(GetVertexShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
STDMETHOD(SetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride); STDMETHOD(SetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride);
STDMETHOD(GetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride); STDMETHOD(GetStreamSource)(UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride);
STDMETHOD(SetStreamSourceFreq)(UINT StreamNumber, UINT Setting); STDMETHOD(SetStreamSourceFreq)(UINT StreamNumber, UINT Setting);
STDMETHOD(GetStreamSourceFreq)(UINT StreamNumber, UINT* pSetting); STDMETHOD(GetStreamSourceFreq)(UINT StreamNumber, UINT* pSetting);
STDMETHOD(SetIndices)(IDirect3DIndexBuffer9* pIndexData); STDMETHOD(SetIndices)(IDirect3DIndexBuffer9* pIndexData);
STDMETHOD(GetIndices)(IDirect3DIndexBuffer9** ppIndexData); STDMETHOD(GetIndices)(IDirect3DIndexBuffer9** ppIndexData);
STDMETHOD(CreatePixelShader)(CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader); STDMETHOD(CreatePixelShader)(CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader);
STDMETHOD(SetPixelShader)(IDirect3DPixelShader9* pShader); STDMETHOD(SetPixelShader)(IDirect3DPixelShader9* pShader);
STDMETHOD(GetPixelShader)(IDirect3DPixelShader9** ppShader); STDMETHOD(GetPixelShader)(IDirect3DPixelShader9** ppShader);
STDMETHOD(SetPixelShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount); STDMETHOD(SetPixelShaderConstantF)(UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
STDMETHOD(GetPixelShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount); STDMETHOD(GetPixelShaderConstantF)(UINT StartRegister, float* pConstantData, UINT Vector4fCount);
STDMETHOD(SetPixelShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount); STDMETHOD(SetPixelShaderConstantI)(UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
STDMETHOD(GetPixelShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount); STDMETHOD(GetPixelShaderConstantI)(UINT StartRegister, int* pConstantData, UINT Vector4iCount);
STDMETHOD(SetPixelShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount); STDMETHOD(SetPixelShaderConstantB)(UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
STDMETHOD(GetPixelShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount); STDMETHOD(GetPixelShaderConstantB)(UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
STDMETHOD(DrawRectPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo); STDMETHOD(DrawRectPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo);
STDMETHOD(DrawTriPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo); STDMETHOD(DrawTriPatch)(UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo);
STDMETHOD(DeletePatch)(UINT Handle); STDMETHOD(DeletePatch)(UINT Handle);
STDMETHOD(CreateQuery)(D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery); STDMETHOD(CreateQuery)(D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery);
}; };

View file

@ -1,209 +1,209 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{6C397640-B1A0-4DEF-8657-0EB21DC2FEA5}</ProjectGuid> <ProjectGuid>{6C397640-B1A0-4DEF-8657-0EB21DC2FEA5}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>d3d9ex</RootNamespace> <RootNamespace>d3d9ex</RootNamespace>
<ProjectName>OneTweakNG</ProjectName> <ProjectName>OneTweakNG</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<InterproceduralOptimization>true</InterproceduralOptimization> <InterproceduralOptimization>true</InterproceduralOptimization>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<InterproceduralOptimization>true</InterproceduralOptimization> <InterproceduralOptimization>true</InterproceduralOptimization>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<TargetName>d3d9</TargetName> <TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath> <IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<TargetName>d3d9</TargetName> <TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath> <IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<TargetName>dinput8</TargetName> <TargetName>dinput8</TargetName>
<IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath> <IncludePath>$(SolutionDir)\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<TargetName>d3d9</TargetName> <TargetName>d3d9</TargetName>
<IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath> <IncludePath>$(SolutionDir)\Common\Common;$(SolutionDir)\MinHook\include;$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile> <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile> <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile> <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;D3D9EX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile> <ModuleDefinitionFile>exports.def</ModuleDefinitionFile>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<Text Include="ReadMe.txt" /> <Text Include="ReadMe.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Context.h" /> <ClInclude Include="Context.h" />
<ClInclude Include="Wrapper.h" /> <ClInclude Include="Wrapper.h" />
<ClInclude Include="IDirect3D9.h" /> <ClInclude Include="IDirect3D9.h" />
<ClInclude Include="IDirect3DDevice9.h" /> <ClInclude Include="IDirect3DDevice9.h" />
<ClInclude Include="Settings.h" /> <ClInclude Include="Settings.h" />
<ClInclude Include="stdafx.h" /> <ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" /> <ClInclude Include="targetver.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="AutoFix.cpp" /> <ClCompile Include="AutoFix.cpp" />
<ClCompile Include="Context.cpp" /> <ClCompile Include="Context.cpp" />
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader> </PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader> </PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader> </PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="IDirect3D9.cpp" /> <ClCompile Include="IDirect3D9.cpp" />
<ClCompile Include="IDirect3DDevice9.cpp" /> <ClCompile Include="IDirect3DDevice9.cpp" />
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="exports.def" /> <None Include="exports.def" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\MinHook\build\VC12\libMinHook.vcxproj"> <ProjectReference Include="..\MinHook\build\VC12\libMinHook.vcxproj">
<Project>{f142a341-5ee0-442d-a15f-98ae9b48dbae}</Project> <Project>{f142a341-5ee0-442d-a15f-98ae9b48dbae}</Project>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View file

@ -1,68 +1,68 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<Filter Include="Source Files"> <Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter> </Filter>
<Filter Include="Header Files"> <Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter> </Filter>
<Filter Include="Resource Files"> <Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Text Include="ReadMe.txt" /> <Text Include="ReadMe.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="stdafx.h"> <ClInclude Include="stdafx.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="targetver.h"> <ClInclude Include="targetver.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="IDirect3D9.h"> <ClInclude Include="IDirect3D9.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="IDirect3DDevice9.h"> <ClInclude Include="IDirect3DDevice9.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Context.h"> <ClInclude Include="Context.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Settings.h"> <ClInclude Include="Settings.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Wrapper.h"> <ClInclude Include="Wrapper.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="IDirect3D9.cpp"> <ClCompile Include="IDirect3D9.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="IDirect3DDevice9.cpp"> <ClCompile Include="IDirect3DDevice9.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="AutoFix.cpp"> <ClCompile Include="AutoFix.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Context.cpp"> <ClCompile Include="Context.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="exports.def"> <None Include="exports.def">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</None> </None>
</ItemGroup> </ItemGroup>
</Project> </Project>