aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/graphics/maemosdl/maemosdl-graphics.cpp60
-rw-r--r--backends/graphics/maemosdl/maemosdl-graphics.h40
-rw-r--r--backends/module.mk3
-rw-r--r--backends/platform/maemo/maemo.cpp4
-rw-r--r--engines/cge/cge_main.cpp3
-rw-r--r--engines/cge/events.h22
-rw-r--r--engines/hugo/parser.cpp2
7 files changed, 110 insertions, 24 deletions
diff --git a/backends/graphics/maemosdl/maemosdl-graphics.cpp b/backends/graphics/maemosdl/maemosdl-graphics.cpp
new file mode 100644
index 0000000000..527ef82b9d
--- /dev/null
+++ b/backends/graphics/maemosdl/maemosdl-graphics.cpp
@@ -0,0 +1,60 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+#if defined(MAEMO)
+
+#include "SDL_syswm.h"
+
+#include "common/scummsys.h"
+
+#include "backends/platform/maemo/maemo.h"
+#include "backends/events/maemosdl/maemosdl-events.h"
+#include "backends/graphics/maemosdl/maemosdl-graphics.h"
+
+MaemoSdlGraphicsManager::MaemoSdlGraphicsManager(SdlEventSource *sdlEventSource)
+ : SurfaceSdlGraphicsManager(sdlEventSource) {
+}
+
+bool MaemoSdlGraphicsManager::loadGFXMode() {
+ bool success = SurfaceSdlGraphicsManager::loadGFXMode();
+
+ // fix the problematic zoom key capture in Maemo5/N900
+ SDL_SysWMinfo info;
+ SDL_VERSION(&info.version);
+ if (SDL_GetWMInfo(&info)) {
+ Display *dpy = info.info.x11.display;
+ Window win;
+ unsigned long val = 1;
+ Atom atom_zoom = XInternAtom(dpy, "_HILDON_ZOOM_KEY_ATOM", 0);
+ info.info.x11.lock_func();
+ win = info.info.x11.fswindow;
+ if (win)
+ XChangeProperty(dpy, win, atom_zoom, XA_INTEGER, 32, PropModeReplace, (unsigned char *) &val, 1); // grab zoom keys
+ win = info.info.x11.wmwindow;
+ if (win)
+ XChangeProperty(dpy, win, atom_zoom, XA_INTEGER, 32, PropModeReplace, (unsigned char *) &val, 1); // grab zoom keys
+ info.info.x11.unlock_func();
+ }
+
+ return success;
+}
+
+#endif
diff --git a/backends/graphics/maemosdl/maemosdl-graphics.h b/backends/graphics/maemosdl/maemosdl-graphics.h
new file mode 100644
index 0000000000..81064d2d5f
--- /dev/null
+++ b/backends/graphics/maemosdl/maemosdl-graphics.h
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if defined(MAEMO)
+
+#ifndef BACKENDS_GRAPHICS_MAEMOSDL_GRAPHICS_H
+#define BACKENDS_GRAPHICS_MAEMOSDL_GRAPHICS_H
+
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
+
+class MaemoSdlGraphicsManager : public SurfaceSdlGraphicsManager {
+public:
+ MaemoSdlGraphicsManager(SdlEventSource *sdlEventSource);
+
+protected:
+ virtual bool loadGFXMode();
+};
+
+#endif
+
+#endif
diff --git a/backends/module.mk b/backends/module.mk
index 89cde44536..6be595a65e 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -149,7 +149,8 @@ endif
ifeq ($(BACKEND),maemo)
MODULE_OBJS += \
- events/maemosdl/maemosdl-events.o
+ events/maemosdl/maemosdl-events.o \
+ graphics/maemosdl/maemosdl-graphics.o
endif
ifeq ($(BACKEND),n64)
diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp
index a1885036e7..454a13631c 100644
--- a/backends/platform/maemo/maemo.cpp
+++ b/backends/platform/maemo/maemo.cpp
@@ -29,6 +29,7 @@
#include "backends/platform/maemo/maemo.h"
#include "backends/events/maemosdl/maemosdl-events.h"
+#include "backends/graphics/maemosdl/maemosdl-graphics.h"
#include "common/textconsole.h"
@@ -47,6 +48,9 @@ void OSystem_SDL_Maemo::initBackend() {
if (_eventSource == 0)
_eventSource = new MaemoSdlEventSource();
+ if (_graphicsManager == 0)
+ _graphicsManager = new MaemoSdlGraphicsManager(_eventSource);
+
ConfMan.set("vkeybdpath", DATA_PATH);
_model = Model(detectModel());
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 01bd037315..db47c61d42 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -757,7 +757,8 @@ void System::touch(uint16 mask, int x, int y) {
funTouch();
if (mask & kEventKeyb) {
- _vm->keyClick();
+ // The original was calling keyClick()
+ // The sound is uselessly annoying and noisy, so it has been removed
_vm->killText();
if (_vm->_startupMode == 1) {
_vm->_commandHandler->addCommand(kCmdClear, -1, 0, NULL);
diff --git a/engines/cge/events.h b/engines/cge/events.h
index ac1e6231fe..7ead4cbc7b 100644
--- a/engines/cge/events.h
+++ b/engines/cge/events.h
@@ -52,32 +52,14 @@ enum EventMask {
};
enum Keys {
- NoKey = 0, CtrlA, CtrlB, CtrlC, CtrlD, CtrlE, CtrlF, CtrlG, CtrlH,
- CtrlI, CtrlJ, CtrlK, CtrlL, CtrlM, CtrlN, CtrlO, CtrlP,
- CtrlQ, CtrlR, CtrlS, CtrlT, CtrlU, CtrlV, CtrlW, CtrlX,
- CtrlY, CtrlZ,
BSp = 8, Tab,
Enter = 13,
- Eof = 26, Esc,
- AltQ = 256 + 16, AltW, AltE, AltR, AltT, AltY, AltU, AltI, AltO, AltP,
- AltA = 256 + 30, AltS, AltD, AltF, AltG, AltH, AltJ, AltK, AltL,
- AltZ = 256 + 44, AltX, AltC, AltV, AltB, AltN, AltM,
+ Esc = 27,
F11 = 256 + 87, F12,
F1 = 256 + 59, F2, F3, F4, F5, F6, F7, F8, F9, F10,
- ShiftTab = 256 + 15,
- ShiftF1 = 256 + 84, ShiftF2, ShiftF3, ShiftF4, ShiftF5,
- ShiftF6, ShiftF7, ShiftF8, ShiftF9, ShiftF10,
- CtrlF1 = 256 + 94, CtrlF2, CtrlF3, CtrlF4, CtrlF5,
- CtrlF6, CtrlF7, CtrlF8, CtrlF9, CtrlF10,
- AltF1 = 256 + 104, AltF2, AltF3, AltF4, AltF5,
- AltF6, AltF7, AltF8, AltF9, AltF10,
Home = 256 + 71, Up, PgUp,
Left = 256 + 75, Ctr, Right,
- End = 256 + 79, Down, PgDn, Ins, Del,
- CtrlLeft = 256 + 115, CtrlRight, CtrlEnd, CtrlPgDn, CtrlHome,
- CtrlPgUp = 256 + 132,
- MouseLeft = 512 + 1, MouseRight,
- TwiceLeft = 512 + 256 + 1, TwiceRight
+ End = 256 + 79, Down, PgDn, Ins, Del
};
class Keyboard {
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index bbf6c39f13..a0ad4c0986 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -391,8 +391,6 @@ void Parser::command(const char *format, ...) {
va_list marker;
va_start(marker, format);
-// TODO:
-// _vm->_line = Common::String::vformat(format, marker);
vsprintf(_vm->_line, format, marker);
va_end(marker);