aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/gfx/gfx_driver.cpp16
-rw-r--r--engines/sci/sci.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp
index 5951ef252f..7b9c890a05 100644
--- a/engines/sci/gfx/gfx_driver.cpp
+++ b/engines/sci/gfx/gfx_driver.cpp
@@ -28,6 +28,7 @@
#include "common/events.h"
#include "graphics/primitives.h"
+#include "sci/sci.h"
#include "sci/gfx/gfx_driver.h"
#include "sci/gfx/gfx_tools.h"
@@ -385,6 +386,21 @@ static sci_event_t scummvm_get_event(gfx_driver_t *drv) {
input.data = ev.kbd.keycode;
input.character = ev.kbd.ascii;
+ // Debug console
+ if (ev.kbd.flags == Common::KBD_CTRL && ev.kbd.keycode == Common::KEYCODE_d) {
+
+ ((Sci::SciEngine*)g_engine)->_console->attach();
+ ((Sci::SciEngine*)g_engine)->_console->onFrame();
+
+ // Clear keyboard event
+ input.type = SCI_EVT_NONE;
+ input.character = 0;
+ input.data = 0;
+ input.buckybits = 0;
+
+ return input;
+ }
+
if (!(input.data & 0xFF00)) {
// Directly accept most common keys without conversion
input.type = SCI_EVT_KEYBOARD;
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 7a8d328112..a92356a396 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -98,10 +98,10 @@ public:
/** Remove the 'TARGET-' prefix of the given filename, if present. */
Common::String unwrapFilename(const Common::String &name) const;
+ Console *_console;
private:
const SciGameDescription *_gameDescription;
- Console *_console;
ResourceManager *_resmgr;
};