[PATCH mga] make MAXSCREENS run-time configurable

Tiago Vignatti tiago.vignatti at nokia.com
Thu Apr 8 08:06:40 PDT 2010


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 src/mga_dga.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mga_dga.c b/src/mga_dga.c
index d43b96d..c9712f3 100644
--- a/src/mga_dga.c
+++ b/src/mga_dga.c
@@ -301,11 +301,13 @@ MGA_SetMode(
    ScrnInfoPtr pScrn,
    DGAModePtr pMode
 ){
-   static MGAFBLayout SavedLayouts[MAXSCREENS];
+   static MGAFBLayout *SavedLayouts;
    int index = pScrn->pScreen->myNum;
 
    MGAPtr pMga = MGAPTR(pScrn);
 
+   MAXSCREENSALLOC_FATAL(SavedLayouts);
+
    if(!pMode) { /* restore the original mode */
       if(pMga->DGAactive)
         memcpy(&pMga->CurrentLayout, &SavedLayouts[index], sizeof(MGAFBLayout));
-- 
1.6.0.4



More information about the xorg-devel mailing list