@@ -26,10 +26,14 @@ int main(int argc, char *argv[])
2626#if !defined(__ANDROID__ )
2727 // Android don't need conf and arguments.
2828 flipclock_load_conf (app );
29+ # if defined(__DEBUG__ )
30+ for (int i = 0 ; i < argc ; ++ i )
31+ LOG_DEBUG ("argv[%d]: %s\n" , i , argv [i ]);
32+ # endif
2933# if defined(_WIN32 )
30- char OPT_STRING [] = "hvscp:Swt :f:" ;
34+ char OPT_STRING [] = "hvscp:3wt :f:" ;
3135# else
32- char OPT_STRING [] = "hvSwt :f:" ;
36+ char OPT_STRING [] = "hv3wt :f:" ;
3337# endif
3438 int opt = 0 ;
3539 bool exit_after_argument = false;
@@ -77,14 +81,21 @@ int main(int argc, char *argv[])
7781 * typedef void *PVOID;
7882 * typedef PVOID HANDLE;
7983 * typedef HANDLE HWND;
80- * So it's safe to treat it as a unsigned int.
84+ * So it's safe to treat it as a unsigned int, even
85+ * though silly MSVC will complain. If MSVC is unhappy,
86+ * why not tell us how to handle it correctly?
8187 * Seems Windows print HWND as a decimal number,
8288 * so %p with scanf() is not suitable here.
8389 */
8490 app -> preview_window = strtoul (argopt , NULL , 0 );
8591 break ;
8692# endif
87- case 'S' :
93+ /**
94+ * Windows taken `/s` for screensaver, and if you run `.scr`
95+ * file from explorer, it will add `/S`! What a silly behavior,
96+ * so we cannot use those chars.
97+ */
98+ case '3' :
8899 app -> show_second = true;
89100 break ;
90101 case 'w' :
0 commit comments