summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2006-10-04 11:05:30 +0100
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2006-10-04 11:05:30 +0100
commit07cdc60be8ebe5d0c21149f3cd2aeb8fed05022a (patch)
tree1590333a18e0f14db3c2cc250ca27443239c9a9d /src
parent8da10d15f84ccc992b828546af5ba0d848e7263e (diff)
Fix bug #5795, VT switching fails because of a bad test on some platforms.
Diffstat (limited to 'src')
-rw-r--r--src/i830_driver.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 9c86fe53..a69a9a3a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2620,37 +2620,15 @@ static Bool
I830Set640x480(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
- int m = 0x30; /* 640x480 8bpp */
+ int m;
- switch (pScrn->depth) {
- case 15:
- m = 0x40;
- break;
- case 16:
- m = 0x41;
- break;
- case 24:
- m = 0x50;
- break;
- }
-
- m |= (1 << 15) | (1 << 14);
+ /* 640x480 8bpp */
+ m = 0x30 | (1 << 15) | (1 << 14);
if (VBESetVBEMode(pI830->pVbe, m, NULL))
return TRUE;
-
/* if the first failed, let's try the next - usually 800x600 */
- m = 0x32;
- switch (pScrn->depth) {
- case 15:
- case 16:
- m = 0x42;
- break;
- case 24:
- m = 0x52;
- break;
- }
- m |= (1 << 15) | (1 << 14);
+ m = 0x32 | (1 << 15) | (1 << 14);
if (VBESetVBEMode(pI830->pVbe, m, NULL))
return TRUE;