aboutsummaryrefslogtreecommitdiff
path: root/common/osd_message_queue.h
diff options
context:
space:
mode:
authorThierry Crozat2016-10-26 23:20:30 +0100
committerThierry Crozat2016-10-29 15:13:32 +0100
commit3ae52a61afe2790bfd56c7eae8e06bcef52d926b (patch)
tree5d2ac0779580327072cc3fdecf04ee3729900c59 /common/osd_message_queue.h
parentcbfa598446f656e5082f96458ee9540f1a58d180 (diff)
downloadscummvm-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.h2
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) */
};