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

This commit is contained in:
alexey.lysiuk 2018-05-09 12:47:11 +03:00
parent 23dcc27542
commit fd5df6e8d1
2 changed files with 14 additions and 2 deletions

View file

@ -369,8 +369,17 @@ extern bool AppActive;
} }
} }
s_argv.Push("-file"); bool iwad = false;
s_argv.Push([filename UTF8String]);
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; return TRUE;
} }

View file

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