diff -ru scummvm/backends/sdl/sdl-common.cpp scummvm-arm/backends/sdl/sdl-common.cpp
old
|
new
|
|
595 | 595 | while(SDL_PollEvent(&ev)) { |
596 | 596 | switch(ev.type) { |
597 | 597 | case SDL_KEYDOWN: |
| 598 | #ifdef LINUPY |
| 599 | // Yopy has no ALT key, steal the SHIFT key |
| 600 | // (which isn't used much anyway) |
| 601 | if (ev.key.keysym.mod & KMOD_SHIFT) |
| 602 | b |= KBD_ALT; |
| 603 | if (ev.key.keysym.mod & KMOD_CTRL) |
| 604 | b |= KBD_CTRL; |
| 605 | #else |
598 | 606 | if (ev.key.keysym.mod & KMOD_SHIFT) |
599 | 607 | b |= KBD_SHIFT; |
600 | 608 | if (ev.key.keysym.mod & KMOD_CTRL) |
601 | 609 | b |= KBD_CTRL; |
602 | 610 | if (ev.key.keysym.mod & KMOD_ALT) |
603 | 611 | b |= KBD_ALT; |
| 612 | #endif |
604 | 613 | event->kbd.flags = b; |
605 | 614 | |
606 | 615 | // Alt-Return toggles full screen mode |
… |
… |
|
714 | 723 | } |
715 | 724 | } |
716 | 725 | |
| 726 | #ifdef LINUPY |
| 727 | // On Yopy map the End button to quit |
| 728 | if ((ev.key.keysym.sym==293)) { |
| 729 | event->event_code = EVENT_QUIT; |
| 730 | return true; |
| 731 | } |
| 732 | // Map menu key to f5 (scumm menu) |
| 733 | if (ev.key.keysym.sym==306) { |
| 734 | event->event_code = EVENT_KEYDOWN; |
| 735 | event->kbd.keycode = SDLK_F5; |
| 736 | event->kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); |
| 737 | return true; |
| 738 | } |
| 739 | // Map action key to action |
| 740 | if (ev.key.keysym.sym==291) { |
| 741 | event->event_code = EVENT_KEYDOWN; |
| 742 | event->kbd.keycode = SDLK_TAB; |
| 743 | event->kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0); |
| 744 | return true; |
| 745 | } |
| 746 | // Map OK key to skip cinematic |
| 747 | if (ev.key.keysym.sym==292) { |
| 748 | event->event_code = EVENT_KEYDOWN; |
| 749 | event->kbd.keycode = SDLK_ESCAPE; |
| 750 | event->kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); |
| 751 | return true; |
| 752 | } |
| 753 | #endif |
| 754 | |
717 | 755 | #ifdef QTOPIA |
718 | 756 | // quit on fn+backspace on zaurus |
719 | 757 | if (ev.key.keysym.sym == 127) { |
Only in scummvm-arm: config.h
Only in scummvm-arm: config.log
Only in scummvm-arm: config.mak
diff -ru scummvm/configure scummvm-arm/configure
old
|
new
|
|
42 | 42 | _backend=sdl |
43 | 43 | _ranlib=ranlib |
44 | 44 | _sdlconfig=sdl-config |
| 45 | _host="" |
| 46 | _sdlpath="$PATH" |
45 | 47 | |
46 | 48 | cc_check() { |
47 | 49 | echo >> "$TMPLOG" |
… |
… |
|
75 | 77 | return 0; |
76 | 78 | } |
77 | 79 | EOF |
78 | | eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler tmp_cxx_compiler.cpp |
| 80 | |
| 81 | if test -n "$_host"; then |
| 82 | # In cross-compiling mode, we cannot run the result |
| 83 | eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler tmp_cxx_compiler.cpp |
| 84 | else |
| 85 | eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler tmp_cxx_compiler.cpp |
| 86 | fi |
79 | 87 | } |
80 | 88 | |
81 | 89 | # |
… |
… |
|
90 | 98 | |
91 | 99 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
92 | 100 | |
93 | | for path_dir in $PATH; do |
| 101 | for path_dir in $_sdlpath; do |
94 | 102 | for sdlconfig in $sdlconfigs; do |
95 | | if test -e "$path_dir/$sdlconfig" ; then |
96 | | _sdlconfig=$sdlconfig |
| 103 | if test -x "$path_dir/$sdlconfig" ; then |
| 104 | _sdlconfig="$path_dir/$sdlconfig" |
97 | 105 | echo $_sdlconfig |
98 | 106 | break |
99 | 107 | fi |
… |
… |
|
171 | 179 | -h, --help display this help and exit |
172 | 180 | --backend=BACKEND backend to build (sdl, sdlgl, x11, morphos, dc, gp32) [sdl] |
173 | 181 | |
| 182 | Special configuration feature: |
| 183 | --host=HOST cross-compile to target HOST (arm-linux, ...) |
| 184 | special targets: linupy for Yopy PDA |
| 185 | |
174 | 186 | Optional Features: |
175 | 187 | --disable-scumm don't build the SCUMM engine |
176 | 188 | --disable-simon don't build the simon engine |
… |
… |
|
191 | 203 | --disable-zlib disable zlib (compression) support [autodetect] |
192 | 204 | --disable-mpeg2 disable mpeg2 codec for cutscenes [autodetect] |
193 | 205 | --with-mpeg2-prefix=PFX Prefix where libmpeg2 is installed (optional) |
| 206 | --with-sdl-prefix=PFX Prefix where the sdl-config script is installed |
194 | 207 | |
195 | 208 | EOF |
196 | 209 | exit 0 |
… |
… |
|
255 | 268 | --enable-release) |
256 | 269 | DEBFLAGS="" |
257 | 270 | ;; |
| 271 | --with-sdl-prefix=*) |
| 272 | arg=`echo $ac_option | cut -d '=' -f 2` |
| 273 | _sdlpath="$arg:$arg/bin" |
| 274 | ;; |
| 275 | --host=*) |
| 276 | _host=`echo $ac_option | cut -d '=' -f 2` |
| 277 | ;; |
258 | 278 | *) |
259 | 279 | echo "error: unrecognised option: $ac_option |
260 | 280 | Try \`$0 --help' for more information." >&2 |
… |
… |
|
264 | 284 | done; |
265 | 285 | |
266 | 286 | CXXFLAGS="$CXXFLAGS $DEBFLAGS" |
| 287 | |
| 288 | if test "$_host" = "linupy"; then |
| 289 | _host=arm-linux |
| 290 | CXXFLAGS="$CXXFLAGS -DLINUPY" |
| 291 | fi |
| 292 | |
267 | 293 | # |
268 | 294 | # Determine the C++ compiler |
269 | 295 | # |
270 | 296 | printf "Looking for C++ compiler... " |
271 | | compilers="$CXX g++ c++" |
| 297 | if test -n "$_host"; then |
| 298 | compilers="$CXX $_host-g++ $_host-c++" |
| 299 | else |
| 300 | compilers="$CXX g++ c++" |
| 301 | fi |
| 302 | |
272 | 303 | CXX= |
273 | 304 | for compiler in $compilers; do |
274 | | if test_compiler $compiler; then |
275 | | CXX=$compiler |
276 | | echo $CXX |
277 | | break |
278 | | fi |
| 305 | if test_compiler $compiler; then |
| 306 | CXX=$compiler |
| 307 | echo $CXX |
| 308 | break |
| 309 | fi |
279 | 310 | done |
280 | 311 | if test -z $CXX; then |
281 | 312 | echo "none found!" |
… |
… |
|
373 | 404 | _mak_queen='# DISABLE_QUEEN = 1' |
374 | 405 | fi |
375 | 406 | |
376 | | # |
377 | | # Determine hosttype |
378 | | # |
379 | | # TODO - also add an command line option to override this?!? |
380 | | # TODO - recognize more systems, e.g. *BSD |
381 | | printf "Checking hosttype... " |
382 | | hosttype=`uname -s` |
383 | | echo $hosttype |
384 | | case $hosttype in |
| 407 | |
| 408 | if test -n "$_host"; then |
| 409 | # Cross-compiling mode - add your target here if needed |
| 410 | case "$_host" in |
| 411 | arm-linux) |
| 412 | echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes" |
| 413 | DEFINES="$DEFINES -DUNIX" |
| 414 | _def_endianess='#define SCUMM_LITTLE_ENDIAN' |
| 415 | _def_align='#define SCUMM_NEED_ALIGNMENT' |
| 416 | type_1_byte='char' |
| 417 | type_2_byte='short' |
| 418 | type_4_byte='int' |
| 419 | ;; |
| 420 | *) |
| 421 | echo "Cross-compiling to unkown target, please add your target to configure." |
| 422 | exit 1 |
| 423 | ;; |
| 424 | esac |
| 425 | |
| 426 | else |
| 427 | # |
| 428 | # Determine hosttype |
| 429 | # |
| 430 | # TODO - also add an command line option to override this?!? |
| 431 | # TODO - recognize more systems, e.g. *BSD |
| 432 | printf "Checking hosttype... " |
| 433 | hosttype=`uname -s` |
| 434 | echo $hosttype |
| 435 | case $hosttype in |
385 | 436 | Linux | OpenBSD | FreeBSD | NetBSD | BSD/OS | SunOS | HP-UX | BeOS) |
386 | 437 | DEFINES="$DEFINES -DUNIX" |
387 | 438 | ;; |
… |
… |
|
410 | 461 | echo "WARNING: could not establish system type, assuming unix like" |
411 | 462 | DEFINES="$DEFINES -DUNIX" |
412 | 463 | ;; |
413 | | esac |
| 464 | esac |
414 | 465 | |
415 | | # |
416 | | # Check for endianess |
417 | | # |
418 | | printf "Checking endianess... " |
419 | | cat <<EOF >tmp_endianess_check.cpp |
| 466 | # |
| 467 | # Check for endianess |
| 468 | # |
| 469 | printf "Checking endianess... " |
| 470 | cat <<EOF >tmp_endianess_check.cpp |
420 | 471 | #include <stdio.h> |
421 | 472 | #include <stdlib.h> |
422 | 473 | int main(int argc, char **argv) |
… |
… |
|
432 | 483 | return 0; |
433 | 484 | } |
434 | 485 | EOF |
435 | | $CXX -o tmp_endianess_check tmp_endianess_check.cpp |
436 | | endianess=`./tmp_endianess_check` |
437 | | echo $endianess; |
438 | | case $endianess in |
| 486 | $CXX -o tmp_endianess_check tmp_endianess_check.cpp |
| 487 | endianess=`./tmp_endianess_check` |
| 488 | echo $endianess; |
| 489 | case $endianess in |
439 | 490 | big) |
440 | | _def_endianess='#define SCUMM_BIG_ENDIAN' |
441 | | ;; |
| 491 | _def_endianess='#define SCUMM_BIG_ENDIAN' |
| 492 | ;; |
442 | 493 | little) |
443 | | _def_endianess='#define SCUMM_LITTLE_ENDIAN' |
444 | | ;; |
| 494 | _def_endianess='#define SCUMM_LITTLE_ENDIAN' |
| 495 | ;; |
445 | 496 | *) |
446 | | exit 1 |
447 | | ;; |
448 | | esac |
449 | | rm -f tmp_endianess_check tmp_endianess_check.cpp |
450 | | |
451 | | # |
452 | | # Check whether memory alignment is required |
453 | | # |
454 | | echo -n "Alignment required... " |
455 | | cat > $TMPC << EOF |
| 497 | exit 1 |
| 498 | ;; |
| 499 | esac |
| 500 | rm -f tmp_endianess_check tmp_endianess_check.cpp |
| 501 | |
| 502 | # |
| 503 | # Check whether memory alignment is required |
| 504 | # |
| 505 | echo -n "Alignment required... " |
| 506 | cat > $TMPC << EOF |
456 | 507 | #include <stdlib.h> |
457 | 508 | #include <signal.h> |
458 | 509 | int main(int argc, char **argv) |
… |
… |
|
467 | 518 | return 0; |
468 | 519 | } |
469 | 520 | EOF |
470 | | _need_memalign=yes |
471 | | cc_check && $TMPO && _need_memalign=no |
472 | | if test "$_need_memalign" = yes ; then |
473 | | _def_align='#define SCUMM_NEED_ALIGNMENT' |
474 | | else |
475 | | _def_align='#undef SCUMM_NEED_ALIGNMENT' |
| 521 | _need_memalign=yes |
| 522 | cc_check && $TMPO && _need_memalign=no |
| 523 | if test "$_need_memalign" = yes ; then |
| 524 | _def_align='#define SCUMM_NEED_ALIGNMENT' |
| 525 | else |
| 526 | _def_align='#undef SCUMM_NEED_ALIGNMENT' |
| 527 | fi |
| 528 | echo "$_need_memalign" |
| 529 | |
| 530 | # |
| 531 | # Determine data type sizes |
| 532 | # TODO: proper error checking |
| 533 | # |
| 534 | printf "Type with 1 byte... " |
| 535 | type_1_byte=`find_type_with_size 1` |
| 536 | echo "$type_1_byte" |
| 537 | |
| 538 | printf "Type with 2 bytes... " |
| 539 | type_2_byte=`find_type_with_size 2` |
| 540 | echo "$type_2_byte" |
| 541 | |
| 542 | printf "Type with 4 bytes... " |
| 543 | type_4_byte=`find_type_with_size 4` |
| 544 | echo "$type_4_byte" |
| 545 | |
476 | 546 | fi |
477 | | echo "$_need_memalign" |
478 | | |
479 | | # |
480 | | # Determine data type sizes |
481 | | # TODO: proper error checking |
482 | | # |
483 | | printf "Type with 1 byte... " |
484 | | type_1_byte=`find_type_with_size 1` |
485 | | echo "$type_1_byte" |
486 | | |
487 | | printf "Type with 2 bytes... " |
488 | | type_2_byte=`find_type_with_size 2` |
489 | | echo "$type_2_byte" |
490 | | |
491 | | printf "Type with 4 bytes... " |
492 | | type_4_byte=`find_type_with_size 4` |
493 | | echo "$type_4_byte" |
494 | | |
495 | 547 | |
496 | 548 | echocheck "Ogg Vorbis" |
497 | 549 | if test "$_vorbis" = auto ; then |