1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-08 20:39:03 +00:00

rogueviz:: added heatx

This commit is contained in:
Zeno Rogue
2021-03-31 20:11:27 +02:00
parent b952d03277
commit d206656724
5 changed files with 174 additions and 10 deletions

View File

@@ -703,4 +703,25 @@ EX bool file_exists(string fname) {
return access(fname.c_str(), F_OK) != -1;
}
EX void open_url(string s) {
#if ISWEB
EM_ASM_({
window.open(UTF8ToString($0, 1000));
}, s.c_str());
#else
#ifdef WINDOWS
ShellExecute(0, 0, s.c_str(), 0, 0, SW_SHOW);
#endif
#ifdef LINUX
system(("xdg-open "+s).c_str());
#endif
#ifdef MAC
system(("open "+s).c_str());
#endif
#endif
}
}