diff options
author | Ryan C. Gordon <icculus@icculus.org> | 2011-10-26 12:04:05 -0400 |
---|---|---|
committer | Ryan C. Gordon <icculus@icculus.org> | 2011-10-26 12:04:05 -0400 |
commit | 5bed1280d51080639cb8af0ce926745d93e62832 (patch) | |
tree | 4c8d70b7886cdb9ce87fff50492c9cb57b3d8e70 /src/core/windows/SDL_windows.c | |
parent | 7bfe1c4ee493ebf01b2ef093dacdc0e3e6580458 (diff) |
Don't bother checking S_OK here, it'll work in falling through.
Diffstat (limited to 'src/core/windows/SDL_windows.c')
-rw-r--r-- | src/core/windows/SDL_windows.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c index 63a94f15..e00a399d 100644 --- a/src/core/windows/SDL_windows.c +++ b/src/core/windows/SDL_windows.c @@ -42,10 +42,11 @@ WIN_SetError(const char *prefix) HRESULT WIN_CoInitialize(void) { + const HRESULT hr = CoInitialize(NULL); + /* S_FALSE means success, but someone else already initialized. */ /* You still need to call CoUninitialize in this case! */ - const HRESULT hr = CoInitialize(NULL); - if ((hr == S_OK) || (hr == S_FALSE)) { + if (hr == S_FALSE) { return S_OK; } |