aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2018-10-17 20:20:48 +0200
committerAndre Weissflog <floooh@gmail.com>2018-10-17 20:20:48 +0200
commit06b8163f4b135a522faf491d84ec199b683b4ae6 (patch)
tree8b3abf415a64b3922164fd215e936bd210cc44fd
parent7cb60253cb06819bf72372057f31840a13284743 (diff)
sokol_args.h: add note about Windows __argc, __argv
-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)