1 |
|
/* |
2 |
|
* main_beos.cpp - SIDPlayer BeOS main program |
3 |
|
* |
4 |
< |
* SIDPlayer (C) Copyright 1996-2000 Christian Bauer |
4 |
> |
* SIDPlayer (C) Copyright 1996-2001 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
29 |
|
|
30 |
|
#include "main.h" |
31 |
|
#include "prefs_window.h" |
32 |
+ |
#include "sid.h" |
33 |
|
|
34 |
|
|
35 |
|
// Message codes |
187 |
|
|
188 |
|
void SIDPlayer::ArgvReceived(int32 argc, char **argv) |
189 |
|
{ |
190 |
< |
if (argc >= 2) { |
190 |
> |
if (argc < 2) |
191 |
> |
return; |
192 |
> |
|
193 |
> |
for (int i=1; i<argc; i++) { |
194 |
> |
if (argv[i][0] == '-') |
195 |
> |
continue; |
196 |
|
player.Stop(); |
197 |
< |
LoadPSIDFile(argv[1]); |
197 |
> |
LoadPSIDFile(argv[i]); |
198 |
|
player.Start(); |
199 |
|
player_stopped = false; |
200 |
|
if (main_window) |
298 |
|
void SIDPlayer::ReadyToRun(void) |
299 |
|
{ |
300 |
|
main_window = new MainWindow(); |
301 |
< |
if (psid_loaded) |
301 |
> |
if (IsPSIDLoaded()) |
302 |
|
main_window->PostMessage(MSG_NEW_MODULE); |
303 |
|
} |
304 |
|
|
311 |
|
{ |
312 |
|
BAlert *theAlert = new BAlert("", |
313 |
|
"SIDPlayer\nVersion " VERSION "\n\n" |
314 |
< |
"Copyright " B_UTF8_COPYRIGHT " 1996-2000 Christian Bauer\n" |
314 |
> |
"Copyright " B_UTF8_COPYRIGHT " 1996-2001 Christian Bauer\n" |
315 |
|
"E-mail: Christian.Bauer@uni-mainz.de\n" |
316 |
|
"http://www.uni-mainz.de/~bauec002/\n\n" |
317 |
|
"SIDPlayer comes with ABSOLUTELY NO\n" |
647 |
|
|
648 |
|
int main(int argc, char **argv) |
649 |
|
{ |
650 |
< |
InitAll(); |
650 |
> |
InitAll(argc, argv); |
651 |
|
SIDPlayer *the_app = new SIDPlayer(); |
652 |
|
the_app->Run(); |
653 |
|
delete the_app; |