ref: f30f390e513e456c2bdec64726469a50097e4371
parent: a0f514d32994b8649dce57a9bb3154968df3ad01
author: Simon Howard <fraggle@soulsphere.org>
date: Wed Jun 3 21:07:36 EDT 2015
textscreen: Tweak to command line to open URL. Alexandre-Xavier commented in #520 that the 'start' command line to open help URLs doesn't work. According to this page, 'start' is actually a cmd.exe built-in and can't be shelled out to directly: http://www.dwheeler.com/essays/open-files-urls.html This prepends cmd /c to the 'start' command; hopefully this should work. It might still be non-ideal if it causes a cmd.exe window to briefly pop up; in the long term we should probably switch to the ShellExecute() API function instead.
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -516,7 +516,7 @@
cmd = malloc(cmd_len);
#if defined(_WIN32)
- TXT_snprintf(cmd, cmd_len, "start \"%s\"", url);
+ TXT_snprintf(cmd, cmd_len, "cmd /c start \"%s\"", url);
#elif defined(__MACOSX__)
TXT_snprintf(cmd, cmd_len, "open \"%s\"", url);
#else