vmwlegacy: Fix a bug in screen dimension calculation
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 30 Mar 2011 09:01:06 +0000 (11:01 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 30 Mar 2011 09:01:06 +0000 (11:01 +0200)
This bug resulted in incorrect screen dimensions and DPI being calculated
in some circumstances, leading to among other things bad aspect ratios in xine.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/vmware.c

index 1f262e3..4158732 100644 (file)
@@ -1626,10 +1626,10 @@ VMWareDriverFunc(ScrnInfoPtr pScrn,
        * keep the DPI constant.
        */
       if (modemm && modemm->mode) {
-         modemm->mmWidth *= (modemm->mode->HDisplay * VMWARE_INCHTOMM +
-                             pScrn->xDpi / 2)  / pScrn->xDpi;
-         modemm->mmHeight *= (modemm->mode->VDisplay * VMWARE_INCHTOMM +
-                              pScrn->yDpi / 2) / pScrn->yDpi;
+         modemm->mmWidth = (modemm->mode->HDisplay * VMWARE_INCHTOMM +
+                            pScrn->xDpi / 2)  / pScrn->xDpi;
+         modemm->mmHeight = (modemm->mode->VDisplay * VMWARE_INCHTOMM +
+                             pScrn->yDpi / 2) / pScrn->yDpi;
       }
       return TRUE;
    default: