--- np2/x11/main.c 2003/11/20 14:05:04 1.4 +++ np2/x11/main.c 2003/11/26 14:55:01 1.6 @@ -94,6 +94,7 @@ sighandler(int signo) static struct option longopts[] = { { "config", required_argument, 0, 'c' }, { "timidity-config", required_argument, 0, 'C' }, + { "no-shared-pixmap", no_argument, 0, 'p' }, { "help", no_argument, 0, 'h' }, { 0, 0, 0, 0 }, }; @@ -120,13 +121,14 @@ main(int argc, char *argv[]) int rv = 1; int ch; int i, drvmax; + BOOL shared_pixmap_flag = TRUE; progname = argv[0]; toolkit_initialize(); toolkit_arginit(&argc, &argv); - while ((ch = getopt_long(argc, argv, "c:C:h", longopts, NULL)) != -1) { + while ((ch = getopt_long(argc, argv, "c:C:nh", longopts, NULL)) != -1) { switch (ch) { case 'c': if (stat(optarg, &sb) < 0 || !S_ISREG(sb.st_mode)) { @@ -149,6 +151,10 @@ main(int argc, char *argv[]) sizeof(timidity_cfgfile_path)); break; + case 'p': + shared_pixmap_flag = FALSE; + break; + case 'h': case '?': default: @@ -224,6 +230,8 @@ main(int argc, char *argv[]) mmxflag += np2oscfg.disablemmx ? MMXFLAG_DISABLE : 0; #endif + use_shared_pixmap = np2oscfg.shared_pixmap && shared_pixmap_flag; + TRACEINIT(); keystat_reset(); @@ -250,7 +258,7 @@ main(int argc, char *argv[]) result = soundmng_pcmload(SOUND_PCMSEEK1, file_getcd("fddseek1.wav")); if (!result) { - soundmng_pcmload(SOUND_PCMSEEK1, SYSRESPATH "/wav/fddseek1.wav"); + result = soundmng_pcmload(SOUND_PCMSEEK1, SYSRESPATH "/wav/fddseek1.wav"); } if (result) { soundmng_pcmvolume(SOUND_PCMSEEK1, np2cfg.MOTORVOL); @@ -331,5 +339,7 @@ resource_cleanup: TRACETERM(); dosio_term(); + toolkit_terminate(); + return rv; }