summaryrefslogtreecommitdiff
authorbipolar <bipolar>2002-03-11 18:38:29 (UTC)
committer bipolar <bipolar>2002-03-11 18:38:29 (UTC)
commit0f81c8354840d1c8e54e3b083d965e1b2489bb36 (patch) (unidiff)
treea5120c79d3eec5024fe0d0e2622eb7e439fc8c39
parent9eb665b004caceafcc74fb147dc713729d2abf8e (diff)
downloadopie-0f81c8354840d1c8e54e3b083d965e1b2489bb36.zip
opie-0f81c8354840d1c8e54e3b083d965e1b2489bb36.tar.gz
opie-0f81c8354840d1c8e54e3b083d965e1b2489bb36.tar.bz2
add new qt/e patch
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qte232-for-qpe150.patch106
1 files changed, 106 insertions, 0 deletions
diff --git a/qt/qte232-for-qpe150.patch b/qt/qte232-for-qpe150.patch
new file mode 100644
index 0000000..c01f1f3
--- a/dev/null
+++ b/qt/qte232-for-qpe150.patch
@@ -0,0 +1,106 @@
1 --- src/kernel/qsoundqss_qws.cpp.origWed Jan 30 12:49:24 2002
2 +++ src/kernel/qsoundqss_qws.cppWed Jan 30 12:47:41 2002
3@@ -142,6 +142,19 @@ public:
4 return wavedata_remaining < 0 || !max;
5 }
6 private:
7+ int getOneSample()
8+ {
9 +int sample;
10 +if ( chunkdata.wBitsPerSample == 8 ) {
11 + sample = (data[out++] - 128) * 128;
12 + wavedata_remaining--;
13 +} else {
14 + sample = ((short*)data)[out/2];
15 + out += 2;
16 + wavedata_remaining -= 2;
17 +}
18 +return sample;
19+ }
20 void getSample(int& l, int& r)
21 {
22 l = r = 0;
23@@ -152,38 +165,22 @@ private:
24 if ( out >= max ) {
25 max = dev->readBlock((char*)data,
26 (uint)QMIN(sound_buffer_size,wavedata_remaining));
27 - wavedata_remaining -= max;
28 out = 0;
29 if ( max <= 0 ) {
30 max = 0;
31 return;
32 }
33 }
34 - if ( chunkdata.wBitsPerSample == 8 ) {
35 - l = (data[out++] - 128) * 128;
36 - } else {
37 - l = ((short*)data)[out/2];
38 - out += 2;
39 - }
40 + l = getOneSample();
41 if ( sound_stereo ) {
42 if ( chunkdata.channels == 1 ) {
43 r = l;
44 } else {
45 - if ( chunkdata.wBitsPerSample == 8 ) {
46 - r = (data[out++] - 128) * 128;
47 - } else {
48 - r = ((short*)data)[out/2];
49 - out += 2;
50 - }
51 + r = getOneSample();
52 }
53 } else {
54 if ( chunkdata.channels == 2 ) {
55 - if ( chunkdata.wBitsPerSample == 8 ) {
56 - r = (data[out++] - 128) * 128;
57 - } else {
58 - r = ((short*)data)[out/2];
59 - out += 2;
60 - }
61 + r = getOneSample();
62 l = l + r;
63 }
64 }
65
66 --- src/kernel/qpixmap_qws.cpp.origMon Mar 11 17:00:03 2002
67 +++ src/kernel/qpixmap_qws.cppMon Mar 11 17:01:05 2002
68@@ -585,6 +585,13 @@ QPixmap QPixmap::xForm( const QWMatrix &
69 QWMatrix mat( 1, 0, 0, 1, -xmin, -ymin );// true matrix
70 mat = matrix * mat;
71
72+ // calculate new width and height
73+ QPointArray a( QRect( 0,0,ws,hs ) );
74+ a = mat.map( a );
75+ QRect r = a.boundingRect().normalize();
76+ w = r.width();
77+ h = r.height();
78+
79 if ( matrix.m12() == 0.0F && matrix.m21() == 0.0F &&
80 matrix.m11() >= 0.0F && matrix.m22() >= 0.0F &&
81 depth() == defaultDepth() // ### stretchBlt limitation
82@@ -593,11 +600,6 @@ QPixmap QPixmap::xForm( const QWMatrix &
83 if ( mat.m11() == 1.0F && mat.m22() == 1.0F )
84 return *this; // identity matrix
85
86 -h = qRound( mat.m22()*hs );
87 -w = qRound( mat.m11()*ws );
88 -h = QABS( h );
89 -w = QABS( w );
90-
91 if(w==0 || h==0) {
92 return *this;
93 }
94@@ -618,12 +620,6 @@ QPixmap QPixmap::xForm( const QWMatrix &
95 }
96 return pm;
97
98 - } else { // rotation or shearing
99 -QPointArray a( QRect(0,0,ws,hs) );
100 -a = mat.map( a );
101 -QRect r = a.boundingRect().normalize();
102 -w = r.width();
103 -h = r.height();
104 }
105 bool invertible;
106 mat = mat.invert( &invertible ); // invert matrix