mirror of
https://github.com/brain-hackers/version-txt-dumper.git
synced 2024-12-22 12:10:12 +09:00
Merge pull request #2 from brain-hackers/fallback
Fallback to NAND3 if no SD card is available
This commit is contained in:
commit
d87c204701
6
main.cpp
6
main.cpp
@ -53,9 +53,13 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow)
|
||||
file = CreateFile(L"\\Storage Card\\version.txt", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (file == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
MessageBox(NULL, L"Failed to create \\Storage Card\\version.txt", L"(X_X) < OMG", MB_ICONWARNING);
|
||||
file = CreateFile(L"\\NAND3\\version.txt", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (file == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
MessageBox(NULL, L"Failed to create \\Storage Card\\version.txt and \\NAND3\\version.txt", L"(X_X) < OMG", MB_ICONWARNING);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!WriteFile(file, buf, fileSize, NULL, NULL))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user