Undo some comment formatting changes from b5104a7
This commit is contained in:
parent
64cf74abb4
commit
1878605d77
|
@ -274,10 +274,8 @@ static std::string GetTitle(std::string filename)
|
||||||
titles = pVolume->GetShortNames();
|
titles = pVolume->GetShortNames();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bool is_wii_title = pVolume->GetVolumeType() !=
|
bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||||
DiscIO::IVolume::GAMECUBE_DISC;
|
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
|
||||||
DiscIO::IVolume::ELanguage language =
|
|
||||||
SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
|
|
||||||
|
|
||||||
auto it = titles.find(language);
|
auto it = titles.find(language);
|
||||||
if (it != end)
|
if (it != end)
|
||||||
|
@ -285,8 +283,7 @@ static std::string GetTitle(std::string filename)
|
||||||
|
|
||||||
auto end = titles.end();
|
auto end = titles.end();
|
||||||
|
|
||||||
// English tends to be a good fallback when the requested language isn't
|
// English tends to be a good fallback when the requested language isn't available
|
||||||
// available
|
|
||||||
// if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
// if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
||||||
auto it = titles.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
auto it = titles.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||||
if (it != end)
|
if (it != end)
|
||||||
|
@ -318,10 +315,8 @@ static std::string GetDescription(std::string filename)
|
||||||
std::map<DiscIO::IVolume::ELanguage, std::string> descriptions = volume->GetDescriptions();
|
std::map<DiscIO::IVolume::ELanguage, std::string> descriptions = volume->GetDescriptions();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bool is_wii_title = pVolume->GetVolumeType() !=
|
bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||||
DiscIO::IVolume::GAMECUBE_DISC;
|
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
|
||||||
DiscIO::IVolume::ELanguage language =
|
|
||||||
SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
|
|
||||||
|
|
||||||
auto it = descriptions.find(language);
|
auto it = descriptions.find(language);
|
||||||
if (it != end)
|
if (it != end)
|
||||||
|
@ -329,8 +324,7 @@ static std::string GetDescription(std::string filename)
|
||||||
|
|
||||||
auto end = descriptions.end();
|
auto end = descriptions.end();
|
||||||
|
|
||||||
// English tends to be a good fallback when the requested language isn't
|
// English tends to be a good fallback when the requested language isn't available
|
||||||
// available
|
|
||||||
// if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
// if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
||||||
auto it = descriptions.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
auto it = descriptions.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||||
if (it != end)
|
if (it != end)
|
||||||
|
|
|
@ -19,8 +19,7 @@ namespace DiscIO
|
||||||
class IVolume
|
class IVolume
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Increment CACHE_REVISION if the enums below are modified (ISOFile.cpp &
|
// Increment CACHE_REVISION if the enums below are modified (ISOFile.cpp & GameFile.cpp)
|
||||||
// GameFile.cpp)
|
|
||||||
enum EPlatform
|
enum EPlatform
|
||||||
{
|
{
|
||||||
GAMECUBE_DISC = 0,
|
GAMECUBE_DISC = 0,
|
||||||
|
|
|
@ -63,14 +63,10 @@ bool CVolumeDirectory::Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt
|
||||||
if (!decrypt && (_Offset + _Length >= 0x400) && m_is_wii)
|
if (!decrypt && (_Offset + _Length >= 0x400) && m_is_wii)
|
||||||
{
|
{
|
||||||
// Fully supporting this would require re-encrypting every file that's read.
|
// Fully supporting this would require re-encrypting every file that's read.
|
||||||
// Only supporting the areas that IOS allows software to read could be more
|
// Only supporting the areas that IOS allows software to read could be more feasible.
|
||||||
// feasible.
|
// Currently, only the header (up to 0x400) is supported, though we're cheating a bit
|
||||||
// Currently, only the header (up to 0x400) is supported, though we're
|
// with it by reading the header inside the current partition instead. Supporting the
|
||||||
// cheating a bit
|
// header is enough for booting games, but not for running things like the Disc Channel.
|
||||||
// with it by reading the header inside the current partition instead.
|
|
||||||
// Supporting the
|
|
||||||
// header is enough for booting games, but not for running things like the
|
|
||||||
// Disc Channel.
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,7 @@ struct FSTEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// --- this volume type is used for reading files directly from the hard drive
|
// --- this volume type is used for reading files directly from the hard drive ---
|
||||||
// ---
|
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
|
|
|
@ -89,8 +89,7 @@ std::string CVolumeWAD::GetUniqueID() const
|
||||||
std::string CVolumeWAD::GetMakerID() const
|
std::string CVolumeWAD::GetMakerID() const
|
||||||
{
|
{
|
||||||
char temp[2] = {1};
|
char temp[2] = {1};
|
||||||
// Some weird channels use 0x0000 in place of the MakerID, so we need a check
|
// Some weird channels use 0x0000 in place of the MakerID, so we need a check there
|
||||||
// there
|
|
||||||
if (!Read(0x198 + m_tmd_offset, 2, (u8*)temp) || temp[0] == 0 || temp[1] == 0)
|
if (!Read(0x198 + m_tmd_offset, 2, (u8*)temp) || temp[0] == 0 || temp[1] == 0)
|
||||||
return "00";
|
return "00";
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
#include "DiscIO/Volume.h"
|
#include "DiscIO/Volume.h"
|
||||||
|
|
||||||
// --- this volume type is used for Wad files ---
|
// --- this volume type is used for Wad files ---
|
||||||
// Some of this code might look redundant with the CNANDContentLoader class,
|
// Some of this code might look redundant with the CNANDContentLoader class, however,
|
||||||
// however,
|
|
||||||
// We do not do any decryption here, we do raw read, so things are -Faster-
|
// We do not do any decryption here, we do raw read, so things are -Faster-
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
|
|
|
@ -47,8 +47,7 @@ static std::string GetLanguageString(DiscIO::IVolume::ELanguage language,
|
||||||
if (it != end)
|
if (it != end)
|
||||||
return it->second;
|
return it->second;
|
||||||
|
|
||||||
// English tends to be a good fallback when the requested language isn't
|
// English tends to be a good fallback when the requested language isn't available
|
||||||
// available
|
|
||||||
if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH)
|
if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH)
|
||||||
{
|
{
|
||||||
it = strings.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
it = strings.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||||
|
@ -150,16 +149,14 @@ GameListItem::GameListItem(const std::string& _rFileName,
|
||||||
std::string path, name;
|
std::string path, name;
|
||||||
SplitPath(m_FileName, &path, &name, nullptr);
|
SplitPath(m_FileName, &path, &name, nullptr);
|
||||||
|
|
||||||
// A bit like the Homebrew Channel icon, except there can be multiple files in
|
// A bit like the Homebrew Channel icon, except there can be multiple files
|
||||||
// a folder with their
|
// in a folder with their own icons. Useful for those who don't want to have
|
||||||
// own icons.
|
// a Homebrew Channel-style folder structure.
|
||||||
// Useful for those who don't want to have a Homebrew Channel-style folder
|
|
||||||
// structure.
|
|
||||||
if (ReadPNGBanner(path + name + ".png"))
|
if (ReadPNGBanner(path + name + ".png"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Homebrew Channel icon. Typical for DOLs and ELFs, but can be also used with
|
// Homebrew Channel icon. Typical for DOLs and ELFs,
|
||||||
// volumes.
|
// but can be also used with volumes.
|
||||||
if (ReadPNGBanner(path + "icon.png"))
|
if (ReadPNGBanner(path + "icon.png"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue