aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/wince/wince.cpp30
-rw-r--r--scumm/debugger.cpp13
-rw-r--r--scumm/scummvm.cpp15
3 files changed, 39 insertions, 19 deletions
diff --git a/backends/wince/wince.cpp b/backends/wince/wince.cpp
index ab12d86559..ac5584d7dd 100644
--- a/backends/wince/wince.cpp
+++ b/backends/wince/wince.cpp
@@ -473,6 +473,10 @@ bool closing = false;
bool smartphone = false;
bool high_res = false;
+bool isSmartphone() {
+ return smartphone;
+}
+
void close_GAPI() {
g_config->setBool("Sound", sound_activated, "wince");
g_config->setInt("DisplayMode", GetScreenMode(), "wince");
@@ -790,9 +794,12 @@ void runGame(char *game_name) {
int argc = 4;
char* argv[4];
char argdir[MAX_PATH];
- char music[100];
+ char music[50];
bool no_music;
+ if (!game_name)
+ return;
+
select_game = false;
argv[0] = NULL;
@@ -808,10 +815,7 @@ void runGame(char *game_name) {
argv[2] = music;
argv[3] = game_name;
-
- if (!argv[3])
- return;
-
+
// No default toolbar for zak256
/*
if (strcmp(game_name, "zak256") == 0)
@@ -883,14 +887,6 @@ LRESULT CALLBACK OSystem_WINCE3::WndProc(HWND hWnd, UINT message, WPARAM wParam,
if (!select_game)
wm = (OSystem_WINCE3*)GetWindowLong(hWnd, GWL_USERDATA);
-
- if (!select_game && monkey_keyboard && (
- g_scumm->VAR(g_scumm->VAR_ROOM) != 108 && // monkey 2
- g_scumm->VAR(g_scumm->VAR_ROOM) != 90)) { // monkey 1 floppy
- monkey_keyboard = false;
- draw_keyboard = false;
- toolbar_drawn = false;
- }
if (smartphone) {
if (SmartphoneWndProc(hWnd, message, wParam, lParam, wm))
@@ -1445,6 +1441,14 @@ void OSystem_WINCE3::copy_rect(const byte *buf, int pitch, int x, int y, int w,
if (!hide_cursor && _mouse_drawn)
undraw_mouse();
+ if (!select_game && monkey_keyboard && (
+ g_scumm->VAR(g_scumm->VAR_ROOM) != 108 && // monkey 2
+ g_scumm->VAR(g_scumm->VAR_ROOM) != 90)) { // monkey 1 floppy
+ monkey_keyboard = false;
+ draw_keyboard = false;
+ toolbar_drawn = false;
+ }
+
/* Clip */
if (x < 0) {
w += x;
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) {