aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/EventMapper.cpp6
-rw-r--r--common/c++11-compat.h6
-rw-r--r--common/scummsys.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/common/EventMapper.cpp b/common/EventMapper.cpp
index b92116cbe7..cf65946d50 100644
--- a/common/EventMapper.cpp
+++ b/common/EventMapper.cpp
@@ -45,7 +45,7 @@ List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
if (ev.type == EVENT_MBUTTONUP) {
if ((g_system->getMillis() - vkeybdThen) >= vkeybdTime) {
mappedEvent.type = EVENT_VIRTUAL_KEYBOARD;
-
+
// Avoid blocking event from engine.
addDelayedEvent(100, ev);
}
@@ -59,7 +59,7 @@ List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
#ifdef ENABLE_VKEYBD
else if (ev.kbd.hasFlags(KBD_CTRL) && ev.kbd.keycode == KEYCODE_F7) {
mappedEvent.type = EVENT_VIRTUAL_KEYBOARD;
-
+
// Avoid blocking CTRL-F7 events from engine.
addDelayedEvent(100, ev);
}
@@ -67,7 +67,7 @@ List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
#ifdef ENABLE_KEYMAPPER
else if (ev.kbd.hasFlags(KBD_CTRL) && ev.kbd.keycode == KEYCODE_F8) {
mappedEvent.type = EVENT_KEYMAPPER_REMAP;
-
+
// Avoid blocking CTRL-F8 events from engine.
addDelayedEvent(100, ev);
}
diff --git a/common/c++11-compat.h b/common/c++11-compat.h
index 14e0642821..a56b79514c 100644
--- a/common/c++11-compat.h
+++ b/common/c++11-compat.h
@@ -32,13 +32,19 @@
// though.
//
#if !defined(nullptr) // XCode 5.0.1 has __cplusplus=199711 but defines this
+// MSVC 2010 and newer fully support nullptr: http://msdn.microsoft.com/en-us/library/hh567368.aspx
+#if !defined(_MSC_VER) || _MSC_VER < 1600
#define nullptr 0
#endif
+#endif
//
// Replacement for the override keyword. This allows compilation of code
// which uses it, but does not feature any semantic.
//
+// MSVC 2012 and newer fully support override: http://msdn.microsoft.com/en-us/library/hh567368.aspx
+#if !defined(_MSC_VER) || _MSC_VER < 1700
#define override
+#endif
#endif
diff --git a/common/scummsys.h b/common/scummsys.h
index c30bc4a52a..0c4687e03e 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -148,7 +148,7 @@
#endif
#endif
-// The following math constants are usually defined by the system math.h header, but
+// The following math constants are usually defined by the system math.h header, but
// they are not part of the ANSI C++ standards and so can NOT be relied upon to be
// present i.e. when -std=c++11 is passed to GCC, enabling strict ANSI compliance.
// As we rely on these being present, we define them if they are not set.