diff --git a/src/posix/cocoa/i_main.mm b/src/posix/cocoa/i_main.mm
index 0a4d16df99..665f2203a6 100644
--- a/src/posix/cocoa/i_main.mm
+++ b/src/posix/cocoa/i_main.mm
@@ -369,8 +369,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;
}
diff --git a/src/posix/osx/zdoom-info.plist b/src/posix/osx/zdoom-info.plist
index a1510254ce..da2263f05e 100644
--- a/src/posix/osx/zdoom-info.plist
+++ b/src/posix/osx/zdoom-info.plist
@@ -38,6 +38,9 @@
zip
pk7
7z
+ iwad
+ ipk3
+ ipk7