aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorNicolas Bacca2003-07-21 22:30:15 +0000
committerNicolas Bacca2003-07-21 22:30:15 +0000
commitd79ae6f1f28da20530ce9df61a9ce4cc5160d3cc (patch)
tree324242d016b807bf279e3a835d49128b4267999a /scumm
parentb6b23c6352250534f2e4831908a1aaf917c09346 (diff)
downloadscummvm-rg350-d79ae6f1f28da20530ce9df61a9ce4cc5160d3cc.tar.gz
scummvm-rg350-d79ae6f1f28da20530ce9df61a9ce4cc5160d3cc.tar.bz2
scummvm-rg350-d79ae6f1f28da20530ce9df61a9ce4cc5160d3cc.zip
Fix for #775275 : debugger support on WinCE
svn-id: r9114
Diffstat (limited to 'scumm')
-rw-r--r--scumm/debugger.cpp13
-rw-r--r--scumm/scummvm.cpp15
2 files changed, 22 insertions, 6 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index f4bc07c1f2..e4796d67bf 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -35,6 +35,10 @@
#define Debug_Printf printf
#endif
+#ifdef _WIN32_WCE
+extern void force_keyboard(bool);
+#endif
+
extern uint16 _debugLevel;
ScummDebugger::ScummDebugger() {
@@ -48,6 +52,11 @@ ScummDebugger::ScummDebugger() {
// Initialisation Functions
void ScummDebugger::attach(Scumm *s, char *entry) {
+
+#ifdef _WIN32_WCE
+ force_keyboard(true);
+#endif
+
if (_s)
detach();
@@ -114,6 +123,10 @@ void ScummDebugger::detach() {
}
#endif
+#ifdef _WIN32_WCE
+ force_keyboard(false);
+#endif
+
_s->_debugger = NULL;
_s = NULL;
_detach_now = false;
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index afcfb1b208..9e94d8c566 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -52,14 +52,14 @@
#include <sys/stat.h>
#endif
-#ifdef _WIN32_WCE
-extern void drawError(char*);
-#endif
-
#ifdef _MSC_VER
# pragma warning( disable : 4068 ) // turn off "unknown pragma" warning
#endif
+#ifdef _WIN32_WCE
+extern bool isSmartphone(void);
+#endif
+
// Use g_scumm from error() ONLY
Scumm *g_scumm = 0;
ScummDebugger *g_debugger;
@@ -1128,10 +1128,8 @@ void Scumm::waitForTimer(int msec_delay) {
}
int Scumm::scummLoop(int delta) {
-#ifndef _WIN32_WCE
if (_debugger)
_debugger->on_frame();
-#endif
// Randomize the PRNG by calling it at regular intervals. This ensures
// that it will be in a different state each time you run the program.
@@ -2373,6 +2371,11 @@ void Scumm::errorString(const char *buf1, char *buf2) {
strcpy(buf2, buf1);
}
+#ifdef _WIN32_WCE
+ if (isSmartphone())
+ return;
+#endif
+
// Unless an error -originated- within the debugger, spawn the debugger. Otherwise
// exit out normally.
if (!_debugger) {