mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 14:14:47 +01:00
testing code for detecting bad compatibility modes
This commit is contained in:
parent
590cbf12c9
commit
9bd26df82c
24
src/main.c
24
src/main.c
@ -55,6 +55,30 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
/*
|
||||
char buf[1024];
|
||||
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))
|
||||
{
|
||||
char *s = strtok(buf, " ");
|
||||
while (s)
|
||||
{
|
||||
if (strcmpi(s, "WIN95") == 0 || strcmpi(s, "WIN98") == 0 || strcmpi(s, "NT4SP5") == 0)
|
||||
{
|
||||
MessageBoxA(
|
||||
NULL,
|
||||
"Please disable all compatibility modes for the game executable and "
|
||||
"then try to start the game again.",
|
||||
"Compatibility modes detected - cnc-ddraw",
|
||||
MB_OK);
|
||||
|
||||
//return FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
s = strtok(NULL, " ");
|
||||
}
|
||||
}
|
||||
*/
|
||||
printf("cnc-ddraw DLL_PROCESS_ATTACH\n");
|
||||
|
||||
//SetProcessPriorityBoost(GetCurrentProcess(), TRUE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user