dolphin/Source/Core/VideoCommon/HiresTextures.h
dreamsyntax 07f712f8a0 Core/VideoCommon: Fix duplicate OSD Custom Textures messages
Resolves duplicate OSD messages for Loading and Found custom textures.
VideoBackend initialization results in HiresTexture::Init being called.
We already call HiresTexture::Update when OnNewTitleLoad is called.
Thus we can remove HiresTextures::Init completely as it is redundant.
2024-12-28 01:09:50 -07:00

39 lines
1.1 KiB
C++

// Copyright 2008 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <memory>
#include <set>
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "VideoCommon/Assets/CustomTextureData.h"
#include "VideoCommon/Assets/TextureAsset.h"
#include "VideoCommon/TextureConfig.h"
#include "VideoCommon/TextureInfo.h"
enum class TextureFormat;
std::set<std::string> GetTextureDirectoriesWithGameId(const std::string& root_directory,
const std::string& game_id);
class HiresTexture
{
public:
static void Update();
static void Clear();
static void Shutdown();
static std::shared_ptr<HiresTexture> Search(const TextureInfo& texture_info);
HiresTexture(bool has_arbitrary_mipmaps, std::shared_ptr<VideoCommon::GameTextureAsset> asset);
bool HasArbitraryMipmaps() const { return m_has_arbitrary_mipmaps; }
const std::shared_ptr<VideoCommon::GameTextureAsset>& GetAsset() const { return m_game_texture; }
private:
bool m_has_arbitrary_mipmaps = false;
std::shared_ptr<VideoCommon::GameTextureAsset> m_game_texture;
};