mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Support opening web pages on emscripten.
This commit is contained in:
parent
7552341ff0
commit
5940af8995
@ -1,6 +1,8 @@
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
# include <shellapi.h>
|
||||
#elif defined __EMSCRIPTEN__
|
||||
# include <emscripten.h>
|
||||
#else
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
@ -19,6 +21,8 @@ void OpenWebpage( const char* url )
|
||||
char buf[1024];
|
||||
sprintf( buf, "open %s", url );
|
||||
system( buf );
|
||||
#elif defined __EMSCRIPTEN__
|
||||
EM_ASM( { window.open( UTF8ToString( $0 ), '_blank' ) }, url );
|
||||
#else
|
||||
char buf[1024];
|
||||
sprintf( buf, "xdg-open %s", url );
|
||||
|
Loading…
Reference in New Issue
Block a user