aboutsummaryrefslogtreecommitdiff
path: root/sokol_args.h
diff options
context:
space:
mode:
Diffstat (limited to 'sokol_args.h')
-rw-r--r--sokol_args.h15
1 files changed, 15 insertions, 0 deletions
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)