aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/maemo/scummvm-0.11.0-maemo.patch
blob: 9014a326cbf4e134fe1fb588bd6e14e21489033d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
diff -Naur scummvm-0.11.orig/debian/changelog scummvm-0.11/debian/changelog
--- scummvm-0.11.orig/debian/changelog	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/changelog	2008-01-12 22:26:50.000000000 +0100
@@ -0,0 +1,69 @@
+scummvm (0.11.0-0) unstable; urgency=low
+
+  * upstream 0.11 release
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Sat, 12 Jan 2008 22:26:34 +0100
+scummvm (0.10.0-5) unstable; urgency=low
+
+  * fixed for chinook, menu selection postinst script added
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Thu, 25 Oct 2007 09:56:32 +0200
+scummvm (0.10.0-4) unstable; urgency=low
+
+  * AGI - added pred.dic to DATA_PATH (=/usr/share/scummvm) to enable
+    predictive input
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Tue, 28 Aug 2007 09:58:29 +0200
+scummvm (0.10.0-3) unstable; urgency=low
+
+  * SCUMM - added mapping also for key up events (may fix right button in FT?)
+  * SWORD2 - added right button press mapping (not tested)
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Mon, 20 Aug 2007 22:39:07 +0200
+scummvm (0.10.0-2) unstable; urgency=low
+
+  * Future Wars - add mapping for left/up/down/right,zoom +/-
+  * fix SDL backend to set mouse position on button down event
+    as we may not have mousemove events with touchscreen
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Fri, 13 Jul 2007 09:56:37 +0200
+scummvm (0.10.0-1) unstable; urgency=low
+
+  * mapped F10 in Future Wars to menu key
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Wed, 11 Jul 2007 22:20:00 +0200
+scummvm (0.10.0) unstable; urgency=low
+
+  * upstream 0.10 release, enabled FLAC too
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Wed,  4 Jul 2007 12:48:48 +0200
+scummvm (0.9.1-1) unstable; urgency=low
+
+  * 0.9.1 mapped right mouse button in sword1
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Mon, 18 Jun 2007 21:15:31 +0200
+scummvm (0.9.1) unstable; urgency=low
+
+  * 0.9.1 upstream release
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Wed,  1 Nov 2006 20:40:51 +0100
+scummvm (0.9.0-3) unstable; urgency=low
+
+  * merged fixes in 0.9.0 upstream branch
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Mon,  9 Oct 2006 15:40:59 +0200
+scummvm (0.9.0-2) unstable; urgency=low
+
+  * merged fixes in 0.9.0 upstream branch
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Sat, 12 Aug 2006 20:10:47 +0200
+scummvm (0.9.0-1) unstable; urgency=low
+
+  * merged changes in 0.9.0 upstream release
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Sun, 23 Jul 2006 22:29:51 +0200
+scummvm (0.9.0) unstable; urgency=low
+
+  * 0.9.0 upstream release
+
+ -- Frantisek Dufka <dufkaf@seznam.cz>  Tue, 27 Jun 2006 20:30:54 +0200
diff -Naur scummvm-0.11.orig/debian/compat scummvm-0.11/debian/compat
--- scummvm-0.11.orig/debian/compat	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/compat	2008-01-06 20:45:14.000000000 +0100
@@ -0,0 +1 @@
+4
diff -Naur scummvm-0.11.orig/debian/control scummvm-0.11/debian/control
--- scummvm-0.11.orig/debian/control	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/control	2008-01-06 20:45:14.000000000 +0100
@@ -0,0 +1,47 @@
+Source: scummvm
+Section: user/games
+Priority: optional
+Maintainer: Frantisek Dufka <dufkaf@seznam.cz>
+Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev
+
+Standards-Version: 3.6.1.1
+Package: scummvm
+Pre-Depends: maemo-select-menu-location
+Depends: ${shlibs:Depends}
+Architecture: any
+Section: user/games
+Description: free implementation of LucasArts' S.C.U.M.M interpreter
+ ScummVM is a virtual machine for classic graphical adventure games.
+ This package does not contain any actual games.
+XBS-Maemo-Icon-26:
+  iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAC/VBMVEUICwcH
+  CQUKDAgLDQoMDwsOEAwREAUPEQ0QEg8PFQoRExAUEwoVFAwPGAcTFBIRFg0W
+  FQ0XFg4RGgkTGA8XGQsTGwwUHA0aGRIWGxMXHQkVHQ8aGhMbGxQcHQocGxUZ
+  HwsYIgcfHxgeIRUbJQwhIBofJAweJwgfKQocKwwgKgshKw0gLggfLg8jLQ8n
+  LwwpLhEmMwcoMRQjNgotLCYmNwQlNwwqOBQtOQgsOQ8xNh4sPQswNyQqQAUw
+  PAsuOiAsQgcwOyIqRgIsSAQvRgs0PyY1Rg06RA0+PDAwSwg2RxUzTQE4TQsz
+  VAc/SSo6VAk4VwE6VRM2XAVAUC85XwlJVCNEXQo+YwJGXwxMWS1JXC5AagBI
+  awJUagRIcQBSbwpHeAJTaD9OdwNXcwJKewZNfABacRlOfQBPfgBQfwBMggBW
+  fgBNgwNSgQJOhAVecUJjdSZefwNUiABZhgBjeDZieDxhezFQjQBgghZkhQ5j
+  iQJUkAZcixJmgDZnhCtckQpblgBekw5clwBqgkthlQBdmAJriz90hz5omgBs
+  mAhxlgd0mAB5lgBpnA16khdzmAtxnABooQBtnwB4jUpzngBkpQR5nQF8j0Vr
+  pQduoRZ4nRR3k014oQBzpAt8oAh/ogBvqA5trACBmypwqRF1pw+GogCAow+D
+  pQB8phJ/nUNurxh0rRd4rwmHqQd6qDOArwCJqwyDsgCMrgB8ryiFtAB7uQN8
+  sDKBuAWOsBWJqFR8ti2IsiOSswaBuRt6vxCOtgqXsgePrjR9wQCFuw2KuQyB
+  uSeSuACEux6JuR2OvACAxACEvCuSuhOHujSMwQGTtiqfuACRvwGOvRWHuz2T
+  wASPwwmYvwaLvTebuxiWvhmSwBqZwAmNu0aevgiKvkCVviaMvE6bwQycuTid
+  vhylvQyZwB2cwg+QywCawR6fwB+bwyGI0gaewCudxCOjwyOT1ACmwjiX0g+j
+  xTqmxzOd1gCV0i6kyyuoyTah1Sif2h6tzjukzF+pz1uq1Eeg2Uml3U1kaLAB
+  AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAHrSURBVCjPY2BAAC5ubkFB
+  BkzAzggDfKgSUFEmKCmOIsPvktA0aVpbSYQ+FwsjkwpMBsi2m/X7z89v3759
+  +ngg1UqIlZEVponJYcW/rw9unH/04u2bc0vbo+WZWGCahEv/fj+6Yc2SZfv3
+  b5w6+eACHVYWmCazMz+unN44b3ZfV3dnx5yDiaKsUAOZGD2/fL58+PSGg3Gu
+  buEVWyZacLCzw6S8X324fOHqibMxWpKy5okBIjAZoNOt9r47e+HOnafbe/ND
+  DNWkOGAyDKwsCtXPTly4eufqm+fvHy4M1RRggsnJMLI6z9x99Oqtx7cuPP/2
+  ele5LjtCGyObbcHcDfuevHn+5s319RuSpOByrEwcwsqhlcvXHbp38+LxiXP6
+  DeBSTKzWvkrCun5Zq04dO7S6p67ZHibFziiRt6PYUk5YtfbUqSMTGnKyHaFS
+  rMDA3fHr7tqayKDWa0dWVmXHp5lCpRgZ2QI2HTl25NLt+1t3rppRFJ8SrwGX
+  4g9rmbJo0cpVqxZNaK5OS0nzF4NLMWkHZ1TVN9bXlxXmAo2L0uNgZITaxcjI
+  axAYH5+RATQrPtZHk5udA+Z2cIpQN3Hy8vOwMVLmYGTidoenDSawLAsnJz8L
+  kMUiY4ySpviYoKmKRVAcIyXKyIiLyygi+ADqVqrAkApevwAAAABJRU5ErkJg
+  gg==
diff -Naur scummvm-0.11.orig/debian/copyright scummvm-0.11/debian/copyright
--- scummvm-0.11.orig/debian/copyright	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/copyright	2008-01-12 22:40:37.000000000 +0100
@@ -0,0 +1,20 @@
+ScummVM was debianized by Bastien Nocera <hadess@hadess.net> the 5th Apr 2002.
+It was adopted by Tore Anderson <tore@linpro.no> the 4th Oct 2002.
+Packaged for the Maemo platform by Tomas Junnoen <tomas@fs-security.com> Oct 2005
+Since 0.8.2 packaging for Maemo done by Frantisek Dufka <dufkaf@seznam.cz>
+
+It was downloaded from <http://www.scummvm.org/>.
+
+Upstream Authors: see AUTHORS file of the ScummVM source distribution.
+
+Copyright:
+
+ 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, or (at your option) any
+ later version.
+
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL'.
+
+This copyright also applies to the Debian-related build scripts.
diff -Naur scummvm-0.11.orig/debian/files scummvm-0.11/debian/files
--- scummvm-0.11.orig/debian/files	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/files	2008-01-12 22:27:20.000000000 +0100
@@ -0,0 +1 @@
+scummvm_0.11.0-0_armel.deb user/games optional
diff -Naur scummvm-0.11.orig/debian/postinst scummvm-0.11/debian/postinst
--- scummvm-0.11.orig/debian/postinst	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/postinst	2008-01-06 20:45:14.000000000 +0100
@@ -0,0 +1,3 @@
+#! /bin/sh
+maemo-select-menu-location scummvm.desktop tana_fi_games
+exit 0
diff -Naur scummvm-0.11.orig/debian/rules scummvm-0.11/debian/rules
--- scummvm-0.11.orig/debian/rules	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/rules	2008-01-11 22:16:49.000000000 +0100
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+
+build: scummvm
+
+scummvm:
+	dh_testdir
+#	CXXFLAGS="-Os -mcpu=arm926ej-s -fomit-frame-pointer -DMAEMO_SDL" ./configure  --host=arm-linux --prefix=/usr --disable-debug --disable-mt32emu  --disable-hq-scalers --with-tremor-prefix=/usr --enable-tremor --with-zlib-prefix=/usr --enable-zlib --with-mad-prefix=/usr --enable-mad --enable-flac --disable-fluidsynth
+##  --enable-plugins --disable-scumm-7-8
+	$(MAKE)
+
+clean:
+	dh_testdir
+	dh_testroot
+	-$(MAKE) distclean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean
+	dh_installdirs
+	install -m0755 scummvm debian/scummvm/usr/games/scummvm.bin
+	install -m0755 dists/maemo/scummvm.wrapper debian/scummvm/usr/games/scummvm
+	install -m0644 dists/maemo/scummvm.desktop debian/scummvm/usr/share/applications/hildon
+	install -m0644 icons/scummvm.xpm debian/scummvm/usr/share/icons
+#	install -m0644 -d debian/scummvm/usr/lib/scummvm
+#	install -m0644 plugins/lib*.so debian/scummvm/usr/lib/scummvm
+	install -m0644 -d debian/scummvm/usr/share/scummvm
+	install -m0644 dists/pred.dic debian/scummvm/usr/share/scummvm
+#	install -m0644 gui/themes/modern.ini gui/themes/modern.zip gui/themes/classic080.ini debian/scummvm/usr/share/scummvm
+
+binary: binary-arch
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs NEWS
+	dh_link
+	dh_strip
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-indep:
+
+.PHONY: build clean binary install binary-arch binary-indep
diff -Naur scummvm-0.11.orig/debian/scummvm.dirs scummvm-0.11/debian/scummvm.dirs
--- scummvm-0.11.orig/debian/scummvm.dirs	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/scummvm.dirs	2008-01-06 20:45:14.000000000 +0100
@@ -0,0 +1,3 @@
+usr/games
+usr/share/icons
+usr/share/applications/hildon
\ No newline at end of file
diff -Naur scummvm-0.11.orig/debian/scummvm.links scummvm-0.11/debian/scummvm.links
--- scummvm-0.11.orig/debian/scummvm.links	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/scummvm.links	2008-01-06 20:45:14.000000000 +0100
@@ -0,0 +1 @@
+/var/lib/install/usr/share/applications/scummvm.desktop /etc/others-menu/extra_applications/scummvm.desktop
diff -Naur scummvm-0.11.orig/debian/scummvm.substvars scummvm-0.11/debian/scummvm.substvars
--- scummvm-0.11.orig/debian/scummvm.substvars	1970-01-01 01:00:00.000000000 +0100
+++ scummvm-0.11/debian/scummvm.substvars	2008-01-12 22:27:19.000000000 +0100
@@ -0,0 +1 @@
+shlibs:Depends=libc6 (>= 2.3.5-1), libgcc1 (>= 1:3.4.4), libsdl1.2, libstdc++6 (>= 3.4.4), zlib1g (>= 1:1.2.1)
--- scummvm-0.11.orig/engines/sword1/sword1.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/sword1/sword1.cpp	2008-01-06 21:06:26.000000000 +0100
@@ -722,8 +722,21 @@
 		while (_eventMan->pollEvent(event)) {
 			switch (event.type) {
 			case Common::EVENT_KEYDOWN:
+#ifdef MAEMO_SDL
+// map center to right button
+				if (event.kbd.keycode == 13) {
+					_mouseState |= BS1R_BUTTON_DOWN;
+				} else
+#endif
 				_keyPressed = event.kbd;
 				break;
+#ifdef MAEMO_SDL
+			case Common::EVENT_KEYUP:
+				if (event.kbd.keycode == 13) {
+					_mouseState |= BS1R_BUTTON_UP;
+				}
+				break;
+#endif
 			case Common::EVENT_MOUSEMOVE:
 				_mouseCoord = event.mouse;
 				break;
--- scummvm-0.11.orig/engines/sword2/sword2.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/sword2/sword2.cpp	2008-01-06 20:50:57.000000000 +0100
@@ -552,11 +552,28 @@
 						_gameSpeed = 1;
 				}
 			}
