Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ else()
target_include_directories(
${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_BINARY_DIR}/src"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/skse-mcp/include")
target_compile_definitions(${PROJECT_NAME} PRIVATE UNICODE _UNICODE)
target_compile_definitions(${PROJECT_NAME} PRIVATE UNICODE _UNICODE NOMINMAX)

set_target_properties(
${PROJECT_NAME}
Expand Down
2 changes: 1 addition & 1 deletion lib/vcpkg
Submodule vcpkg updated 6013 files
21 changes: 8 additions & 13 deletions src/MenuUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,16 @@ namespace
return installed;
}

// menuFramework (HMODULE) is declared as a file-scope static in
// SKSEMenuFramework.hpp (pulled in via SKSEMCP/utils.hpp). Do not
// redeclare it here — that would shadow the variable used by every
// GetProcAddress call inside that header.
bool EnsureFrameworkLoaded()
{
if (menuFramework) {
if (GetMenuFrameworkModule()) {
return true;
}
menuFramework = GetModuleHandleW(L"SKSEMenuFramework.dll");
if (menuFramework) {
return true;
if (!LoadLibraryW(LR"(Data\SKSE\Plugins\SKSEMenuFramework.dll)")) {
return false;
}
menuFramework = LoadLibraryW(LR"(Data\SKSE\Plugins\SKSEMenuFramework.dll)");
return menuFramework != nullptr;

return static_cast<bool>(GetMenuFrameworkModule());
}

bool HasBlockingWindowExport()
Expand All @@ -49,7 +44,7 @@ namespace
return false;
}

hasExport = GetProcAddress(menuFramework, "IsAnyBlockingWindowOpened") != nullptr;
hasExport = static_cast<bool>(GetProcAddress(GetMenuFrameworkModule(), "IsAnyBlockingWindowOpened"));
exportResolved = true;
return hasExport;
}
Expand Down Expand Up @@ -253,8 +248,8 @@ void HoldFastMenuUI::Register()
logger::warn("SKSE Menu Framework detected on disk but DLL is not loaded — integration disabled");
return;
}
if (!GetProcAddress(menuFramework, "AddSectionItem") ||
!GetProcAddress(menuFramework, "IsAnyBlockingWindowOpened")) {
if (!GetProcAddress(GetMenuFrameworkModule(), "AddSectionItem") ||
!GetProcAddress(GetMenuFrameworkModule(), "IsAnyBlockingWindowOpened")) {
logger::warn("SKSE Menu Framework required exports are unavailable — integration disabled");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "holdfast",
"version-string": "1.4.1",
"builtin-baseline": "4bc07e3eb00c5a9539a5a7a83415150a9260f8db",
"builtin-baseline": "6fdd23fa0a9479a9f9a1c48178696f60cf39255d",
"dependencies": [
"spdlog",
"directxtk",
Expand Down
Loading