Skip to content
Permalink
Browse files

UICommon/GameFile: Make COVER_URL a plain C string

Same behavior but doesn't take up 8 bytes in the executable to store a
pointer. While we're at it, move it into an anonymous namespace within
the UICommon namespace.
  • Loading branch information
lioncash committed May 28, 2019
1 parent 8229ada commit b4470ad4c215aad3765eb6acfc739548fdc53064
Showing with 7 additions and 4 deletions.
  1. +7 −4 Source/Core/UICommon/GameFile.cpp
@@ -39,13 +39,15 @@
#include "DiscIO/Volume.h" #include "DiscIO/Volume.h"
#include "DiscIO/WiiSaveBanner.h" #include "DiscIO/WiiSaveBanner.h"


constexpr const char* COVER_URL = "https://art.gametdb.com/wii/cover/%s/%s.png";

namespace UICommon namespace UICommon
{ {
static const std::string EMPTY_STRING; namespace
{
constexpr char COVER_URL[] = "https://art.gametdb.com/wii/cover/%s/%s.png";

const std::string EMPTY_STRING;


static bool UseGameCovers() bool UseGameCovers()
{ {
// We ifdef this out on Android because accessing the config before emulation start makes us crash. // We ifdef this out on Android because accessing the config before emulation start makes us crash.
// The Android GUI handles covers in Java anyway, so this doesn't make us lose any functionality. // The Android GUI handles covers in Java anyway, so this doesn't make us lose any functionality.
@@ -55,6 +57,7 @@ static bool UseGameCovers()
return Config::Get(Config::MAIN_USE_GAME_COVERS); return Config::Get(Config::MAIN_USE_GAME_COVERS);
#endif #endif
} }
} // Anonymous namespace


DiscIO::Language GameFile::GetConfigLanguage() const DiscIO::Language GameFile::GetConfigLanguage() const
{ {

0 comments on commit b4470ad

Please sign in to comment.
You can’t perform that action at this time.