diff options
author | Adam Jackson <ajax@redhat.com> | 2007-11-26 11:53:08 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2007-11-26 11:53:08 -0500 |
commit | a344920ae86c1970e4cc34ee91e2f2008d490c49 (patch) | |
tree | ffdbf02daccbc6432522f8c089d4688e36929f8b /hw/xfree86/parser | |
parent | c6c284e64b1f537a3243856cf78cf3f2324e4c2b (diff) |
Allow Virtual to be specified globally in the Screen section.
The Display subsections are optional, and it's confusing to need to create
them just to set a Virtual size.
Diffstat (limited to 'hw/xfree86/parser')
-rw-r--r-- | hw/xfree86/parser/Screen.c | 13 | ||||
-rw-r--r-- | hw/xfree86/parser/xf86Parser.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c index 4524f17f6..ad08c1382 100644 --- a/hw/xfree86/parser/Screen.c +++ b/hw/xfree86/parser/Screen.c @@ -214,6 +214,7 @@ static xf86ConfigSymTabRec ScreenTab[] = {DEFAULTDEPTH, "defaultdepth"}, {DEFAULTBPP, "defaultbpp"}, {DEFAULTFBBPP, "defaultfbbpp"}, + {VIRTUAL, "virtual"}, {OPTION, "option"}, {-1, ""}, }; @@ -299,6 +300,14 @@ xf86parseScreenSection (void) } } break; + case VIRTUAL: + if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER) + Error (VIRTUAL_MSG, NULL); + ptr->scrn_virtualX = val.num; + if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER) + Error (VIRTUAL_MSG, NULL); + ptr->scrn_virtualY = val.num; + break; case OPTION: ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst); break; @@ -364,6 +373,10 @@ xf86printScreenSection (FILE * cf, XF86ConfScreenPtr ptr) { fprintf (cf, "\tVideoAdaptor \"%s\"\n", aptr->al_adaptor_str); } + if (ptr->scrn_virtualX && ptr->scrn_virtualY) + fprintf (cf, "\tVirtual %d %d\n", + ptr->scrn_virtualX, + ptr->scrn_virtualY); for (dptr = ptr->scrn_display_lst; dptr; dptr = dptr->list.next) { fprintf (cf, "\tSubSection \"Display\"\n"); diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h index a078361d3..fd6cc530b 100644 --- a/hw/xfree86/parser/xf86Parser.h +++ b/hw/xfree86/parser/xf86Parser.h @@ -307,6 +307,7 @@ typedef struct XF86ConfDisplayPtr scrn_display_lst; XF86OptionPtr scrn_option_lst; char *scrn_comment; + int scrn_virtualX, scrn_virtualY; } XF86ConfScreenRec, *XF86ConfScreenPtr; |