diff --git a/D2BS.cpp b/D2BS.cpp index 42734ef1..1c618049 100644 --- a/D2BS.cpp +++ b/D2BS.cpp @@ -78,6 +78,61 @@ BOOL WINAPI DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) Vars.bMulti = TRUE; } + command = GetCommand("-c0"); + + if(command) + { + Vars.bUseRawCDKey = 1; + const char *keys = (char*)command->szText; + int len = strlen(keys); + strncat_s(Vars.szClassic, keys, len); + } + + command = GetCommand("-c1"); + + if(command) + { + const char *keys = (char*)command->szText; + int len = strlen(keys); + strncat_s(Vars.szClassic, keys, len); + } + + command = GetCommand("-c2"); + + if(command) + { + const char *keys = (char*)command->szText; + int len = strlen(keys); + strncat_s(Vars.szClassic, keys, len); + } + + command = GetCommand("-e0"); + + if(command) + { + const char *keys = (char*)command->szText; + int len = strlen(keys); + strncat_s(Vars.szLod, keys, len); + } + + command = GetCommand("-e1"); + + if(command) + { + const char *keys = (char*)command->szText; + int len = strlen(keys); + strncat_s(Vars.szLod, keys, len); + } + + command = GetCommand("-e2"); + + if(command) + { + const char *keys = (char*)command->szText; + int len = strlen(keys); + strncat_s(Vars.szLod, keys, len); + } + #if 0 char errlog[516] = ""; sprintf_s(errlog, 516, "%sd2bs.log", Vars.szPath); diff --git a/D2BS.h b/D2BS.h index 615b4cc7..bdb88fd2 100644 --- a/D2BS.h +++ b/D2BS.h @@ -5,7 +5,7 @@ #define XP_WIN -#define D2BS_VERSION "1.5.1863" //uptodate with d branch 1765 ff 20b +#define D2BS_VERSION "1.5.1864" //uptodate with d branch 1765 ff 20b #include #include diff --git a/D2Handlers.cpp b/D2Handlers.cpp index a3a40a2a..80293176 100644 --- a/D2Handlers.cpp +++ b/D2Handlers.cpp @@ -42,61 +42,6 @@ DWORD WINAPI D2Thread(LPVOID lpParam) ParseCommandLine(GetCommandLineA()); - command = GetCommand("-c0"); - - if(command) - { - Vars.bUseRawCDKey = 1; - const char *keys = (char*)command->szText; - int len = strlen(keys); - strncat_s(Vars.szClassic, keys, len); - } - - command = GetCommand("-c1"); - - if(command) - { - const char *keys = (char*)command->szText; - int len = strlen(keys); - strncat_s(Vars.szClassic, keys, len); - } - - command = GetCommand("-c2"); - - if(command) - { - const char *keys = (char*)command->szText; - int len = strlen(keys); - strncat_s(Vars.szClassic, keys, len); - } - - command = GetCommand("-e0"); - - if(command) - { - const char *keys = (char*)command->szText; - int len = strlen(keys); - strncat_s(Vars.szLod, keys, len); - } - - command = GetCommand("-e1"); - - if(command) - { - const char *keys = (char*)command->szText; - int len = strlen(keys); - strncat_s(Vars.szLod, keys, len); - } - - command = GetCommand("-e2"); - - if(command) - { - const char *keys = (char*)command->szText; - int len = strlen(keys); - strncat_s(Vars.szLod, keys, len); - } - command = GetCommand("-handle"); if(command)