Skip to content

Commit

Permalink
[Android][windowing] Revert 'Initialize m_bWindowCreated' and remove …
Browse files Browse the repository at this point in the history
…dead code

Co-Authored-By: thexai <[email protected]>
  • Loading branch information
joseluismarti and thexai committed Jan 27, 2024
1 parent 41c4a59 commit ac4d013
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions xbmc/windowing/android/WinSystemAndroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,34 +105,19 @@ bool CWinSystemAndroid::DestroyWindowSystem()
}

bool CWinSystemAndroid::CreateNewWindow(const std::string& name,
bool fullScreen,
RESOLUTION_INFO& res)
bool fullScreen,
RESOLUTION_INFO& res)
{
RESOLUTION_INFO current_resolution;
current_resolution.iWidth = current_resolution.iHeight = 0;
RENDER_STEREO_MODE stereo_mode = CServiceBroker::GetWinSystem()->GetGfxContext().GetStereoMode();

m_nWidth = res.iWidth;
m_nHeight = res.iHeight;
m_displayWidth = res.iScreenWidth;
m_nWidth = res.iWidth;
m_nHeight = res.iHeight;
m_displayWidth = res.iScreenWidth;
m_displayHeight = res.iScreenHeight;
m_fRefreshRate = res.fRefreshRate;

if ((m_bWindowCreated && m_android->GetNativeResolution(&current_resolution)) &&
current_resolution.iWidth == res.iWidth && current_resolution.iHeight == res.iHeight &&
current_resolution.iScreenWidth == res.iScreenWidth && current_resolution.iScreenHeight == res.iScreenHeight &&
m_bFullScreen == fullScreen && current_resolution.fRefreshRate == res.fRefreshRate &&
(current_resolution.dwFlags & D3DPRESENTFLAG_MODEMASK) == (res.dwFlags & D3DPRESENTFLAG_MODEMASK) &&
m_stereo_mode == stereo_mode)
{
CLog::Log(LOGDEBUG, "CWinSystemAndroid::CreateNewWindow: No need to create a new window");
return true;
}
m_fRefreshRate = res.fRefreshRate;

m_dispResetTimer->Stop();
m_HdmiModeTriggered = false;

m_stereo_mode = stereo_mode;
m_stereo_mode = CServiceBroker::GetWinSystem()->GetGfxContext().GetStereoMode();
m_bFullScreen = fullScreen;

m_nativeWindow = CXBMCApp::Get().GetNativeWindow(2000);
Expand Down

0 comments on commit ac4d013

Please sign in to comment.