- Cocoa: ability to use drag and drop with custom IWADs

(cherry picked from commit fd5df6e8d1)
This commit is contained in:
alexey.lysiuk 2018-05-09 12:47:11 +03:00 committed by drfrag666
parent 12f1820ea5
commit 91d91ce84f
2 changed files with 14 additions and 2 deletions

View file

@ -375,8 +375,17 @@ extern bool AppActive;
}
}
s_argv.Push("-file");
s_argv.Push([filename UTF8String]);
bool iwad = false;
if (const char* const extPos = strrchr(charFileName, '.'))
{
iwad = 0 == stricmp(extPos, ".iwad")
|| 0 == stricmp(extPos, ".ipk3")
|| 0 == stricmp(extPos, ".ipk7");
}
s_argv.Push(iwad ? "-iwad" : "-file");
s_argv.Push(charFileName);
return TRUE;
}

View file

@ -38,6 +38,9 @@
<string>zip</string>
<string>pk7</string>
<string>7z</string>
<string>iwad</string>
<string>ipk3</string>
<string>ipk7</string>
</array>
</dict>
</array>