From 5b06786960eb2148688b5d915898fdd7e0dd0137 Mon Sep 17 00:00:00 2001 From: Quantum Date: Mon, 27 Aug 2018 05:31:05 -0400 Subject: [PATCH] Fixup: __wargv is not a thing unless you use wmain, in which case __argv is not a thing. --- punyverse/launcher.c | 5 +++-- punyverse/main.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/punyverse/launcher.c b/punyverse/launcher.c index 9446be1..5766fc5 100644 --- a/punyverse/launcher.c +++ b/punyverse/launcher.c @@ -11,10 +11,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine int main() #endif { - int argc = __argc; #if PY_MAJOR_VERSION >= 3 - LPWSTR *argv = __wargv; + int argc; + LPWSTR *argv = CommandLineToArgvW(GetCommandLineW(), &argc); #else + int argc = __argc; char **argv = __argv; #endif diff --git a/punyverse/main.py b/punyverse/main.py index 00187fa..34cf4d3 100644 --- a/punyverse/main.py +++ b/punyverse/main.py @@ -4,7 +4,7 @@ import pyglet INITIAL_WIN_HEIGHT = 540 INITIAL_WIN_WIDTH = 700 -DEBUG = True +DEBUG = False def main():