Sheepshaver: misc, runtime fixes on OSX hosts

This commit is contained in:
David Ludwig 2017-08-25 17:19:36 -04:00
parent e55df3de96
commit eb36b34106
2 changed files with 20 additions and 11 deletions

View File

@ -1555,6 +1555,8 @@ void VideoVBL(void)
if (toggle_fullscreen)
do_toggle_fullscreen();
present_sdl_video();
// Temporarily give up frame buffer lock (this is the point where
// we are suspended when the user presses Ctrl-Tab)

View File

@ -729,7 +729,25 @@ int main(int argc, char **argv)
#endif
// Parse command line arguments
#if defined(__APPLE__) && defined(__MACH__)
// Mac OS X likes to pass in various options of its own, when launching an app.
// Attempt to ignore these.
for (int i=1; i<argc; i++) {
const char * mac_psn_prefix = "-psn_";
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) {
argv[i] = NULL;
} else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) {
argv[i] = NULL;
}
}
#endif
for (int i=1; i<argc; i++) {
if (argv[i] == NULL) {
continue;
}
if (strcmp(argv[i], "--help") == 0) {
usage(argv[0]);
#ifndef USE_SDL_VIDEO
@ -754,17 +772,6 @@ int main(int argc, char **argv)
}
break;
}
#if defined(__APPLE__) && defined(__MACH__)
// Mac OS X likes to pass in various options of its own, when launching an app.
// Attempt to ignore these.
const char * mac_psn_prefix = "-psn_";
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) {
argv[i] = NULL;
} else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) {
argv[i] = NULL;
}
#endif
}
// Remove processed arguments