Can now open .map in trenchbroom automatically
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "OS.h"
|
||||
#include "src/Window.h"
|
||||
#include "Engine.h"
|
||||
|
||||
#define GLFW_EXPOSE_NATIVE_WIN32
|
||||
#include "GLFW/glfw3.h"
|
||||
@@ -69,6 +70,11 @@ void OS::ShowInFileExplorer(const std::string& filePath)
|
||||
ShellExecuteA(nullptr, "open", "explorer.exe", ("/select," + std::string(filePath)).c_str(), nullptr, SW_SHOWDEFAULT);
|
||||
}
|
||||
|
||||
void OS::OpenTrenchbroomMap(const std::string& filePath)
|
||||
{
|
||||
ShellExecuteA(nullptr, nullptr, Engine::GetProject()->TrenchbroomPath.c_str(), filePath.c_str(), nullptr, SW_SHOW);
|
||||
}
|
||||
|
||||
void OS::OpenURL(const std::string& url)
|
||||
{
|
||||
ShellExecute(nullptr, nullptr, std::wstring(url.begin(), url.end()).c_str(), 0, 0, SW_SHOW);
|
||||
|
||||
Reference in New Issue
Block a user