diff options
author | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
commit | 772fbda3e37488c2bf7beb96d35b2cbe001d9eda (patch) | |
tree | 1bfdb9c99b43fdc3b07ac13cbed4259a06d34f6f /video | |
parent | 7fa72c5e2f224243a8c89096f0b07259e05e44cf (diff) | |
download | openttd-772fbda3e37488c2bf7beb96d35b2cbe001d9eda.tar.xz |
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
Diffstat (limited to 'video')
-rw-r--r-- | video/sdl_v.c | 9 | ||||
-rw-r--r-- | video/win32_v.c | 16 |
2 files changed, 14 insertions, 11 deletions
diff --git a/video/sdl_v.c b/video/sdl_v.c index a90333ae4..373009bc8 100644 --- a/video/sdl_v.c +++ b/video/sdl_v.c @@ -362,18 +362,21 @@ static int PollEvent(void) if (_patches.autosave_on_exit) { DoExitSave(); return 0; - } else + } else { AskExitGame(); - } else + } + } else { return 0; + } break; case SDL_KEYDOWN: /* Toggle full-screen on ALT + ENTER/F */ if ((ev.key.keysym.mod & (KMOD_ALT | KMOD_META)) && (ev.key.keysym.sym == SDLK_RETURN || ev.key.keysym.sym == SDLK_f)) { ToggleFullScreen(!_fullscreen); - } else + } else { _pressed_key = ConvertSdlKeyIntoMy(&ev.key.keysym); + } break; diff --git a/video/win32_v.c b/video/win32_v.c index 02f75288d..7f05406c3 100644 --- a/video/win32_v.c +++ b/video/win32_v.c @@ -252,8 +252,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP UINT nChanged = RealizePalette(hDC); SelectPalette(hDC, hOldPalette, TRUE); ReleaseDC(hwnd, hDC); - if (nChanged) - InvalidateRect(hwnd, NULL, FALSE); + if (nChanged) InvalidateRect(hwnd, NULL, FALSE); return 0; } @@ -263,9 +262,9 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP } else if (_patches.autosave_on_exit) { DoExitSave(); _exit_game = true; - } else + } else { AskExitGame(); - + } return 0; case WM_LBUTTONDOWN: @@ -787,8 +786,9 @@ static void Win32GdiMainLoop(void) #endif !_networking && _game_mode != GM_MENU) _fast_forward |= 2; - } else if (_fast_forward & 2) + } else if (_fast_forward & 2) { _fast_forward = 0; + } cur_ticks = GetTickCount(); if ((_fast_forward && !_pause) || cur_ticks > next_tick) @@ -809,14 +809,14 @@ static void Win32GdiMainLoop(void) (GetAsyncKeyState(VK_UP) < 0 ? 2 : 0) + (GetAsyncKeyState(VK_RIGHT) < 0 ? 4 : 0) + (GetAsyncKeyState(VK_DOWN) < 0 ? 8 : 0); - } else + } else { _dirkeys = 0; + } GameLoop(); _cursor.delta.x = _cursor.delta.y = 0; - if (_force_full_redraw) - MarkWholeScreenDirty(); + if (_force_full_redraw) MarkWholeScreenDirty(); GdiFlush(); _screen.dst_ptr = _wnd.buffer_bits; |