diff options
author | Thierry Crozat | 2016-10-26 23:20:30 +0100 |
---|---|---|
committer | Thierry Crozat | 2016-10-29 15:13:32 +0100 |
commit | 3ae52a61afe2790bfd56c7eae8e06bcef52d926b (patch) | |
tree | 5d2ac0779580327072cc3fdecf04ee3729900c59 /common/osd_message_queue.h | |
parent | cbfa598446f656e5082f96458ee9540f1a58d180 (diff) | |
download | scummvm-rg350-3ae52a61afe2790bfd56c7eae8e06bcef52d926b.tar.gz scummvm-rg350-3ae52a61afe2790bfd56c7eae8e06bcef52d926b.tar.bz2 scummvm-rg350-3ae52a61afe2790bfd56c7eae8e06bcef52d926b.zip |
COMMON: Add referencing and destruction of the OSDMessageQueue instance
Registering the OSDMessageQueue instance as an event source is now done
right after the event manager is initialised. This ensures that it is created in a
sensible place and not for example in another thread). Also registering the
event source is moved to a separate function instead of being in the constructor
to remove any issue in case some code tries to display a OSD Message very early
on (the instance would be created then, but it would be registered as an event
source later).
Diffstat (limited to 'common/osd_message_queue.h')
-rw-r--r-- | common/osd_message_queue.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/osd_message_queue.h b/common/osd_message_queue.h index 9348497b28..7aa7cf4792 100644 --- a/common/osd_message_queue.h +++ b/common/osd_message_queue.h @@ -39,6 +39,8 @@ public: OSDMessageQueue(); ~OSDMessageQueue(); + void registerEventSource(); + enum { kMinimumDelay = 1000 /** < Minimum delay between two OSD messages (in milliseconds) */ }; |