summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_htc.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_htc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_htc.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp
index c21e10d..4e5200b 100644
--- a/libopie2/opiecore/device/odevice_htc.cpp
+++ b/libopie2/opiecore/device/odevice_htc.cpp
@@ -411,34 +411,33 @@ bool HTC::setDisplayStatus( bool on )
411 char buf[10]; 411 char buf[10];
412 buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; 412 buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
413 buf[1] = '\0'; 413 buf[1] = '\0';
414 res = ( ::write( fd, &buf[0], 2 ) == 0 ); 414 res = ( ::write( fd, &buf[0], 2 ) == 0 );
415 ::close( fd ); 415 ::close( fd );
416 } 416 }
417 return res; 417 return res;
418} 418}
419 419
420Transformation HTC::rotation() const 420Transformation HTC::rotation() const
421{ 421{
422 qDebug( "HTC::rotation()" ); 422 qDebug( "HTC::rotation()" );
423 Transformation rot; 423 Transformation rot = Rot270;
424 424
425 switch ( d->m_model ) { 425 switch ( d->m_model ) {
426 case Model_HTC_Universal: 426 case Model_HTC_Universal:
427 { 427 {
428 OHingeStatus hs = readHingeSensor(); 428 OHingeStatus hs = readHingeSensor();
429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs ); 429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs );
430 if ( hs == CASE_PORTRAIT ) rot = Rot0; 430 if ( hs == CASE_PORTRAIT ) rot = Rot0;
431 else if ( hs == CASE_UNKNOWN ) rot = Rot270; 431 else if ( hs == CASE_UNKNOWN ) rot = Rot270;
432 else rot = Rot270;
433 } 432 }
434 break; 433 break;
435 } 434 }
436 435
437 qDebug( "HTC::rotation() - returning '%d'", rot ); 436 qDebug( "HTC::rotation() - returning '%d'", rot );
438 return rot; 437 return rot;
439} 438}
440ODirection HTC::direction() const 439ODirection HTC::direction() const
441{ 440{
442 ODirection dir; 441 ODirection dir;
443 442
444 switch ( d->m_model ) { 443 switch ( d->m_model ) {