|
7 | 7 | #include "config/config_recovery.h" |
8 | 8 | #include "config/config_defaults.h" |
9 | 9 | #include "config.h" |
| 10 | +#include "window/window_core.h" |
10 | 11 | #include "log.h" |
11 | 12 | #include "../resource/resource.h" |
12 | 13 | #include <stdio.h> |
@@ -182,11 +183,7 @@ void InitializeDefaultSnapshot(ConfigSnapshot* snapshot) { |
182 | 183 | snapshot->opacityStepFast = 5; |
183 | 184 | snapshot->scaleStepNormal = DEFAULT_SCALE_STEP_NORMAL; |
184 | 185 | snapshot->scaleStepFast = DEFAULT_SCALE_STEP_FAST; |
185 | | - snapshot->glowEffect = FALSE; |
186 | | - snapshot->glassEffect = FALSE; |
187 | | - snapshot->neonEffect = FALSE; |
188 | | - snapshot->holographicEffect = FALSE; |
189 | | - snapshot->liquidEffect = FALSE; |
| 186 | + snapshot->textEffect = TEXT_EFFECT_NONE; |
190 | 187 | snapshot->defaultStartTime = DEFAULT_START_TIME_SECONDS; |
191 | 188 | snapshot->notificationTimeoutMs = DEFAULT_NOTIFICATION_TIMEOUT_MS; |
192 | 189 | snapshot->notificationMaxOpacity = DEFAULT_NOTIFICATION_MAX_OPACITY; |
@@ -260,17 +257,25 @@ BOOL LoadConfigFromFile(const char* config_path, ConfigSnapshot* snapshot) { |
260 | 257 | DEFAULT_SCALE_STEP_NORMAL, config_path); |
261 | 258 | snapshot->scaleStepFast = ReadIniInt(INI_SECTION_DISPLAY, "SCALE_STEP_FAST", |
262 | 259 | DEFAULT_SCALE_STEP_FAST, config_path); |
263 | | - snapshot->glowEffect = ReadIniBool(INI_SECTION_DISPLAY, "TEXT_GLOW_EFFECT", |
264 | | - FALSE, config_path); |
265 | | - snapshot->glassEffect = ReadIniBool(INI_SECTION_DISPLAY, "TEXT_GLASS_EFFECT", |
266 | | - FALSE, config_path); |
267 | | - snapshot->neonEffect = ReadIniBool(INI_SECTION_DISPLAY, "TEXT_NEON_EFFECT", |
268 | | - FALSE, config_path); |
269 | | - snapshot->holographicEffect = ReadIniBool(INI_SECTION_DISPLAY, "TEXT_HOLOGRAPHIC_EFFECT", |
270 | | - FALSE, config_path); |
271 | | - snapshot->liquidEffect = ReadIniBool(INI_SECTION_DISPLAY, "TEXT_LIQUID_EFFECT", |
272 | | - FALSE, config_path); |
273 | | - |
| 260 | + |
| 261 | + /* Read text effect as enum */ |
| 262 | + char textEffectStr[32] = {0}; |
| 263 | + ReadIniString(INI_SECTION_DISPLAY, "TEXT_EFFECT", "NONE", |
| 264 | + textEffectStr, sizeof(textEffectStr), config_path); |
| 265 | + if (_stricmp(textEffectStr, "GLOW") == 0) { |
| 266 | + snapshot->textEffect = TEXT_EFFECT_GLOW; |
| 267 | + } else if (_stricmp(textEffectStr, "GLASS") == 0) { |
| 268 | + snapshot->textEffect = TEXT_EFFECT_GLASS; |
| 269 | + } else if (_stricmp(textEffectStr, "NEON") == 0) { |
| 270 | + snapshot->textEffect = TEXT_EFFECT_NEON; |
| 271 | + } else if (_stricmp(textEffectStr, "HOLOGRAPHIC") == 0) { |
| 272 | + snapshot->textEffect = TEXT_EFFECT_HOLOGRAPHIC; |
| 273 | + } else if (_stricmp(textEffectStr, "LIQUID") == 0) { |
| 274 | + snapshot->textEffect = TEXT_EFFECT_LIQUID; |
| 275 | + } else { |
| 276 | + snapshot->textEffect = TEXT_EFFECT_NONE; |
| 277 | + } |
| 278 | + |
274 | 279 | /* Read Timer section */ |
275 | 280 | snapshot->defaultStartTime = ReadIniInt(INI_SECTION_TIMER, "CLOCK_DEFAULT_START_TIME", |
276 | 281 | 1500, config_path); |
|
0 commit comments