eupak: Add bodge for MinGW compilation

also fix paktest, oops.
This commit is contained in:
Lily Tsuru 2022-09-22 05:58:53 -05:00
parent a95d104e7f
commit a27ab63c96
2 changed files with 8 additions and 2 deletions

View File

@ -6,6 +6,12 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
// MinGW bodges are cool.
#if defined(_WIN32) && !defined(_MSC_VER)
#define _POSIX_THREAD_SAFE_FUNCTIONS
#endif
#include <tasks/InfoTask.hpp>
#include <europa/io/PakReader.hpp>

View File

@ -29,11 +29,11 @@ int main(int argc, char** argv) {
if(argv[3] != nullptr) {
if(!strcmp(argv[3], "--jedi")) {
std::cout << "Writing Jedi Starfighter archive\n";
writer.Init(structs::PakVersion::Ver2);
writer.Init(structs::PakHeader::Version::Ver5);
}
} else {
std::cout << "Writing Starfighter archive\n";
writer.Init(structs::PakVersion::Starfighter);
writer.Init(structs::PakHeader::Version::Ver4);
}
// Read pak data and vomit it into the writer.