Simpler macOS-specific code in main().

This commit is contained in:
ManoloFLTK 2020-07-25 12:43:31 +02:00
parent bfb3b3abd8
commit e3270a6032

View File

@ -508,16 +508,10 @@ int main(int argc, char **argv) {
// construct app_path for all executable files
#ifdef __APPLE__
{
char *p = strdup(argv[0]);
char *q = strstr(p, "/Contents/MacOS/");
if (q) *q = 0;
fl_filename_absolute(app_path, sizeof(app_path), p);
free(p);
}
#else
fl_filename_absolute(app_path, sizeof(app_path), argv[0]);
#ifdef __APPLE__
char *q = strstr(app_path, "/Contents/MacOS/");
if (q) *q = 0;
#endif
fix_path(app_path);