summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/themeio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/themeio.cpp')
-rw-r--r--plugins/TabSRMM/src/themeio.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp
index 7437a5fd77..62c9f2db30 100644
--- a/plugins/TabSRMM/src/themeio.cpp
+++ b/plugins/TabSRMM/src/themeio.cpp
@@ -253,15 +253,13 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
char *szIniFilename = mir_u2a(szIniFilenameT);
char szTemplateBuffer[TEMPLATE_LENGTH * 3 + 2];
char bSize = 0;
- HDC hdc;
int charset;
if ((version = GetPrivateProfileIntA("TabSRMM Theme", "Version", 0, szIniFilename)) == 0) // no version number.. assume 1
version = 1;
+ HDC hdc = GetDC(NULL);
if (dat == 0) {
- hdc = GetDC(NULL);
-
while (fontBlocks[n].szModule && (dwFlags & THEME_READ_FONTS)) {
char *szModule = fontBlocks[n].szModule;
int firstIndex = fontBlocks[n].iFirst;
@@ -342,7 +340,6 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
}
}
else {
- HDC hdc = GetDC(NULL);
int SY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(NULL, hdc);
if (!noAdvanced) {