[c-host] windows: fix errors from prior commit

This commit is contained in:
Geoffrey McRae 2019-05-09 19:32:19 +10:00
parent 4617829d41
commit 22f9fa3938
2 changed files with 10 additions and 10 deletions

View file

@ -1 +1 @@
a12-160-gfc907b802f+1
a12-161-g4617829d41+1

View file

@ -33,16 +33,16 @@ Place, Suite 330, Boston, MA 02111-1307 USA
struct AppState
{
int argc;
char * argv[];
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)
{