gpu_apple.c: Use Ascii encoding

This commit is contained in:
Linus Dierheimer
2022-09-11 02:44:19 -07:00
parent c54b7fbd57
commit 8b7092e4d4
3 changed files with 5 additions and 2 deletions
+1
View File
@@ -2,6 +2,7 @@
**/.vscode/
**/.cache/
**/.kdev4/
**/.DS_Store
cscope.*
tags
fastfetch.kdev4
+2
View File
@@ -411,6 +411,8 @@ if(LINUX)
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
elseif(APPLE)
set(CPACK_GENERATOR "${CPACK_GENERATOR};DragNDrop")
set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK TRUE)
endif()
set(CPACK_SET_DESTDIR ON)
+2 -2
View File
@@ -61,7 +61,7 @@ void ffDetectGPUImpl(FFlist* gpus, const FFinstance* instance)
continue;
}
CFStringRef key = ffCFStringCreateWithCStringNoCopy(NULL, "model", kCFStringEncodingUTF8, *ffkCFAllocatorNull);
CFStringRef key = ffCFStringCreateWithCStringNoCopy(NULL, "model", kCFStringEncodingASCII, *ffkCFAllocatorNull);
CFStringRef model = ffCFDictionaryGetValue(properties, key);
if(model == NULL || ffCFGetTypeID(model) != ffCFDataGetTypeID())
{
@@ -74,7 +74,7 @@ void ffDetectGPUImpl(FFlist* gpus, const FFinstance* instance)
uint32_t modelLength = (uint32_t) ffCFStringGetLength(model);
ffStrbufInitA(&gpu->name, modelLength + 1);
ffCFStringGetCString(model, gpu->name.chars, modelLength + 1, kCFStringEncodingUTF8);
ffCFStringGetCString(model, gpu->name.chars, modelLength + 1, kCFStringEncodingASCII);
gpu->name.length = modelLength;
gpu->name.chars[gpu->name.length] = '\0';