tracy/server/TracyWeb.cpp
2021-06-04 15:17:14 +02:00

30 lines
475 B
C++

#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
}
}