Subversion Repositories spk

Rev

Rev 105 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 105 Rev 106
Line 20... Line 20...
20
	bool intoArgs = false;
20
	bool intoArgs = false;
21
	bool advanced = false;
21
	bool advanced = false;
22
	for ( int i = 0; i < args->Length; i++ )
22
	for ( int i = 0; i < args->Length; i++ )
23
	{
23
	{
24
		if ( String::Compare(args[i], "--gameargs", false) == 0 )
24
		if ( String::Compare(args[i], "--gameargs", false) == 0 )
25
			intoArgs;
25
			intoArgs = true;
26
		else
26
		else
27
		{
27
		{
-
 
28
			if ( String::Compare(args[i]->Substring(0, 2), "--", false) == 0 ) {
-
 
29
				if ( String::Compare(args[i], "--advanced", false) == 0 )
-
 
30
					advanced = true;
-
 
31
			}
28
			if ( !intoArgs && !gameFile )
32
			else if ( !intoArgs && !gameFile )
29
				gameFile = args[i];
33
				gameFile = args[i];
30
			else if ( !intoArgs && !runFile )
34
			else if ( !intoArgs && !runFile )
31
				runFile = args[i];
35
				runFile = args[i];
32
			else if ( String::Compare(args[i], "--advanced", false) == 0 )
-
 
33
				advanced = true;
-
 
34
			else if ( arguments )
36
			else if ( arguments )
35
				arguments += " " + args[i];
37
				arguments += " " + args[i];
36
			else
38
			else
37
				arguments = args[i];
39
				arguments = args[i];
38
		}
40
		}
39
	}
41
	}
-
 
42
 
40
	if ( args->Length >= 1 )
43
	if ( !gameFile && args->Length >= 1 )
41
		gameFile = args[0];
44
		gameFile = args[0];
42
	if ( args->Length > 1 )
45
	if ( !runFile && args->Length > 1 )
43
		runFile = args[1];
46
		runFile = args[1];
44
	// Create the main window and run it
-
 
45
	if ( args->Length > 2 )
-
 
46
		arguments = args[2];
-
 
47
 
47
 
-
 
48
	// Create the main window and run it
48
	if ( !runFile || !runFile->Length )
49
	if ( !runFile || !runFile->Length )
49
	{
50
	{
50
		RegistryKey ^searchKey = Registry::CurrentUser->OpenSubKey("Software\\Egosoft\\PluginManagerSettings");
51
		RegistryKey ^searchKey = Registry::CurrentUser->OpenSubKey("Software\\Egosoft\\PluginManagerSettings");
51
		if ( searchKey )
52
		if ( searchKey )
52
			runFile = System::Convert::ToString(searchKey->GetValue("Run"));
53
			runFile = System::Convert::ToString(searchKey->GetValue("Run"));