Commit 473dc5b1 authored by mercury233's avatar mercury233

update exit on return

parent 6063e83d
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
int enable_log = 0; int enable_log = 0;
bool exit_on_return = false; bool exit_on_return = false;
bool keep_on_return = false;
bool open_file = false; bool open_file = false;
wchar_t open_file_name[256] = L""; wchar_t open_file_name[256] = L"";
...@@ -85,11 +86,16 @@ int main(int argc, char* argv[]) { ...@@ -85,11 +86,16 @@ int main(int argc, char* argv[]) {
continue; continue;
} else if(!strcmp(argv[i], "-x")) { // eXit on return } else if(!strcmp(argv[i], "-x")) { // eXit on return
exit_on_return = true; exit_on_return = true;
} else if(!strcmp(argv[i], "-k")) { // Keep on return
exit_on_return = false;
keep_on_return = true;
} else if(!strcmp(argv[i], "-j")) { // Join host } else if(!strcmp(argv[i], "-j")) { // Join host
exit_on_return = !keep_on_return;
ClickButton(ygo::mainGame->btnLanMode); ClickButton(ygo::mainGame->btnLanMode);
ClickButton(ygo::mainGame->btnJoinHost); ClickButton(ygo::mainGame->btnJoinHost);
break; break;
} else if(!strcmp(argv[i], "-d")) { // Deck } else if(!strcmp(argv[i], "-d")) { // Deck
exit_on_return = !keep_on_return;
if(i < argc) { if(i < argc) {
open_file = true; open_file = true;
GetParameterW(open_file_name, &argv[i + 1][0]); GetParameterW(open_file_name, &argv[i + 1][0]);
...@@ -97,6 +103,7 @@ int main(int argc, char* argv[]) { ...@@ -97,6 +103,7 @@ int main(int argc, char* argv[]) {
ClickButton(ygo::mainGame->btnDeckEdit); ClickButton(ygo::mainGame->btnDeckEdit);
break; break;
} else if(!strcmp(argv[i], "-r")) { // Replay } else if(!strcmp(argv[i], "-r")) { // Replay
exit_on_return = !keep_on_return;
if(i < argc) { if(i < argc) {
open_file = true; open_file = true;
GetParameterW(open_file_name, &argv[i + 1][0]); GetParameterW(open_file_name, &argv[i + 1][0]);
...@@ -106,6 +113,7 @@ int main(int argc, char* argv[]) { ...@@ -106,6 +113,7 @@ int main(int argc, char* argv[]) {
ClickButton(ygo::mainGame->btnLoadReplay); ClickButton(ygo::mainGame->btnLoadReplay);
break; break;
} else if(!strcmp(argv[i], "-s")) { // Single } else if(!strcmp(argv[i], "-s")) { // Single
exit_on_return = !keep_on_return;
if(i < argc) { if(i < argc) {
open_file = true; open_file = true;
GetParameterW(open_file_name, &argv[i + 1][0]); GetParameterW(open_file_name, &argv[i + 1][0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment