// Copyright (C) 2012-2015 ChaosForge Ltd // http://chaosforge.org/ // // This file is part of Nova libraries. // For conditions of distribution and use, see copying.txt file in root folder. #include "nv/lib/sdl.hh" #if defined( NV_SDL_DYNAMIC ) #include "nv/core/library.hh" #define NV_SDL_FUN( rtype, fname, fparams ) rtype (NV_SDL_APIENTRY *fname) fparams = nullptr; #include #undef NV_SDL_FUN bool nv::load_sdl_library( const char* path ) { static nv::library sdl_library; if ( sdl_library.is_open() ) return true; sdl_library.open( path ); # define NV_SDL_FUN( rtype, fname, fparams )void_assign( fname, sdl_library.get(#fname) ); # include # undef NV_SDL_FUN return true; } #endif