RetroAchievements / RAIntegration

The DLL responsible to integrate emulators with RetroAchievements.org
https://retroachievements.org
MIT License
98 stars 23 forks source link

remove queue for achievements activated while runtime paused #869

Closed Jamiras closed 2 years ago

Jamiras commented 2 years ago

Way back in 0.75, achievements loaded into the runtime were queued up while the runtime was paused to prevent them from being processed until we knew if the user had unlocked them. Some time later, the initialization logic was changed such that achievements were not loaded into the runtime until a later point where we knew whether or not the achievements had been earned by the user. As a result, the queue is no longer necessary. If we decide to load something into the runtime it should be loaded into the runtime immediately.

This also fixes an oddity when activating achievements while the runtime is paused (Processing Active is unchecked). Because an activation was queued while the runtime was paused, attempting to manually activate an achievement while the runtime was paused would cause the achievement to automatically appear Inactive in the next time a frame was processed as the achievement hadn't actually been reactivated yet.

NOTE: While this does allow the achievement the be activated in a paused runtime, it will be forever Waiting as the runtime cannot determine that the achievement is not true while it is paused, and therefore cannot promote it to Active.