mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-31 02:00:27 +02:00
Update to v106r66 release.
byuu says: Changelog: - moved to GCC 8.2 and C++17 - fixed compilation under FreeBSD 12.0 - don't read beyond the file size in SuperFamicom::Cartridge::loadMemory - add missing I/O cycle HuC6280::instructionImmediate - serialize Mega Drive's Game Genie state - serialize SPC7110::Thread information - enable 30-bit color depth support under the GLX/OpenGL 2.0 driver (doesn't work with OpenGL 3.2 yet) The 30-bit color depth option isn't super useful, but why not? I need to update ruby to detect that the display is actually capable of it before exposing an option that can result in the driver failing to initialize, however.
This commit is contained in:
@@ -40,28 +40,28 @@ ifeq ($(platform),)
|
||||
endif
|
||||
|
||||
compiler.c = $(compiler) -x c -std=c11
|
||||
compiler.cpp = $(compiler) -x c++ -std=c++14
|
||||
compiler.cpp = $(compiler) -x c++ -std=c++17
|
||||
compiler.objc = $(compiler) -x objective-c -std=c11
|
||||
compiler.objcpp = $(compiler) -x objective-c++ -std=c++14
|
||||
compiler.objcpp = $(compiler) -x objective-c++ -std=c++17
|
||||
|
||||
flags.c = -x c -std=c11
|
||||
flags.cpp = -x c++ -std=c++14
|
||||
flags.cpp = -x c++ -std=c++17
|
||||
flags.objc = -x objective-c -std=c11
|
||||
flags.objcpp = -x objective-c++ -std=c++14
|
||||
flags.objcpp = -x objective-c++ -std=c++17
|
||||
flags.deps = -MMD -MP -MF $(@:.o=.d)
|
||||
|
||||
# compiler detection
|
||||
ifeq ($(compiler),)
|
||||
ifeq ($(platform),windows)
|
||||
compiler := g++
|
||||
compiler.cpp = $(compiler) -x c++ -std=gnu++14
|
||||
flags.cpp = -x c++ -std=gnu++14
|
||||
compiler.cpp = $(compiler) -x c++ -std=gnu++17
|
||||
flags.cpp = -x c++ -std=gnu++17
|
||||
else ifeq ($(platform),macos)
|
||||
compiler := clang++
|
||||
else ifeq ($(platform),linux)
|
||||
compiler := g++
|
||||
else ifeq ($(platform),bsd)
|
||||
compiler := g++49
|
||||
compiler := g++8
|
||||
else
|
||||
compiler := g++
|
||||
endif
|
||||
@@ -126,7 +126,8 @@ endif
|
||||
ifeq ($(platform),bsd)
|
||||
flags += -I/usr/local/include
|
||||
options += -Wl,-rpath=/usr/local/lib
|
||||
options += -Wl,-rpath=/usr/local/lib/gcc49
|
||||
options += -Wl,-rpath=/usr/local/lib/gcc8
|
||||
options += -lstdc++ -lm
|
||||
endif
|
||||
|
||||
# threading support
|
||||
|
@@ -15,6 +15,11 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if !defined(MAP_NORESERVE)
|
||||
//not supported on FreeBSD; flag removed in 11.0
|
||||
#define MAP_NORESERVE 0
|
||||
#endif
|
||||
|
||||
namespace nall {
|
||||
|
||||
struct file_map {
|
||||
@@ -39,7 +44,7 @@ struct file_map {
|
||||
//auto close() -> void;
|
||||
|
||||
private:
|
||||
bool _open = false;
|
||||
bool _open = false; //zero-byte files return _data = nullptr, _size = 0
|
||||
uint8_t* _data = nullptr;
|
||||
uint64_t _size = 0;
|
||||
|
||||
@@ -66,6 +71,9 @@ public:
|
||||
}
|
||||
|
||||
auto open(const string& filename, uint mode_) -> bool {
|
||||
close();
|
||||
if(file::exists(filename) && file::size(filename) == 0) return _open = true;
|
||||
|
||||
int desiredAccess, creationDisposition, protection, mapAccess;
|
||||
|
||||
switch(mode_) {
|
||||
@@ -111,7 +119,7 @@ public:
|
||||
}
|
||||
|
||||
_data = (uint8_t*)MapViewOfFile(_map, mapAccess, 0, 0, _size);
|
||||
return _open = _data;
|
||||
return _open = true;
|
||||
}
|
||||
|
||||
auto close() -> void {
|
||||
@@ -154,6 +162,8 @@ public:
|
||||
|
||||
auto open(const string& filename, uint mode_) -> bool {
|
||||
close();
|
||||
if(file::exists(filename) && file::size(filename) == 0) return _open = true;
|
||||
|
||||
int openFlags = 0;
|
||||
int mmapFlags = 0;
|
||||
|
||||
@@ -192,7 +202,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _open = _data;
|
||||
return _open = true;
|
||||
}
|
||||
|
||||
auto close() -> void {
|
||||
|
@@ -7,7 +7,7 @@ namespace nall {
|
||||
enum class Platform : uint { Windows, MacOS, Linux, BSD, Unknown };
|
||||
enum class API : uint { Windows, Posix, Unknown };
|
||||
enum class DisplayServer : uint { Windows, Quartz, Xorg, Unknown };
|
||||
enum class Architecture : uint { x86, amd64, ARM, PPC32, PPC64, Unknown };
|
||||
enum class Architecture : uint { x86, amd64, ARM32, ARM64, PPC32, PPC64, Unknown };
|
||||
enum class Endian : uint { LSB, MSB, Unknown };
|
||||
enum class Build : uint { Debug, Stable, Size, Release, Performance };
|
||||
|
||||
@@ -123,9 +123,12 @@ namespace nall {
|
||||
#elif defined(__amd64__) || defined(_M_AMD64)
|
||||
#define ARCHITECTURE_AMD64
|
||||
constexpr auto architecture() -> Architecture { return Architecture::amd64; }
|
||||
#elif defined(__aarch64__)
|
||||
#define ARCHITECTURE_ARM64
|
||||
constexpr auto architecture() -> Architecture { return Architecture::ARM64; }
|
||||
#elif defined(__arm__)
|
||||
#define ARCHITECTURE_ARM
|
||||
constexpr auto architecture() -> Architecture { return Architecture::ARM; }
|
||||
#define ARCHITECTURE_ARM32
|
||||
constexpr auto architecture() -> Architecture { return Architecture::ARM32; }
|
||||
#elif defined(__ppc64__) || defined(_ARCH_PPC64)
|
||||
#define ARCHITECTURE_PPC64
|
||||
constexpr auto architecture() -> Architecture { return Architecture::PPC64; }
|
||||
|
Reference in New Issue
Block a user