blob: 523f38ef6ed5ee36047b30383788b829a64a6cca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifdef _WIN32
# include <windows.h>
# include <shellapi.h>
#else
# include <stdio.h>
# include <stdlib.h>
#endif
#include "TracyWeb.hpp"
namespace tracy
{
void OpenWebpage( const char* url )
{
#ifdef _WIN32
ShellExecuteA( nullptr, nullptr, url, nullptr, nullptr, 0 );
#elif defined __APPLE__
char buf[1024];
sprintf( buf, "open %s", url );
system( buf );
#else
char buf[1024];
sprintf( buf, "xdg-open %s", url );
system( buf );
#endif
}
}
|