3cd9e77889
* Initial linux support using SDL * fixed link error and gitignore * fix in working directory initialization (windows side) * Added README_Linux and fixed a few compilation issues in ubuntu * Rename main to main_Windows in Tests * Better default renderering backend selector * Added backlog terminal output on linux * added asserts on all missing vulkan function call results * added portable file dialogs also small tests update and cleanup * Added Editor compile target * linux ci * linux ci * cmake update * cmake update? * cmake * Editor_Windows fix * build test * make * build tools? * update * ubuntu 20.04 * fix? * cmake * build * build? * package linux build * updates, bump version * backslash to forward slash, eof newlines, add portable-file-dialogs license * xcopy needs backslash duh; update readme; * copy fix * updated readme * readme update * updated readme * updated readme * fix incorrect file encoding linux * paint tool fix * linux: add missing shaders * packaging update Co-authored-by: Turánszki János <turanszkij@users.noreply.github.com> Co-authored-by: Turanszki Janos <turanszkij@gmail.com>
45 lines
673 B
C++
45 lines
673 B
C++
#include "wiStartupArguments.h"
|
|
#include "wiHelper.h"
|
|
|
|
#include <vector>
|
|
#include <sstream>
|
|
#include <iterator>
|
|
#include <set>
|
|
|
|
using namespace std;
|
|
|
|
namespace wiStartupArguments
|
|
{
|
|
set<string> params;
|
|
|
|
void Parse(const wchar_t* args)
|
|
{
|
|
wstring from = args;
|
|
string to;
|
|
wiHelper::StringConvert(from, to);
|
|
|
|
istringstream iss(to);
|
|
|
|
params =
|
|
{
|
|
istream_iterator<string>{iss},
|
|
istream_iterator<string>{}
|
|
};
|
|
|
|
}
|
|
|
|
void Parse(int argc, char *argv[])
|
|
{
|
|
for (int i=1; i<argc; i++)
|
|
{
|
|
params.insert(std::string(argv[i]));
|
|
}
|
|
}
|
|
|
|
bool HasArgument(const std::string& value)
|
|
{
|
|
return params.find(value) != params.end();
|
|
}
|
|
|
|
}
|