ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SIDPlayer/src/main_beos.cpp
(Generate patch)

Comparing SIDPlayer/src/main_beos.cpp (file contents):
Revision 1.2 by cebix, 2000-10-10T21:57:21Z vs.
Revision 1.6 by cebix, 2003-04-11T20:23:02Z

# Line 1 | Line 1
1   /*
2   *  main_beos.cpp - SIDPlayer BeOS main program
3   *
4 < *  SIDPlayer (C) Copyright 1996-2000 Christian Bauer
4 > *  SIDPlayer (C) Copyright 1996-2003 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
# Line 29 | Line 29
29  
30   #include "main.h"
31   #include "prefs_window.h"
32 + #include "sid.h"
33  
34  
35   // Message codes
# Line 186 | Line 187 | SIDPlayer::~SIDPlayer()
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)
# Line 292 | Line 298 | void SIDPlayer::MessageReceived(BMessage
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  
# Line 305 | Line 311 | void AboutWindow(void)
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-2003 Christian Bauer\n"
315                          "E-mail: Christian.Bauer@uni-mainz.de\n"
316 <                        "http://www.uni-mainz.de/~bauec002/\n\n"
316 >                        "http://www.uni-mainz.de/~bauec002/SPMain.html\n\n"
317                          "SIDPlayer comes with ABSOLUTELY NO\n"
318                          "WARRANTY. This is free software, and\n"
319                          "you are welcome to redistribute it\n"
# Line 636 | Line 642 | void PrevButton::Draw(BRect update)
642  
643  
644   /*
645 + *  Get current value of microsecond timer
646 + */
647 +
648 + uint64 GetTicks_usec(void)
649 + {
650 +        return system_time();
651 + }
652 +
653 +
654 + /*
655 + *  Delay by specified number of microseconds (<1 second)
656 + */
657 +
658 + void Delay_usec(uint32 usec)
659 + {
660 +        snooze(usec);
661 + }
662 +
663 +
664 + /*
665   *  Main program
666   */
667  
668   int main(int argc, char **argv)
669   {
670 <        InitAll();
670 >        InitAll(argc, argv);
671          SIDPlayer *the_app = new SIDPlayer();
672          the_app->Run();
673          delete the_app;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines