From f42980e090d7bda88db702105dd80114d86942f9 Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Wed, 30 Nov 2022 19:02:42 +0100 Subject: [PATCH] Make debugging more skin friendly Debug StartMenuDLL used to not find skins when put to Open-Shell installation folder. Now it will try to look for skins in default location (Skins folder in the same folder as DLL) and use alternative (Skins folder one level up) if not present. --- Src/StartMenu/StartMenuDLL/SkinManager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Src/StartMenu/StartMenuDLL/SkinManager.cpp b/Src/StartMenu/StartMenuDLL/SkinManager.cpp index 213a09d..41b6e9b 100644 --- a/Src/StartMenu/StartMenuDLL/SkinManager.cpp +++ b/Src/StartMenu/StartMenuDLL/SkinManager.cpp @@ -3235,10 +3235,14 @@ void GetSkinsPath( wchar_t *path ) { GetModuleFileName(g_Instance,path,_MAX_PATH); *PathFindFileName(path)=0; -#ifdef BUILD_SETUP Strcat(path,_MAX_PATH,L"Skins\\"); -#else - Strcat(path,_MAX_PATH,L"..\\Skins\\"); + +#ifndef BUILD_SETUP + if (!PathIsDirectory(path)) + { + *PathFindFileName(path) = 0; + Strcat(path,_MAX_PATH,L"..\\Skins\\"); + } #endif }