diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2018-07-26 10:11:59 -0700 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2018-07-26 10:11:59 -0700 |
commit | 4e3638c612831dea400be7d0d85d4d1ea9f9a4c2 (patch) | |
tree | 68231d7a08fcdbe60a51b62693023c2bdaa4f14b | |
parent | 15d245de2814128b04dea2b640c4ba0b12926f24 (diff) |
Evaluate software cursor option inside R128PreInit
Since SWCursor option is referenced only once, it should be handled
inside R128PreInit callback function rather than R128ScreenInit
callback function.
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r-- | src/r128.h | 1 | ||||
-rw-r--r-- | src/r128_driver.c | 9 |
2 files changed, 9 insertions, 1 deletions
@@ -349,6 +349,7 @@ typedef struct { int fifo_slots; /* Free slots in the FIFO (64 max) */ int pix24bpp; /* Depth of pixmap for 24bpp framebuffer */ Bool dac6bits; /* Use 6 bit DAC? */ + Bool swCursor; /* Computed values for Rage 128 */ int pitch; diff --git a/src/r128_driver.c b/src/r128_driver.c index 7cc788b..57f4d05 100644 --- a/src/r128_driver.c +++ b/src/r128_driver.c @@ -1345,6 +1345,8 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags) #endif #endif + info->swCursor = FALSE; + /* By default, don't do VGA IOs on ppc */ #if defined(__powerpc__) || defined(__sparc__) || !defined(WITH_VGAHW) info->VGAAccess = FALSE; @@ -1433,6 +1435,11 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags) "Using framebuffer device\n"); } + if (xf86ReturnOptValBool(info->Options, + OPTION_SW_CURSOR, FALSE)) { + info->swCursor = TRUE; + } + /* Allocate an xf86CrtcConfig */ xf86CrtcConfigInit(pScrn, &R128CRTCResizeFuncs); @@ -2082,7 +2089,7 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL) miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); /* Hardware cursor setup */ - if (!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) { + if (!info->swCursor) { if (R128CursorInit(pScreen)) { int width, height; |