Mercurial > sdl-ios-xcode
comparison src/video/fbcon/SDL_fbvideo.c @ 91:e85e03f195b4
From: "Markus F.X.J. Oberhumer"
Subject: SDL CVS patches
below you will find some small patches against the
current SDL CVS.
It adresses these things:
1) Use "&" instead of "%" in some cases. For negative
signed integers (x % 8) is not always (x & 7),
and the compiler can produce slightly faster
code when using "&" here.
2) Some const issues.
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Sat, 07 Jul 2001 20:20:17 +0000 |
parents | 332f458469f0 |
children | 63ec24e0575f |
comparison
equal
deleted
inserted
replaced
90:ee1f71c10889 | 91:e85e03f195b4 |
---|---|
60 __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port)); | 60 __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port)); |
61 } | 61 } |
62 #endif /* FB_TYPE_VGA_PLANES */ | 62 #endif /* FB_TYPE_VGA_PLANES */ |
63 | 63 |
64 /* A list of video resolutions that we query for (sorted largest to smallest) */ | 64 /* A list of video resolutions that we query for (sorted largest to smallest) */ |
65 static SDL_Rect checkres[] = { | 65 static const SDL_Rect checkres[] = { |
66 { 0, 0, 1600, 1200 }, /* 16 bpp: 0x11E, or 286 */ | 66 { 0, 0, 1600, 1200 }, /* 16 bpp: 0x11E, or 286 */ |
67 { 0, 0, 1408, 1056 }, /* 16 bpp: 0x19A, or 410 */ | 67 { 0, 0, 1408, 1056 }, /* 16 bpp: 0x19A, or 410 */ |
68 { 0, 0, 1280, 1024 }, /* 16 bpp: 0x11A, or 282 */ | 68 { 0, 0, 1280, 1024 }, /* 16 bpp: 0x11A, or 282 */ |
69 { 0, 0, 1152, 864 }, /* 16 bpp: 0x192, or 402 */ | 69 { 0, 0, 1152, 864 }, /* 16 bpp: 0x192, or 402 */ |
70 { 0, 0, 1024, 768 }, /* 16 bpp: 0x117, or 279 */ | 70 { 0, 0, 1024, 768 }, /* 16 bpp: 0x117, or 279 */ |
75 { 0, 0, 640, 400 }, /* 8 bpp: 0x100, or 256 */ | 75 { 0, 0, 640, 400 }, /* 8 bpp: 0x100, or 256 */ |
76 { 0, 0, 512, 384 }, | 76 { 0, 0, 512, 384 }, |
77 { 0, 0, 320, 240 }, | 77 { 0, 0, 320, 240 }, |
78 { 0, 0, 320, 200 } | 78 { 0, 0, 320, 200 } |
79 }; | 79 }; |
80 static struct { | 80 static const struct { |
81 int xres; | 81 int xres; |
82 int yres; | 82 int yres; |
83 int pixclock; | 83 int pixclock; |
84 int left; | 84 int left; |
85 int right; | 85 int right; |