Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 3.16)
project(DirectDesktopSuite)

# 1. New Qt6 Engine (Optional)
find_package(Qt6 COMPONENTS Core Gui Quick Widgets QUIET)
if(NOT Qt6_FOUND)
message(STATUS "Qt6 not found. DirectDesktop will build without Qt engine.")
endif()

# 2. Main DirectUI + Qt Application
add_subdirectory(DirectDesktop)

# 3. Consolidation (Install to 'bin' folder in build directory)
set(OUTPUT_DIR "bin")

install(TARGETS DirectDesktop RUNTIME DESTINATION "${OUTPUT_DIR}")
if(Qt6_FOUND)
# Deploy Qt libraries
get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")

if(WINDEPLOYQT_EXECUTABLE)
install(CODE "
execute_process(COMMAND \"${WINDEPLOYQT_EXECUTABLE}\"
--release
--no-translations
--no-compiler-runtime
--no-opengl-sw
--no-system-d3d-compiler
\"\${CMAKE_INSTALL_PREFIX}/${OUTPUT_DIR}/DirectDesktop.exe\")
")
endif()
endif()

# Copy UI files for DirectUI
install(DIRECTORY "${CMAKE_SOURCE_DIR}/DirectDesktop/ui" DESTINATION "${OUTPUT_DIR}/DirectDesktop")
install(DIRECTORY "${CMAKE_SOURCE_DIR}/DirectDesktop/ImageResources" DESTINATION "${OUTPUT_DIR}/DirectDesktop")

# Copy C# binaries if they exist
find_program(DOTNET_EXE dotnet)
if(DOTNET_EXE)
install(CODE "
file(GLOB_RECURSE CS_BINS \"${CMAKE_SOURCE_DIR}/DirectDesktopSettings/bin/Release/net11.0-windows/*\")
foreach(file \${CS_BINS})
file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${OUTPUT_DIR}\" TYPE FILE FILES \"\${file}\")
endforeach()
")
endif()

# 4. CPack Installer Configuration
set(CPACK_PACKAGE_NAME "DirectDesktop")
set(CPACK_PACKAGE_VENDOR "Rectify11")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "DirectDesktop Custom Desktop Shell")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "DirectDesktop")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/.gitignore") # Placeholder if no LICENSE file

# NSIS Specifics
set(CPACK_GENERATOR "NSIS")
set(CPACK_NSIS_DISPLAY_NAME "DirectDesktop")
set(CPACK_NSIS_PACKAGE_NAME "DirectDesktop")
set(CPACK_NSIS_HELP_LINK "https://github.com/Rectify11/DirectDesktop")
set(CPACK_NSIS_URL_INFO_ABOUT "https://github.com/Rectify11/DirectDesktop")
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/DirectDesktop/DirectDesktop.ico")
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/DirectDesktop/DirectDesktop.ico")

# Shortcuts: Point to the Settings app so users know what it's doing
set(CPACK_NSIS_CREATE_ICONS_EXTRA "
CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\DirectDesktop Control Panel.lnk' '$INSTDIR\\\\bin\\\\DirectDesktopSettings.exe'
CreateShortCut '$DESKTOP\\\\DirectDesktop Control Panel.lnk' '$INSTDIR\\\\bin\\\\DirectDesktopSettings.exe'
")
set(CPACK_NSIS_DELETE_ICONS_EXTRA "
Delete '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\DirectDesktop Control Panel.lnk'
Delete '$DESKTOP\\\\DirectDesktop Control Panel.lnk'
")

# Registry entry for auto-start or identification
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
WriteRegStr HKLM 'Software\\\\DirectDesktop' 'InstallDir' '$INSTDIR'
")

include(CPack)
30 changes: 29 additions & 1 deletion DirectDesktop.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36109.1 d17.14
VisualStudioVersion = 17.14.36109.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectDesktop", "DirectDesktop\DirectDesktop.vcxproj", "{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}"
ProjectSection(ProjectDependencies) = postProject
Expand All @@ -13,38 +13,66 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectUI", "DirectDesktop\I
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DUser", "DirectDesktop\Include\dui70\DUser\DUser.vcxproj", "{11541C39-BDE1-4AA4-8FC3-D1C209267802}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DirectDesktopSettings", "DirectDesktopSettings\DirectDesktopSettings.csproj", "{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Debug|Any CPU = Debug|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Debug|x64.ActiveCfg = Debug|x64
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Debug|x64.Build.0 = Debug|x64
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Debug|x86.ActiveCfg = Debug|Win32
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Debug|x86.Build.0 = Debug|Win32
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Debug|Any CPU.ActiveCfg = Debug|x64
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Debug|Any CPU.Build.0 = Debug|x64
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Release|x64.ActiveCfg = Release|x64
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Release|x64.Build.0 = Release|x64
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Release|x86.ActiveCfg = Release|Win32
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Release|x86.Build.0 = Release|Win32
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Release|Any CPU.ActiveCfg = Release|x64
{1D0F8BF4-F1CB-44BA-8012-5D0EB6735F5C}.Release|Any CPU.Build.0 = Release|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Debug|x64.ActiveCfg = Debug|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Debug|x64.Build.0 = Debug|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Debug|x86.ActiveCfg = Debug|Win32
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Debug|x86.Build.0 = Debug|Win32
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Debug|Any CPU.ActiveCfg = Debug|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Debug|Any CPU.Build.0 = Debug|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Release|x64.ActiveCfg = Release|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Release|x64.Build.0 = Release|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Release|x86.ActiveCfg = Release|Win32
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Release|x86.Build.0 = Release|Win32
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Release|Any CPU.ActiveCfg = Release|x64
{0B7DE49A-33C6-41B1-A9CE-D353031F8454}.Release|Any CPU.Build.0 = Release|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Debug|x64.ActiveCfg = Debug|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Debug|x64.Build.0 = Debug|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Debug|x86.ActiveCfg = Debug|Win32
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Debug|x86.Build.0 = Debug|Win32
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Debug|Any CPU.ActiveCfg = Debug|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Debug|Any CPU.Build.0 = Debug|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Release|x64.ActiveCfg = Release|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Release|x64.Build.0 = Release|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Release|x86.ActiveCfg = Release|Win32
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Release|x86.Build.0 = Release|Win32
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Release|Any CPU.ActiveCfg = Release|x64
{11541C39-BDE1-4AA4-8FC3-D1C209267802}.Release|Any CPU.Build.0 = Release|x64
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Debug|x64.ActiveCfg = Debug|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Debug|x64.Build.0 = Debug|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Debug|x86.ActiveCfg = Debug|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Debug|x86.Build.0 = Debug|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Release|x64.ActiveCfg = Release|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Release|x64.Build.0 = Release|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Release|x86.ActiveCfg = Release|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Release|x86.Build.0 = Release|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A067F43B-BA1F-4B5F-B817-3B93813B1F9B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
98 changes: 98 additions & 0 deletions DirectDesktop/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
cmake_minimum_required(VERSION 3.16)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM might not work on ur sys if path or toolchain differ so pay a bit of an attention here might need to tweak if needed
**Quick note do not remove the ones about the qt6 as it need its libraries(dlls) to be bundled with to actually work

project(DirectDesktopWin32 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)

# MSVC specific flags to match .vcxproj
if(MSVC)
add_definitions(-DUNICODE -D_UNICODE -DDIRECTUI_STATIC -DDUSER_STATIC)
endif()

# Collect source files
file(GLOB SRC_FILES_ROOT "*.cpp")
file(GLOB SRC_FILES_BACKEND "backend/*.cpp")
file(GLOB SRC_FILES_COREUI "coreui/*.cpp")
file(GLOB SRC_FILES_UI "ui/*.cpp")

# Exclude QtEngine.cpp from the main list as it is built separately
list(REMOVE_ITEM SRC_FILES_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/QtEngine.cpp")

set(SRC_FILES
${SRC_FILES_ROOT}
${SRC_FILES_BACKEND}
${SRC_FILES_COREUI}
${SRC_FILES_UI}
"Include/dui70/DirectUI/DirectUI.cpp"
)

# Main executable target
add_executable(DirectDesktop WIN32
${SRC_FILES}
DirectDesktop.rc
DirectDesktop.manifest
)

# Apply compiler options to the main target
if(MSVC)
target_compile_options(DirectDesktop PRIVATE /Zc:wchar_t-)
target_compile_definitions(DirectDesktop PRIVATE _HAS_STD_BYTE=0)
endif()

# Include directories
target_include_directories(DirectDesktop PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/backend
${CMAKE_CURRENT_SOURCE_DIR}/coreui
${CMAKE_CURRENT_SOURCE_DIR}/ui
${CMAKE_CURRENT_SOURCE_DIR}/Include
)

# Link the provided and system libraries
target_link_libraries(DirectDesktop PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/dui70.lib
${CMAKE_CURRENT_SOURCE_DIR}/DUser.lib
${CMAKE_CURRENT_SOURCE_DIR}/Everything64.lib
user32
shell32
gdi32
comctl32
ole32
shlwapi
dwmapi
uxtheme
windowscodecs
gdiplus
advapi32
shcore
wtsapi32
powrprof
oleaut32
)

# Embed Qt Engine if available
if(Qt6_FOUND)
add_library(DirectDesktopQtEngine STATIC QtEngine.cpp ui/qml.qrc)

# Qt requires _HAS_STD_BYTE=1 and doesn't use the /Zc:wchar_t- flag
target_compile_definitions(DirectDesktopQtEngine PRIVATE _HAS_STD_BYTE=1 ENABLE_QT DIRECTUI_STATIC DUSER_STATIC)
set_target_properties(DirectDesktopQtEngine PROPERTIES AUTOMOC ON AUTORCC ON AUTOUIC ON)

target_link_libraries(DirectDesktopQtEngine PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Quick
Qt6::Widgets
)

target_compile_definitions(DirectDesktop PRIVATE ENABLE_QT)
target_link_libraries(DirectDesktop PRIVATE DirectDesktopQtEngine)
endif()

# Build the C# Control Panel as a post-step
find_program(DOTNET_EXE dotnet)
if(DOTNET_EXE)
add_custom_command(TARGET DirectDesktop POST_BUILD
COMMAND ${DOTNET_EXE} build ${CMAKE_SOURCE_DIR}/DirectDesktopSettings/DirectDesktopSettings.csproj -c Release
COMMENT "Building C# Control Panel..."
)
endif()
45 changes: 34 additions & 11 deletions DirectDesktop/DirectDesktop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

#include "DirectDesktop.h"

#ifdef ENABLE_QT
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self explanatory

#include "QtEngine.h"
#endif

#include <cmath>
#include <list>
#include <powrprof.h>
Expand Down Expand Up @@ -778,7 +782,7 @@ namespace DirectDesktop
}
if (wParam == SPI_SETFONTSMOOTHING)
{
WCHAR* fontsmoothingStr;
WCHAR* fontsmoothingStr = nullptr;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C23 nullptr damn

GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"FontSmoothing", &fontsmoothingStr);
g_fontsmoothing = _wtoi(fontsmoothingStr);
free(fontsmoothingStr);
Expand Down Expand Up @@ -1406,9 +1410,10 @@ namespace DirectDesktop
}
case WM_USER + 5:
{
WCHAR *cxDragStr{}, *cyDragStr{};
WCHAR *cxDragStr = nullptr, *cyDragStr = nullptr;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing C23 nullptr

GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"DragWidth", &cxDragStr);
GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"DragHeight", &cyDragStr);

static const int dragWidth = _wtoi(cxDragStr);
static const int dragHeight = _wtoi(cyDragStr);
free(cxDragStr), free(cyDragStr);
Expand Down Expand Up @@ -1531,9 +1536,10 @@ namespace DirectDesktop
POINT ppt;
GetCursorPos(&ppt);
ScreenToClient(wnd->GetHWND(), &ppt);
WCHAR *cxDragStr{}, *cyDragStr{};
WCHAR *cxDragStr = nullptr, *cyDragStr = nullptr;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C23

GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"DragWidth", &cxDragStr);
GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"DragHeight", &cyDragStr);

static const int dragWidth = _wtoi(cxDragStr);
static const int dragHeight = _wtoi(cyDragStr);
free(cxDragStr), free(cyDragStr);
Expand Down Expand Up @@ -2635,8 +2641,9 @@ namespace DirectDesktop
DWORD WINAPI MultiClickHandler(LPVOID lpParam)
{
int clicks = *(int*)lpParam;
wchar_t* dcms{};
wchar_t* dcms = nullptr;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c23 and also i dont know why u did wchar_t* dcms{}; thats bad code btw

GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Mouse", L"DoubleClickSpeed", &dcms);

Sleep(_wtoi(dcms));
free(dcms);
if (clicks == *(int*)lpParam)
Expand Down Expand Up @@ -3636,9 +3643,10 @@ namespace DirectDesktop
POINT ppt, ppt2;
GetCursorPos(&ppt);
ScreenToClient(wnd->GetHWND(), &ppt);
WCHAR *cxDragStr{}, *cyDragStr{};
WCHAR *cxDragStr = nullptr, *cyDragStr = nullptr;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing

GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"DragWidth", &cxDragStr);
GetRegistryStrValues(HKEY_CURRENT_USER, L"Control Panel\\Desktop", L"DragHeight", &cyDragStr);

static const int dragWidth = _wtoi(cxDragStr);
static const int dragHeight = _wtoi(cyDragStr);
free(cxDragStr), free(cyDragStr);
Expand Down Expand Up @@ -4377,12 +4385,13 @@ namespace DirectDesktop
pm.clear();
GetFontHeight();
if (logging == IDYES) MainLogger.WriteLine(L"Information: Initialization: 1 of 6 complete: Prepared DirectDesktop to receive desktop data.");
WCHAR* path{};
WCHAR* path = nullptr;
GetRegistryStrValues(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders", L"Desktop", &path);
WCHAR* secondaryPath = new WCHAR[260];
WCHAR* cBuffer = new WCHAR[260];

BYTE* value{};
BYTE* value = nullptr;

GetRegistryBinValues(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\Shell\\Bags\\1\\Desktop", L"IconLayouts", &value);
size_t offset = 0x10;
vector<uint16_t> head;
Expand Down Expand Up @@ -4811,6 +4820,8 @@ namespace DirectDesktop
keyHold[pKeyInfo->vkCode] = true;
}
}
if (pKeyInfo->vkCode == VK_BACK && g_renameactive) return CallNextHookEx(KeyHook, nCode, wParam, lParam);

if (pKeyInfo->vkCode == 'N' && GetAsyncKeyState(VK_SHIFT) & 0x8000 && GetAsyncKeyState(VK_CONTROL) & 0x8000)
{
if (!keyHold[pKeyInfo->vkCode])
Expand Down Expand Up @@ -5005,8 +5016,21 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
WCHAR* WindowsBuildStr;
// Check if the user has selected the Qt6 engine in the Control Panel
int uiMode = GetRegistryValues(HKEY_CURRENT_USER, L"Software\\DirectDesktop", L"UIMode");
if (uiMode == 1)
{
#ifdef ENABLE_QT
return RunQtEngine(__argc, __argv);
#else
MessageBoxW(nullptr, L"DirectDesktop was not built with Qt support.", L"Error", MB_OK | MB_ICONERROR);
return 0; // Exit DirectUI process
#endif
}

WCHAR* WindowsBuildStr = nullptr;
GetRegistryStrValues(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", L"CurrentBuildNumber", &WindowsBuildStr);

int WindowsBuild = _wtoi(WindowsBuildStr);
free(WindowsBuildStr);
if (WindowsBuild < 18362)
Expand Down Expand Up @@ -5236,8 +5260,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
SystemParametersInfoW(SPI_GETCOMBOBOXANIMATION, NULL, &g_comboAnim, NULL);
SystemParametersInfoW(SPI_GETMENUANIMATION, NULL, &g_menuAnim, NULL);
SystemParametersInfoW(SPI_GETTOOLTIPANIMATION, NULL, &g_tooltipAnim, NULL);
WCHAR* fontsmoothingStr;
GetRegistryStrValues(DDKey.GetHKeyName(), L"Control Panel\\Desktop", L"FontSmoothing", &fontsmoothingStr);
WCHAR* fontsmoothingStr = nullptr; GetRegistryStrValues(DDKey.GetHKeyName(), L"Control Panel\\Desktop", L"FontSmoothing", &fontsmoothingStr);
g_fontsmoothing = _wtoi(fontsmoothingStr);
free(fontsmoothingStr);
g_hiddenIcons = GetRegistryValues(DDKey.GetHKeyName(), DDKey.GetPath(), L"HideIcons");
Expand Down Expand Up @@ -5319,7 +5342,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
else StringCchPrintfW(DesktopLayoutWithSize, 24, L"DesktopLayout_Touch");
if (EnsureRegValueExists(HKEY_CURRENT_USER, L"Software\\DirectDesktop", DesktopLayoutWithSize))
{
BYTE* value2;
BYTE* value2 = nullptr;
GetRegistryBinValues(HKEY_CURRENT_USER, L"Software\\DirectDesktop", DesktopLayoutWithSize, &value2);
g_currentPageID = *reinterpret_cast<unsigned short*>(&value2[2]);
free(value2);
Expand Down
Loading