Fixed Linux build not compiling.

This commit is contained in:
tschumann 2025-04-12 17:50:28 +10:00
parent 69e76c5581
commit 1296dfd5ee
3 changed files with 11 additions and 11 deletions

View File

@ -11,7 +11,7 @@
#define ENGINE_LIB_NAME "engine" LIB_SUFFIX
#endif
bool DetermineBackendS1(char *gameDir, int expectedBackend)
bool DetermineBackendS1(const char *gameDir, int expectedBackend)
{
char errorBuffer[128];
void *serverLib = nullptr;

View File

@ -20,13 +20,13 @@
} \
bool DetermineBackendS1(char *gameDir, int expectedBackend);
bool DetermineBackendS1(const char *gameDir, int expectedBackend);
DECL_TEST(TrimComments);
int main(int argc, char *argv[])
{
bool testDetermineBackendS1 = false;
char *gameDirectory = "";
char *gameDirectory = NULL;
int expectedMetamodBackend = -1;
for (int i = 0; i < argc; i++)
@ -47,8 +47,7 @@ int main(int argc, char *argv[])
if (testDetermineBackendS1)
{
bool success = DetermineBackendS1(gameDirectory, expectedMetamodBackend);
bool success = DetermineBackendS1(gameDirectory ? gameDirectory : "", expectedMetamodBackend);
// invert it because return code from main has 0 as success
return success != true;
}

View File

@ -95,6 +95,7 @@ function testGame([SteamGame]$game)
Return
}
# make gamedir the last parameter as something weird is going on where if it's "" then PowerShell is collapsing it and the next argument gets passed as gamedir
if ($game.Architecture -eq "x86")
{
$env:Path=$enginePath + ";" + $gamePath + ";" + $env:Path; ..\..\build\loader\test\test_loader\windows-x86\test_loader.exe -testdbs1 -expectedbackend $game.ExpectedBackend -gamedir $game.GameDir