mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
enable compatibility mode warning
This commit is contained in:
parent
5ef92e42c7
commit
0d35c746e1
17
src/main.c
17
src/main.c
@ -56,7 +56,6 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
|||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))
|
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))
|
||||||
{
|
{
|
||||||
@ -65,12 +64,16 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
|||||||
{
|
{
|
||||||
if (strcmpi(s, "WIN95") == 0 || strcmpi(s, "WIN98") == 0 || strcmpi(s, "NT4SP5") == 0)
|
if (strcmpi(s, "WIN95") == 0 || strcmpi(s, "WIN98") == 0 || strcmpi(s, "NT4SP5") == 0)
|
||||||
{
|
{
|
||||||
MessageBoxA(
|
char mes[128] = { 0 };
|
||||||
NULL,
|
|
||||||
"Please disable all compatibility modes for the game executable and "
|
_snprintf(
|
||||||
|
mes,
|
||||||
|
sizeof(mes),
|
||||||
|
"Please disable the '%s' compatibility mode for all game executables and "
|
||||||
"then try to start the game again.",
|
"then try to start the game again.",
|
||||||
"Compatibility modes detected - cnc-ddraw",
|
s);
|
||||||
MB_OK);
|
|
||||||
|
MessageBoxA(NULL, mes, "Compatibility modes detected - cnc-ddraw", MB_OK);
|
||||||
|
|
||||||
//return FALSE;
|
//return FALSE;
|
||||||
break;
|
break;
|
||||||
@ -79,7 +82,7 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
|||||||
s = strtok(NULL, " ");
|
s = strtok(NULL, " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
printf("cnc-ddraw DLL_PROCESS_ATTACH\n");
|
printf("cnc-ddraw DLL_PROCESS_ATTACH\n");
|
||||||
|
|
||||||
//SetProcessPriorityBoost(GetCurrentProcess(), TRUE);
|
//SetProcessPriorityBoost(GetCurrentProcess(), TRUE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user