custom_tex_cache: Remove reliance on the global system instance (#5252)

Removes direct usages of Core::System::GetInstance() and instead passes
the direct necessities through the interface.
This commit is contained in:
Mat M 2020-04-20 22:50:16 -04:00 committed by GitHub
parent d5a962cb81
commit b82d4315fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 16 deletions

View file

@ -10,6 +10,10 @@
#include <vector>
#include "common/common_types.h"
namespace Frontend {
class ImageInterface;
} // namespace Frontend
namespace Core {
struct CustomTexInfo {
u32 width;
@ -37,8 +41,8 @@ public:
void CacheTexture(u64 hash, const std::vector<u8>& tex, u32 width, u32 height);
void AddTexturePath(u64 hash, const std::string& path);
void FindCustomTextures();
void PreloadTextures();
void FindCustomTextures(u64 program_id);
void PreloadTextures(Frontend::ImageInterface& image_interface);
bool CustomTextureExists(u64 hash) const;
const CustomTexPathInfo& LookupTexturePathInfo(u64 hash) const;
bool IsTexturePathMapEmpty() const;