mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Add Env Var detection for VCPKG_ROOT, add DLC detection.
This commit is contained in:
parent
d4f58a35be
commit
0010de9d30
2 changed files with 14 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
cmake_minimum_required (VERSION 3.20)
|
cmake_minimum_required (VERSION 3.20)
|
||||||
|
|
||||||
|
if(NOT DEFINED ENV{VCPKG_ROOT})
|
||||||
|
message(FATAL_ERROR "VCPKG_ROOT is not defined!")
|
||||||
|
endif()
|
||||||
|
|
||||||
include($ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
include($ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
||||||
set(SWA_THIRDPARTY_ROOT ${CMAKE_SOURCE_DIR}/thirdparty)
|
set(SWA_THIRDPARTY_ROOT ${CMAKE_SOURCE_DIR}/thirdparty)
|
||||||
set(SWA_TOOLS_ROOT ${CMAKE_SOURCE_DIR}/tools)
|
set(SWA_TOOLS_ROOT ${CMAKE_SOURCE_DIR}/tools)
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,16 @@ void KiSystemStartup()
|
||||||
// OS mounts game data to D:
|
// OS mounts game data to D:
|
||||||
XamContentCreateEx(0, "D", &gameContent, OPEN_EXISTING, nullptr, nullptr, 0, 0, nullptr);
|
XamContentCreateEx(0, "D", &gameContent, OPEN_EXISTING, nullptr, nullptr, 0, 0, nullptr);
|
||||||
|
|
||||||
|
for (auto& file : std::filesystem::directory_iterator("./dlc"))
|
||||||
|
{
|
||||||
|
if (file.is_directory())
|
||||||
|
{
|
||||||
|
std::u8string fileNameU8 = file.path().filename().u8string();
|
||||||
|
std::u8string filePathU8 = file.path().u8string();
|
||||||
|
XamRegisterContent(XamMakeContent(XCONTENTTYPE_DLC, (const char*)(fileNameU8.c_str())), (const char*)(filePathU8.c_str()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
XAudioInitializeSystem();
|
XAudioInitializeSystem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue