fix: 4jlibs debug builds + dlc issues

This commit is contained in:
Fireblade
2026-07-17 00:02:23 -04:00
parent 8ad0c385de
commit 14abb60207
2 changed files with 12 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ target_include_directories(4JLibs.Globals INTERFACE
)
set(CMAKE_DEBUG_POSTFIX "_d")
add_compile_definitions($<$<CONFIG:Debug>:_DEBUG>)
# msvc specific flags
if(MSVC)

View File

@@ -129,21 +129,26 @@ DWORD CDLC::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DW
this->m_pMountedDLCParam = lpParam;
if (szMountDrive)
{
m_szMountPath = szMountDrive;
}
else
{
m_szMountPath = this->m_szPackageRoot;
}
this->m_uiCurrentMappedDLC = dwDLC;
char *dlcdirPath = m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName;
for (int i = 0; i < (int)m_vDLCDriveMappings.size(); i++)
{
if (m_vDLCDriveMappings[i].m_szMountPath == m_szMountPath)
{
m_vDLCDriveMappings.erase(m_vDLCDriveMappings.begin() + i);
break;
}
}
m_vDLCDriveMappings.push_back(DriveMapping(dlcdirPath, m_szMountPath));
m_iHasNewMountedDLCs = true;
return 997;
}
@@ -152,17 +157,13 @@ DWORD CDLC::UnmountInstalledDLC(LPCSTR szMountDrive)
LPCSTR szDrive = nullptr;
if (szMountDrive)
{
szDrive = szMountDrive;
}
else
{
szDrive = this->m_szPackageRoot;
}
for (int i = 0; i < this->m_vDLCDriveMappings.size(); i++)
{
if (m_vDLCDriveMappings[i].m_szDirectoryPath == szDrive)
if (m_vDLCDriveMappings[i].m_szMountPath == szDrive)
{
m_vDLCDriveMappings.erase(m_vDLCDriveMappings.begin() + i);