From 6e4dfc8eb51d0a60b9f466412ca497bae475a0f8 Mon Sep 17 00:00:00 2001 From: EXetoC Date: Thu, 18 Jul 2013 20:28:09 +0200 Subject: [PATCH 1/2] Add missing SDL symbols. --- lib/wrappers/sdl/sdl_image.nim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/wrappers/sdl/sdl_image.nim b/lib/wrappers/sdl/sdl_image.nim index 16e41070b..538a8a6f5 100644 --- a/lib/wrappers/sdl/sdl_image.nim +++ b/lib/wrappers/sdl/sdl_image.nim @@ -163,6 +163,15 @@ proc IMG_Linked_Version*(): Pversion{.importc: "IMG_Linked_Version", # surface afterwards by calling: # SDL_SetColorKey(image, SDL_RLEACCEL, image.format.colorkey); # + +const + IMG_INIT_JPG* = 0x00000001 + IMG_INIT_PNG* = 0x00000002 + IMG_INIT_TIF* = 0x00000004 + IMG_INIT_WEBP* = 0x00000008 + +proc IMG_Init*(flags: cint): int {.cdecl, importc: "IMG_Init".} +proc IMG_Quit*() {.cdecl, importc: "IMG_Quit".} proc IMG_LoadTyped_RW*(src: PRWops, freesrc: cint, theType: cstring): PSurface{. cdecl, importc: "IMG_LoadTyped_RW", dynlib: ImageLibName.} # Convenience functions From 1e3934e4648fa19b741ef19c82fa30d75bb14f15 Mon Sep 17 00:00:00 2001 From: EXetoC Date: Thu, 18 Jul 2013 23:25:29 +0200 Subject: [PATCH 2/2] dynlib --- lib/wrappers/sdl/sdl_image.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/wrappers/sdl/sdl_image.nim b/lib/wrappers/sdl/sdl_image.nim index 538a8a6f5..2bd731506 100644 --- a/lib/wrappers/sdl/sdl_image.nim +++ b/lib/wrappers/sdl/sdl_image.nim @@ -170,8 +170,10 @@ const IMG_INIT_TIF* = 0x00000004 IMG_INIT_WEBP* = 0x00000008 -proc IMG_Init*(flags: cint): int {.cdecl, importc: "IMG_Init".} -proc IMG_Quit*() {.cdecl, importc: "IMG_Quit".} +proc IMG_Init*(flags: cint): int {.cdecl, importc: "IMG_Init", + dynlib: ImageLibName.} +proc IMG_Quit*() {.cdecl, importc: "IMG_Quit", + dynlib: ImageLibName.} proc IMG_LoadTyped_RW*(src: PRWops, freesrc: cint, theType: cstring): PSurface{. cdecl, importc: "IMG_LoadTyped_RW", dynlib: ImageLibName.} # Convenience functions