Files

50 lines
1.1 KiB
C++

/*
* Gearboy - Nintendo Game Boy Emulator
* Copyright (C) 2012 Ignacio Sanchez
* 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
* the Free Software Foundation, either version 3 of the License, or
* any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/
*
*/
#include <QApplication>
#include "MainWindow.h"
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
int main(int argc, char *argv[])
{
#ifdef Q_WS_X11
XInitThreads();
#endif
QApplication a(argc, argv);
if (argc > 2)
{
printf("Unexpected number of arguments\n");
a.quit();
return -1;
}
MainWindow w;
w.show();
if (argc == 2)
{
w.InitalGameBoyLoadROM(argv[1]);
}
return a.exec();
}