d3d9 proxy loader hides console after success
This commit is contained in:
parent
d17924595d
commit
878082322c
@ -93,22 +93,26 @@ void D3D9Proxy_Uninitialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void D3D9Proxy_LoadL2Detect()
|
bool D3D9Proxy_LoadL2Detect()
|
||||||
{
|
{
|
||||||
if( gl_hL2Detect != NULL )
|
if( gl_hL2Detect != NULL )
|
||||||
return;
|
return true; // already loaded
|
||||||
|
|
||||||
gl_hL2Detect = LoadLibraryW( L"L2Detect_d.dll" );
|
gl_hL2Detect = LoadLibraryW( L"L2Detect_d.dll" );
|
||||||
if( gl_hL2Detect == NULL )
|
if( gl_hL2Detect == NULL ) // first try failed
|
||||||
{
|
{
|
||||||
gl_hL2Detect = LoadLibraryW( L"L2Detect.dll" );
|
gl_hL2Detect = LoadLibraryW( L"L2Detect.dll" );
|
||||||
if( gl_hL2Detect == NULL )
|
if( gl_hL2Detect == NULL )
|
||||||
|
{
|
||||||
log_error( LOG_ERROR, "Failed to load radar DLL! Tried to find L2Detect_d / L2Detect dlls.\n" );
|
log_error( LOG_ERROR, "Failed to load radar DLL! Tried to find L2Detect_d / L2Detect dlls.\n" );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
log_error( LOG_OK, "Loaded L2Detect.dll at 0x%08X\n", gl_hL2Detect );
|
log_error( LOG_OK, "Loaded L2Detect.dll at 0x%08X\n", gl_hL2Detect );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log_error( LOG_OK, "Loaded L2Detect_d.dll (debug version) at 0x%08X\n", gl_hL2Detect );
|
log_error( LOG_OK, "Loaded L2Detect_d.dll (debug version) at 0x%08X\n", gl_hL2Detect );
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,7 +153,8 @@ IDirect3D9* WINAPI Direct3DCreate9( UINT SDKVersion )
|
|||||||
::ExitProcess(0); // exit the hard way
|
::ExitProcess(0); // exit the hard way
|
||||||
}
|
}
|
||||||
|
|
||||||
D3D9Proxy_LoadL2Detect();
|
if( D3D9Proxy_LoadL2Detect() )
|
||||||
|
ErrorLogger_EnableLoggingToConsole( false );
|
||||||
|
|
||||||
// Request pointer from Original Dll.
|
// Request pointer from Original Dll.
|
||||||
IDirect3D9 *pIDirect3D9_orig = D3DCreate9_fn( SDKVersion );
|
IDirect3D9 *pIDirect3D9_orig = D3DCreate9_fn( SDKVersion );
|
||||||
|
7
d3d9_proxy_loader/PostBuildEvent.cmd
Normal file
7
d3d9_proxy_loader/PostBuildEvent.cmd
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
set out=..\..\out\dist_L2Detect
|
||||||
|
|
||||||
|
echo Copy d3d9.dll %2\%1.dll - %2\%out%
|
||||||
|
copy /y %2\%1.dll %2\%out%
|
||||||
|
|
||||||
|
echo Copy d3d9.pdb %2\%1.pdb - %2\%out%
|
||||||
|
rem copy /y %2\%1.pdb %2\%out%
|
@ -5,4 +5,4 @@ extern HINSTANCE gl_hOriginalDll;
|
|||||||
|
|
||||||
void D3D9Proxy_Initialize();
|
void D3D9Proxy_Initialize();
|
||||||
void D3D9Proxy_Uninitialize();
|
void D3D9Proxy_Uninitialize();
|
||||||
void D3D9Proxy_LoadL2Detect();
|
bool D3D9Proxy_LoadL2Detect();
|
Loading…
Reference in New Issue
Block a user