#Appending new args to lpCmdLine wWinMain

1 messages · Page 1 of 1 (latest)

coral surge
#

Hello everyone, I'm new to C++ and I'm trying to add new arguments to lpCmdLine before calling UnityMain, this way it's working but I want to know if it's right or if I need to know anything else, thanks for your attention.

int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nShowCmd)
{
    wchar_t nCommand[MAX_PATH] = { 0 };
    wcscpy_s(nCommand, MAX_PATH, lpCmdLine);
    wcscat_s(nCommand, MAX_PATH, L" -popupwindow -screen-width 800 -screen-height 420 -screen-fullscreen 0");

    return UnityMain(hInstance, hPrevInstance, nCommand, nShowCmd);
}