Cocoa Port:

- Do a better job of disabling JIT-related controls when running on ppc/ppc64.
- When running on ppc/ppc64, use std::map instead of std::tr1::unordered_map to avoid input-related crashes.
- For Emulation Settings, rename the "General Settings" section to "Emulation Timing".
This commit is contained in:
rogerman 2013-04-18 18:51:58 +00:00
parent ac5191161a
commit 66ef280dde
4 changed files with 230 additions and 200 deletions

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,11 @@
#include <libkern/OSAtomic.h>
#include <IOKit/hid/IOHIDManager.h>
#if defined(__ppc__) || defined(__ppc64__)
#include <map>
#else
#include <tr1/unordered_map>
#endif
#include <string>
#include <vector>
@ -80,10 +84,18 @@ typedef struct
typedef std::vector<InputAttributes> InputAttributesList;
typedef std::vector<CommandAttributes> CommandAttributesList;
#if defined(__ppc__) || defined(__ppc64__)
typedef std::map<std::string, CommandAttributes> InputCommandMap; // Key = Input key in deviceCode:elementCode format, Value = CommandAttributes
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
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
#endif
#pragma mark -
@interface InputHIDDevice : NSObject

View File

@ -793,7 +793,11 @@ void HandleDeviceRemovalCallback(void *inContext, IOReturn inResult, void *inSen
@synthesize commandTagList;
@synthesize commandIcon;
#if defined(__ppc__) || defined(__ppc64__)
static std::map<unsigned short, std::string> keyboardNameTable; // Key = Key code, Value = Key name
#else
static std::tr1::unordered_map<unsigned short, std::string> keyboardNameTable; // Key = Key code, Value = Key name
#endif
- (id)init
{