diff options
Diffstat (limited to 'textw/xconfig_text.py')
-rw-r--r-- | textw/xconfig_text.py | 33 |
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, |