Page 1 of 1

[PB 5.73 LTS] QT - ScreenOutput doesn't work

Posted: Wed Dec 09, 2020 12:05 am
by wombats
Using ScreenOutput results in a white screen, even if you don't draw anything. Tested on Ubuntu 20.04 x64.

Code: Select all

EnableExplicit

Global quit, event

InitSprite()

If OpenWindow(0, 0, 0, 320, 240, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

  If OpenWindowedScreen(WindowID(0), 0, 0, 320, 240)
    
    Repeat
      Repeat
        event = WindowEvent()
        
        Select event
          Case #PB_Event_CloseWindow
            quit = 1
        
        EndSelect
        
      Until event = 0

      ClearScreen(RGB(0, 0, 0))
      
      If StartDrawing(ScreenOutput())
        Box(10, 10, 32, 32, RGB(255, 0, 0))
        StopDrawing()
      EndIf
      
      FlipBuffers()
    
    Until quit

  EndIf
EndIf

Re: ScreenOutput doesn't work

Posted: Wed Dec 09, 2020 2:48 am
by Paul
You don't mention any of your specs but it looks like it's your system.
On Linux Mint 19 compiled with PureBsic 5.73 LTS x64 I see this...
Image

Re: ScreenOutput doesn't work

Posted: Wed Dec 09, 2020 8:35 am
by wombats
I updated my post with my specs. Even so, in your screenshot, the box isn't at the Y coordinate it's supposed to be, unless you modified it.

Re: [PB 5.73 LTS] ScreenOutput doesn't work

Posted: Wed Dec 09, 2020 12:07 pm
by deeproot
On MX Linux 19.3 x64 Xfce the above test code works correctly for gtk2 and gtk3 -

Image

but does not work if using Qt -

Image

On another machine with MX Linux 19.3 KDE Plasma subsystems gtk2 and gtk3 are also good and appear the same as under Xfce, but for Qt the window is all black - no white area and no red box.

Note - MX Linux is closely based on Debian 10.6 stable (Buster). PB 5.73 LTS x64 on both systems.

Re: ScreenOutput doesn't work

Posted: Wed Dec 09, 2020 4:11 pm
by Paul
wombats wrote:I updated my post with my specs. Even so, in your screenshot, the box isn't at the Y coordinate it's supposed to be, unless you modified it.
Sorry, I had "Interface Scaling" set to "Double (HiDPI)" so the display was incorrect.
I set this option back to normal and the display is what it should be. Picture has been updated.