Last change
on this file since 319 was
319,
checked in by epyon, 11 years ago
|
- created core module and moved all free source files there
- took the opportunity to update all copyright lines and minor cleanup
- minor fixes
- not all examples are up to date
|
File size:
835 bytes
|
Rev | Line | |
---|
[319] | 1 | // Copyright (C) 2012-2014 ChaosForge Ltd
|
---|
[194] | 2 | // http://chaosforge.org/
|
---|
| 3 | //
|
---|
| 4 | // This file is part of NV Libraries.
|
---|
| 5 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
| 6 |
|
---|
| 7 | #include "nv/lib/sdl_mixer.hh"
|
---|
| 8 |
|
---|
| 9 | #if defined( NV_SDL_DYNAMIC )
|
---|
| 10 |
|
---|
[319] | 11 | #include "nv/core/library.hh"
|
---|
[194] | 12 |
|
---|
[319] | 13 | #define NV_SDL_FUN( rtype, fname, fparams ) rtype (NV_SDL_APIENTRY *fname) fparams = nullptr;
|
---|
| 14 | #include <nv/lib/detail/sdl_mixer_functions.inc>
|
---|
[194] | 15 | #undef NV_SDL_FUN
|
---|
| 16 |
|
---|
| 17 | bool nv::load_sdl_mixer_library( const char* path )
|
---|
| 18 | {
|
---|
| 19 | static nv::library sdl_mixer_library;
|
---|
| 20 | if ( sdl_mixer_library.is_open() ) return true;
|
---|
| 21 | sdl_mixer_library.open( path );
|
---|
| 22 |
|
---|
[319] | 23 | # define NV_SDL_FUN( rtype, fname, fparams ) *(void **) (&fname) = sdl_mixer_library.get(#fname);
|
---|
| 24 | # include <nv/lib/detail/sdl_mixer_functions.inc>
|
---|
[194] | 25 | # undef NV_SDL_FUN
|
---|
| 26 |
|
---|
| 27 | return true;
|
---|
| 28 | }
|
---|
| 29 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.