mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-14 11:31:15 +00:00
Fixes
This commit is contained in:
parent
57ab9cfc02
commit
e6ae70385f
@ -1121,8 +1121,9 @@ bool IsleApp::LoadConfig()
|
||||
for (const char* key : Extensions::availableExtensions) {
|
||||
if (iniparser_getboolean(dict, key, 0)) {
|
||||
std::vector<const char*> extensionKeys;
|
||||
extensionKeys.resize(iniparser_getsecnkeys(dict, key));
|
||||
iniparser_getseckeys(dict, key, extensionKeys.data());
|
||||
const char* section = SDL_strchr(key, ':') + 1;
|
||||
extensionKeys.resize(iniparser_getsecnkeys(dict, section));
|
||||
iniparser_getseckeys(dict, section, extensionKeys.data());
|
||||
|
||||
std::map<std::string, std::string> extensionDict;
|
||||
for (const char* key : extensionKeys) {
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include "extensions/extensions.h"
|
||||
#include "legotextureinfo.h"
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
|
||||
namespace Extensions
|
||||
|
||||
@ -11,6 +11,7 @@ void Extensions::Enable(const char* p_key, std::map<std::string, std::string> p_
|
||||
if (!SDL_strcasecmp(p_key, "extensions:texture loader")) {
|
||||
TextureLoader::options = std::move(p_options);
|
||||
TextureLoader::enabled = true;
|
||||
TextureLoader::Initialize();
|
||||
}
|
||||
|
||||
SDL_Log("Enabled extension: %s", p_key);
|
||||
|
||||
@ -4,7 +4,7 @@ using namespace Extensions;
|
||||
|
||||
std::map<std::string, std::string> TextureLoader::options;
|
||||
bool TextureLoader::enabled = false;
|
||||
|
||||
#include <SDL3/SDL_log.h>
|
||||
void TextureLoader::Initialize()
|
||||
{
|
||||
for (const auto& option : defaults) {
|
||||
@ -12,6 +12,11 @@ void TextureLoader::Initialize()
|
||||
options[option.first.data()] = option.second;
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& x : options) {
|
||||
SDL_Log(x.first.c_str());
|
||||
SDL_Log(x.second.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool TextureLoader::PatchTexture(LegoTextureInfo* p_textureInfo)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user