fix: 4jlibs debug builds + dlc issues
This commit is contained in:
@@ -9,6 +9,7 @@ target_include_directories(4JLibs.Globals INTERFACE
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_DEBUG_POSTFIX "_d")
|
set(CMAKE_DEBUG_POSTFIX "_d")
|
||||||
|
add_compile_definitions($<$<CONFIG:Debug>:_DEBUG>)
|
||||||
|
|
||||||
# msvc specific flags
|
# msvc specific flags
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
|||||||
@@ -129,21 +129,26 @@ DWORD CDLC::MountInstalledDLC(int iPad, DWORD dwDLC, int (*Func)(LPVOID, int, DW
|
|||||||
this->m_pMountedDLCParam = lpParam;
|
this->m_pMountedDLCParam = lpParam;
|
||||||
|
|
||||||
if (szMountDrive)
|
if (szMountDrive)
|
||||||
{
|
|
||||||
m_szMountPath = szMountDrive;
|
m_szMountPath = szMountDrive;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
m_szMountPath = this->m_szPackageRoot;
|
m_szMountPath = this->m_szPackageRoot;
|
||||||
}
|
|
||||||
|
|
||||||
this->m_uiCurrentMappedDLC = dwDLC;
|
this->m_uiCurrentMappedDLC = dwDLC;
|
||||||
|
|
||||||
char *dlcdirPath = m_vInstalledDLCs[m_uiCurrentMappedDLC].szFileName;
|
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_vDLCDriveMappings.push_back(DriveMapping(dlcdirPath, m_szMountPath));
|
||||||
|
|
||||||
m_iHasNewMountedDLCs = true;
|
m_iHasNewMountedDLCs = true;
|
||||||
|
|
||||||
return 997;
|
return 997;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,17 +157,13 @@ DWORD CDLC::UnmountInstalledDLC(LPCSTR szMountDrive)
|
|||||||
LPCSTR szDrive = nullptr;
|
LPCSTR szDrive = nullptr;
|
||||||
|
|
||||||
if (szMountDrive)
|
if (szMountDrive)
|
||||||
{
|
|
||||||
szDrive = szMountDrive;
|
szDrive = szMountDrive;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
szDrive = this->m_szPackageRoot;
|
szDrive = this->m_szPackageRoot;
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < this->m_vDLCDriveMappings.size(); i++)
|
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);
|
m_vDLCDriveMappings.erase(m_vDLCDriveMappings.begin() + i);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user