executable info, static daylight toggle fix

This commit is contained in:
tmj-fstate
2017-03-21 17:31:50 +01:00
parent 38acc083d1
commit f4a5f60465
7 changed files with 23 additions and 7 deletions

View File

@@ -249,6 +249,12 @@ int main(int argc, char *argv[])
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_GREEN );
}
std::string executable( argv[ 0 ] ); auto const pathend = executable.rfind( '\\' );
Global::ExecutableName =
( pathend != std::string::npos ?
executable.substr( executable.rfind( '\\' ) + 1 ) :
executable );
for (int i = 1; i < argc; ++i)
{
std::string token(argv[i]);