+#ifdef MAEMO_SDL
+// map center to right button
+			else if (event.kbd.keycode == 13 && !(_inputEventFilter & RD_RIGHTBUTTONDOWN)) {
+				_mouseEvent.pending = true;
+				_mouseEvent.buttons = RD_RIGHTBUTTONDOWN;
+			} else
+#endif
 			if (!(_inputEventFilter & RD_KEYDOWN)) {
 				_keyboardEvent.pending = true;
 				_keyboardEvent.kbd = event.kbd;
 			}
+
+			break;
+#ifdef MAEMO_SDL
+		case Common::EVENT_KEYUP:
+// map center to right button
+			if (event.kbd.keycode == 13 && !(_inputEventFilter & RD_RIGHTBUTTONUP)) {
+				_mouseEvent.pending = true;
+				_mouseEvent.buttons = RD_RIGHTBUTTONUP;
+			}
 			break;
+#endif
 		case Common::EVENT_LBUTTONDOWN:
 			if (!(_inputEventFilter & RD_LEFTBUTTONDOWN)) {
 				_mouseEvent.pending = true;
--- scummvm-0.11.orig/engines/scumm/input.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/scumm/input.cpp	2008-01-07 13:50:01.000000000 +0100
@@ -89,6 +89,20 @@
 				_keyPressed = event.kbd;
 			}
 
