--- np2/x11/main.c 2004/06/17 14:36:33 1.18 +++ np2/x11/main.c 2007/01/23 15:48:20 1.27 @@ -10,8 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -138,14 +136,13 @@ main(int argc, char *argv[]) int rv = 1; int ch; int i, drvmax; - BOOL shared_pixmap_flag = FALSE; progname = argv[0]; toolkit_initialize(); toolkit_arginit(&argc, &argv); - while ((ch = getopt_long(argc, argv, "c:C:t:ph", longopts, NULL)) != -1) { + while ((ch = getopt_long(argc, argv, "c:C:t:vh", longopts, NULL)) != -1) { switch (ch) { case 'c': if (stat(optarg, &sb) < 0 || !S_ISREG(sb.st_mode)) { @@ -176,6 +173,10 @@ main(int argc, char *argv[]) milstr_ncpy(fontfilename, optarg, sizeof(fontfilename)); break; + case 'v': + verbose = 1; + break; + case 'h': case '?': default: @@ -252,8 +253,6 @@ main(int argc, char *argv[]) mmxflag += np2oscfg.disablemmx ? MMXFLAG_DISABLE : 0; #endif - use_shared_pixmap = np2oscfg.shared_pixmap && shared_pixmap_flag; - TRACEINIT(); if (fontmng_init() != SUCCESS) @@ -281,7 +280,7 @@ main(int argc, char *argv[]) if (soundmng_initialize() == SUCCESS) { result = soundmng_pcmload(SOUND_PCMSEEK, file_getcd("fddseek.wav")); if (!result) { - result = soundmng_pcmload(SOUND_PCMSEEK, SYSRESPATH "/wav/fddseek.wav"); + result = soundmng_pcmload(SOUND_PCMSEEK, SYSRESPATH "/fddseek.wav"); } if (result) { soundmng_pcmvolume(SOUND_PCMSEEK, np2cfg.MOTORVOL); @@ -289,13 +288,14 @@ main(int argc, char *argv[]) result = soundmng_pcmload(SOUND_PCMSEEK1, file_getcd("fddseek1.wav")); if (!result) { - result = soundmng_pcmload(SOUND_PCMSEEK1, SYSRESPATH "/wav/fddseek1.wav"); + result = soundmng_pcmload(SOUND_PCMSEEK1, SYSRESPATH "/fddseek1.wav"); } if (result) { soundmng_pcmvolume(SOUND_PCMSEEK1, np2cfg.MOTORVOL); } } + joymng_initialize(); mousemng_initialize(); if (np2oscfg.MOUSE_SW) { mouse_running(MOUSE_ON); @@ -305,7 +305,6 @@ main(int argc, char *argv[]) sysmng_initialize(); taskmng_initialize(); - joy_init(); pccore_init(); S98_init(); @@ -326,15 +325,16 @@ main(int argc, char *argv[]) } } +#if !defined(CPUCORE_IA32) if (np2oscfg.resume) { flagload(np2resumeext, "Resume", FALSE); } +#endif sysmng_workclockreset(); drvmax = (argc < 4) ? argc : 4; for (i = 0; i < drvmax; i++) { - milstr_ncpy(diskdrv_fname[i],argv[i],sizeof(diskdrv_fname[0])); - diskdrv_delay[i] = 1; + diskdrv_readyfdd(i, argv[i], 0); } setup_signal(SIGINT, sighandler); @@ -350,13 +350,16 @@ main(int argc, char *argv[]) pccore_cfgupdate(); mouse_running(MOUSE_OFF); + joymng_deinitialize(); S98_trash(); +#if !defined(CPUCORE_IA32) if (np2oscfg.resume) { flagsave(np2resumeext); } else { flagdelete(np2resumeext); } +#endif pccore_term(); debugwin_destroy();