00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "gameloop.h"
00021
00022 #include <gluon/input/inputmanager.h>
00023
00024 #include <QtCore/QDebug>
00025 #include <QtCore/QObject>
00026 #include <QtCore/QPointer>
00027 #include <QtGui/QApplication>
00028
00029 using namespace GluonInput;
00030
00031 int main( int argc, char* argv[] )
00032 {
00033 QApplication app( argc, argv );
00034
00035 if( InputManager::instance()->inputList().count() > 0 )
00036 {
00037 qDebug() << "creating generic test game loop";
00038 QList<InputDevice*> inputList = InputManager::instance()->inputList();
00039 foreach( InputDevice * input, inputList )
00040 input->setEnabled( true );
00041 GameLoop* gameLoop = new GameLoop( inputList );
00042 gameLoop->run();
00043 }
00044
00045 qDebug() << "starting generic game event loop";
00046 app.exec();
00047 }