mirror of
https://github.com/libretro/gambatte-libretro.git
synced 2025-02-17 07:10:19 +00:00
add support for loading rom from program argument
git-svn-id: https://gambatte.svn.sourceforge.net/svnroot/gambatte@39 9dfb2916-2d38-0410-aef4-c5fe6c9ffc24
This commit is contained in:
parent
20c08907ff
commit
1ca02f5906
@ -41,7 +41,7 @@
|
||||
|
||||
#include "resizesignalingmenubar.h"
|
||||
|
||||
GambatteQt::GambatteQt() : resetVideoBuffer(gambatte) {
|
||||
GambatteQt::GambatteQt(const int argc, const char *const argv[]) : resetVideoBuffer(gambatte) {
|
||||
blitter = NULL;
|
||||
ae = NULL;
|
||||
timerId = 0;
|
||||
@ -118,6 +118,13 @@ GambatteQt::GambatteQt() : resetVideoBuffer(gambatte) {
|
||||
videoSettingsChange();
|
||||
|
||||
setFocus();
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (argv[i][0] != '-') {
|
||||
loadFile(QString(argv[i]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GambatteQt::~GambatteQt() {
|
||||
|
@ -49,7 +49,7 @@ class GambatteQt : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GambatteQt();
|
||||
GambatteQt(int argc, const char *const argv[]);
|
||||
~GambatteQt();
|
||||
|
||||
protected:
|
||||
|
@ -26,7 +26,7 @@ int main(int argc, char *argv[]) {
|
||||
QApplication app(argc, argv);
|
||||
QCoreApplication::setOrganizationName("gambatte");
|
||||
QCoreApplication::setApplicationName("gambatte_qt");
|
||||
GambatteQt * mw = new GambatteQt();
|
||||
GambatteQt * mw = new GambatteQt(argc, argv);
|
||||
mw->show();
|
||||
return app.exec();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user