From: Javier Sancho Date: Sun, 10 Jun 2012 07:37:06 +0000 (+0200) Subject: Adding SDL_GetError. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=6db93f044c899a6b7ce0166d9909711f8b414791;hp=dc625bb914a81cc41b7a5c2b0d33d9b85185925f;p=gacela.git Adding SDL_GetError. --- diff --git a/src/sdl.c b/src/sdl.c index 0f96fb8..c59d607 100644 --- a/src/sdl.c +++ b/src/sdl.c @@ -195,6 +195,12 @@ gacela_SDL_GetTicks (void) return scm_from_int (SDL_GetTicks ()); } +SCM +gacela_SDL_GetError (void) +{ + return scm_from_locale_string (SDL_GetError ()); +} + SCM gacela_SDL_DisplayFormat (SCM surface) { @@ -501,6 +507,7 @@ init_gacela_sdl (void *data) scm_c_define_gsubr ("SDL_Flip", 1, 0, 0, gacela_SDL_Flip); scm_c_define_gsubr ("SDL_Delay", 1, 0, 0, gacela_SDL_Delay); scm_c_define_gsubr ("SDL_GetTicks", 0, 0, 0, gacela_SDL_GetTicks); + scm_c_define_gsubr ("SDL_GetError", 0, 0, 0, gacela_SDL_GetError); scm_c_define_gsubr ("SDL_DisplayFormat", 1, 0, 0, gacela_SDL_DisplayFormat); scm_c_define_gsubr ("SDL_DisplayFormatAlpha", 1, 0, 0, gacela_SDL_DisplayFormatAlpha); scm_c_define_gsubr ("SDL_MapRGB", 4, 0, 0, gacela_SDL_MapRGB);