+#ifdef	MAEMO_SDL
+		switch (_keyPressed.keycode) {
+			case Common::KEYCODE_F8: _fastMode ^= 1; break ;// Map F8 (zoom out) to toggle fast mode
+			case Common::KEYCODE_F4: _keyPressed.keycode = Common::KEYCODE_F5; _keyPressed.ascii=Common::ASCII_F5 ; break; // map F4 to F5 (menu key)
+			case Common::KEYCODE_RETURN: _keyPressed.keycode = Common::KEYCODE_TAB; _keyPressed.ascii=Common::ASCII_TAB ; break; // map Select (return) to Tab (right mouse button)
+			case Common::KEYCODE_F7: if(_game.id == GID_MONKEY2){ _keyPressed.ascii = '1';_keyPressed.keycode=Common::KEYCODE_1;} break; // map F7 (zoom in) to 1 (to bypass Monkey2 copy protection)
+			default: ;
+		}
+		if (_game.version < 7) switch(event.kbd.keycode){
+			case Common::KEYCODE_UP: _keyPressed.ascii = ' '; _keyPressed.keycode=Common::KEYCODE_SPACE; break ;// map Up to space (pause game)
+			case Common::KEYCODE_DOWN: _keyPressed.ascii ='.'; _keyPressed.keycode=Common::KEYCODE_PERIOD; break ;// map Down to . (skip one line of dialog)
+			default: ;
+		}
+#endif
 			if (_game.heversion >= 80) {
 				// FIXME: Move this code & VAR_KEY_STATE to class ScummEngine_v80he
 
@@ -131,6 +145,21 @@
 			break;
 
 		case Common::EVENT_KEYUP:
+#ifdef	MAEMO_SDL
+			// map keyup with similar rules as keydown
+			switch (event.kbd.keycode) {
+
+				case Common::KEYCODE_F4: event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii=Common::ASCII_F5 ; break; // map F4 to F5 (menu key)
+				case Common::KEYCODE_RETURN: event.kbd.keycode = Common::KEYCODE_TAB; event.kbd.ascii=Common::ASCII_TAB ; break; // map Select (return) to Tab (right mouse button)
+				case Common::KEYCODE_F7: if(_game.id == GID_MONKEY2){ event.kbd.ascii = '1';event.kbd.keycode=Common::KEYCODE_1;} break; // map F7 (zoom in) to 1 (to bypass Monkey2 copy protection)
+				default: ;
+			}
+			if (_game.version < 7) switch(event.kbd.keycode){
+				case Common::KEYCODE_UP: event.kbd.ascii = ' '; event.kbd.keycode=Common::KEYCODE_SPACE; break ;// map Up to space (pause game)
+				case Common::KEYCODE_DOWN: event.kbd.ascii ='.'; event.kbd.keycode=Common::KEYCODE_PERIOD; break ;// map Down to . (skip one line of dialog)
+				default: ;
+			}
+#endif
 			if (event.kbd.ascii >= 512) {
 				debugC(DEBUG_GENERAL, "keyPressed > 512 (%d)", event.kbd.ascii);
 			} else {
@@ -480,9 +509,10 @@
 		if (VAR_SAVELOAD_SCRIPT != 0xFF && _currentRoom != 0)
 			runScript(VAR(VAR_SAVELOAD_SCRIPT2), 0, 0, 0);
 
+#ifndef MAEMO_SDL
 	} else if (restartKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_F8 && lastKeyHit.flags == 0)) {
 		confirmRestartDialog();
-
+#endif
 	} else if (pauseKeyEnabled && (lastKeyHit.keycode == Common::KEYCODE_SPACE && lastKeyHit.flags == 0)) {
 		pauseGame();
 
--- scummvm-0.11.orig/engines/scumm/dialogs.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/scumm/dialogs.cpp	2008-01-06 21:52:30.000000000 +0100
@@ -818,7 +818,11 @@
 }
 
 void PauseDialog::handleKeyDown(Common::KeyState state) {
+#ifdef MAEMO_SDL
+	if (state.ascii == ' ' || state.keycode==273 )  // Close pause dialog if space or UP key is pressed
+#else
 	if (state.ascii == ' ')  // Close pause dialog if space key is pressed
+#endif
 		close();
 	else
 		ScummDialog::handleKeyDown(state);
@@ -885,12 +889,19 @@
 }
 
 void ValueDisplayDialog::handleKeyDown(Common::KeyState state) {
+#ifdef MAEMO_SDL
+        if (state.ascii == _incKey || state.ascii == _decKey || state.keycode == 275 || state.keycode == 276) {
+                if ((state.ascii == _incKey || state.keycode == 275 ) && _value < _max)
+                        _value++;
+                else if ((state.ascii == _decKey || state.keycode == 276) && _value > _min)
+                        _value--;
+#else
 	if (state.ascii == _incKey || state.ascii == _decKey) {
 		if (state.ascii == _incKey && _value < _max)
 			_value++;
 		else if (state.ascii == _decKey && _value > _min)
 			_value--;
-
+#endif
 		setResult(_value);
 		_timer = getMillis() + kDisplayDelay;
 		draw();
--- scummvm-0.11.orig/engines/touche/touche.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/touche/touche.cpp	2008-01-10 23:09:41.000000000 +0100
@@ -294,6 +294,13 @@
 			_flagsTable[611] = 1;
 			break;
 		case Common::EVENT_KEYDOWN:
+#ifdef	MAEMO_SDL
+			if (event.kbd.keycode == 13) { // select button simulates righ button toggle
+				_inp_rightMouseButtonPressed=!_inp_rightMouseButtonPressed;
+			} else {
+				_inp_rightMouseButtonPressed = false;
+			}
+#endif
 			if (!handleKeyEvents) {
 				break;
 			}
@@ -302,15 +309,25 @@
 				if (_displayQuitDialog) {
 					_flagsTable[611] = displayQuitDialog();
 				}
+#ifdef	MAEMO_SDL
+			} else if (event.kbd.keycode == Common::KEYCODE_F4) {
+#else
 			} else if (event.kbd.keycode == Common::KEYCODE_F5) {
+#endif
 				if (_flagsTable[618] == 0 && !_hideInventoryTexts) {
 					handleOptions(0);
 				}
+#ifdef	MAEMO_SDL
+			} else if (event.kbd.keycode == Common::KEYCODE_F8) {
+				_fastWalkMode = !_fastWalkMode;
+			}
+#else
 			} else if (event.kbd.keycode == Common::KEYCODE_F9) {
 				_fastWalkMode = true;
 			} else if (event.kbd.keycode == Common::KEYCODE_F10) {
 				_fastWalkMode = false;
 			}
+#endif
 			if (event.kbd.flags == Common::KBD_CTRL) {
 				if (event.kbd.keycode == Common::KEYCODE_d) {
 					// enable debugging stuff ?
@@ -333,6 +350,10 @@
 		case Common::EVENT_LBUTTONDOWN:
 			_inp_leftMouseButtonPressed = true;
 			break;
+		case Common::EVENT_LBUTTONUP:
+			// this is done elsewhere _inp_leftMouseButtonPressed = false;
+			_inp_rightMouseButtonPressed = false; // simulate rbutton up to close menu
+			break;
 		case Common::EVENT_RBUTTONDOWN:
 			_inp_rightMouseButtonPressed = true;
 			break;
--- scummvm-0.11.orig/engines/sky/sky.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/sky/sky.cpp	2008-01-06 22:31:44.000000000 +0100
@@ -524,6 +524,17 @@
 			switch (event.type) {
 			case Common::EVENT_KEYDOWN:
 				_keyPressed = event.kbd;
+#ifdef	MAEMO_SDL
+				// Maemo platform keybindings
+				if (_keyPressed.keycode == Common::KEYCODE_F4) // Map F4 (menu) to F5 (access main menu)
+					_keyPressed.keycode = Common::KEYCODE_F5;
+				if (_keyPressed.ascii == 13) // Map Select=Enter to right mouse button
+					_skyMouse->buttonPressed(1);
+				if (_keyPressed.keycode == Common::KEYCODE_F8) // Map F8 (zoom out) to toggle fast mode
+					_fastMode ^= 1;
+				if (_keyPressed.keycode == Common::KEYCODE_DOWN) // Map Down to . (skip one line of dialog)
+					_keyPressed.ascii = '.';
+#endif
 				break;
 			case Common::EVENT_MOUSEMOVE:
 				if (!(_systemVars.systemFlags & SF_MOUSE_LOCKED))
--- scummvm-0.11.orig/engines/gob/util.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/gob/util.cpp	2008-01-06 20:52:51.000000000 +0100
@@ -107,6 +107,12 @@
 			_mouseButtons &= ~2;
 			break;
 		case Common::EVENT_KEYDOWN:
+#ifdef MAEMO_SDL
+			if (event.kbd.keycode==285){
+				_mouseButtons |= 2;
+				break;
+			}
+#endif
 			if (event.kbd.flags == Common::KBD_CTRL) {
 				if (event.kbd.keycode == Common::KEYCODE_f)
 					_fastMode ^= 1;
@@ -117,6 +123,10 @@
 			addKeyToBuffer(event.kbd);
 			break;
 		case Common::EVENT_KEYUP:
+#ifdef MAEMO_SDL
+			if (event.kbd.keycode==285)
+				_mouseButtons &= ~2;
+#endif
 			break;
 		case Common::EVENT_QUIT:
 			_vm->_quitRequested = true;
--- scummvm-0.11.orig/engines/lure/menu.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/lure/menu.cpp	2008-01-07 21:07:54.000000000 +0100
@@ -34,7 +34,7 @@
 #include "lure/events.h"
 #include "lure/lure.h"
 
-#if defined(_WIN32_WCE)
+#if defined(_WIN32_WCE) || defined(MAEMO_SDL)
 #define LURE_CLICKABLE_MENUS
 #endif
 
--- scummvm-0.11.orig/engines/queen/input.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/queen/input.cpp	2008-01-06 21:29:58.000000000 +0100
@@ -174,7 +174,11 @@
 		}
 		break;
 	case Common::KEYCODE_F1: // use Journal
+#ifdef MAEMO_SDL
+	case Common::KEYCODE_F4: // menu key on N770
+#else
 	case Common::KEYCODE_F5:
+#endif
 		if (_cutawayRunning) {
 			if (_canQuit) {
 				_keyVerb = VERB_USE_JOURNAL;
--- scummvm-0.11.orig/engines/cine/main_loop.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/engines/cine/main_loop.cpp	2008-01-12 21:39:53.000000000 +0100
@@ -78,18 +78,27 @@
 				mouseRight = 1;
 			}
 			break;
+#ifdef	MAEMO_SDL
+		case Common::KEYCODE_UP:
+#else
 		case Common::KEYCODE_F1:
+#endif
 			if (allowPlayerInput) {
 				playerCommand = 0; // EXAMINE
 				makeCommandLine();
 			}
 			break;
+#ifdef	MAEMO_SDL
+		case Common::KEYCODE_DOWN:
+#else
 		case Common::KEYCODE_F2:
+#endif
 			if (allowPlayerInput) {
 				playerCommand = 1; // TAKE
 				makeCommandLine();
 			}
 			break;
+#ifndef	MAEMO_SDL
 		case Common::KEYCODE_F3:
 			if (allowPlayerInput) {
 				playerCommand = 2; // INVENTORY
@@ -102,13 +111,41 @@
 				makeCommandLine();
 			}
 			break;
+#else
+//map f3, f4 to f8,f7 = zoom +- keys, when in menu generate keypresses for savegame
+		case Common::KEYCODE_F8:
+			if (inMenu)
+				lastKeyStroke = '1';
+			else if (allowPlayerInput) {
+				playerCommand = 2; // INVENTORY
+				makeCommandLine();
+			}
+			break;
+		case Common::KEYCODE_F7:
+			if (inMenu)
+				lastKeyStroke = '2';
+			else
+			if (allowPlayerInput) {
+				playerCommand = 3; // USE
+				makeCommandLine();
+			}
+			break;
+#endif
+#ifdef	MAEMO_SDL
+		case Common::KEYCODE_LEFT:
+#else
 		case Common::KEYCODE_F5:
+#endif
 			if (allowPlayerInput) {
 				playerCommand = 4; // ACTIVATE
 				makeCommandLine();
 			}
 			break;
+#ifdef	MAEMO_SDL
+		case Common::KEYCODE_RIGHT:
+#else
 		case Common::KEYCODE_F6:
+#endif
 			if (allowPlayerInput) {
 				playerCommand = 5; // SPEAK
 				makeCommandLine();
@@ -120,7 +157,11 @@
 				makeCommandLine();
 			}
 			break;
+#ifdef	MAEMO_SDL
+		case Common::KEYCODE_F4: // Menu key
+#else
 		case Common::KEYCODE_F10:
+#endif
 			if (!disableSystemMenu && !inMenu) {
 				g_cine->makeSystemMenu();
 			}
--- scummvm-0.11.orig/backends/plugins/sdl/sdl-provider.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/backends/plugins/sdl/sdl-provider.cpp	2008-01-06 20:53:38.000000000 +0100
@@ -31,8 +31,12 @@
 
 #include "SDL.h"
 #include "SDL_loadso.h"
-#define PLUGIN_DIRECTORY	"plugins/"
 
+#ifdef	PLUGIN_PATH
+#define	PLUGIN_DIRECTORY	PLUGIN_PATH
+#else
+#define PLUGIN_DIRECTORY	"plugins/"
+#endif
 
 class SDLPlugin : public DynamicPlugin {
 protected:
--- scummvm-0.11.orig/backends/platform/sdl/events.cpp	2008-01-12 00:06:35.000000000 +0100
+++ scummvm-0.11/backends/platform/sdl/events.cpp	2008-01-12 22:21:51.000000000 +0100
@@ -26,7 +26,9 @@
 #include "backends/platform/sdl/sdl.h"
 #include "common/util.h"
 #include "common/events.h"
-
+#ifdef MAEMO_SDL
+#include "common/config-manager.h"
+#endif
 // FIXME move joystick defines out and replace with confile file options
 // we should really allow users to map any key to a joystick button
 #define JOY_DEADZONE 3200
@@ -192,9 +194,13 @@
 		case SDL_KEYDOWN:{
 			b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
 
+#ifdef  MAEMO_SDL
+			if (ev.key.keysym.sym == SDLK_F6) {
+#else
 			// Alt-Return and Alt-Enter toggle full screen mode
 			if (b == Common::KBD_ALT && (ev.key.keysym.sym == SDLK_RETURN
-			                  || ev.key.keysym.sym == SDLK_KP_ENTER)) {
+					|| ev.key.keysym.sym == SDLK_KP_ENTER)) {
+#endif
 				setFullscreenMode(!_fullscreen);
 #ifdef USE_OSD
 				if (_fullscreen)
@@ -311,7 +317,10 @@
 				break;
 
 			fillMouseEvent(event, ev.button.x, ev.button.y);
-
+#ifdef  MAEMO_SDL
+			// we have touchscreen so we may have no mousemotion events between taps
+			setMousePos(event.mouse.x, event.mouse.y);
+#endif
 			return true;
 
 		case SDL_MOUSEBUTTONUP:
@@ -444,7 +453,54 @@
 	return false;
 }
 
+// called on SDL KEYUP and KEYDOWN events
 bool OSystem_SDL::remapKey(SDL_Event &ev, Common::Event &event) {
+#ifdef MAEMO_SDL
+	static int engine=0;
+#define	ENG_OTHER	-1
+//#define	ENG_SCUMM	1
+	static int game=0;
+#define GAME_OTHER	-1
+#define GAME_LURE	1
+//#define GAME_SWORD1	2
+//#define	GAME_SWORD2	3
+	if (!engine){
+		// one time initialization
+		Common::String gameid(ConfMan.get("gameid"));
+		if (gameid == "lure") {
+			game=GAME_LURE;
+			engine=ENG_OTHER;
+		} else {
+			game=GAME_OTHER;
+			engine=ENG_OTHER;
+		}
+	}
+	// engine specific mappings
+	switch (engine){
+
+	}
+	// game specific mapping
+	switch (game) {
+		case GAME_LURE:
+			switch(ev.key.keysym.sym){
+				case SDLK_F5: // map F5 (home key) to f9 = restart game
+					ev.key.keysym.sym=SDLK_F9;
+					break;
+				case SDLK_F8: // map F8 (zoom key) to F5 (save dialog) in game
+					ev.key.keysym.sym=SDLK_F5;
+					break;
+				case SDLK_F4: // map menu to right click
+					event.type = ((ev.type==SDL_KEYUP) ? Common::EVENT_RBUTTONUP : Common::EVENT_RBUTTONDOWN );
+					event.mouse.x = _mouseCurState.x;
+					event.mouse.y = _mouseCurState.y;
+					return true;
+				default:
+					;
+			}
+		break;
+	}
+#endif //SDL_MAEMO
+
 #ifdef LINUPY
 	// On Yopy map the End button to quit
 	if ((ev.key.keysym.sym == 293)) {