mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
CheatSearch: Update Current Values at end of frame
At the end of each frame automatically update the Current Value for visible table rows in the selected and visible CheatSearchWidget (if any). Also update all Current Values in all CheatSearchWidgets when the State changes to Paused. Only updating visible table rows serves to minimize the performance cost of this feature. If the user scrolls to an un-updated cell it will promptly be updated by either the next VIEndFieldEvent or the State transitioning to Paused.
This commit is contained in:
@ -11,14 +11,16 @@
|
||||
#include <QDialog>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "DolphinQt/GameList/GameListModel.h"
|
||||
|
||||
#include "Core/CheatSearch.h"
|
||||
#include "DolphinQt/GameList/GameListModel.h"
|
||||
#include "VideoCommon/VideoEvents.h"
|
||||
|
||||
class ARCodeWidget;
|
||||
class GeckoCodeWidget;
|
||||
class CheatSearchFactoryWidget;
|
||||
class QDialogButtonBox;
|
||||
class QHideEvent;
|
||||
class QShowEvent;
|
||||
class PartiallyClosableTabWidget;
|
||||
|
||||
namespace Core
|
||||
@ -38,14 +40,22 @@ signals:
|
||||
void ShowMemory(u32 address);
|
||||
void RequestWatch(QString name, u32 address);
|
||||
|
||||
protected:
|
||||
void hideEvent(QHideEvent* event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
|
||||
private:
|
||||
void CreateWidgets();
|
||||
void ConnectWidgets();
|
||||
void OnStateChanged(Core::State state);
|
||||
void OnFrameEnd();
|
||||
void RegisterAfterFrameEventCallback();
|
||||
void RemoveAfterFrameEventCallback();
|
||||
void OnNewSessionCreated(const Cheats::CheatSearchSessionBase& session);
|
||||
void OnTabCloseRequested(int index);
|
||||
|
||||
void RefreshCodeTabs(Core::State state, bool force);
|
||||
void UpdateAllCheatSearchWidgetCurrentValues();
|
||||
|
||||
std::string m_game_id;
|
||||
std::string m_game_tdb_id;
|
||||
@ -57,4 +67,6 @@ private:
|
||||
ARCodeWidget* m_ar_code = nullptr;
|
||||
GeckoCodeWidget* m_gecko_code = nullptr;
|
||||
CheatSearchFactoryWidget* m_cheat_search_new = nullptr;
|
||||
|
||||
Common::EventHook m_VI_end_field_event;
|
||||
};
|
||||
|
Reference in New Issue
Block a user