Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 39b37cd..a824392 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -25,24 +25,25 @@ | |||
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "odevice_beagle.h" | 30 | #include "odevice_beagle.h" |
31 | #include "odevice_ipaq.h" | 31 | #include "odevice_ipaq.h" |
32 | #include "odevice_jornada.h" | 32 | #include "odevice_jornada.h" |
33 | #include "odevice_ramses.h" | 33 | #include "odevice_ramses.h" |
34 | #include "odevice_simpad.h" | 34 | #include "odevice_simpad.h" |
35 | #include "odevice_yopy.h" | 35 | #include "odevice_yopy.h" |
36 | #include "odevice_zaurus.h" | 36 | #include "odevice_zaurus.h" |
37 | #include "odevice_genuineintel.h" | ||
37 | 38 | ||
38 | /* QT */ | 39 | /* QT */ |
39 | #include <qapplication.h> | 40 | #include <qapplication.h> |
40 | #include <qfile.h> | 41 | #include <qfile.h> |
41 | #include <qtextstream.h> | 42 | #include <qtextstream.h> |
42 | #include <qwindowsystem_qws.h> | 43 | #include <qwindowsystem_qws.h> |
43 | 44 | ||
44 | /* OPIE */ | 45 | /* OPIE */ |
45 | #include <qpe/config.h> | 46 | #include <qpe/config.h> |
46 | #include <qpe/resource.h> | 47 | #include <qpe/resource.h> |
47 | #include <qpe/sound.h> | 48 | #include <qpe/sound.h> |
48 | #include <qpe/qcopenvelope_qws.h> | 49 | #include <qpe/qcopenvelope_qws.h> |
@@ -134,24 +135,31 @@ ODevice *ODevice::inst() | |||
134 | if ( line.startsWith( "Hardware" ) ) | 135 | if ( line.startsWith( "Hardware" ) ) |
135 | { | 136 | { |
136 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 137 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
137 | cpu_info = line; | 138 | cpu_info = line; |
138 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); | 139 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); |
139 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); | 140 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); |
140 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); | 141 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); |
141 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); | 142 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); |
142 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); | 143 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); |
143 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); | 144 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); |
144 | else qWarning( "ODevice() - unknown hardware - using default." ); | 145 | else qWarning( "ODevice() - unknown hardware - using default." ); |
145 | break; | 146 | break; |
147 | } else if ( line.startsWith( "vendor_id" ) ) { | ||
148 | qDebug( "ODevice() - found '%s'", (const char*) line ); | ||
149 | cpu_info = line; | ||
150 | if( line.contains( "genuineintel", false ) ) { | ||
151 | dev = new Internal::GenuineIntel(); | ||
152 | break; | ||
153 | } | ||
146 | } | 154 | } |
147 | } | 155 | } |
148 | } | 156 | } |
149 | else | 157 | else |
150 | { | 158 | { |
151 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); | 159 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); |
152 | } | 160 | } |
153 | if ( !dev ) dev = new ODevice(); | 161 | if ( !dev ) dev = new ODevice(); |
154 | dev->init(cpu_info); | 162 | dev->init(cpu_info); |
155 | } | 163 | } |
156 | return dev; | 164 | return dev; |
157 | } | 165 | } |