mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12: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) {
|
for (const char* key : Extensions::availableExtensions) {
|
||||||
if (iniparser_getboolean(dict, key, 0)) {
|
if (iniparser_getboolean(dict, key, 0)) {
|
||||||
std::vector<const char*> extensionKeys;
|
std::vector<const char*> extensionKeys;
|
||||||
extensionKeys.resize(iniparser_getsecnkeys(dict, key));
|
const char* section = SDL_strchr(key, ':') + 1;
|
||||||
iniparser_getseckeys(dict, key, extensionKeys.data());
|
extensionKeys.resize(iniparser_getsecnkeys(dict, section));
|
||||||
|
iniparser_getseckeys(dict, section, extensionKeys.data());
|
||||||
|
|
||||||
std::map<std::string, std::string> extensionDict;
|
std::map<std::string, std::string> extensionDict;
|
||||||
for (const char* key : extensionKeys) {
|
for (const char* key : extensionKeys) {
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
#include "extensions/extensions.h"
|
#include "extensions/extensions.h"
|
||||||
#include "legotextureinfo.h"
|
#include "legotextureinfo.h"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace Extensions
|
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")) {
|
if (!SDL_strcasecmp(p_key, "extensions:texture loader")) {
|
||||||
TextureLoader::options = std::move(p_options);
|
TextureLoader::options = std::move(p_options);
|
||||||
TextureLoader::enabled = true;
|
TextureLoader::enabled = true;
|
||||||
|
TextureLoader::Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Log("Enabled extension: %s", p_key);
|
SDL_Log("Enabled extension: %s", p_key);
|
||||||
|
|||||||
@ -4,7 +4,7 @@ using namespace Extensions;
|
|||||||
|
|
||||||
std::map<std::string, std::string> TextureLoader::options;
|
std::map<std::string, std::string> TextureLoader::options;
|
||||||
bool TextureLoader::enabled = false;
|
bool TextureLoader::enabled = false;
|
||||||
|
#include <SDL3/SDL_log.h>
|
||||||
void TextureLoader::Initialize()
|
void TextureLoader::Initialize()
|
||||||
{
|
{
|
||||||
for (const auto& option : defaults) {
|
for (const auto& option : defaults) {
|
||||||
@ -12,6 +12,11 @@ void TextureLoader::Initialize()
|
|||||||
options[option.first.data()] = option.second;
|
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)
|
bool TextureLoader::PatchTexture(LegoTextureInfo* p_textureInfo)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user