Skip to content

Commit

Permalink
read language argument from loader, not currently passed to game
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpatt committed May 28, 2024
1 parent 3ab07b1 commit b7a144c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions f4se_loader/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ bool Options::Read(int argc, char ** argv)
// terminator for arguments
break;
}
else if((arg[0] == 'l') && (strlen(arg) == 3))
{
// language argument from the vanilla launcher
m_languageFromLoader = arg + 1;
}
else
{
_ERROR("unknown switch (%s)", arg);
Expand Down Expand Up @@ -239,6 +244,7 @@ void Options::PrintUsage(void)
_MESSAGE(" -affinity <mask> - set the processor affinity mask");
_MESSAGE(" -forcesteamloader - does nothing, ignored for backwards compatibility");
_MESSAGE(" -waitfordebugger - wait for a debugger to attach before beginning execution");
_MESSAGE(" -l** - language argument from the vanilla launcher (matches -l and then any two characters)");
_MESSAGE(" -- - ignore arguments after this marker");
}

Expand Down
2 changes: 2 additions & 0 deletions f4se_loader/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Options
std::string m_altEXE;
std::string m_altDLL;

std::string m_languageFromLoader;

private:
bool Verify(void);
};
Expand Down

0 comments on commit b7a144c

Please sign in to comment.