--- SIDPlayer/src/main_beos.cpp 2000/10/10 21:57:21 1.2 +++ SIDPlayer/src/main_beos.cpp 2003/10/21 16:56:19 1.7 @@ -1,7 +1,7 @@ /* * main_beos.cpp - SIDPlayer BeOS main program * - * SIDPlayer (C) Copyright 1996-2000 Christian Bauer + * SIDPlayer (C) Copyright 1996-2003 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ #include "main.h" #include "prefs_window.h" +#include "sid.h" // Message codes @@ -186,9 +187,14 @@ SIDPlayer::~SIDPlayer() void SIDPlayer::ArgvReceived(int32 argc, char **argv) { - if (argc >= 2) { + if (argc < 2) + return; + + for (int i=1; iPostMessage(MSG_NEW_MODULE); } @@ -301,13 +307,13 @@ void SIDPlayer::ReadyToRun(void) * Show About window */ -void AboutWindow(void) +void AboutWindow() { BAlert *theAlert = new BAlert("", "SIDPlayer\nVersion " VERSION "\n\n" - "Copyright " B_UTF8_COPYRIGHT " 1996-2000 Christian Bauer\n" + "Copyright " B_UTF8_COPYRIGHT " 1996-2003 Christian Bauer\n" "E-mail: Christian.Bauer@uni-mainz.de\n" - "http://www.uni-mainz.de/~bauec002/\n\n" + "http://www.uni-mainz.de/~bauec002/SPMain.html\n\n" "SIDPlayer comes with ABSOLUTELY NO\n" "WARRANTY. This is free software, and\n" "you are welcome to redistribute it\n" @@ -636,12 +642,32 @@ void PrevButton::Draw(BRect update) /* + * Get current value of microsecond timer + */ + +uint64 GetTicks_usec() +{ + return system_time(); +} + + +/* + * Delay by specified number of microseconds (<1 second) + */ + +void Delay_usec(uint32 usec) +{ + snooze(usec); +} + + +/* * Main program */ int main(int argc, char **argv) { - InitAll(); + InitAll(argc, argv); SIDPlayer *the_app = new SIDPlayer(); the_app->Run(); delete the_app;