Mercurial > sdl-ios-xcode
changeset 17:4f22a992f5e9
Fixed crash in GGI detection
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Thu, 10 May 2001 18:10:19 +0000 |
parents | 735e5a8696d0 |
children | d9e3595b63d5 |
files | src/video/ggi/SDL_ggivideo.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/ggi/SDL_ggivideo.c Thu May 10 18:04:03 2001 +0000 +++ b/src/video/ggi/SDL_ggivideo.c Thu May 10 18:10:19 2001 +0000 @@ -75,11 +75,13 @@ static int GGI_Available(void) { ggi_visual_t *vis; - - vis = ggiOpen(NULL); - if (vis != NULL) - { - ggiClose(vis); + + vis = NULL; + if (ggiInit() == 0) { + vis = ggiOpen(NULL); + if (vis != NULL) { + ggiClose(vis); + } } return (vis != NULL); }