Cocoa Port:
- Fix some compiling issues if the C++ standard library is set to libc++ w/ C++11 support instead of libstdc++. - Fix some compiling issues if compiling on OS X Leopard w/ Xcode 3.1.4.
This commit is contained in:
parent
d83b1a260c
commit
5254d7143a
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2011 Roger Manuel
|
||||
Copyright (C) 2012 DeSmuME team
|
||||
Copyright (C) 2012-2015 DeSmuME team
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
/********************************************************************************************
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2013 DeSmuME team
|
||||
Copyright (C) 2013-2015 DeSmuME team
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,6 +15,10 @@
|
|||
along with the this software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
|
||||
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
|
||||
|
@ -88,3 +92,5 @@ template wistream& wistream::_M_extract(void*&);
|
|||
#endif
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,8 +35,10 @@
|
|||
|
||||
#if defined(__ppc__) || defined(__ppc64__)
|
||||
#include <map>
|
||||
#else
|
||||
#elif !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_6)
|
||||
#include <tr1/unordered_map>
|
||||
#else
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -67,8 +69,11 @@
|
|||
|
||||
#if defined(__ppc__) || defined(__ppc64__)
|
||||
static std::map<NSScreen *, DisplayWindowController *> _screenMap; // Key = NSScreen object pointer, Value = DisplayWindowController object pointer
|
||||
#else
|
||||
#elif !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_6)
|
||||
static std::tr1::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; // Key = NSScreen object pointer, Value = DisplayWindowController object pointer
|
||||
#else
|
||||
static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; // Key = NSScreen object pointer, Value = DisplayWindowController object pointer
|
||||
|
||||
#endif
|
||||
|
||||
- (id)initWithWindowNibName:(NSString *)windowNibName emuControlDelegate:(EmuControllerDelegate *)theEmuController
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2013-2014 DeSmuME Team
|
||||
Copyright (C) 2013-2015 DeSmuME Team
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,8 +22,10 @@
|
|||
|
||||
#if defined(__ppc__) || defined(__ppc64__)
|
||||
#include <map>
|
||||
#else
|
||||
#elif !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_6)
|
||||
#include <tr1/unordered_map>
|
||||
#else
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -93,11 +95,16 @@ typedef std::map<std::string, CommandAttributes> InputCommandMap; // Key = Input
|
|||
typedef std::map<std::string, CommandAttributes> CommandAttributesMap; // Key = Command Tag, Value = CommandAttributes
|
||||
typedef std::map<std::string, SEL> CommandSelectorMap; // Key = Command Tag, Value = Obj-C Selector
|
||||
typedef std::map<std::string, AudioSampleBlockGenerator> AudioFileSampleGeneratorMap; // Key = File path to audio file, Value = AudioSampleBlockGenerator
|
||||
#else
|
||||
#elif !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_6)
|
||||
typedef std::tr1::unordered_map<std::string, CommandAttributes> InputCommandMap; // Key = Input key in deviceCode:elementCode format, Value = CommandAttributes
|
||||
typedef std::tr1::unordered_map<std::string, CommandAttributes> CommandAttributesMap; // Key = Command Tag, Value = CommandAttributes
|
||||
typedef std::tr1::unordered_map<std::string, SEL> CommandSelectorMap; // Key = Command Tag, Value = Obj-C Selector
|
||||
typedef std::tr1::unordered_map<std::string, AudioSampleBlockGenerator> AudioFileSampleGeneratorMap; // Key = File path to audio file, Value = AudioSampleBlockGenerator
|
||||
#else
|
||||
typedef std::unordered_map<std::string, CommandAttributes> InputCommandMap; // Key = Input key in deviceCode:elementCode format, Value = CommandAttributes
|
||||
typedef std::unordered_map<std::string, CommandAttributes> CommandAttributesMap; // Key = Command Tag, Value = CommandAttributes
|
||||
typedef std::unordered_map<std::string, SEL> CommandSelectorMap; // Key = Command Tag, Value = Obj-C Selector
|
||||
typedef std::unordered_map<std::string, AudioSampleBlockGenerator> AudioFileSampleGeneratorMap; // Key = File path to audio file, Value = AudioSampleBlockGenerator
|
||||
#endif
|
||||
|
||||
#pragma mark -
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2011 Roger Manuel
|
||||
Copyright (C) 2012-2014 DeSmuME Team
|
||||
Copyright (C) 2012-2015 DeSmuME Team
|
||||
|
||||
This file is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -982,8 +982,10 @@ void HandleDeviceRemovalCallback(void *inContext, IOReturn inResult, void *inSen
|
|||
|
||||
#if defined(__ppc__) || defined(__ppc64__)
|
||||
static std::map<unsigned short, std::string> keyboardNameTable; // Key = Key code, Value = Key name
|
||||
#else
|
||||
#elif !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_6)
|
||||
static std::tr1::unordered_map<unsigned short, std::string> keyboardNameTable; // Key = Key code, Value = Key name
|
||||
#else
|
||||
static std::unordered_map<unsigned short, std::string> keyboardNameTable; // Key = Key code, Value = Key name
|
||||
#endif
|
||||
|
||||
- (id)init
|
||||
|
|
Loading…
Reference in New Issue