isle-portable/extensions/src/extensions.cpp
Christian Semmler 841db2a577
Add SI Loader extension (#664)
* SiLoader draft

* Fixes

* Fixes

* Fix asset build on Windows

* Remove whitespace

* Package assets in CI

* Disable clang-tidy

* Fix NCC

* Try this

* Disable extensions on Xbox for now

* Update bitmap

* Update 3rdparty/CMakeLists.txt

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* Add DEPFILE for asset command

* Use assets.d instead of .d

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2025-08-11 00:59:55 +00:00

28 lines
731 B
C++

#include "extensions/extensions.h"
#include "extensions/siloader.h"
#include "extensions/textureloader.h"
#include <SDL3/SDL_log.h>
void Extensions::Enable(const char* p_key, std::map<std::string, std::string> p_options)
{
for (const char* key : availableExtensions) {
if (!SDL_strcasecmp(p_key, key)) {
if (!SDL_strcasecmp(p_key, "extensions:texture loader")) {
TextureLoader::options = std::move(p_options);
TextureLoader::enabled = true;
TextureLoader::Initialize();
}
else if (!SDL_strcasecmp(p_key, "extensions:si loader")) {
SiLoader::options = std::move(p_options);
SiLoader::enabled = true;
SiLoader::Initialize();
}
SDL_Log("Enabled extension: %s", p_key);
break;
}
}
}