summaryrefslogtreecommitdiff
path: root/packages/libsdl/libsdl-qpe-1.2.7/ipaq.patch
blob: bf57953c085a99aedc8cb42af098cc4165962e24 (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
Index: SDL-1.2.7/src/video/qtopia/Makefile.am
===================================================================
--- SDL-1.2.7.orig/src/video/qtopia/Makefile.am	2005-05-16 14:21:01.000000000 +0200
+++ SDL-1.2.7/src/video/qtopia/Makefile.am	2005-05-16 14:24:02.000000000 +0200
@@ -22,4 +22,4 @@
 # overwrite USER variables
 CXXLD = $(CC)
 CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -lsupc++ -o $@
+	$(AM_LDFLAGS) $(LDFLAGS) -lopiecore2 -lsupc++ -o $@
Index: SDL-1.2.7/src/video/qtopia/SDL_QWin.cc
===================================================================
--- SDL-1.2.7.orig/src/video/qtopia/SDL_QWin.cc	2005-05-16 14:21:01.000000000 +0200
+++ SDL-1.2.7/src/video/qtopia/SDL_QWin.cc	2005-05-16 14:24:02.000000000 +0200
@@ -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;
Index: SDL-1.2.7/src/video/qtopia/SDL_sysvideo.cc
===================================================================
--- SDL-1.2.7.orig/src/video/qtopia/SDL_sysvideo.cc	2005-05-16 14:21:00.000000000 +0200
+++ SDL-1.2.7/src/video/qtopia/SDL_sysvideo.cc	2005-05-16 14:24:02.000000000 +0200
@@ -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;