diff --git a/src/main.c b/src/main.c index 5563895..c09eecd 100644 --- a/src/main.c +++ b/src/main.c @@ -56,7 +56,6 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) { case DLL_PROCESS_ATTACH: { - /* char buf[1024]; 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) { - MessageBoxA( - NULL, - "Please disable all compatibility modes for the game executable and " + char mes[128] = { 0 }; + + _snprintf( + mes, + sizeof(mes), + "Please disable the '%s' compatibility mode for all game executables and " "then try to start the game again.", - "Compatibility modes detected - cnc-ddraw", - MB_OK); + s); + + MessageBoxA(NULL, mes, "Compatibility modes detected - cnc-ddraw", MB_OK); //return FALSE; break; @@ -79,7 +82,7 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) s = strtok(NULL, " "); } } - */ + printf("cnc-ddraw DLL_PROCESS_ATTACH\n"); //SetProcessPriorityBoost(GetCurrentProcess(), TRUE);