From 06b8163f4b135a522faf491d84ec199b683b4ae6 Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Wed, 17 Oct 2018 20:20:48 +0200 Subject: sokol_args.h: add note about Windows __argc, __argv --- sokol_args.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sokol_args.h b/sokol_args.h index d238b212..3fbc5cbd 100644 --- a/sokol_args.h +++ b/sokol_args.h @@ -127,6 +127,21 @@ sargs_shutdown(); } + WINMAIN AND ARGC / ARGV + ======================= + On Windows with WinMain() based apps, use the __argc and __argv global + variables provided Windows. These are compatible with main(argc, argv) + and have already been converted to UTF-8 by Windows: + + int WINAPI WinMain(...) { + sargs_setup(&(sargs_desc){ + .argc = __argc, + .argv = __argv + }); + } + + (this is also what sokol_app.h uses btw) + API DOCUMENTATION ================= void sargs_setup(const sargs_desc* desc) -- cgit v1.2.3