[PB 5.73 LTS] ScreenOutput doesn't work

Post bugreports for the Linux version here
wombats
Enthusiast
Enthusiast
Posts: 663
Joined: Thu Dec 29, 2011 5:03 pm

[PB 5.73 LTS] ScreenOutput doesn't work

Post 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
Last edited by wombats on Wed Dec 09, 2020 9:15 am, edited 2 times in total.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1243
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: ScreenOutput doesn't work

Post 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
Image Image
wombats
Enthusiast
Enthusiast
Posts: 663
Joined: Thu Dec 29, 2011 5:03 pm

Re: ScreenOutput doesn't work

Post 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.
deeproot
Enthusiast
Enthusiast
Posts: 269
Joined: Thu Dec 17, 2009 12:00 pm
Location: Llangadog, Wales, UK
Contact:

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

Post 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.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1243
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: ScreenOutput doesn't work

Post 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.
Image Image
Post Reply