Skip to content

Commit 9ca181c

Browse files
committed
Update for new USVFS function scheme.
1 parent 3d18f0c commit 9ca181c

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

src/spawn.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ DWORD spawn(const SpawnParameters& sp, HANDLE& processHandle)
457457
const DWORD flags = CREATE_BREAKAWAY_FROM_JOB;
458458

459459
if (sp.hooked) {
460-
success = ::CreateProcessHooked(nullptr, const_cast<wchar_t*>(wcommandLine.c_str()),
460+
success = ::usvfsCreateProcessHooked(
461+
nullptr, const_cast<wchar_t*>(wcommandLine.c_str()),
461462
nullptr, nullptr, inheritHandles, flags, nullptr,
462463
wcwd.c_str(), &si, &pi);
463464
} else {

src/usvfsconnector.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void LogWorker::process()
7070

7171
int noLogCycles = 0;
7272
while (!m_QuitRequested) {
73-
if (GetLogMessages(&m_Buffer[0], m_Buffer.size(), false)) {
73+
if (usvfsGetLogMessages(&m_Buffer[0], m_Buffer.size(), false)) {
7474
m_LogFile.write(m_Buffer.c_str());
7575
m_LogFile.write("\n");
7676
m_LogFile.flush();
@@ -142,7 +142,7 @@ UsvfsConnector::UsvfsConnector()
142142
usvfsSetCrashDumpPath(params, dumpPath.c_str());
143143
usvfsSetProcessDelay(params, delay.count());
144144

145-
InitLogging(false);
145+
usvfsInitLogging(false);
146146

147147
log::debug("initializing usvfs:\n"
148148
" . instance: {}\n"
@@ -154,13 +154,13 @@ UsvfsConnector::UsvfsConnector()
154154
usvfsCreateVFS(params);
155155
usvfsFreeParameters(params);
156156

157-
ClearExecutableBlacklist();
157+
usvfsClearExecutableBlacklist();
158158
for (auto exec : s.executablesBlacklist().split(";")) {
159159
std::wstring buf = exec.toStdWString();
160-
BlacklistExecutable(buf.data());
160+
usvfsBlacklistExecutable(buf.data());
161161
}
162162

163-
ClearLibraryForceLoads();
163+
usvfsClearLibraryForceLoads();
164164

165165
m_LogWorker.moveToThread(&m_WorkerThread);
166166

@@ -172,7 +172,7 @@ UsvfsConnector::UsvfsConnector()
172172

173173
UsvfsConnector::~UsvfsConnector()
174174
{
175-
DisconnectVFS();
175+
usvfsDisconnectVFS();
176176
m_LogWorker.exit();
177177
m_WorkerThread.quit();
178178
m_WorkerThread.wait();
@@ -193,11 +193,11 @@ void UsvfsConnector::updateMapping(const MappingType& mapping)
193193

194194
log::debug("Updating VFS mappings...");
195195

196-
ClearVirtualMappings();
196+
usvfsClearVirtualMappings();
197197

198198
for (auto map : mapping) {
199199
if (progress.wasCanceled()) {
200-
ClearVirtualMappings();
200+
usvfsClearVirtualMappings();
201201
throw UsvfsConnectorException("VFS mapping canceled by user");
202202
}
203203
progress.setValue(value++);
@@ -206,12 +206,12 @@ void UsvfsConnector::updateMapping(const MappingType& mapping)
206206
}
207207

208208
if (map.isDirectory) {
209-
VirtualLinkDirectoryStatic(
209+
usvfsVirtualLinkDirectoryStatic(
210210
map.source.toStdWString().c_str(), map.destination.toStdWString().c_str(),
211211
(map.createTarget ? LINKFLAG_CREATETARGET : 0) | LINKFLAG_RECURSIVE);
212212
++dirs;
213213
} else {
214-
VirtualLinkFile(map.source.toStdWString().c_str(),
214+
usvfsVirtualLinkFile(map.source.toStdWString().c_str(),
215215
map.destination.toStdWString().c_str(), 0);
216216
++files;
217217
}
@@ -243,20 +243,20 @@ void UsvfsConnector::updateParams(MOBase::log::Levels logLevel,
243243
usvfsUpdateParameters(p);
244244
usvfsFreeParameters(p);
245245

246-
ClearExecutableBlacklist();
246+
usvfsClearExecutableBlacklist();
247247
for (auto exec : executableBlacklist.split(";")) {
248248
std::wstring buf = exec.toStdWString();
249-
BlacklistExecutable(buf.data());
249+
usvfsBlacklistExecutable(buf.data());
250250
}
251251
}
252252

253253
void UsvfsConnector::updateForcedLibraries(
254254
const QList<MOBase::ExecutableForcedLoadSetting>& forcedLibraries)
255255
{
256-
ClearLibraryForceLoads();
256+
usvfsClearLibraryForceLoads();
257257
for (auto setting : forcedLibraries) {
258258
if (setting.enabled()) {
259-
ForceLoadLibrary(setting.process().toStdWString().data(),
259+
usvfsForceLoadLibrary(setting.process().toStdWString().data(),
260260
setting.library().toStdWString().data());
261261
}
262262
}
@@ -269,7 +269,7 @@ std::vector<HANDLE> getRunningUSVFSProcesses()
269269
{
270270
size_t count = 0;
271271
DWORD* buffer = nullptr;
272-
if (!::GetVFSProcessList2(&count, &buffer)) {
272+
if (!::usvfsGetVFSProcessList2(&count, &buffer)) {
273273
log::error("failed to get usvfs process list");
274274
return {};
275275
}

0 commit comments

Comments
 (0)