Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

Commit

Permalink
launcher: auto find NeptuniaReBirth[123].exe
Browse files Browse the repository at this point in the history
  • Loading branch information
u3shit committed Mar 14, 2016
1 parent 411392a commit 05ba9ca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/programs/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ static int mymain(void)
}
strwcpy(last_slash + 1, L"NeptuniaReBirth3.exe");

for (int i = '3';; --i)
{
last_slash[16] = i;
unsigned attrib = GetFileAttributesW(buf);
if (attrib != INVALID_FILE_ATTRIBUTES &&
!(attrib & FILE_ATTRIBUTE_ENCRYPTED))
break;
if (i == '1')
{
MessageBoxA(NULL, "Couldn't find NeptuniaReBirth[123].exe",
NULL, MB_OK | MB_ICONERROR);
return 2;
}
}

STARTUPINFOW si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
Expand Down

0 comments on commit 05ba9ca

Please sign in to comment.