From 22f9fa39384aaae195658196f415d0a3f93c0c01 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 9 May 2019 19:32:19 +1000 Subject: [PATCH] [c-host] windows: fix errors from prior commit --- VERSION | 2 +- c-host/platform/Windows/src/platform.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index 8e210ba0..8bd7acff 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -a12-160-gfc907b802f+1 \ No newline at end of file +a12-161-g4617829d41+1 \ No newline at end of file diff --git a/c-host/platform/Windows/src/platform.c b/c-host/platform/Windows/src/platform.c index b7bd02ac..dd5f7fd5 100644 --- a/c-host/platform/Windows/src/platform.c +++ b/c-host/platform/Windows/src/platform.c @@ -32,17 +32,17 @@ Place, Suite 330, Boston, MA 02111-1307 USA struct AppState { - int argc; - char * argv[]; + int argc; + char ** argv; - static char executable[MAX_PATH + 1]; - static HANDLE shmemHandle; - static bool shmemOwned; - static IVSHMEM_MMAP shmemMap; - static HWND messageWnd; + char executable[MAX_PATH + 1]; + HANDLE shmemHandle; + bool shmemOwned; + IVSHMEM_MMAP shmemMap; + HWND messageWnd; }; -static struct AppState state = +static struct AppState app = { .shmemHandle = INVALID_HANDLE_VALUE, .shmemOwned = false, @@ -116,7 +116,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine SP_DEVICE_INTERFACE_DATA deviceInterfaceData; // convert the command line to the standard argc and argv - LPWSTR * wargv = CommandLineToArgvA(GetCommandLineW(), &app.argc); + LPWSTR * wargv = CommandLineToArgvW(GetCommandLineW(), &app.argc); app.argv = malloc(sizeof(char *) * app.argc); for(int i = 0; i < app.argc; ++i) {