diff --git a/src/dummy.h b/src/dummy.h
index c3fdd6e..7e7e0aa 100644
a
|
b
|
typedef struct dummyRec |
51 | 51 | /* options */ |
52 | 52 | OptionInfoPtr Options; |
53 | 53 | Bool swCursor; |
| 54 | Bool constantDPI; |
54 | 55 | /* proc pointer */ |
55 | 56 | CloseScreenProcPtr CloseScreen; |
56 | 57 | xf86CursorInfoPtr CursorInfo; |
diff --git a/src/dummy_driver.c b/src/dummy_driver.c
index 6062c39..926bf5a 100644
a
|
b
|
|
34 | 34 | #include <X11/extensions/Xv.h> |
35 | 35 | #endif |
36 | 36 | |
| 37 | #include "randrstr.h" |
| 38 | |
37 | 39 | /* |
38 | 40 | * Driver data structures. |
39 | 41 | */ |
… |
… |
static SymTabRec DUMMYChipsets[] = { |
118 | 120 | }; |
119 | 121 | |
120 | 122 | typedef enum { |
121 | | OPTION_SW_CURSOR |
| 123 | OPTION_SW_CURSOR, |
| 124 | OPTION_CONSTANT_DPI |
122 | 125 | } DUMMYOpts; |
123 | 126 | |
124 | 127 | static const OptionInfoRec DUMMYOptions[] = { |
125 | 128 | { OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE }, |
| 129 | { OPTION_CONSTANT_DPI, "ConstantDPI", OPTV_BOOLEAN, {0}, FALSE }, |
126 | 130 | { -1, NULL, OPTV_NONE, {0}, FALSE } |
127 | 131 | }; |
128 | 132 | |
… |
… |
DUMMYPreInit(ScrnInfoPtr pScrn, int flags) |
362 | 366 | xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, dPtr->Options); |
363 | 367 | |
364 | 368 | xf86GetOptValBool(dPtr->Options, OPTION_SW_CURSOR,&dPtr->swCursor); |
| 369 | xf86GetOptValBool(dPtr->Options, OPTION_CONSTANT_DPI, &dPtr->constantDPI); |
365 | 370 | |
366 | 371 | if (device->videoRam != 0) { |
367 | 372 | pScrn->videoRam = device->videoRam; |
… |
… |
Bool |
666 | 671 | DUMMYSwitchMode(SWITCH_MODE_ARGS_DECL) |
667 | 672 | { |
668 | 673 | SCRN_INFO_PTR(arg); |
669 | | return dummyModeInit(pScrn, mode); |
| 674 | if (!dummyModeInit(pScrn, mode)) |
| 675 | return FALSE; |
| 676 | DUMMYPtr dPtr = DUMMYPTR(pScrn); |
| 677 | if (dPtr->constantDPI) { |
| 678 | pScrn->pScreen->mmWidth = mode->HDisplay * 254 / 960; |
| 679 | pScrn->pScreen->mmHeight = mode->VDisplay * 254 / 960; |
| 680 | RRScreenSizeNotify(pScrn->pScreen); |
| 681 | RRTellChanged(pScrn->pScreen); |
| 682 | } |
| 683 | return TRUE; |
670 | 684 | } |
671 | 685 | |
672 | 686 | /* Mandatory */ |