From a3d2d7587539e2b6f8f9cf47cbc52920686ebd00 Mon Sep 17 00:00:00 2001 From: Mike Fulbright Date: Tue, 2 Sep 2003 21:33:22 +0000 Subject: replace an old bad hack that didnt work with a new one that does and is slightly less bad --- anaconda | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'anaconda') diff --git a/anaconda b/anaconda index 5063e57f3..89d5e686b 100755 --- a/anaconda +++ b/anaconda @@ -415,6 +415,7 @@ nofallback = 0 # if GUI mode fails, exit rescue = 0 # run in rescue mode rescue_nomount = 0 # don't automatically mount device in rescue runres = '800x600' # resolution to run the GUI install in +runres_override = 0 # was run resolution overridden by user? skipddc = 0 # if true skip ddcprobe (locks some machines) instClass = None # the install class to use progmode = 'install' # 'rescue', or 'install' @@ -501,6 +502,7 @@ for n in args: elif (str == '--resolution'): # run native X server at specified resolution, ignore fb runres = arg + runres_override = 1 elif (str == "--skipddc"): skipddc = 1 elif (str == "--autostep"): @@ -876,20 +878,15 @@ if display_mode == 'g' and not os.environ.has_key('DISPLAY'): if not res_supported: import rhpl.guesslcd as guesslcd + # pick a monitor spec that is adequate for requested runres (hsync, vsync) = guesslcd.getSyncForRes(runres) monitorhw.setSpecs(hsync, vsync) - - # XXX - need to fix - # - # messy hack for how rhpl.xhwstate works - # current it wants to use probed values which we dont have so we'll - # fake them - hsync = monitorhw.getMonitorHorizSync() - vsync = monitorhw.getMonitorVertSync() - monitorhw.orig_monHoriz = hsync - monitorhw.orig_monVert = vsync - + # recreate X config object + xcfg = xhwstate.XF86HardwareState(defcard=videohw, + defmon=monitorhw) + xcfg.set_resolution(runres) + # make sure we can write log to ramfs if os.access("/tmp/ramfs", os.W_OK): xlogfile = "/tmp/ramfs/X.log" @@ -1057,6 +1054,12 @@ if xcfg is not None: xcfg.set_resolution("640x480") xsetup = xsetup.XSetup(xcfg) + + # HACK - if user overrides resolution then use it and disable + # choosing a sane default for them + if runres_override: + xsetup.imposed_sane_default = 1 + id.setXSetup(xsetup) if kbd: -- cgit