summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2015-06-04 01:07:36 -0400
committerSimon Howard2015-06-04 01:07:36 -0400
commitf30f390e513e456c2bdec64726469a50097e4371 (patch)
treee32d02331aba4b36be82da4777db476ad01a5a53
parenta0f514d32994b8649dce57a9bb3154968df3ad01 (diff)
downloadchocolate-doom-f30f390e513e456c2bdec64726469a50097e4371.tar.gz
chocolate-doom-f30f390e513e456c2bdec64726469a50097e4371.tar.bz2
chocolate-doom-f30f390e513e456c2bdec64726469a50097e4371.zip
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.
-rw-r--r--textscreen/txt_window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c
index bd892ac9..5aa35edf 100644
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -516,7 +516,7 @@ void TXT_OpenURL(char *url)
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