void CXBMCApp::SetDisplayModeCallback(CVariant* variant) { int mode = (*variant)["mode"].asInteger(); float rate = (*variant)["rate"].asFloat(); delete variant; CJNIWindow window = getWindow(); if (window) { CJNIWindowManagerLayoutParams params = window.getAttributes(); if (params.getpreferredDisplayModeId() != mode) { if (g_application.GetAppPlayer().IsPlaying()) { dynamic_cast<CWinSystemAndroid*>(CServiceBroker::GetWinSystem())->SetHDMIState(false); m_hdmiReportedState = false; } params.setpreferredDisplayModeId(mode); params.setpreferredRefreshRate(rate); window.setAttributes(params); return; } } m_displayChangeEvent.Set(); }
void CXBMCApp::SetRefreshRateCallback(CVariant* rateVariant) { float rate = rateVariant->asFloat(); delete rateVariant; CJNIWindow window = getWindow(); if (window) { CJNIWindowManagerLayoutParams params = window.getAttributes(); if (fabs(params.getpreferredRefreshRate() - rate) > 0.001) { if (g_application.GetAppPlayer().IsPlaying()) { dynamic_cast<CWinSystemAndroid*>(CServiceBroker::GetWinSystem())->SetHDMIState(false, 1000); m_hdmiReportedState = false; } params.setpreferredRefreshRate(rate); if (params.getpreferredRefreshRate() > 0.0) { window.setAttributes(params); return; } } } m_displayChangeEvent.Set(); }
void CXBMCApp::SetDisplayModeCallback(CVariant* modeVariant) { int mode = modeVariant->asFloat(); delete modeVariant; CJNIWindow window = getWindow(); if (window) { CJNIWindowManagerLayoutParams params = window.getAttributes(); if (params.getpreferredDisplayModeId() != mode) { params.setpreferredDisplayModeId(mode); window.setAttributes(params); } } }
void CXBMCApp::SetRefreshRateCallback(CVariant* rateVariant) { float rate = rateVariant->asFloat(); delete rateVariant; CJNIWindow window = getWindow(); if (window) { CJNIWindowManagerLayoutParams params = window.getAttributes(); if (params.getpreferredRefreshRate() != rate) { params.setpreferredRefreshRate(rate); if (params.getpreferredRefreshRate() > 0.0) window.setAttributes(params); } } }