aboutsummaryrefslogtreecommitdiff
path: root/c/main.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-01 12:10:15 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-01 12:14:24 +0200
commit75ec2e035ca3114a13023ba974d2a7dfb7f12451 (patch)
treeae43399ac8b28022fc0a4366e03617a8fcba571c /c/main.c
parent3d907443ef27355ec9ced8a244fd678df1ea2538 (diff)
downloadEpisodeBrowser-75ec2e035ca3114a13023ba974d2a7dfb7f12451.tar.gz
Fix control flow in UpdateTheme.
Fixes 4f98051cbe62171775f6b319400b6dc6c2841e07.
Diffstat (limited to 'c/main.c')
-rw-r--r--c/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/c/main.c b/c/main.c
index f22eabf..4b3a91d 100644
--- a/c/main.c
+++ b/c/main.c
@@ -314,16 +314,17 @@ UpdateTheme()
static int bThemes = -1;
switch (bThemes) {
+ case 0:
+ return;
case -1:
{
HMODULE hModule;
hModule = LoadLibrary(TEXT("uxtheme.dll"));
bThemes = hModule && GetProcAddress(hModule,"SetWindowTheme");
- break;
}
- case 1:
- bThemeActive = IsThemeActive();
- LvSetTheme(HElv, bThemeActive);
- LvSetTheme(HDlv, bThemeActive);
}
+
+ bThemeActive = IsThemeActive();
+ LvSetTheme(HElv, bThemeActive);
+ LvSetTheme(HDlv, bThemeActive);
}