| 1 | //============================================================================ | 
|---|
| 2 | // | 
|---|
| 3 | //   SSSS    tt          lll  lll | 
|---|
| 4 | //  SS  SS   tt           ll   ll | 
|---|
| 5 | //  SS     tttttt  eeee   ll   ll   aaaa | 
|---|
| 6 | //   SSSS    tt   ee  ee  ll   ll      aa | 
|---|
| 7 | //      SS   tt   eeeeee  ll   ll   aaaaa  --  "An Atari 2600 VCS Emulator" | 
|---|
| 8 | //  SS  SS   tt   ee      ll   ll  aa  aa | 
|---|
| 9 | //   SSSS     ttt  eeeee llll llll  aaaaa | 
|---|
| 10 | // | 
|---|
| 11 | // Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony | 
|---|
| 12 | // and the Stella Team | 
|---|
| 13 | // | 
|---|
| 14 | // See the file "License.txt" for information on usage and redistribution of | 
|---|
| 15 | // this file, and for a DISCLAIMER OF ALL WARRANTIES. | 
|---|
| 16 | //============================================================================ | 
|---|
| 17 |  | 
|---|
| 18 | #ifndef SDL_LIB_HXX | 
|---|
| 19 | #define SDL_LIB_HXX | 
|---|
| 20 |  | 
|---|
| 21 | #include "bspf.hxx" | 
|---|
| 22 |  | 
|---|
| 23 | /* | 
|---|
| 24 | * We can't control the quality of code from outside projects, so for now | 
|---|
| 25 | * just disable warnings for it. | 
|---|
| 26 | */ | 
|---|
| 27 | #ifdef __clang__ | 
|---|
| 28 | #pragma clang diagnostic push | 
|---|
| 29 | #pragma clang diagnostic ignored "-Wdocumentation" | 
|---|
| 30 | #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" | 
|---|
| 31 | #pragma clang diagnostic ignored "-Wimplicit-fallthrough" | 
|---|
| 32 | #pragma clang diagnostic ignored "-Wreserved-id-macro" | 
|---|
| 33 | #include <SDL.h> | 
|---|
| 34 | #pragma clang diagnostic pop | 
|---|
| 35 | #else | 
|---|
| 36 | #include <SDL.h> | 
|---|
| 37 | #endif | 
|---|
| 38 |  | 
|---|
| 39 | /* | 
|---|
| 40 | * Seems to be needed for ppc64le, doesn't hurt other archs | 
|---|
| 41 | * Note that this is a problem in SDL2, which includes <altivec.h> | 
|---|
| 42 | *  https://bugzilla.redhat.com/show_bug.cgi?id=1419452 | 
|---|
| 43 | */ | 
|---|
| 44 | #undef vector | 
|---|
| 45 | #undef pixel | 
|---|
| 46 | #undef bool | 
|---|
| 47 |  | 
|---|
| 48 | static inline string SDLVersion() | 
|---|
| 49 | { | 
|---|
| 50 | ostringstream buf; | 
|---|
| 51 | SDL_version ver; | 
|---|
| 52 | SDL_GetVersion(&ver); | 
|---|
| 53 | buf << "SDL "<< int(ver.major) << "."<< int(ver.minor) << "."<< int(ver.patch); | 
|---|
| 54 | return buf.str(); | 
|---|
| 55 | } | 
|---|
| 56 |  | 
|---|
| 57 | #endif  // SDL_LIB_HXX | 
|---|
| 58 |  | 
|---|