EDIT:
(Actually, I'm fairly certain this function /is/ called and /does/ work. I can write code to crash SC as it exits, but see below.)
I've also tried writing a test file in this function, but it
qdp.cpp
Code
BOOL WINAPI TerminatePlugin() {
//Called when starcraft closes
// BROKEN AS FUCK, I DON'T EVEN KNOW IF IT IS CALLED
std::ofstream musicCheckEnd("music", ios::in);
if(musicCheckEnd.is_open()) // music was enabled
{
// perform cleanup
std::ofstream musicExit("exit", ios::out);
musicExit.close();
}
musicCheckEnd.close();
return true;
}
//Called when starcraft closes
// BROKEN AS FUCK, I DON'T EVEN KNOW IF IT IS CALLED
std::ofstream musicCheckEnd("music", ios::in);
if(musicCheckEnd.is_open()) // music was enabled
{
// perform cleanup
std::ofstream musicExit("exit", ios::out);
musicExit.close();
}
musicCheckEnd.close();
return true;
}
EDIT2:
Clarification. If I place the file "music" in either my SCBW main directory where the SC EXE is or where the mod's EXE is, it doesn't work. I don't know where else it could be reading/writing to, though.
Post has been edited 1 time(s), last time on Aug 13 2012, 10:44 am by Sand Wraith.