mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
gpu_apple.c: Use Ascii encoding
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
**/.vscode/
|
||||
**/.cache/
|
||||
**/.kdev4/
|
||||
**/.DS_Store
|
||||
cscope.*
|
||||
tags
|
||||
fastfetch.kdev4
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user