mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 15:12:23 +01:00
byuu says: Changelog: - added Cocoa target: higan can now be compiled for OS X Lion [Cydrak, byuu] - SNES/accuracy profile hires color blending improvements - fixes Marvelous text [AWJ] - fixed a slight bug in SNES/SA-1 VBR support caused by a typo - added support for multi-pass shaders that can load external textures (requires OpenGL 3.2+) - added game library path (used by ananke->Import Game) to Settings->Advanced - system profiles, shaders and cheats database can be stored in "all users" shared folders now (eg /usr/share on Linux) - all configuration files are in BML format now, instead of XML (much easier to read and edit this way) - main window supports drag-and-drop of game folders (but not game files / ZIP archives) - audio buffer clears when entering a modal loop on Windows (prevents audio repetition with DirectSound driver) - a substantial amount of code clean-up (probably the biggest refactoring to date) One highly desired target for this release was to default to the optimal drivers instead of the safest drivers, but because AMD drivers don't seem to like my OpenGL 3.2 driver, I've decided to postpone that. AMD has too big a market share. Hopefully with v093 officially released, we can get some public input on what AMD doesn't like.
71 lines
2.3 KiB
C++
71 lines
2.3 KiB
C++
#ifndef NALL_INTRINSICS_HPP
|
|
#define NALL_INTRINSICS_HPP
|
|
|
|
namespace nall {
|
|
|
|
struct Intrinsics {
|
|
enum class Compiler : unsigned { Clang, GCC, VisualC, Unknown };
|
|
enum class Platform : unsigned { X, OSX, Windows, Unknown };
|
|
enum class Endian : unsigned { LSB, MSB, Unknown };
|
|
|
|
static inline Compiler compiler();
|
|
static inline Platform platform();
|
|
static inline Endian endian();
|
|
};
|
|
|
|
/* Compiler detection */
|
|
|
|
#if defined(__clang__)
|
|
#define COMPILER_CLANG
|
|
Intrinsics::Compiler Intrinsics::compiler() { return Intrinsics::Compiler::Clang; }
|
|
#elif defined(__GNUC__)
|
|
#define COMPILER_GCC
|
|
Intrinsics::Compiler Intrinsics::compiler() { return Intrinsics::Compiler::GCC; }
|
|
#elif defined(_MSC_VER)
|
|
#define COMPILER_VISUALC
|
|
Intrinsics::Compiler Intrinsics::compiler() { return Intrinsics::Compiler::VisualC; }
|
|
#else
|
|
#warning "unable to detect compiler"
|
|
#define COMPILER_UNKNOWN
|
|
Intrinsics::Compiler Intrinsics::compiler() { return Intrinsics::Compiler::Unknown; }
|
|
#endif
|
|
|
|
/* Platform detection */
|
|
|
|
#if defined(linux) || defined(__sun__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
#define PLATFORM_X
|
|
Intrinsics::Platform Intrinsics::platform() { return Intrinsics::Platform::X; }
|
|
#elif defined(__APPLE__)
|
|
#define PLATFORM_OSX
|
|
Intrinsics::Platform Intrinsics::platform() { return Intrinsics::Platform::OSX; }
|
|
#elif defined(_WIN32)
|
|
#define PLATFORM_WINDOWS
|
|
#define PLATFORM_WIN
|
|
Intrinsics::Platform Intrinsics::platform() { return Intrinsics::Platform::Windows; }
|
|
#else
|
|
#warning "unable to detect platform"
|
|
#define PLATFORM_UNKNOWN
|
|
Intrinsics::Platform Intrinsics::platform() { return Intrinsics::Platform::Unknown; }
|
|
#endif
|
|
|
|
/* Endian detection */
|
|
|
|
#if defined(__i386__) || defined(__amd64__) || defined(_M_IX86) || defined(_M_AMD64)
|
|
#define ENDIAN_LSB
|
|
#define ARCH_LSB
|
|
Intrinsics::Endian Intrinsics::endian() { return Intrinsics::Endian::LSB; }
|
|
#elif defined(__powerpc__) || defined(_M_PPC) || defined(__BIG_ENDIAN__)
|
|
#define ENDIAN_MSB
|
|
#define ARCH_MSB
|
|
Intrinsics::Endian Intrinsics::endian() { return Intrinsics::Endian::MSB; }
|
|
#else
|
|
#warning "unable to detect endian"
|
|
#define ENDIAN_UNKNOWN
|
|
#define ARCH_UNKNOWN
|
|
Intrinsics::Endian Intrinsics::endian() { return Intrinsics::Endian::Unknown; }
|
|
#endif
|
|
|
|
}
|
|
|
|
#endif
|