1
0
mirror of https://github.com/dolphin-emu/dolphin synced 2024-07-01 07:54:33 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
TryTwo
ebd98c6c28
Merge f29fe15d77 into f49659fbfc 2024-06-28 08:04:59 -05:00
OatmealDome
f49659fbfc
Merge pull request #12897 from Dentomologist/achievementmanager_fix_ignored_qualifiers_warning
AchievementManager: Fix -Wignored-qualifiers warning
2024-06-28 01:23:04 -04:00
Dentomologist
c46c010ae3 AchievementManager: Fix -Wignored-qualifiers warning
Fix warning on Android builder by returning bool instead of const bool.
2024-06-27 14:36:14 -07:00
TryTwo
f29fe15d77 FrameAdvance: Fix continuous frame advancing while the debug UI is open. Blocks signals from being spammed to update the UI. 2024-06-26 16:19:03 -07:00
6 changed files with 30 additions and 3 deletions

View File

@ -341,7 +341,7 @@ AchievementManager::RichPresence AchievementManager::GetRichPresence() const
return m_rich_presence;
}
const bool AchievementManager::AreChallengesUpdated() const
bool AchievementManager::AreChallengesUpdated() const
{
return m_challenges_updated;
}

View File

@ -116,7 +116,7 @@ public:
const Badge& GetAchievementBadge(AchievementId id, bool locked) const;
const LeaderboardStatus* GetLeaderboardInfo(AchievementId leaderboard_id);
RichPresence GetRichPresence() const;
const bool AreChallengesUpdated() const;
bool AreChallengesUpdated() const;
void ResetChallengesUpdated();
const std::unordered_set<AchievementId>& GetActiveChallenges() const;
std::vector<std::string> GetActiveLeaderboards() const;

View File

@ -250,6 +250,9 @@ void Host_YieldToUI()
void Host_UpdateDisasmDialog()
{
if (Settings::Instance().GetIsContinuouslyFrameStepping())
return;
QueueOnObject(QApplication::instance(), [] { emit Host::GetInstance()->UpdateDisasmDialog(); });
}

View File

@ -113,6 +113,8 @@ static void HandleFrameStepHotkeys()
if ((frame_step_count == 0 || frame_step_count == FRAME_STEP_DELAY) && !frame_step_hold)
{
if (frame_step_count > 0)
Settings::Instance().SetIsContinuouslyFrameStepping(true);
Core::QueueHostJob([](auto& system) { Core::DoFrameStep(system); });
frame_step_hold = true;
}
@ -138,6 +140,8 @@ static void HandleFrameStepHotkeys()
frame_step_count = 0;
frame_step_hold = false;
frame_step_delay_count = 0;
Settings::Instance().SetIsContinuouslyFrameStepping(false);
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
}
}

View File

@ -59,7 +59,12 @@ Settings::Settings()
{
qRegisterMetaType<Core::State>();
Core::AddOnStateChangedCallback([this](Core::State new_state) {
QueueOnObject(this, [this, new_state] { emit EmulationStateChanged(new_state); });
QueueOnObject(this, [this, new_state] {
// Avoid signal spam while continuously frame stepping. Will still send a signal for the first
// and last framestep.
if (!m_continuously_frame_stepping)
emit EmulationStateChanged(new_state);
});
});
Config::AddConfigChangedCallback([this] {
@ -827,3 +832,13 @@ void Settings::SetUSBKeyboardConnected(bool connected)
emit USBKeyboardConnectionChanged(connected);
}
}
void Settings::SetIsContinuouslyFrameStepping(bool is_stepping)
{
m_continuously_frame_stepping = is_stepping;
}
bool Settings::GetIsContinuouslyFrameStepping() const
{
return m_continuously_frame_stepping;
}

View File

@ -120,6 +120,9 @@ public:
bool IsUSBKeyboardConnected() const;
void SetUSBKeyboardConnected(bool connected);
void SetIsContinuouslyFrameStepping(bool is_stepping);
bool GetIsContinuouslyFrameStepping() const;
// Graphics
Config::ShowCursor GetCursorVisibility() const;
bool GetLockCursor() const;
@ -229,6 +232,8 @@ private:
Settings();
bool m_batch = false;
std::atomic<bool> m_continuously_frame_stepping = false;
std::shared_ptr<NetPlay::NetPlayClient> m_client;
std::shared_ptr<NetPlay::NetPlayServer> m_server;
ControllerInterface::HotplugCallbackHandle m_hotplug_callback_handle;