mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 16:49:12 +01:00
ab93b00385
Fixed a compile bug and a small bug in the cdutils(thanks lp). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2420 8ced0084-cf51-0410-be5f-012b33b47a6e
30 lines
566 B
C++
30 lines
566 B
C++
#include "Common.h"
|
|
#include <wx/wx.h>
|
|
#include <wx/string.h>
|
|
namespace WxUtils {
|
|
|
|
// Launch a file according to its mime type
|
|
void Launch(const char *filename)
|
|
{
|
|
if (! ::wxLaunchDefaultBrowser(wxString::FromAscii(filename))) {
|
|
// WARN_LOG
|
|
}
|
|
}
|
|
|
|
// Launch an file explorer window on a certain path
|
|
void Explore(const char *path)
|
|
{
|
|
wxString wxPath = wxString::FromAscii(path);
|
|
|
|
// Default to file
|
|
if (! wxPath.Contains(wxT("://"))) {
|
|
wxPath = wxT("file://") + wxPath;
|
|
}
|
|
|
|
if (! ::wxLaunchDefaultBrowser(wxPath)) {
|
|
// WARN_LOG
|
|
}
|
|
}
|
|
|
|
}
|