mirror of
https://github.com/DxWnd/DxWnd.reloaded
synced 2024-12-30 09:25:35 +01:00
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
int WINAPI D3DPERF_BeginEvent(D3DCOLOR col, LPCWSTR wszName)
|
|
{
|
|
if (!gl_hOriginalDll) LoadOriginalDll(); // looking for the "right d3d9.dll"
|
|
|
|
typedef int (WINAPI* D3DPERF_BE)(D3DCOLOR,LPCWSTR);
|
|
D3DPERF_BE D3DPERF_BeginEvent_fn = (D3DPERF_BE) GetProcAddress( gl_hOriginalDll, "D3DPERF_BeginEvent");
|
|
|
|
return D3DPERF_BeginEvent_fn(col, wszName);
|
|
}
|
|
|
|
int WINAPI D3DPERF_EndEvent()
|
|
{
|
|
if (!gl_hOriginalDll) LoadOriginalDll(); // looking for the "right d3d9.dll"
|
|
|
|
typedef int (WINAPI* D3DPERF_EE)(void);
|
|
D3DPERF_EE D3DPERF_EndEvent_fn = (D3DPERF_EE) GetProcAddress( gl_hOriginalDll, "D3DPERF_EndEvent");
|
|
|
|
return D3DPERF_EndEvent_fn();
|
|
}
|
|
|
|
void WINAPI D3DPERF_SetMarker(D3DCOLOR col, LPCWSTR wszName)
|
|
{
|
|
if (!gl_hOriginalDll) LoadOriginalDll(); // looking for the "right d3d9.dll"
|
|
|
|
typedef void (WINAPI* D3DPERF_SM)(D3DCOLOR,LPCWSTR);
|
|
D3DPERF_SM D3DPERF_SetMarker_fn = (D3DPERF_SM) GetProcAddress( gl_hOriginalDll, "D3DPERF_SetMarker");
|
|
|
|
D3DPERF_SetMarker_fn(col, wszName);
|
|
}
|
|
|
|
LIBRARY "d3d9"
|
|
|
|
EXPORTS
|
|
Direct3DCreate9 @1
|
|
D3DPERF_BeginEvent @2
|
|
D3DPERF_EndEvent @3
|
|
D3DPERF_SetMarker @4 |