mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
Simplify GetModuleHandleEx usage
This commit is contained in:
parent
b3c95bb519
commit
910b9372b5
1 changed files with 2 additions and 3 deletions
|
@ -56,9 +56,8 @@ namespace ModCompat
|
||||||
{
|
{
|
||||||
if ( module == nullptr ) return false; // modloader not installed
|
if ( module == nullptr ) return false; // modloader not installed
|
||||||
|
|
||||||
HMODULE stdStreamModule = nullptr;
|
HMODULE stdStreamModule;
|
||||||
GetModuleHandleEx( 0, TEXT("std.stream.dll"), &stdStreamModule );
|
if ( GetModuleHandleEx( 0, TEXT("std.stream.dll"), &stdStreamModule ) == 0 ) return false; // std.data not loaded
|
||||||
if ( stdStreamModule == nullptr ) return false; // std.data not loaded
|
|
||||||
|
|
||||||
// ML is installed, so if it's an old version we need to fall back to a less safe implementation (no condition variables)
|
// ML is installed, so if it's an old version we need to fall back to a less safe implementation (no condition variables)
|
||||||
bCdStreamFallBackForOldML = true;
|
bCdStreamFallBackForOldML = true;
|
||||||
|
|
Loading…
Reference in a new issue