| 51 | } |
| 52 | |
| 53 | AppImplAndroid::AppImplAndroid( AppAndroid *aApp, const AppAndroid::Settings &settings ) |
| 54 | : mApp( aApp ), mSetupHasBeenCalled( false ), mCanProcessEvents( false ), mActive( false ) //, mFocused( false ) |
| 55 | { |
| 56 | sInstance = this; |
| 57 | |
| 58 | EventManagerAndroid::instance()->setAppImplInst( this ); |
| 59 | mNativeApp = EventManagerAndroid::instance()->getNativeApp(); |
| 60 | |
| 61 | mFrameRate = settings.getFrameRate(); |
| 62 | mFrameRateEnabled = settings.isFrameRateEnabled(); |
| 63 | mQuitOnLastWindowClosed = settings.isQuitOnLastWindowCloseEnabled(); |
| 64 | |
| 65 | cinder::android::app::CinderNativeActivity::setFullScreen( settings.isFullScreen() ); |
| 66 | |
| 67 | auto formats = settings.getWindowFormats(); |
| 68 | if( formats.empty() ) { |
| 69 | formats.push_back( settings.getDefaultWindowFormat() ); |
| 70 | } |
| 71 | |
| 72 | for( auto &format : formats ) { |
| 73 | if( ! format.isTitleSpecified() ) { |
| 74 | format.setTitle( settings.getTitle() ); |
| 75 | } |
| 76 | |
| 77 | createWindow( format ); |
| 78 | } |
| 79 | |
| 80 | // Set the active window |
| 81 | if( ! mWindows.empty() ) { |
| 82 | setWindow( mWindows.back()->getWindow() ); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | AppImplAndroid::~AppImplAndroid() |
| 87 | { |
nothing calls this directly
no test coverage detected