[Approved] Fullscreen ClientSize (and black video) on non primary screen (1 Viewer)

jblomb

Retired Team Member
  • Premium Supporter
  • May 17, 2007
    96
    17
    Sundsvall
    Home Country
    Sweden Sweden
    Setting my VGA screen to primary (1024x768) and TV/Mediaportal to secondary (1024x576) I get problems with initial black video and GUI overscan setting doesn't work.

    Looking through the logs i found:

    Code:
    D3D: Starting fullscreen
    D3D: Client size: 1024x603 - Screen: 1024x576

    In fullscreen mode I don't understand why Client size and Screen size ever should differ.
    Just stopping and restarting video writes this in the log instead:

    Code:
    D3D: Client size: 1024x576 - Screen: 1024x576

    It seems like setting the Bounds property is not enough to set the size of the client, so I propose the following addition:

    Code:
    Index: xbmc/d3dapp.cs
    ===================================================================
    --- xbmc/d3dapp.cs	(revision 25291)
    +++ xbmc/d3dapp.cs	(working copy)
    @@ -427,6 +427,7 @@
                 this.Menu = null;
                 Rectangle newBounds = GUIGraphicsContext.currentScreen.Bounds;
                 this.Bounds = newBounds;
    [COLOR="Red"]+            this.ClientSize = GUIGraphicsContext.currentScreen.Bounds.Size;[/COLOR]
                 //GUIGraphicsContext.DX9Device.PresentationParameters.BackBufferWidth=Screen.PrimaryScreen.Bounds.Width;
                 //GUIGraphicsContext.DX9Device.PresentationParameters.BackBufferHeight=Screen.PrimaryScreen.Bounds.Height;
                 Log.Info("D3D: Client size: {0}x{1} - Screen: {2}x{3}",

    It works for me, and I have no problem with initial black video anymore on secondary screen.

    Regards
    /Blomman
     

    Attachments

    • ClientSize.diff
      30.6 KB

    tontsa

    Retired Team Member
  • Premium Supporter
  • April 7, 2007
    108
    17
    Home Country
    Finland Finland
    +1 for this patch from me. Tested with:
    2010-12-14 17:59:21.341299 [Info.][MPMain(1)]: Main: MediaPortal v1.1.6.27032 is starting up on Windows Vista ( Service Pack 2 ) [6.0.6002.131072]
    2010-12-14 17:59:22.120699 [Info.][MPMain(1)]: D3D: Starting fullscreen
    2010-12-14 17:59:22.124699 [Info.][MPMain(1)]: D3D: Client size: 1280x1024 - Screen: 1280x1024
    2010-12-14 17:59:22.129699 [Info.][MPMain(1)]: d3dapp: Graphic adapter 'NVIDIA GeForce GTX 460' is using driver version '8.17.12.5896'

    So it shows right client size for my second monitor.

    Please commit.
     

    Users who are viewing this thread

    Top Bottom