mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Added AchievementEventHandler to AchievementManager
AchievementEventHandler simply checks which kind of event is triggered and calls the appropriate function. Its primary purpose is as a function to be pointed to.
This commit is contained in:
parent
a48fab0abf
commit
ed121a4033
@ -202,6 +202,19 @@ void AchievementManager::ActivateDeactivateRichPresence()
|
||||
nullptr, 0);
|
||||
}
|
||||
|
||||
void AchievementManager::AchievementEventHandler(const rc_runtime_event_t* runtime_event)
|
||||
{
|
||||
switch (runtime_event->type)
|
||||
{
|
||||
case RC_RUNTIME_EVENT_ACHIEVEMENT_TRIGGERED:
|
||||
HandleAchievementTriggeredEvent(runtime_event);
|
||||
break;
|
||||
case RC_RUNTIME_EVENT_LBOARD_TRIGGERED:
|
||||
HandleLeaderboardTriggeredEvent(runtime_event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void AchievementManager::CloseGame()
|
||||
{
|
||||
m_is_game_loaded = false;
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
void ActivateDeactivateLeaderboards();
|
||||
void ActivateDeactivateRichPresence();
|
||||
|
||||
void AchievementEventHandler(const rc_runtime_event_t* runtime_event);
|
||||
|
||||
void CloseGame();
|
||||
void Logout();
|
||||
void Shutdown();
|
||||
|
Loading…
Reference in New Issue
Block a user