mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 09:11:01 +00:00
Block exchndl.dll loading for XP/Vista users
This commit is contained in:
parent
1029463741
commit
209f18cf11
3 changed files with 28 additions and 3 deletions
|
@ -149,7 +149,14 @@ int main(int argc, char **argv)
|
|||
)
|
||||
#endif
|
||||
{
|
||||
LoadLibraryA("exchndl.dll");
|
||||
// XP and Vista users can't use the newest exchndl.dll
|
||||
// and older exchndl.dll won't work with release builds >= 2.1.21
|
||||
// Check for >= Version 6.1 (>= Win7)
|
||||
DWORD winversion = GetVersion();
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
|
||||
if (major > 6 || (major == 6 && minor > 0))
|
||||
LoadLibraryA("exchndl.dll");
|
||||
}
|
||||
}
|
||||
#ifndef __MINGW32__
|
||||
|
|
|
@ -218,7 +218,14 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
)
|
||||
{
|
||||
LoadLibraryA("exchndl.dll");
|
||||
// XP and Vista users can't use the newest exchndl.dll
|
||||
// and older exchndl.dll won't work with release builds >= 2.1.21
|
||||
// Check for >= Version 6.1 (>= Win7)
|
||||
DWORD winversion = GetVersion();
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
|
||||
if (major > 6 || (major == 6 && minor > 0))
|
||||
LoadLibraryA("exchndl.dll");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -663,8 +663,19 @@ int WINAPI WinMain (HINSTANCE hInstance,
|
|||
#endif
|
||||
// Try Dr MinGW's exception handler.
|
||||
if (!pfnIsDebuggerPresent || !pfnIsDebuggerPresent())
|
||||
{
|
||||
#endif
|
||||
// XP and Vista users can't use the newest exchndl.dll
|
||||
// and older exchndl.dll won't work with release builds >= 2.1.21
|
||||
// Check for >= Version 6.1 (Win7)
|
||||
DWORD winversion = GetVersion();
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(winversion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(winversion)));
|
||||
if (major > 6 || (major == 6 && minor > 0))
|
||||
LoadLibraryA("exchndl.dll");
|
||||
#if 0
|
||||
}
|
||||
#endif
|
||||
LoadLibraryA("exchndl.dll");
|
||||
|
||||
#ifndef __MINGW32__
|
||||
prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo);
|
||||
|
|
Loading…
Reference in a new issue