summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2012-05-09 23:46:20 +0200
committerTormod Volden <debian.tormod@gmail.com>2012-05-20 21:50:14 +0200
commit7a441035e2aac4d76dcd4cb548e0b9e1d9eea8ba (patch)
treea82ac83a373ba93124dbc1a073c6cdfe7eae7f81
parent0fcc405001c8b85f6cadb863784848366afd8278 (diff)
fixup: duoview 1: write decision logic simpler, easier to read
-rw-r--r--src/savage_vbe.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/savage_vbe.c b/src/savage_vbe.c
index 1528896..ded0857 100644
--- a/src/savage_vbe.c
+++ b/src/savage_vbe.c
@@ -350,12 +350,9 @@ int SavageCorrectDuoViewFlag(int iDevInfo, Bool bEnableActivate,
/* decision logic */
/* only use iDevInfo here to avoid side effects on the return value */
- if ((iDevInfo & TV_ACTIVE) != 0) { /* TV enabled, check if either CRT or LCD is also on */
- if (((iDevInfo & CRT_ACTIVE) != 0)
- || ((iDevInfo & LCD_ACTIVE) != 0)) {
- bDoEnable = TRUE;
- }
- }
+ if ((iDevInfo & TV_ACTIVE) &&
+ ((iDevInfo & CRT_ACTIVE) || (iDevInfo & LCD_ACTIVE)))
+ bDoEnable = TRUE;
/* action logic */
if (bDoEnable == TRUE) {