New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#11861 XBMC loses video settings in windowed mode. Fix. #1246

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@dedeibel
Copy link

dedeibel commented Aug 5, 2012

Hi,

I am trying to fix ticket #11861 since the problem is also a problem for me. This is my first change here, so please help me complying with your rules.

Please have a look at the ticket: http://trac.xbmc.org/ticket/11861

The fix is pretty simple, but there was more than one problem preventing the overscan settings to be restored.

First of all there was the following statement preventing the settings for windowed mode being loaded at all:

@@ -494,9 +496,6 @@ bool CSettings::LoadCalibration(const TiXmlElement* pRoot, const CStdString& str
     // find this resolution in our resolution vector
     for (unsigned int res = 0; res < m_ResInfo.size(); res++)
     {
-      if (res == RES_WINDOW)
-        continue;
-

I don't know exactly where this came from, I kind of lost tracks on a merge back from some linux branch back in SVN, see below.

git log -1 45285e8                           
commit 45285e8a9300cd754a760560640b75b09f98035e
Author: AlTheKiller <AlTheKiller@svn>
Date:   Wed Sep 23 01:49:50 2009 +0000

    step 3/4: Move linuxport to trunk.  How'd I get roped into this?


    git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@23097 568bbfeb-2a22-0410-94d2-cc84cf5bfa90

The second problem was matching the stored resolution nodes to the res info structures. This failed since the RES_WINDOW Structure did not have set the strMode field to "Windowed" at this time.

@@ -494,9 +496,6 @@ bool CSettings::LoadCalibration(const TiXmlElement* pRoot, const CStdString& str
     // find this resolution in our resolution vector
     for (unsigned int res = 0; res < m_ResInfo.size(); res++)
     {
...
       if (m_ResInfo[res].strMode == mode)

I fixed that by setting the strMode for windowed mode early in the constructor.

And finally the overscan settings where reset on every resolution change, including the initial setting. I overcame this by introducing a "reset overscan settings" flag with default to true to the method and additionally resetting the overscan values if the current settings don't make any sense.

Thanks for reading this and I hope this or a similar fix could make it into xbmc. I think some xbmc dev's comments would be helpfull.

regards,

Benjamin Peter

#11861 XBMC loses video settings in windowed mode. Video settings wil…
…l not be loaded correctly and overscan settings are not reset during window initialization.
@FernetMenta

This comment has been minimized.

Copy link
Member

FernetMenta commented Aug 5, 2012

check out #1231
There are (and should) no calibration settings for windowed mode. Your original problem mentioned in the ticket 11861 will be fixed by not grabbing the mouse.

@dedeibel

This comment has been minimized.

Copy link

dedeibel commented Aug 5, 2012

I was afraid you'd say something like this. Until then I have my patch. Thanks anyway.

@dedeibel dedeibel closed this Aug 5, 2012

@FernetMenta

This comment has been minimized.

Copy link
Member

FernetMenta commented Aug 5, 2012

Too bad but until then I got my patch. It seems kind of hard to help in open source, this is not the first time something like this happens to me.

Any help by the community is appreciated. Sorry that your work kind of overlapped with work being in progress (you can't know about). You always have the chance to get feedback on your ideas in the development section of the forum.

In this case I think it is better to fix the original problem instead work around it.

@FernetMenta

This comment has been minimized.

Copy link
Member

FernetMenta commented Aug 5, 2012

BTW: this only my view on this topic. Does not mean that other devs share my view :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment