mirror of
https://git.neolegacy.dev/neoStudiosLCE/4JLibs.git
synced 2026-07-18 01:20:42 +00:00
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")
|
||||
add_compile_definitions($<$<CONFIG:Debug>:_DEBUG>)
|
||||
|
||||
# msvc specific flags
|
||||
if(MSVC)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user