Add switch for openssl patch in segatools.ini

This commit is contained in:
2024-10-18 13:34:25 +07:00
parent 97d2d6b9bc
commit cef3406691
6 changed files with 41 additions and 5 deletions

View File

@ -23,6 +23,7 @@
#include "platform/platform.h"
#include "platform/vfs.h"
#include "platform/system.h"
#include "platform/opensslpatch.h"
void platform_config_load(struct platform_config *cfg, const wchar_t *filename)
{
@ -41,6 +42,7 @@ void platform_config_load(struct platform_config *cfg, const wchar_t *filename)
nusec_config_load(&cfg->nusec, filename);
vfs_config_load(&cfg->vfs, filename);
system_config_load(&cfg->system, filename);
openssl_patch_config_load(&cfg->openssl, filename);
}
void amvideo_config_load(struct amvideo_config *cfg, const wchar_t *filename)
@ -355,3 +357,18 @@ void epay_config_load(struct epay_config *cfg, const wchar_t *filename)
cfg->enable = GetPrivateProfileIntW(L"epay", L"enable", 1, filename);
}
void openssl_patch_config_load(struct openssl_patch_config *cfg, const wchar_t *filename)
{
// Ensure the config structure and filename are valid
assert(cfg != NULL);
assert(filename != NULL);
// Read the "enable" key from the "[openssl]" section of the configuration file
cfg->enable = GetPrivateProfileIntW(
L"openssl", // Section name
L"enable", // Key name
1, // Default value if the key is not found (disabled by default)
filename // INI file name
);
}