summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-08-14 23:29:34 +0000
committerMike Fulbright <msf@redhat.com>2001-08-14 23:29:34 +0000
commit9d3068fe1b37b43610cfefb11502f8bf19c09374 (patch)
treef9093928321726963b6eaecba93c5d82f161d9b3 /textw
parentc3ed24213227b414912ac3695033b27730beba3b (diff)
downloadanaconda-9d3068fe1b37b43610cfefb11502f8bf19c09374.tar.gz
anaconda-9d3068fe1b37b43610cfefb11502f8bf19c09374.tar.xz
anaconda-9d3068fe1b37b43610cfefb11502f8bf19c09374.zip
make TUI reflect detected vram properly
Diffstat (limited to 'textw')
-rw-r--r--textw/xconfig_text.py33
1 files changed, 28 insertions, 5 deletions
diff --git a/textw/xconfig_text.py b/textw/xconfig_text.py
index 4f88b8002..7098754a5 100644
--- a/textw/xconfig_text.py
+++ b/textw/xconfig_text.py
@@ -546,16 +546,39 @@ class XConfigWindowCard:
self.origCard = None
try:
- tmp = self.videocard.possible_ram_sizes()
- self.selectedRam = tmp.index(int(self.videocard.primaryCard().getVideoRam()))
+ vidRam = string.atoi(self.videocard.primaryCard().getVideoRam())
except:
- self.selectedRam = 0
+ vidRam = 1024
+
+ count = 0
+ for size in self.videocard.possible_ram_sizes():
+ #--Cards such as Mach64 and ATI Rage Mobility report 64k less ram
+ # than it should
+ small = size - 64
+ if size == vidRam or small == vidRam:
+ break
+ count = count + 1
+
+ print vidRam, count
+
+ self.selectedRam = count
try:
- self.origRam = tmp.index(int(self.videocard.primaryCard(useProbed=1).getVideoRam()))
+ vidRam = string.atoi(self.videocard.primaryCard(useProbed=1).getVideoRam())
except:
- self.origRam = 0
+ vidRam = 1024
+
+ count = 0
+ for size in self.videocard.possible_ram_sizes():
+ #--Cards such as Mach64 and ATI Rage Mobility report 64k less ram
+ # than it should
+ small = size - 64
+ if size == vidRam or small == vidRam:
+ break
+ count = count + 1
+ self.origRam = count
+
skipx = 0
while 1:
bb = ButtonBar (screen, (TEXT_OK_BUTTON,