mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Improved Launcher::openFile() method for Windows using ShellExecute() instead of system().
This commit is contained in:
parent
e97aa018a3
commit
ff705fce46
@ -20,6 +20,10 @@
|
||||
|
||||
#include "launcher.h"
|
||||
|
||||
#if defined ALLEGRO_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
void Launcher::openUrl(const std::string& url)
|
||||
{
|
||||
openFile(url);
|
||||
@ -29,7 +33,7 @@ void Launcher::openFile(const std::string& file)
|
||||
{
|
||||
#if defined ALLEGRO_WINDOWS
|
||||
|
||||
system(("start " + file).c_str());
|
||||
ShellExecute(NULL, "open", file.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
|
||||
#elif defined ALLEGRO_MACOSX
|
||||
|
||||
|
7
third_party/vaca/src/Application.cpp
vendored
7
third_party/vaca/src/Application.cpp
vendored
@ -33,6 +33,10 @@
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
#ifdef VACA_ON_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
using namespace Vaca;
|
||||
|
||||
Application* Application::m_instance = NULL;
|
||||
@ -40,6 +44,9 @@ std::vector<String> Application::m_args;
|
||||
|
||||
Application::Application()
|
||||
{
|
||||
#ifdef VACA_ON_WINDOWS
|
||||
CoInitialize(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
|
Loading…
Reference in New Issue
Block a user