aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/events/dinguxsdl/dinguxsdl-events.cpp34
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp59
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.h11
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp6
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp2
-rw-r--r--backends/keymapper/action.h2
-rw-r--r--backends/platform/android/asset-archive.cpp3
-rw-r--r--backends/platform/dingux/dingux.mk35
-rw-r--r--backends/platform/sdl/sdl.cpp2
-rw-r--r--backends/platform/wii/osystem_events.cpp136
-rw-r--r--backends/taskbar/unity/unity-taskbar.cpp9
11 files changed, 195 insertions, 104 deletions
diff --git a/backends/events/dinguxsdl/dinguxsdl-events.cpp b/backends/events/dinguxsdl/dinguxsdl-events.cpp
index 6f9f2a7748..cc15f2666c 100644
--- a/backends/events/dinguxsdl/dinguxsdl-events.cpp
+++ b/backends/events/dinguxsdl/dinguxsdl-events.cpp
@@ -26,18 +26,48 @@
#include "backends/events/dinguxsdl/dinguxsdl-events.h"
+#ifndef GCW0
#define PAD_UP SDLK_UP
#define PAD_DOWN SDLK_DOWN
#define PAD_LEFT SDLK_LEFT
#define PAD_RIGHT SDLK_RIGHT
#define BUT_A SDLK_LCTRL
#define BUT_B SDLK_LALT
-#define BUT_X SDLK_SPACE
-#define BUT_Y SDLK_LSHIFT
+#define BUT_X SDLK_SPACE // BUT_Y in GCW0
+#define BUT_Y SDLK_LSHIFT // BUT_X in GCW0
#define BUT_SELECT SDLK_ESCAPE
#define BUT_START SDLK_RETURN
#define TRIG_L SDLK_TAB
#define TRIG_R SDLK_BACKSPACE
+#else // GCW0
+
+/******
+ * GCW0 keymap
+ * Dingoo button
+ * A -> Left Button BUT_Y
+ * B -> right button BUT_B
+ * X -> ' ' BUT_A '0'
+ * Y -> '.' BUT_X
+ * Select -> ESC TRIG_R
+ * Start -> F5 TRIG_L
+ * L -> Shift BUT_START
+ * R -> VK BUT_SELECT
+ */
+
+#define PAD_UP SDLK_UP
+#define PAD_DOWN SDLK_DOWN
+#define PAD_LEFT SDLK_LEFT
+#define PAD_RIGHT SDLK_RIGHT
+#define BUT_A SDLK_LSHIFT
+#define BUT_B SDLK_LALT
+#define BUT_X SDLK_SPACE
+#define BUT_Y SDLK_LCTRL
+#define BUT_SELECT SDLK_BACKSPACE
+#define BUT_START SDLK_TAB
+#define TRIG_L SDLK_RETURN
+#define TRIG_R SDLK_ESCAPE
+
+#endif
bool DINGUXSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
if (ev.key.keysym.sym == PAD_UP) {
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 5a66cdaa2f..7bebdf8ce6 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -62,7 +62,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode() {
_bIsDirectory = true;
_sPath = "";
_pFileLock = 0;
- _nProt = 0; // protection is ignored for the root volume
+ _nProt = 0; // Protection is ignored for the root volume
LEAVE();
}
@@ -84,7 +84,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
_bIsDirectory = false;
_bIsValid = false;
- // Check whether the node exists and if it is a directory
+ // Check whether the node exists and if it's a directory
struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_StringNameInput,_sPath.c_str(),TAG_END);
if (pExd) {
_nProt = pExd->Protection;
@@ -93,7 +93,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
_pFileLock = IDOS->Lock((CONST_STRPTR)_sPath.c_str(), SHARED_LOCK);
_bIsValid = (_pFileLock != 0);
- // Add a trailing slash if it is needed
+ // Add a trailing slash if needed
const char c = _sPath.lastChar();
if (c != '/' && c != ':')
_sPath += '/';
@@ -134,7 +134,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam
delete[] n;
}
- _bIsValid = false;
+ _bIsValid = false;
_bIsDirectory = false;
struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_FileLockInput,pLock,TAG_END);
@@ -188,10 +188,10 @@ bool AmigaOSFilesystemNode::exists() const {
bool nodeExists = false;
- // previously we were trying to examine the node in order
+ // Previously we were trying to examine the node in order
// to determine if the node exists or not.
// I don't see the point : once you have been granted a
- // lock on it then it means it exists...
+ // lock on it, it means it exists...
//
// ============================= Old code
// BPTR pLock = IDOS->Lock((STRPTR)_sPath.c_str(), SHARED_LOCK);
@@ -237,8 +237,8 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
ENTER();
bool ret = false;
- //TODO: honor the hidden flag
- // There is nothing like a hidden flag under AmigaOS...
+ // TODO: Honor the hidden flag
+ // There is no such thing as a hidden flag in AmigaOS...
if (!_bIsValid) {
debug(6, "Invalid node");
@@ -252,7 +252,7 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
return false; // Empty list
}
- if (_pFileLock == 0) {
+ if (isRootNode()) {
debug(6, "Root node");
LEAVE();
myList = listVolumes();
@@ -264,7 +264,7 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
EX_DataFields, (EXF_NAME|EXF_LINK|EXF_TYPE),
TAG_END);
if (context) {
- struct ExamineData * pExd = NULL; // NB: no need to free value after usage, all is dealt by the DirContext release
+ struct ExamineData * pExd = NULL; // NB: No need to free the value after usage, everything will be dealt with by the DirContext release
AmigaOSFilesystemNode *entry ;
while ( (pExd = IDOS->ExamineDir(context)) ) {
@@ -307,21 +307,33 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
ENTER();
- if (_pFileLock == 0) {
+ if (isRootNode()) {
debug(6, "Root node");
LEAVE();
return new AmigaOSFilesystemNode(*this);
}
+ BPTR pLock = _pFileLock;
+
+ if (!_bIsDirectory) {
+ assert(!pLock);
+ pLock = IDOS->Lock((CONST_STRPTR)_sPath.c_str(), SHARED_LOCK);
+ assert(pLock);
+ }
+
AmigaOSFilesystemNode *node;
- BPTR parentDir = IDOS->ParentDir( _pFileLock );
+ BPTR parentDir = IDOS->ParentDir( pLock );
if (parentDir) {
node = new AmigaOSFilesystemNode(parentDir);
IDOS->UnLock(parentDir);
} else
node = new AmigaOSFilesystemNode();
+ if (!_bIsDirectory) {
+ IDOS->UnLock(pLock);
+ }
+
LEAVE();
return node;
@@ -332,9 +344,9 @@ bool AmigaOSFilesystemNode::isReadable() const {
return false;
// Regular RWED protection flags are low-active or inverted, thus the negation.
- // moreover pseudo root filesystem (null _pFileLock) is readable whatever the
- // protection says
- bool readable = !(_nProt & EXDF_OTR_READ) || _pFileLock == 0;
+ // Moreover, a pseudo root filesystem is readable whatever the
+ // protection says.
+ bool readable = !(_nProt & EXDF_OTR_READ) || isRootNode();
return readable;
}
@@ -344,9 +356,9 @@ bool AmigaOSFilesystemNode::isWritable() const {
return false;
// Regular RWED protection flags are low-active or inverted, thus the negation.
- // moreover pseudo root filesystem (null _pFileLock) is never writable whatever
- // the protection says (because of the pseudo nature)
- bool writable = !(_nProt & EXDF_OTR_WRITE) && _pFileLock !=0;
+ // Moreover, a pseudo root filesystem is never writable whatever
+ // the protection says (Because of it's pseudo nature).
+ bool writable = !(_nProt & EXDF_OTR_WRITE) && !isRootNode();
return writable;
}
@@ -371,12 +383,13 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
if (dosList->dol_Type == DLT_VOLUME &&
dosList->dol_Name) {
- // Original was
- // dosList->dol_Name &&
- // dosList->dol_Task) {
+ // The original line was
+ //if (dosList->dol_Type == DLT_VOLUME &&
+ //dosList->dol_Name &&
+ //dosList->dol_Task) {
// which errored using SDK 53.24 with a 'struct dosList' has no member called 'dol_Task'
// I removed dol_Task because it's not used anywhere else
- // and it neither brought up further errors nor crashes or regressions.
+ // and it neither brought up further errors nor crashes or regressions
// Copy name to buffer
IDOS->CopyStringBSTRToC(dosList->dol_Name, buffer, MAXPATHLEN);
@@ -410,7 +423,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
delete[] volName;
}
- dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES);
+ dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES);
}
IDOS->UnLockDosList(kLockFlags);
diff --git a/backends/fs/amigaos4/amigaos4-fs.h b/backends/fs/amigaos4/amigaos4-fs.h
index bbe88b2716..408354888e 100644
--- a/backends/fs/amigaos4/amigaos4-fs.h
+++ b/backends/fs/amigaos4/amigaos4-fs.h
@@ -62,6 +62,11 @@ protected:
*/
virtual AbstractFSList listVolumes() const;
+ /**
+ * True if this is the pseudo root filesystem.
+ */
+ bool isRootNode() const { return _bIsValid && _bIsDirectory && _pFileLock == 0; }
+
public:
/**
* Creates an AmigaOSFilesystemNode with the root node as path.
@@ -76,19 +81,19 @@ public:
AmigaOSFilesystemNode(const Common::String &p);
/**
- * Creates an AmigaOSFilesystemNode given its lock and display name
+ * Creates an AmigaOSFilesystemNode given its lock and display name.
*
* @param pLock BPTR to the lock.
* @param pDisplayName name to be used for display, in case not supplied the FilePart() of the filename will be used.
*
- * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private
+ * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private.
*/
AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0);
/**
* Copy constructor.
*
- * @note Needed because it duplicates the file lock
+ * @note Needed because it duplicates the file lock.
*/
AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node);
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index cbd06e9161..c455c4ce2e 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -489,7 +489,7 @@ void OpenGLGraphicsManager::warpMouse(int x, int y) {
if (!_overlay) {
return;
}
-
+
// It might be confusing that we actually have to handle something
// here when the overlay is visible. This is because for very small
// resolutions we have a minimal overlay size and have to adjust
@@ -1044,8 +1044,8 @@ void OpenGLGraphicsManager::recalculateDisplayArea() {
}
// We center the screen in the middle for now.
- _displayX = (_outputScreenWidth - _displayWidth ) / 2;
- _displayY = (_outputScreenHeight - _displayHeight) / 2;
+ _displayX = (_outputScreenWidth - _displayWidth ) / 2;
+ _displayY = (_outputScreenHeight - _displayHeight) / 2;
}
void OpenGLGraphicsManager::updateCursorPalette() {
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index c998f3d1f1..b028cd5b1a 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -282,7 +282,7 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
if (!_fullscreenVideoModes.empty()) {
VideoModeArray::const_iterator i = _fullscreenVideoModes.end();
--i;
-
+
_desiredFullscreenWidth = i->width;
_desiredFullscreenHeight = i->height;
} else {
diff --git a/backends/keymapper/action.h b/backends/keymapper/action.h
index ed4bb86ce6..17b1153c77 100644
--- a/backends/keymapper/action.h
+++ b/backends/keymapper/action.h
@@ -37,7 +37,7 @@ namespace Common {
struct HardwareInput;
class Keymap;
-#define ACTION_ID_SIZE (4)
+#define ACTION_ID_SIZE (5)
struct KeyActionEntry {
const KeyState ks;
diff --git a/backends/platform/android/asset-archive.cpp b/backends/platform/android/asset-archive.cpp
index 52c2c084bd..6680081c16 100644
--- a/backends/platform/android/asset-archive.cpp
+++ b/backends/platform/android/asset-archive.cpp
@@ -295,7 +295,6 @@ AssetFdReadStream::AssetFdReadStream(JNIEnv *env, jobject assetfd) :
jclass cls = env->GetObjectClass(_assetfd);
MID_close = env->GetMethodID(cls, "close", "()V");
assert(MID_close);
- env->DeleteLocalRef(cls);
jmethodID MID_getStartOffset =
env->GetMethodID(cls, "getStartOffset", "()J");
@@ -321,6 +320,8 @@ AssetFdReadStream::AssetFdReadStream(JNIEnv *env, jobject assetfd) :
_fd = env->GetIntField(javafd, FID_descriptor);
env->DeleteLocalRef(javafd);
+
+ env->DeleteLocalRef(cls);
}
AssetFdReadStream::~AssetFdReadStream() {
diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk
index 48a9347143..1333e89ff8 100644
--- a/backends/platform/dingux/dingux.mk
+++ b/backends/platform/dingux/dingux.mk
@@ -1,6 +1,7 @@
DINGUX_EXE_STRIPPED := scummvm_stripped$(EXEEXT)
bundle_name = dingux-dist/scummvm
+gcw0_bundle = gcw0-opk
all: $(DINGUX_EXE_STRIPPED)
@@ -30,3 +31,37 @@ endif
$(CP) $(srcdir)/backends/platform/dingux/scummvm.gpe $(bundle_name)/
$(CP) $(srcdir)/backends/platform/dingux/README.DINGUX $(bundle_name)/
$(CP) $(srcdir)/backends/platform/dingux/scummvm.png $(bundle_name)/
+
+# Special target for generationg GCW-Zero OPK bundle
+$(gcw0_bundle): all
+ $(MKDIR) $(gcw0_bundle)
+ $(CP) $(DIST_FILES_DOCS) $(gcw0_bundle)/
+ $(MKDIR) $(gcw0_bundle)/themes
+ $(CP) $(DIST_FILES_THEMES) $(gcw0_bundle)/themes/
+ifdef DIST_FILES_ENGINEDATA
+ $(MKDIR) $(gcw0_bundle)/engine-data
+ $(CP) $(DIST_FILES_ENGINEDATA) $(gcw0_bundle)/engine-data/
+endif
+ifdef DYNAMIC_MODULES
+ $(MKDIR) $(gcw0_bundle)/plugins
+ $(CP) $(PLUGINS) $(gcw0_bundle)/plugins/
+endif
+ $(CP) $(EXECUTABLE) $(gcw0_bundle)/scummvm
+
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(gcw0_bundle)/
+ $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(gcw0_bundle)/
+
+ $(CP) $(srcdir)/dists/gcw0/scummvm.png $(gcw0_bundle)/
+ $(CP) $(srcdir)/dists/gcw0/default.gcw0.desktop $(gcw0_bundle)/
+ $(CP) $(srcdir)/dists/gcw0/scummvmrc $(gcw0_bundle)/
+ $(CP) $(srcdir)/dists/gcw0/scummvm.sh $(gcw0_bundle)/
+
+gcw0-opk-unstripped: $(gcw0_bundle)
+ $(CP) $(PLUGINS) $(gcw0_bundle)/plugins/
+ $(CP) $(EXECUTABLE) $(gcw0_bundle)/scummvm
+ ./dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm
+
+gcw-opk: $(gcw0_bundle)
+ $(STRIP) $(gcw0_bundle)/plugins/*
+ $(STRIP) $(gcw0_bundle)/scummvm
+ ./dists/gcw0/opk_make.sh -d $(gcw0_bundle) -o scummvm
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 41610dc0c7..4dc5929dab 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -390,7 +390,7 @@ Common::String OSystem_SDL::getSystemLanguage() const {
#else // WIN32
// Activating current locale settings
const Common::String locale = setlocale(LC_ALL, "");
-
+
// Restore default C locale to prevent issues with
// portability of sscanf(), atof(), etc.
// See bug #3615148
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index 0563639de3..13f5d1fbe0 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -70,73 +70,73 @@
#endif
#ifdef USE_WII_KBD
-static int keymap[][2] = {
- { KS_Return, Common::KEYCODE_RETURN },
- { KS_Up, Common::KEYCODE_UP },
- { KS_Down, Common::KEYCODE_DOWN },
- { KS_Left, Common::KEYCODE_LEFT },
- { KS_Right, Common::KEYCODE_RIGHT },
- { KS_Shift_L, Common::KEYCODE_LSHIFT },
- { KS_Shift_R, Common::KEYCODE_RSHIFT },
- { KS_Control_L, Common::KEYCODE_LCTRL },
- { KS_Control_R, Common::KEYCODE_RCTRL },
- { KS_Alt_L, Common::KEYCODE_LALT },
- { KS_Alt_R, Common::KEYCODE_RALT },
- { KS_Meta_L, Common::KEYCODE_LMETA },
- { KS_Meta_R, Common::KEYCODE_RMETA },
- { KS_KP_0, Common::KEYCODE_KP0 },
- { KS_KP_1, Common::KEYCODE_KP1 },
- { KS_KP_2, Common::KEYCODE_KP2 },
- { KS_KP_3, Common::KEYCODE_KP3 },
- { KS_KP_4, Common::KEYCODE_KP4 },
- { KS_KP_5, Common::KEYCODE_KP5 },
- { KS_KP_6, Common::KEYCODE_KP6 },
- { KS_KP_7, Common::KEYCODE_KP7 },
- { KS_KP_8, Common::KEYCODE_KP8 },
- { KS_KP_9, Common::KEYCODE_KP9 },
- { KS_Home, Common::KEYCODE_HOME },
- { KS_Insert, Common::KEYCODE_INSERT },
- { KS_End, Common::KEYCODE_END },
- { KS_Prior, Common::KEYCODE_PAGEUP },
- { KS_Next, Common::KEYCODE_PAGEDOWN },
- { KS_f1, Common::KEYCODE_F1 },
- { KS_f2, Common::KEYCODE_F2 },
- { KS_f3, Common::KEYCODE_F3 },
- { KS_f4, Common::KEYCODE_F4 },
- { KS_f5, Common::KEYCODE_F5 },
- { KS_f6, Common::KEYCODE_F6 },
- { KS_f7, Common::KEYCODE_F7 },
- { KS_f8, Common::KEYCODE_F8 },
- { KS_f9, Common::KEYCODE_F9 },
- { KS_f10, Common::KEYCODE_F10 },
- { KS_f11, Common::KEYCODE_F11 },
- { KS_f12, Common::KEYCODE_F12 },
- { KS_f13, Common::KEYCODE_F13 },
- { KS_f14, Common::KEYCODE_F14 },
- { KS_f15, Common::KEYCODE_F15 },
- { KS_F1, Common::KEYCODE_F1 },
- { KS_F2, Common::KEYCODE_F2 },
- { KS_F3, Common::KEYCODE_F3 },
- { KS_F4, Common::KEYCODE_F4 },
- { KS_F5, Common::KEYCODE_F5 },
- { KS_F6, Common::KEYCODE_F6 },
- { KS_F7, Common::KEYCODE_F7 },
- { KS_F8, Common::KEYCODE_F8 },
- { KS_F9, Common::KEYCODE_F9 },
- { KS_F10, Common::KEYCODE_F10 },
- { KS_F11, Common::KEYCODE_F11 },
- { KS_F12, Common::KEYCODE_F12 },
- { KS_F13, Common::KEYCODE_F13 },
- { KS_F14, Common::KEYCODE_F14 },
- { KS_F15, Common::KEYCODE_F15 },
- { KS_KP_Separator, Common::KEYCODE_KP_PERIOD },
- { KS_KP_Subtract, Common::KEYCODE_KP_DIVIDE },
- { KS_KP_Multiply, Common::KEYCODE_KP_MULTIPLY },
- { KS_KP_Add, Common::KEYCODE_KP_PLUS },
- { KS_KP_Subtract, Common::KEYCODE_KP_MINUS },
- { KS_KP_Equal, Common::KEYCODE_KP_EQUALS },
- { KS_KP_Enter, Common::KEYCODE_KP_ENTER },
- { 0, 0 }
+static int keymap[][3] = {
+ { KS_Return, Common::KEYCODE_RETURN, Common::ASCII_RETURN },
+ { KS_Up, Common::KEYCODE_UP, 0 },
+ { KS_Down, Common::KEYCODE_DOWN, 0 },
+ { KS_Left, Common::KEYCODE_LEFT, 0 },
+ { KS_Right, Common::KEYCODE_RIGHT, 0 },
+ { KS_Shift_L, Common::KEYCODE_LSHIFT, 0 },
+ { KS_Shift_R, Common::KEYCODE_RSHIFT, 0 },
+ { KS_Control_L, Common::KEYCODE_LCTRL, 0 },
+ { KS_Control_R, Common::KEYCODE_RCTRL, 0 },
+ { KS_Alt_L, Common::KEYCODE_LALT, 0 },
+ { KS_Alt_R, Common::KEYCODE_RALT, 0 },
+ { KS_Meta_L, Common::KEYCODE_LMETA, 0 },
+ { KS_Meta_R, Common::KEYCODE_RMETA, 0 },
+ { KS_KP_0, Common::KEYCODE_KP0, '0' },
+ { KS_KP_1, Common::KEYCODE_KP1, '1' },
+ { KS_KP_2, Common::KEYCODE_KP2, '2' },
+ { KS_KP_3, Common::KEYCODE_KP3, '3' },
+ { KS_KP_4, Common::KEYCODE_KP4, '4' },
+ { KS_KP_5, Common::KEYCODE_KP5, '5' },
+ { KS_KP_6, Common::KEYCODE_KP6, '6' },
+ { KS_KP_7, Common::KEYCODE_KP7, '7' },
+ { KS_KP_8, Common::KEYCODE_KP8, '8' },
+ { KS_KP_9, Common::KEYCODE_KP9, '9' },
+ { KS_Home, Common::KEYCODE_HOME, 0 },
+ { KS_Insert, Common::KEYCODE_INSERT, 0 },
+ { KS_End, Common::KEYCODE_END, 0 },
+ { KS_Prior, Common::KEYCODE_PAGEUP, 0 },
+ { KS_Next, Common::KEYCODE_PAGEDOWN, 0 },
+ { KS_f1, Common::KEYCODE_F1, Common::ASCII_F1 },
+ { KS_f2, Common::KEYCODE_F2, Common::ASCII_F2 },
+ { KS_f3, Common::KEYCODE_F3, Common::ASCII_F3 },
+ { KS_f4, Common::KEYCODE_F4, Common::ASCII_F4 },
+ { KS_f5, Common::KEYCODE_F5, Common::ASCII_F5 },
+ { KS_f6, Common::KEYCODE_F6, Common::ASCII_F6 },
+ { KS_f7, Common::KEYCODE_F7, Common::ASCII_F7 },
+ { KS_f8, Common::KEYCODE_F8, Common::ASCII_F8 },
+ { KS_f9, Common::KEYCODE_F9, Common::ASCII_F9 },
+ { KS_f10, Common::KEYCODE_F10, Common::ASCII_F10 },
+ { KS_f11, Common::KEYCODE_F11, Common::ASCII_F11 },
+ { KS_f12, Common::KEYCODE_F12, Common::ASCII_F12 },
+ { KS_f13, Common::KEYCODE_F13, 0 },
+ { KS_f14, Common::KEYCODE_F14, 0 },
+ { KS_f15, Common::KEYCODE_F15, 0 },
+ { KS_F1, Common::KEYCODE_F1, Common::ASCII_F1 },
+ { KS_F2, Common::KEYCODE_F2, Common::ASCII_F2 },
+ { KS_F3, Common::KEYCODE_F3, Common::ASCII_F3 },
+ { KS_F4, Common::KEYCODE_F4, Common::ASCII_F4 },
+ { KS_F5, Common::KEYCODE_F5, Common::ASCII_F5 },
+ { KS_F6, Common::KEYCODE_F6, Common::ASCII_F6 },
+ { KS_F7, Common::KEYCODE_F7, Common::ASCII_F7 },
+ { KS_F8, Common::KEYCODE_F8, Common::ASCII_F8 },
+ { KS_F9, Common::KEYCODE_F9, Common::ASCII_F9 },
+ { KS_F10, Common::KEYCODE_F10, Common::ASCII_F10 },
+ { KS_F11, Common::KEYCODE_F11, Common::ASCII_F11 },
+ { KS_F12, Common::KEYCODE_F12, Common::ASCII_F12 },
+ { KS_F13, Common::KEYCODE_F13, 0 },
+ { KS_F14, Common::KEYCODE_F14, 0 },
+ { KS_F15, Common::KEYCODE_F15, 0 },
+ { KS_KP_Separator, Common::KEYCODE_KP_PERIOD, '.' },
+ { KS_KP_Divide, Common::KEYCODE_KP_DIVIDE, '/' },
+ { KS_KP_Multiply, Common::KEYCODE_KP_MULTIPLY, '*' },
+ { KS_KP_Add, Common::KEYCODE_KP_PLUS, '+' },
+ { KS_KP_Subtract, Common::KEYCODE_KP_MINUS, '-' },
+ { KS_KP_Equal, Common::KEYCODE_KP_EQUALS, '=' },
+ { KS_KP_Enter, Common::KEYCODE_KP_ENTER, Common::ASCII_RETURN },
+ { 0, 0, 0 }
};
#endif
@@ -262,7 +262,7 @@ bool OSystem_Wii::pollKeyboard(Common::Event &event) {
while (keymap[i][0] != 0) {
if (keymap[i][0] == kbdEvent.symbol) {
event.kbd.keycode = static_cast<Common::KeyCode>(keymap[i][1]);
- event.kbd.ascii = 0;
+ event.kbd.ascii = keymap[i][2];
return true;
}
diff --git a/backends/taskbar/unity/unity-taskbar.cpp b/backends/taskbar/unity/unity-taskbar.cpp
index 1b82e58c8a..532d9656c3 100644
--- a/backends/taskbar/unity/unity-taskbar.cpp
+++ b/backends/taskbar/unity/unity-taskbar.cpp
@@ -26,6 +26,8 @@
#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_UNITY)
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include "backends/taskbar/unity/unity-taskbar.h"
#include "common/textconsole.h"
@@ -33,7 +35,12 @@
#include <unity.h>
UnityTaskbarManager::UnityTaskbarManager() {
- g_type_init();
+ /*
+ * Deprecated in Glib >= 2.36.0
+ */
+ if (!glib_check_version(2, 36, 0)) {
+ g_type_init();
+ }
_loop = g_main_loop_new(NULL, FALSE);