diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-07-07 22:12:39 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-07-07 22:12:39 +0000 |
| commit | 85871b22b9d5cd203f3a4d82ed44bb6369c11d06 (patch) | |
| tree | 9fd9309deff0fd7b231e825e0073001fec2cd92d | |
| parent | 3c2929ba9056bbbcfa5dea1ed67baeaa2ffe629f (diff) | |
| download | pcsxr-85871b22b9d5cd203f3a4d82ed44bb6369c11d06.tar.gz | |
OS X: Use the proper localization code for the metadata importer.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@90898 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | macosx/Pcsxr.xcodeproj/project.pbxproj | 15 | ||||
| -rw-r--r-- | macosx/Psx-Memcard/GetMetadataForFile.h | 2 | ||||
| -rw-r--r-- | macosx/Psx-Memcard/GetMetadataForFile.m | 2 | ||||
| -rw-r--r-- | macosx/Psx-Memcard/Psx-Memcard-Prefix.pch | 1 | ||||
| -rw-r--r-- | macosx/Psx-Memcard/main.c | 26 |
5 files changed, 27 insertions, 19 deletions
diff --git a/macosx/Pcsxr.xcodeproj/project.pbxproj b/macosx/Pcsxr.xcodeproj/project.pbxproj index 34f69039..3ab9cac1 100644 --- a/macosx/Pcsxr.xcodeproj/project.pbxproj +++ b/macosx/Pcsxr.xcodeproj/project.pbxproj @@ -3439,7 +3439,10 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Psx-Memcard/Psx-Memcard-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "PCSXRPLUG=MDPsx", + ); INFOPLIST_FILE = "Psx-Memcard/Psx-Memcard-Info.plist"; INSTALL_PATH = "@executable_path/../Contents/Library/Spotlight"; LIBRARY_STYLE = BUNDLE; @@ -3464,7 +3467,10 @@ GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Psx-Memcard/Psx-Memcard-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "PCSXRPLUG=MDPsx", + ); INFOPLIST_FILE = "Psx-Memcard/Psx-Memcard-Info.plist"; INSTALL_PATH = "@executable_path/../Contents/Library/Spotlight"; LIBRARY_STYLE = BUNDLE; @@ -3489,7 +3495,10 @@ GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Psx-Memcard/Psx-Memcard-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "PCSXRPLUG=MDPsx", + ); INFOPLIST_FILE = "Psx-Memcard/Psx-Memcard-Info.plist"; INSTALL_PATH = "@executable_path/../Contents/Library/Spotlight"; LIBRARY_STYLE = BUNDLE; diff --git a/macosx/Psx-Memcard/GetMetadataForFile.h b/macosx/Psx-Memcard/GetMetadataForFile.h index 1d876978..61846134 100644 --- a/macosx/Psx-Memcard/GetMetadataForFile.h +++ b/macosx/Psx-Memcard/GetMetadataForFile.h @@ -11,8 +11,6 @@ #include <CoreFoundation/CoreFoundation.h> -#define __private_extern __attribute__((visibility("hidden"))) - __private_extern Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attributes, CFStringRef contentTypeUTI, CFStringRef pathToFile); #endif diff --git a/macosx/Psx-Memcard/GetMetadataForFile.m b/macosx/Psx-Memcard/GetMetadataForFile.m index bfb46ee0..04ecab1f 100644 --- a/macosx/Psx-Memcard/GetMetadataForFile.m +++ b/macosx/Psx-Memcard/GetMetadataForFile.m @@ -219,7 +219,7 @@ Boolean GetMetadataForFile(void *thisInterface, CFMutableDictionaryRef attribute attr[kPCSXRSaveNames] = @{@"en": [enNames copy], - @"jp": [jpNames copy]}; + @"ja": [jpNames copy]}; attr[kPCSXRMemCount] = @(memCount); attr[kPCSXRFreeBlocks] = @(freeBlocks); attr[kPCSXRMemNames] = [memNames copy]; diff --git a/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch b/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch index 90d8f859..98082c8b 100644 --- a/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch +++ b/macosx/Psx-Memcard/Psx-Memcard-Prefix.pch @@ -4,6 +4,7 @@ // The contents of this file are implicitly included at the beginning of every source file. // +#define __private_extern __attribute__((visibility("hidden"))) #include <CoreFoundation/CoreFoundation.h> #ifdef __OBJC__ diff --git a/macosx/Psx-Memcard/main.c b/macosx/Psx-Memcard/main.c index 93dfa030..619d1a68 100644 --- a/macosx/Psx-Memcard/main.c +++ b/macosx/Psx-Memcard/main.c @@ -52,11 +52,11 @@ static ULONG MetadataImporterPluginRelease(void *thisInstance); // static MDImporterInterfaceStruct testInterfaceFtbl = { - NULL, - MetadataImporterQueryInterface, - MetadataImporterPluginAddRef, - MetadataImporterPluginRelease, - GetMetadataForFile + NULL, + MetadataImporterQueryInterface, + MetadataImporterPluginAddRef, + MetadataImporterPluginRelease, + GetMetadataForFile }; @@ -93,13 +93,13 @@ MDImporterType *AllocMetadataImporterPluginType(CFUUIDRef inFactoryID) // void DeallocMetadataImporterPluginType(MDImporterType *thisInstance) { - CFUUIDRef theFactoryID = thisInstance->factoryID; + CFUUIDRef theFactoryID = thisInstance->factoryID; - free(thisInstance); - if (theFactoryID){ - CFPlugInRemoveInstanceForFactory(theFactoryID); - CFRelease(theFactoryID); - } + free(thisInstance); + if (theFactoryID){ + CFPlugInRemoveInstanceForFactory(theFactoryID); + CFRelease(theFactoryID); + } } // ----------------------------------------------------------------------------- @@ -111,7 +111,7 @@ HRESULT MetadataImporterQueryInterface(void *thisInstance, REFIID iid, LPVOID *p { CFUUIDRef interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, iid); - if (CFEqual(interfaceID,kMDImporterInterfaceID)){ + if (CFEqual(interfaceID, kMDImporterInterfaceID)) { /* If the Right interface was requested, bump the ref count, * set the ppv parameter equal to the instance, and * return good status. @@ -120,7 +120,7 @@ HRESULT MetadataImporterQueryInterface(void *thisInstance, REFIID iid, LPVOID *p *ppv = thisInstance; CFRelease(interfaceID); return S_OK; - } else if (CFEqual(interfaceID,IUnknownUUID)){ + } else if (CFEqual(interfaceID, IUnknownUUID)) { /* If the IUnknown interface was requested, same as above. */ ((MDImporterType*)thisInstance )->conduitInterface->AddRef(thisInstance); *ppv = thisInstance; |
