Mercurial > sdl-ios-xcode
comparison src/video/dga/SDL_dgavideo.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 | 74212992fb08 |
children | 825b2fa28e2e |
comparison
equal
deleted
inserted
replaced
90:ee1f71c10889 | 91:e85e03f195b4 |
---|---|
276 } | 276 } |
277 #endif /* DGA_DEBUG */ | 277 #endif /* DGA_DEBUG */ |
278 | 278 |
279 static int cmpmodes(const void *va, const void *vb) | 279 static int cmpmodes(const void *va, const void *vb) |
280 { | 280 { |
281 XDGAMode *a = (XDGAMode *)va; | 281 const XDGAMode *a = (const XDGAMode *)va; |
282 XDGAMode *b = (XDGAMode *)vb; | 282 const XDGAMode *b = (const XDGAMode *)vb; |
283 | 283 |
284 /* Prefer DirectColor visuals for otherwise equal modes */ | 284 /* Prefer DirectColor visuals for otherwise equal modes */ |
285 if ( (a->viewportWidth == b->viewportWidth) && | 285 if ( (a->viewportWidth == b->viewportWidth) && |
286 (b->viewportHeight == a->viewportHeight) ) { | 286 (b->viewportHeight == a->viewportHeight) ) { |
287 if ( a->visualClass == DirectColor ) | 287 if ( a->visualClass == DirectColor ) |