Index: dosbox-0.74/src/gui/sdlmain.cpp
===================================================================
--- dosbox-0.74.orig/src/gui/sdlmain.cpp	2010-10-19 18:10:14.000000000 +0200
+++ dosbox-0.74/src/gui/sdlmain.cpp	2010-10-19 20:41:16.000000000 +0200
@@ -132,6 +132,13 @@
 #include <os2.h>
 #endif
 
+#ifdef MAEMO
+#include <SDL/SDL_syswm.h>
+#include <X11/Xutil.h>
+// Love hacks:
+#	undef Always
+#endif
+
 enum SCREEN_TYPES	{
 	SCREEN_SURFACE,
 	SCREEN_SURFACE_DDRAW,
@@ -231,6 +238,29 @@
 bool startup_state_capslock=false;
 void GFX_SetTitle(Bit32s cycles,Bits frameskip,bool paused){
 	char title[200]={0};
+
+#if MAEMO
+	sprintf(title, "DOSBox - %s", RunningProgram);
+#if MAEMO_VERSION >= 5
+	SDL_WM_SetCaption(title, title);
+#else /* MAEMO_VERSION >= 5 */
+	SDL_SysWMinfo info;
+	SDL_VERSION(&info.version);
+
+	if (SDL_GetWMInfo(&info)) {
+		Display *dpy = info.info.x11.display;
+		Window win;
+
+		if (dpy) {
+			win = info.info.x11.fswindow;
+			if (win) XStoreName(dpy, win, title);
+			win = info.info.x11.wmwindow;
+			if (win) XStoreName(dpy, win, title);
+		}
+	}
+#endif /* MAEMO_VERSION >= 5 */
+
+#else /* MAEMO */
 	static Bit32s internal_cycles=0;
 	static Bits internal_frameskip=0;
 	if(cycles != -1) internal_cycles = cycles;
@@ -243,6 +273,7 @@
 
 	if(paused) strcat(title," PAUSED");
 	SDL_WM_SetCaption(title,VERSION);
+#endif /* MAEMO */
 }
 
 static void PauseDOSBox(bool pressed) {
