Closed CookiePLMonster closed 7 years ago
Also switched the project to Unicode because... why not? W versions of WinAPI functions should be preferred these days and the only affected lines are
MessageBox(nullptr, TEXT("Failed to open debug log file \"d3d8.log\"!"), nullptr, MB_ICONWARNING);
const HMODULE module = LoadLibrary(TEXT("d3dx9_43.dll"));
With this change, underlying d3d9 resources don't have their refcounts changed by wrapper's
AddRef
andRelease
and instead they only get released once at wrapper destruction time. Instead of returning underlying resource's refcount from wrapper functions, now wrapper's refcounts are returned. This fixes cases where the game is doing something likeMight also be a micro optimization since it issues less d3d calls (albeit refcount ones should be nearly no-ops).
Fixes #19