Skip to content

Commit 9a0e451

Browse files
committed
Refactor isUsingWine
1 parent e9f6b36 commit 9a0e451

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Client/loader/MainFunctions.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -946,20 +946,14 @@ void ValidateGTAPath()
946946
// Detect if we are running under Wine
947947
//
948948
//////////////////////////////////////////////////////////
949-
int isUsingWine()
949+
bool isUsingWine()
950950
{
951951
HMODULE ntdll = GetModuleHandleA("ntdll.dll");
952952
if (!ntdll)
953-
return 0; // Not ntdll? Not Wine.
953+
return false;
954954

955-
// Check for Wine-specific function
956955
FARPROC wineVersion = GetProcAddress(ntdll, "wine_get_version");
957-
if (wineVersion)
958-
{
959-
return 1; // Is Wine.
960-
}
961-
962-
return 0; // Not Wine.
956+
return wineVersion != nullptr;
963957
}
964958

965959
//////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)