|
|
@@ -200,16 +200,18 @@ void IZ_ConfigLoadGuid(IZ_ConfigItem* item, const char* config_path) { |
|
|
|
default_value = *((SDL_GUID *) item->default_value); |
|
|
|
} |
|
|
|
|
|
|
|
char buffer[128]; |
|
|
|
char buffer[33]; |
|
|
|
if (item->transformer.deserialize && item->transformer.serialize) { |
|
|
|
IZ_ConfigDeserializeGUID* deserialize = item->transformer.deserialize; |
|
|
|
IZ_ConfigSerializeGUID* serialize = item->transformer.serialize; |
|
|
|
const char serialized_default_value[128]; |
|
|
|
const char serialized_default_value[33]; |
|
|
|
serialize(default_value, serialized_default_value); |
|
|
|
ini_gets(item->section, item->key, serialized_default_value, buffer, 128, config_path); |
|
|
|
ini_gets(item->section, item->key, serialized_default_value, buffer, 33, config_path); |
|
|
|
raw_value = deserialize(buffer); |
|
|
|
} else { |
|
|
|
ini_gets(item->section, item->key, "00000000000000000000000000000000", buffer, 128, config_path); |
|
|
|
char guid_string_default_value[33]; |
|
|
|
SDL_GUIDToString(default_value, guid_string_default_value, 33); |
|
|
|
ini_gets(item->section, item->key, guid_string_default_value, buffer, 33, config_path); |
|
|
|
raw_value = SDL_GUIDFromString(buffer); |
|
|
|
} |
|
|
|
IZ_ConfigEnsureValidGuid(item, raw_value, default_value); |
|
|
|