summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-10 08:37:41 +0000
committertron <tron@openttd.org>2006-06-10 08:37:41 +0000
commit0a72639c2d7254c37cd6f8ab0a9fa0f4d63fd2ea (patch)
treeddcc7798b94be03152e4b31cee4bf48bc73774e4 /video
parent15c945c9263ffd64f01fd3da92fcb4efb17fe691 (diff)
downloadopenttd-0a72639c2d7254c37cd6f8ab0a9fa0f4d63fd2ea.tar.xz
(svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
Diffstat (limited to 'video')
-rw-r--r--video/cocoa_v.m2
-rw-r--r--video/win32_v.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/video/cocoa_v.m b/video/cocoa_v.m
index cbe85cc77..b4b026c01 100644
--- a/video/cocoa_v.m
+++ b/video/cocoa_v.m
@@ -664,8 +664,6 @@ static bool QZ_PollEvent(void)
}
-
-
static void QZ_GameLoop(void)
{
uint32 next_tick = GetTick() + 30;
diff --git a/video/win32_v.c b/video/win32_v.c
index 82d21c43b..02f75288d 100644
--- a/video/win32_v.c
+++ b/video/win32_v.c
@@ -649,13 +649,15 @@ static const uint16 default_resolutions[][2] = {
static void FindResolutions(void)
{
- int i = 0, n = 0;
+ uint n = 0;
+ uint i;
DEVMODE dm;
- while (EnumDisplaySettings(NULL, i++, &dm) != 0) {
+ for (i = 0; EnumDisplaySettings(NULL, i, &dm) != 0; i++) {
if (dm.dmBitsPerPel == 8 && IS_INT_INSIDE(dm.dmPelsWidth, 640, MAX_SCREEN_WIDTH + 1) &&
- IS_INT_INSIDE(dm.dmPelsHeight, 480, MAX_SCREEN_HEIGHT + 1)){
- int j;
+ IS_INT_INSIDE(dm.dmPelsHeight, 480, MAX_SCREEN_HEIGHT + 1)) {
+ uint j;
+
for (j = 0; j < n; j++) {
if (_resolutions[j][0] == dm.dmPelsWidth && _resolutions[j][1] == dm.dmPelsHeight) break;
}