diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2005-03-23 00:32:49 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2005-03-23 00:32:49 +0000 |
commit | ac18f8e308221af368fd4153b4eee7b89f8dd4bc (patch) | |
tree | 8ab1edda5ae54c35cbaa873207a35ce211e591c7 /hw/vfb/InitOutput.c | |
parent | 45bcb8e22ad949c456368b7d4f4226110f8b5cfc (diff) |
//bugs.freedesktop.org/show_bug.cgi?id=2789) attachment #2187
(https://bugs.freedesktop.org/attachment.cgi?id=2187) Fix Xvfb to honor
the "-dpi" option (instead of using a hardcoded value of 100DPI).
Diffstat (limited to 'hw/vfb/InitOutput.c')
-rw-r--r-- | hw/vfb/InitOutput.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 0fbf014d6..4c08d223f 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -855,9 +855,15 @@ static Bool vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) { vfbScreenInfoPtr pvfb = &vfbScreens[index]; - int dpix = 100, dpiy = 100; + int dpix = monitorResolution, dpiy = monitorResolution; int ret; char *pbits; + + if (dpix == 0) + dpix = 100; + + if (dpiy == 0) + dpiy = 100; pvfb->paddedBytesWidth = PixmapBytePad(pvfb->width, pvfb->depth); pvfb->bitsPerPixel = vfbBitsPerPixel(pvfb->depth); |