2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:43:35 +00:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2015-09-06 10:34:48 +00:00
|
|
|
#include <algorithm>
|
2014-02-17 10:18:15 +00:00
|
|
|
#include <cinttypes>
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <cstdio>
|
|
|
|
#include <cstring>
|
2014-11-15 18:25:21 +00:00
|
|
|
#include <memory>
|
2008-12-08 05:30:24 +00:00
|
|
|
#include <string>
|
2015-09-13 12:17:58 +00:00
|
|
|
#include <unordered_map>
|
2015-04-09 15:44:53 +00:00
|
|
|
#include <utility>
|
2008-12-08 05:30:24 +00:00
|
|
|
#include <vector>
|
2014-11-18 01:11:34 +00:00
|
|
|
#include <wx/app.h>
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <wx/bitmap.h>
|
|
|
|
#include <wx/filefn.h>
|
|
|
|
#include <wx/image.h>
|
2015-05-08 14:04:40 +00:00
|
|
|
#include <wx/toplevel.h>
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/ChunkFile.h"
|
|
|
|
#include "Common/CommonPaths.h"
|
2014-09-08 01:06:58 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/FileUtil.h"
|
|
|
|
#include "Common/Hash.h"
|
|
|
|
#include "Common/IniFile.h"
|
|
|
|
#include "Common/StringUtil.h"
|
|
|
|
|
|
|
|
#include "Core/ConfigManager.h"
|
2014-02-22 22:36:30 +00:00
|
|
|
#include "Core/Boot/Boot.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include "DiscIO/Volume.h"
|
|
|
|
#include "DiscIO/VolumeCreator.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
|
|
|
|
#include "DolphinWX/ISOFile.h"
|
|
|
|
#include "DolphinWX/WxUtils.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2015-09-27 12:01:12 +00:00
|
|
|
static const u32 CACHE_REVISION = 0x126; // Last changed in PR 3097
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
#define DVD_BANNER_WIDTH 96
|
|
|
|
#define DVD_BANNER_HEIGHT 32
|
|
|
|
|
2015-05-08 21:28:03 +00:00
|
|
|
static std::string GetLanguageString(DiscIO::IVolume::ELanguage language, std::map<DiscIO::IVolume::ELanguage, std::string> strings)
|
2015-04-09 15:44:53 +00:00
|
|
|
{
|
|
|
|
auto end = strings.end();
|
|
|
|
auto it = strings.find(language);
|
|
|
|
if (it != end)
|
|
|
|
return it->second;
|
|
|
|
|
|
|
|
// English tends to be a good fallback when the requested language isn't available
|
2015-05-08 21:28:03 +00:00
|
|
|
if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH)
|
2015-04-09 15:44:53 +00:00
|
|
|
{
|
2015-05-08 21:28:03 +00:00
|
|
|
it = strings.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
2015-04-09 15:44:53 +00:00
|
|
|
if (it != end)
|
|
|
|
return it->second;
|
|
|
|
}
|
|
|
|
|
|
|
|
// If English isn't available either, just pick something
|
|
|
|
if (!strings.empty())
|
|
|
|
return strings.cbegin()->second;
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2015-09-13 12:17:58 +00:00
|
|
|
GameListItem::GameListItem(const std::string& _rFileName, const std::unordered_map<std::string, std::string>& custom_titles)
|
2008-12-08 05:30:24 +00:00
|
|
|
: m_FileName(_rFileName)
|
2011-03-25 18:12:40 +00:00
|
|
|
, m_emu_state(0)
|
2008-12-08 05:30:24 +00:00
|
|
|
, m_FileSize(0)
|
2015-08-26 05:13:55 +00:00
|
|
|
, m_Country(DiscIO::IVolume::COUNTRY_UNKNOWN)
|
2015-08-30 03:41:59 +00:00
|
|
|
, m_Revision(0)
|
2008-12-08 05:30:24 +00:00
|
|
|
, m_Valid(false)
|
2013-09-25 07:05:36 +00:00
|
|
|
, m_ImageWidth(0)
|
|
|
|
, m_ImageHeight(0)
|
2015-08-26 05:13:55 +00:00
|
|
|
, m_disc_number(0)
|
2015-09-13 10:45:06 +00:00
|
|
|
, m_has_custom_name(false)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2009-02-03 15:03:34 +00:00
|
|
|
if (LoadFromCache())
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
|
|
|
m_Valid = true;
|
2015-06-13 18:06:27 +00:00
|
|
|
|
|
|
|
// Wii banners can only be read if there is a savefile,
|
|
|
|
// so sometimes caches don't contain banners. Let's check
|
|
|
|
// if a banner has become available after the cache was made.
|
|
|
|
if (m_pImage.empty())
|
|
|
|
{
|
|
|
|
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(_rFileName));
|
|
|
|
if (volume != nullptr)
|
|
|
|
{
|
2015-09-04 17:08:30 +00:00
|
|
|
ReadVolumeBanner(*volume);
|
2015-06-13 18:06:27 +00:00
|
|
|
if (!m_pImage.empty())
|
|
|
|
SaveToCache();
|
|
|
|
}
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-11-22 02:05:31 +00:00
|
|
|
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(_rFileName));
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2015-11-22 02:05:31 +00:00
|
|
|
if (volume != nullptr)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2015-11-22 02:05:31 +00:00
|
|
|
m_Platform = volume->GetVolumeType();
|
2009-05-27 06:41:01 +00:00
|
|
|
|
2015-11-22 02:05:31 +00:00
|
|
|
m_names = volume->GetNames(true);
|
|
|
|
m_descriptions = volume->GetDescriptions();
|
|
|
|
m_company = volume->GetCompany();
|
2011-12-19 06:01:46 +00:00
|
|
|
|
2015-11-22 02:05:31 +00:00
|
|
|
m_Country = volume->GetCountry();
|
|
|
|
m_blob_type = volume->GetBlobType();
|
|
|
|
m_FileSize = volume->GetRawSize();
|
|
|
|
m_VolumeSize = volume->GetSize();
|
2009-06-06 07:36:22 +00:00
|
|
|
|
2015-11-22 02:05:31 +00:00
|
|
|
m_UniqueID = volume->GetUniqueID();
|
|
|
|
m_disc_number = volume->GetDiscNumber();
|
|
|
|
m_Revision = volume->GetRevision();
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2015-11-22 02:05:31 +00:00
|
|
|
ReadVolumeBanner(*volume);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
m_Valid = true;
|
2015-06-13 18:06:27 +00:00
|
|
|
SaveToCache();
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-24 15:41:53 +00:00
|
|
|
if (m_company.empty() && m_UniqueID.size() >= 6)
|
|
|
|
m_company = DiscIO::GetCompanyFromID(m_UniqueID.substr(4, 2));
|
|
|
|
|
2011-03-23 04:31:00 +00:00
|
|
|
if (IsValid())
|
|
|
|
{
|
2015-06-12 11:56:53 +00:00
|
|
|
IniFile ini = SConfig::LoadGameIni(m_UniqueID, m_Revision);
|
2015-02-07 20:27:26 +00:00
|
|
|
ini.GetIfExists("EmuState", "EmulationStateId", &m_emu_state);
|
|
|
|
ini.GetIfExists("EmuState", "EmulationIssues", &m_issues);
|
2015-09-13 10:45:06 +00:00
|
|
|
m_has_custom_name = ini.GetIfExists("EmuState", "Title", &m_custom_name);
|
|
|
|
|
|
|
|
if (!m_has_custom_name)
|
|
|
|
{
|
2015-09-13 12:17:58 +00:00
|
|
|
std::string game_id = m_UniqueID;
|
2015-09-13 10:45:06 +00:00
|
|
|
|
2015-09-13 12:17:58 +00:00
|
|
|
// Ignore publisher ID for WAD files
|
2015-09-19 07:23:52 +00:00
|
|
|
if (m_Platform == DiscIO::IVolume::WII_WAD && game_id.size() > 4)
|
|
|
|
game_id.erase(4);
|
2015-09-13 10:45:06 +00:00
|
|
|
|
2015-09-13 12:17:58 +00:00
|
|
|
auto end = custom_titles.end();
|
|
|
|
auto it = custom_titles.find(game_id);
|
|
|
|
if (it != end)
|
2015-09-13 10:45:06 +00:00
|
|
|
{
|
2015-09-13 12:17:58 +00:00
|
|
|
m_custom_name = it->second;
|
|
|
|
m_has_custom_name = true;
|
2015-09-13 10:45:06 +00:00
|
|
|
}
|
|
|
|
}
|
2011-03-23 04:31:00 +00:00
|
|
|
}
|
|
|
|
|
2015-08-26 05:13:55 +00:00
|
|
|
if (!IsValid() && IsElfOrDol())
|
|
|
|
{
|
|
|
|
m_Valid = true;
|
|
|
|
m_FileSize = File::GetSize(_rFileName);
|
|
|
|
m_Platform = DiscIO::IVolume::ELF_DOL;
|
2015-09-27 12:01:12 +00:00
|
|
|
m_blob_type = DiscIO::BlobType::DIRECTORY;
|
2015-08-26 05:13:55 +00:00
|
|
|
}
|
|
|
|
|
2015-09-04 17:08:30 +00:00
|
|
|
std::string path, name;
|
|
|
|
SplitPath(m_FileName, &path, &name, nullptr);
|
|
|
|
|
|
|
|
// A bit like the Homebrew Channel icon, except there can be multiple files in a folder with their own icons.
|
|
|
|
// Useful for those who don't want to have a Homebrew Channel-style folder structure.
|
|
|
|
if (ReadPNGBanner(path + name + ".png"))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Homebrew Channel icon. Typical for DOLs and ELFs, but can be also used with volumes.
|
|
|
|
if (ReadPNGBanner(path + "icon.png"))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Volume banner. Typical for everything that isn't a DOL or ELF.
|
2011-03-22 07:27:23 +00:00
|
|
|
if (!m_pImage.empty())
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2015-09-04 17:08:30 +00:00
|
|
|
wxImage image(m_ImageWidth, m_ImageHeight, &m_pImage[0], true);
|
|
|
|
m_Bitmap = ScaleBanner(&image);
|
|
|
|
return;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
2015-09-04 17:08:30 +00:00
|
|
|
|
|
|
|
// Fallback in case no banner is available.
|
2015-10-30 09:04:54 +00:00
|
|
|
ReadPNGBanner(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP + "nobanner.png");
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GameListItem::~GameListItem()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GameListItem::LoadFromCache()
|
|
|
|
{
|
|
|
|
return CChunkFileReader::Load<GameListItem>(CreateCacheFilename(), CACHE_REVISION, *this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void GameListItem::SaveToCache()
|
|
|
|
{
|
2011-03-01 03:06:14 +00:00
|
|
|
if (!File::IsDirectory(File::GetUserPath(D_CACHE_IDX)))
|
|
|
|
File::CreateDir(File::GetUserPath(D_CACHE_IDX));
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
CChunkFileReader::Save<GameListItem>(CreateCacheFilename(), CACHE_REVISION, *this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void GameListItem::DoState(PointerWrap &p)
|
|
|
|
{
|
2015-04-10 20:10:49 +00:00
|
|
|
p.Do(m_names);
|
2013-03-03 01:46:55 +00:00
|
|
|
p.Do(m_descriptions);
|
2015-04-10 20:10:49 +00:00
|
|
|
p.Do(m_company);
|
2008-12-08 05:30:24 +00:00
|
|
|
p.Do(m_UniqueID);
|
|
|
|
p.Do(m_FileSize);
|
|
|
|
p.Do(m_VolumeSize);
|
|
|
|
p.Do(m_Country);
|
2015-09-27 12:01:12 +00:00
|
|
|
p.Do(m_blob_type);
|
2011-03-22 07:27:23 +00:00
|
|
|
p.Do(m_pImage);
|
2013-09-25 07:05:36 +00:00
|
|
|
p.Do(m_ImageWidth);
|
|
|
|
p.Do(m_ImageHeight);
|
2009-06-06 07:36:22 +00:00
|
|
|
p.Do(m_Platform);
|
2015-05-29 19:14:02 +00:00
|
|
|
p.Do(m_disc_number);
|
2013-04-17 03:29:01 +00:00
|
|
|
p.Do(m_Revision);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
2015-09-06 10:34:48 +00:00
|
|
|
bool GameListItem::IsElfOrDol() const
|
|
|
|
{
|
2015-11-15 17:04:45 +00:00
|
|
|
if (m_FileName.size() < 4)
|
|
|
|
return false;
|
2015-09-06 10:34:48 +00:00
|
|
|
|
2015-11-15 17:04:45 +00:00
|
|
|
std::string name_end = m_FileName.substr(m_FileName.size() - 4);
|
|
|
|
std::transform(name_end.begin(), name_end.end(), name_end.begin(), ::tolower);
|
|
|
|
return name_end == ".elf" || name_end == ".dol";
|
2015-09-06 10:34:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string GameListItem::CreateCacheFilename() const
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2010-12-08 06:46:59 +00:00
|
|
|
std::string Filename, LegalPathname, extension;
|
|
|
|
SplitPath(m_FileName, &LegalPathname, &Filename, &extension);
|
2009-04-08 16:38:41 +00:00
|
|
|
|
2009-04-28 02:30:50 +00:00
|
|
|
if (Filename.empty()) return Filename; // Disc Drive
|
2010-11-11 09:17:57 +00:00
|
|
|
|
2010-12-08 06:46:59 +00:00
|
|
|
// Filename.extension_HashOfFolderPath_Size.cache
|
2010-11-11 09:17:57 +00:00
|
|
|
// Append hash to prevent ISO name-clashing in different folders.
|
2015-09-08 05:44:37 +00:00
|
|
|
Filename.append(StringFromFormat("%s_%x_%" PRIx64 ".cache",
|
2010-12-08 06:46:59 +00:00
|
|
|
extension.c_str(), HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size()),
|
2011-03-01 03:06:14 +00:00
|
|
|
File::GetSize(m_FileName)));
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2011-02-28 20:40:15 +00:00
|
|
|
std::string fullname(File::GetUserPath(D_CACHE_IDX));
|
2008-12-08 05:30:24 +00:00
|
|
|
fullname += Filename;
|
|
|
|
return fullname;
|
|
|
|
}
|
2009-02-03 15:03:34 +00:00
|
|
|
|
2015-09-04 17:08:30 +00:00
|
|
|
// Outputs to m_pImage
|
|
|
|
void GameListItem::ReadVolumeBanner(const DiscIO::IVolume& volume)
|
2015-06-13 18:06:27 +00:00
|
|
|
{
|
|
|
|
std::vector<u32> Buffer = volume.GetBanner(&m_ImageWidth, &m_ImageHeight);
|
|
|
|
u32* pData = Buffer.data();
|
|
|
|
m_pImage.resize(m_ImageWidth * m_ImageHeight * 3);
|
|
|
|
|
|
|
|
for (int i = 0; i < m_ImageWidth * m_ImageHeight; i++)
|
|
|
|
{
|
|
|
|
m_pImage[i * 3 + 0] = (pData[i] & 0xFF0000) >> 16;
|
|
|
|
m_pImage[i * 3 + 1] = (pData[i] & 0x00FF00) >> 8;
|
|
|
|
m_pImage[i * 3 + 2] = (pData[i] & 0x0000FF) >> 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-09-04 17:08:30 +00:00
|
|
|
// Outputs to m_Bitmap
|
|
|
|
bool GameListItem::ReadPNGBanner(const std::string& path)
|
|
|
|
{
|
|
|
|
if (!File::Exists(path))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
wxImage image;
|
|
|
|
image.LoadFile(StrToWxStr(path), wxBITMAP_TYPE_PNG);
|
|
|
|
m_Bitmap = ScaleBanner(&image);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
wxBitmap GameListItem::ScaleBanner(wxImage* image)
|
|
|
|
{
|
|
|
|
double scale = wxTheApp->GetTopWindow()->GetContentScaleFactor();
|
|
|
|
// Note: This uses nearest neighbor, which subjectively looks a lot
|
|
|
|
// better for GC banners than smooth scaling.
|
|
|
|
// TODO: Make scaling less bad for Homebrew Channel banners.
|
|
|
|
image->Rescale(DVD_BANNER_WIDTH * scale, DVD_BANNER_HEIGHT * scale);
|
|
|
|
#ifdef __APPLE__
|
|
|
|
return wxBitmap(*image, -1, scale);
|
|
|
|
#else
|
|
|
|
return wxBitmap(*image, -1);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2015-05-08 21:28:03 +00:00
|
|
|
std::string GameListItem::GetDescription(DiscIO::IVolume::ELanguage language) const
|
2009-02-03 15:03:34 +00:00
|
|
|
{
|
2015-04-09 15:44:53 +00:00
|
|
|
return GetLanguageString(language, m_descriptions);
|
2009-02-03 15:03:34 +00:00
|
|
|
}
|
2009-04-28 02:30:50 +00:00
|
|
|
|
2015-04-09 15:44:53 +00:00
|
|
|
std::string GameListItem::GetDescription() const
|
2013-03-04 00:29:56 +00:00
|
|
|
{
|
2015-06-04 14:26:36 +00:00
|
|
|
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
|
2015-06-12 11:56:53 +00:00
|
|
|
return GetDescription(SConfig::GetInstance().GetCurrentLanguage(wii));
|
2013-03-04 00:29:56 +00:00
|
|
|
}
|
|
|
|
|
2015-05-08 21:28:03 +00:00
|
|
|
std::string GameListItem::GetName(DiscIO::IVolume::ELanguage language) const
|
2015-04-09 15:44:53 +00:00
|
|
|
{
|
2015-04-10 20:10:49 +00:00
|
|
|
return GetLanguageString(language, m_names);
|
2013-03-04 00:29:56 +00:00
|
|
|
}
|
2013-03-03 01:46:55 +00:00
|
|
|
|
2015-04-10 20:10:49 +00:00
|
|
|
std::string GameListItem::GetName() const
|
2013-03-04 00:29:56 +00:00
|
|
|
{
|
2015-09-13 10:45:06 +00:00
|
|
|
if (m_has_custom_name)
|
|
|
|
return m_custom_name;
|
|
|
|
|
2015-06-04 14:26:36 +00:00
|
|
|
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
|
2015-06-12 11:56:53 +00:00
|
|
|
std::string name = GetName(SConfig::GetInstance().GetCurrentLanguage(wii));
|
2015-09-13 10:45:06 +00:00
|
|
|
if (!name.empty())
|
|
|
|
return name;
|
2015-08-26 05:13:55 +00:00
|
|
|
|
2015-09-13 10:45:06 +00:00
|
|
|
// No usable name, return filename (better than nothing)
|
|
|
|
std::string ext;
|
|
|
|
SplitPath(GetFileName(), nullptr, &name, &ext);
|
|
|
|
return name + ext;
|
2011-12-19 06:01:46 +00:00
|
|
|
}
|
|
|
|
|
2015-05-08 21:28:03 +00:00
|
|
|
std::vector<DiscIO::IVolume::ELanguage> GameListItem::GetLanguages() const
|
2015-04-09 15:44:53 +00:00
|
|
|
{
|
2015-05-08 21:28:03 +00:00
|
|
|
std::vector<DiscIO::IVolume::ELanguage> languages;
|
|
|
|
for (std::pair<DiscIO::IVolume::ELanguage, std::string> name : m_names)
|
2015-04-10 20:10:49 +00:00
|
|
|
languages.push_back(name.first);
|
2015-04-09 15:44:53 +00:00
|
|
|
return languages;
|
|
|
|
}
|
|
|
|
|
2009-05-02 18:06:42 +00:00
|
|
|
const std::string GameListItem::GetWiiFSPath() const
|
|
|
|
{
|
2015-11-22 02:05:31 +00:00
|
|
|
std::unique_ptr<DiscIO::IVolume> iso(DiscIO::CreateVolumeFromFilename(m_FileName));
|
2011-01-06 13:57:46 +00:00
|
|
|
std::string ret;
|
2009-05-02 18:06:42 +00:00
|
|
|
|
2014-03-12 19:33:41 +00:00
|
|
|
if (iso == nullptr)
|
2011-01-06 13:57:46 +00:00
|
|
|
return ret;
|
|
|
|
|
2015-06-04 14:26:36 +00:00
|
|
|
if (iso->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC)
|
2009-05-02 18:06:42 +00:00
|
|
|
{
|
2015-09-22 17:25:54 +00:00
|
|
|
u64 title_id = 0;
|
|
|
|
iso->GetTitleID(&title_id);
|
2009-05-02 18:06:42 +00:00
|
|
|
|
2014-11-18 01:59:14 +00:00
|
|
|
const std::string path = StringFromFormat("%s/title/%08x/%08x/data/",
|
2015-09-22 17:25:54 +00:00
|
|
|
File::GetUserPath(D_WIIROOT_IDX).c_str(), (u32)(title_id >> 32), (u32)title_id);
|
2009-05-02 18:06:42 +00:00
|
|
|
|
2014-03-12 19:33:41 +00:00
|
|
|
if (!File::Exists(path))
|
|
|
|
File::CreateFullPath(path);
|
2009-05-02 18:06:42 +00:00
|
|
|
|
2014-03-12 19:33:41 +00:00
|
|
|
if (path[0] == '.')
|
|
|
|
ret = WxStrToStr(wxGetCwd()) + path.substr(strlen(ROOT_DIR));
|
2011-01-06 13:57:46 +00:00
|
|
|
else
|
2014-03-12 19:33:41 +00:00
|
|
|
ret = path;
|
2009-05-02 18:06:42 +00:00
|
|
|
}
|
|
|
|
|
2010-01-14 07:19:10 +00:00
|
|
|
return ret;
|
2009-05-02 18:06:42 +00:00
|
|
|
}
|