diff options
author | alberth <alberth@openttd.org> | 2010-07-24 10:14:39 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-07-24 10:14:39 +0000 |
commit | be6c0584240caf420b2475a0be036391e842e8af (patch) | |
tree | 6111751cf5526e1eb41176782d84766c4e9ed185 /src/sdl.cpp | |
parent | 645b6ce77345867fa96861843197481131566c46 (diff) | |
download | openttd-be6c0584240caf420b2475a0be036391e842e8af.tar.xz |
(svn r20211) -Codechange: Indented code should have curly braces around it.
Diffstat (limited to 'src/sdl.cpp')
-rw-r--r-- | src/sdl.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/sdl.cpp b/src/sdl.cpp index 9bbf34c27..949766772 100644 --- a/src/sdl.cpp +++ b/src/sdl.cpp @@ -67,10 +67,12 @@ SDLProcs sdl_proc; static const char *LoadSdlDLL() { - if (sdl_proc.SDL_Init != NULL) + if (sdl_proc.SDL_Init != NULL) { return NULL; - if (!LoadLibraryList((Function *)(void *)&sdl_proc, sdl_files)) + } + if (!LoadLibraryList((Function *)(void *)&sdl_proc, sdl_files)) { return "Unable to load sdl.dll"; + } return NULL; } @@ -86,11 +88,9 @@ const char *SdlOpen(uint32 x) } #endif if (_sdl_usage++ == 0) { - if (SDL_CALL SDL_Init(x | SDL_INIT_NOPARACHUTE) == -1) - return SDL_CALL SDL_GetError(); + if (SDL_CALL SDL_Init(x | SDL_INIT_NOPARACHUTE) == -1) return SDL_CALL SDL_GetError(); } else if (x != 0) { - if (SDL_CALL SDL_InitSubSystem(x) == -1) - return SDL_CALL SDL_GetError(); + if (SDL_CALL SDL_InitSubSystem(x) == -1) return SDL_CALL SDL_GetError(); } return NULL; @@ -98,8 +98,9 @@ const char *SdlOpen(uint32 x) void SdlClose(uint32 x) { - if (x != 0) + if (x != 0) { SDL_CALL SDL_QuitSubSystem(x); + } if (--_sdl_usage == 0) { SDL_CALL SDL_Quit(); } |