summaryrefslogtreecommitdiff
path: root/packages/libsdl/libsdl-qpe-1.2.9/ipaq-1.2.9.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/libsdl/libsdl-qpe-1.2.9/ipaq-1.2.9.patch')
-rw-r--r--packages/libsdl/libsdl-qpe-1.2.9/ipaq-1.2.9.patch140
1 files changed, 140 insertions, 0 deletions
diff --git a/packages/libsdl/libsdl-qpe-1.2.9/ipaq-1.2.9.patch b/packages/libsdl/libsdl-qpe-1.2.9/ipaq-1.2.9.patch
new file mode 100644
index 0000000000..0ad182bae6
--- /dev/null
+++ b/packages/libsdl/libsdl-qpe-1.2.9/ipaq-1.2.9.patch
@@ -0,0 +1,140 @@
+diff -Naur SDL-1.2.9-orig/src/video/qtopia/Makefile.am SDL-1.2.9/src/video/qtopia/Makefile.am
+--- SDL-1.2.9-orig/src/video/qtopia/Makefile.am 2007-03-12 20:57:23.000000000 +0100
++++ SDL-1.2.9/src/video/qtopia/Makefile.am 2007-03-12 20:58:02.000000000 +0100
+@@ -22,4 +22,4 @@
+ # overwrite USER variables
+ CXXLD = $(CC)
+ CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++ $(AM_LDFLAGS) $(LDFLAGS) -lopiecore2 -o $@
+diff -Naur SDL-1.2.9-orig/src/video/qtopia/SDL_QWin.cc SDL-1.2.9/src/video/qtopia/SDL_QWin.cc
+--- SDL-1.2.9-orig/src/video/qtopia/SDL_QWin.cc 2007-03-12 20:57:00.000000000 +0100
++++ SDL-1.2.9/src/video/qtopia/SDL_QWin.cc 2007-03-12 20:58:02.000000000 +0100
+@@ -29,8 +29,11 @@
+ #include "SDL_QWin.h"
+ #include <qapplication.h>
+ #include <qpe/qpeapplication.h>
++#include <opie2/odevice.h>
+ #include <qdirectpainter_qws.h>
+
++using namespace Opie::Core;
++
+ extern int fb_hwrot;
+ extern int fb_direct;
+ extern bool is_VGA_machine;
+@@ -545,18 +548,32 @@
+ case Qt::Key_F7: scancode = SDLK_F7; break;
+ case Qt::Key_F8: scancode = SDLK_F8; break;
+ case Qt::Key_F9:
+- scancode = SDLK_F9;
+- mouse_button_mode=1;
++ if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) {
++ scancode = SDLK_y; }
++ else {
++ scancode = SDLK_F9;
++ mouse_button_mode=1; }
+ break;
+ case Qt::Key_F10:
+- scancode = SDLK_F10;
+- mouse_button_mode=2;
++ if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) {
++ scancode = SDLK_LALT; }
++ else {
++ scancode = SDLK_F10;
++ mouse_button_mode=2; }
+ break;
+ case Qt::Key_F11: scancode = SDLK_F11; break;
+- case Qt::Key_F12: scancode = SDLK_F12; break;
++ case Qt::Key_F12:
++ if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) {
++ scancode = SDLK_RETURN; }
++ else {
++ scancode = SDLK_F12; }
++ break;
+ case Qt::Key_F13:
+- scancode = SDLK_F13;
+- mouse_button_mode=3;
++ if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) {
++ scancode = SDLK_ESCAPE; }
++ else {
++ scancode = SDLK_F13;
++ mouse_button_mode=3; }
+ break;
+ case Qt::Key_F14: scancode = SDLK_F14; break;
+ case Qt::Key_F15: scancode = SDLK_F15; break;
+@@ -573,6 +590,9 @@
+ scancode = SDLK_RETURN;
+ break;
+
++ // To use record button on ipaq
++ case Qt::Key_F24: scancode = SDLK_LSHIFT; break;
++
+ default:
+ scancode = SDLK_UNKNOWN;
+ break;
+diff -Naur SDL-1.2.9-orig/src/video/qtopia/SDL_sysvideo.cc SDL-1.2.9/src/video/qtopia/SDL_sysvideo.cc
+--- SDL-1.2.9-orig/src/video/qtopia/SDL_sysvideo.cc 2007-03-12 20:55:07.000000000 +0100
++++ SDL-1.2.9/src/video/qtopia/SDL_sysvideo.cc 2007-03-12 20:58:02.000000000 +0100
+@@ -45,6 +45,7 @@
+ #include <qapplication.h>
+ #include <qpe/qpeapplication.h>
+ #include <qpe/qcopenvelope_qws.h>
++#include <opie2/odevice.h>
+ #include <qgfx_qws.h>
+ #include <qwindowsystem_qws.h>
+ #include <qwidget.h>
+@@ -66,6 +67,8 @@
+ #include "SDL_syswm_c.h"
+ #include "SDL_lowvideo.h"
+
++using namespace Opie::Core;
++
+ //#define QTOPIA_DEBUG
+ #define QTOPIA_LOG
+ #define QT_HIDDEN_SIZE 32 /* starting hidden window size */
+@@ -106,6 +109,7 @@
+ MACHINE_SHARP_SLC760,
+ MACHINE_SHARP_SLC860,
+ MACHINE_SHARP_SL6000,
++ MACHINE_IPAQ,
+ MACHINE_MAX
+ } machine_t;
+
+@@ -119,6 +123,7 @@
+ { "Sharp", "SL-C760", 0 },
+ { "Sharp", "SL-C860", 0 },
+ { "Sharp", "SL-6000", 0 },
++ { "HP", "HP IPAQ", 0 },
+ };
+
+ /* Name of the environment variable used to invert the screen rotation or not:
+@@ -423,6 +428,13 @@
+ machine = MACHINE_SHARP_SLC760;
+ else if (strstr(buf, "SHARP Boxer") != NULL)
+ machine = MACHINE_SHARP_SLC860;
++ else if ( ODevice::inst ( )-> series ( ) == Model_iPAQ )
++ machine = MACHINE_IPAQ;
++ else
++ {
++ machine = MACHINE_SHARP_SL5000D;
++ LOG("Can't detect machine defaulting to SL5000D");
++ }
+ }
+ fclose(fp);
+ } else {
+@@ -679,6 +691,15 @@
+ if (machine == MACHINE_SHARP_SL5500)
+ qteRotation = 3;
+
++ // HP IPaq
++ if ( ODevice::inst( )-> series ( ) == Model_iPAQ ) {
++ qteRotation = 3;
++ }
++ if ( ODevice::inst ( )-> model ( ) == Model_iPAQ_H38xx ) {
++ qteRotation = 1;
++ }
++
++
+ // SL-B500 用ハック(とりあえず、ね)
+ if (machine == MACHINE_SHARP_SLB500)
+ qteRotation = 3;