From caa878f5426d5d1dbcbe6c3b78656c3618411e7b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 5 Oct 2013 00:44:41 +0300 Subject: [PATCH] OS X tweaks --- source/core/unix/main.cpp | 20 +++++++++++++++++++- source/fs/dir.cpp | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/source/core/unix/main.cpp b/source/core/unix/main.cpp index 601ddb6..698ec69 100644 --- a/source/core/unix/main.cpp +++ b/source/core/unix/main.cpp @@ -2,5 +2,23 @@ int main(int argc, char **argv) { - return Msp::Application::run(argc, argv); + void *data = 0; + +#ifdef __APPLE__ + /* Applications launched from Finder get a special argument, which would + interfere with GetOpt. Remove it from argv but pass it as data so it can + be used to determine how the application was launhed. */ + int j = 0; + for(int i=0; i