Save State UI: Cache legend strings

This commit is contained in:
Silent
2021-02-22 19:34:51 +01:00
parent e361b9f012
commit 78f9136fb8
3 changed files with 42 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#include "common_host_interface.h"
#include "common/timer.h"
#include "common_host_interface.h"
#include <memory>
class HostDisplayTexture;
@@ -24,6 +24,8 @@ public:
void ClearList();
void RefreshList();
void RefreshHotkeyLegend();
const char* GetSelectedStatePath() const;
s32 GetSelectedStateSlot() const;
@@ -51,6 +53,11 @@ private:
void InitializeListEntry(ListEntry* li, CommonHostInterface::ExtendedSaveStateInfo* ssi);
std::pair<s32, bool> GetSlotTypeFromSelection(u32 selection) const;
std::string m_load_legend;
std::string m_save_legend;
std::string m_prev_legend;
std::string m_next_legend;
CommonHostInterface* m_host_interface;
std::vector<ListEntry> m_slots;
u32 m_current_selection = 0;