diff options
author | peak3d <pfau@peak3d.de> | 2019-04-08 09:47:18 +0200 |
---|---|---|
committer | peak3d <pfau@peak3d.de> | 2019-04-08 09:47:18 +0200 |
commit | e724a7b06f88df040904062d47d2fdba5d1766bd (patch) | |
tree | c3c9d85bf66815a63a675a9c19c426cd5e95fc20 | |
parent | 39c78c004b6892f27186dffc322ac753cf6104de (diff) |
[Android] Prevent modeswitch when native_window is invalid
-rw-r--r-- | xbmc/windowing/android/WinSystemAndroid.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xbmc/windowing/android/WinSystemAndroid.cpp b/xbmc/windowing/android/WinSystemAndroid.cpp index df4bf99161..3790d3e0a0 100644 --- a/xbmc/windowing/android/WinSystemAndroid.cpp +++ b/xbmc/windowing/android/WinSystemAndroid.cpp @@ -127,11 +127,21 @@ bool CWinSystemAndroid::CreateNewWindow(const std::string& name, return true; } + if (m_dispResetState != RESET_NOTWAITING) + { + CLog::Log(LOGINFO, "CWinSystemAndroid::CreateNewWindow: cannot create window while resetting"); + return false; + } + m_stereo_mode = stereo_mode; m_bFullScreen = fullScreen; m_nativeWindow = CXBMCApp::GetNativeWindow(2000); - + if (!m_nativeWindow) + { + CLog::Log(LOGERROR, "CWinSystemAndroid::CreateNewWindow: failed"); + return false; + } m_android->SetNativeResolution(res); return true; |