Themes default check on startup (#1429)

Attempt at solving themes defaulting, check themes after they have been added
This commit is contained in:
Pelsin
2025-07-23 17:18:18 +02:00
committed by GitHub
parent ed3477f7a2
commit b04223af8c

View File

@@ -3,10 +3,6 @@
#include "enums.pb.h"
StaticTheme::StaticTheme(PixelMatrix &matrix) : Animation(matrix) {
AnimationOptions & animationOptions = Storage::getInstance().getAnimationOptions();
if (animationOptions.themeIndex >= themes.size()) {
animationOptions.themeIndex = 0;
}
const std::map<uint32_t, RGB> themeGuiltyGearTypeA({
{ GAMEPAD_MASK_DU, ColorWhite },
@@ -301,6 +297,11 @@ StaticTheme::StaticTheme(PixelMatrix &matrix) : Animation(matrix) {
AddTheme(themeGuiltyGearTypeD);
AddTheme(themeGuiltyGearTypeE);
AddTheme(themeFightboard);
AnimationOptions & animationOptions = Storage::getInstance().getAnimationOptions();
if (animationOptions.themeIndex >= themes.size()) {
animationOptions.themeIndex = 0;
}
}
bool StaticTheme::Animate(RGB (&frame)[100]) {