Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_FullScreen woes
#1
Hey all, 

I'm trying to display full screen, using example #1 from the wiki (code below), but for some reason the full screen doesn't work.

It's been a while since I used _FullScreen, but I don't recall ever having any problems with it. 

The only thing that changed since then is I changed my monitor from an older 4k Polaroid TV (at 1920x1080) to a Vizio TV (at 1360x768).

This is with QB64PE 3.6.0, but I also get the same behavior with QB64 2.0.2. 

Does anyone know why this might be happening? 

Code: (Select All)
'Screen 12
Screen _NewImage(800, 600, 32): _ScreenMove 0, 0
_FullScreen
If _FullScreen = 0 Then _FullScreen _Off 'check that a full screen mode initialized
Line (100, 100)-(500, 400), 13, BF
Sleep
System

Here is what I am seeing most of the time (black with white outline where the program window was before it went fullscreen):

[Image: Full-Screen-woes-1.png]

Here is another test which seems to result in different output every time I run it (but the _FullScreen never works):
Code: (Select All)
' Running in any of the _FullScreen modes doesn't work...?
' Enabling any of the _FullScreen lines causes one of:
' * displays black with white outline of window & nothing inside, and frozen mouse pointer
' * no screen updating, IDE window is displayed with no screen updating
' * immediately reverts to _FullScreen _Off
' which changes depending on whether program is saved, run 1st or 2nd time, etc.

Screen _NewImage(800, 600, 32): _ScreenMove 0, 0

'_FullScreen
'_FullScreen _SquarePixels
'_FullScreen _Stretch

If _FullScreen = 0 Then _FullScreen _Off 'check that a full screen mode initialized

Line (100, 100)-(500, 400), _RGB32(255, 0, 0), BF
Line (30, 20)-(200, 200), _RGB32(0, 255, 0), BF
Line (400, 300)-(550, 450), _RGB32(0, 0, 255), BF
Locate 30, 1: Color _RGB32(255, 255, 255)
Print "Press any key to exit"

Sleep
System

Any help appreciated...
Reply
#2
Code: (Select All)
Screen _NewImage(800, 600, 32)

'_ScreenMove 0, 0 'this or

_FullScreen ' this



Line (100, 100)-(500, 400), _RGB32(255, 0, 0), BF
Line (30, 20)-(200, 200), _RGB32(0, 255, 0), BF
Line (400, 300)-(550, 450), _RGB32(0, 0, 255), BF
Locate 30, 1: Color _RGB32(255, 255, 255)
Print "Press any key to exit"

Sleep
System


No sense in waiting for _MoveScreen if going _FullScreen
b = b + ...
Reply
#3
Some recent changes in QB64-PE v3.5.0 caused a problem with _FullScreen and other commands like _ScreenMove being executed close in time to each-other. There's a bug report here, it's on my list of things to get to. I would try adding a short `_Delay .1` after your `_ScreenMove` and see if that fixes the problem as a temporary fix.

For QB64 v2.0.2, that had other issues (which I fixed in v3.5.0) that could cause _FullScreen like you're using to not work. I don't think I would expect the _same_ behavior though, so that's a bit odd and makes me think maybe something else is going on here...
Reply
#4
(03-23-2023, 04:20 PM)bplus Wrote:
Code: (Select All)
Screen _NewImage(800, 600, 32)
'_ScreenMove 0, 0 'this or
_FullScreen ' this
Line (100, 100)-(500, 400), _RGB32(255, 0, 0), BF
Line (30, 20)-(200, 200), _RGB32(0, 255, 0), BF
Line (400, 300)-(550, 450), _RGB32(0, 0, 255), BF
Locate 30, 1: Color _RGB32(255, 255, 255)
Print "Press any key to exit"
Sleep
System

No sense in waiting for _MoveScreen if going _FullScreen

Thanks for your reply - it's still not working:

[Image: Full-Screen-woes-2.png]

Argh! Thanks anyway!
Reply
#5
As Matt mentioned:

Screen _NewImage(800, 600, 32)
_DELAY 0.2
_FullScreen



Place a small delay in there.  Older versions of QB64PE suffered from a race condition at startup.  That's probably where the issue is arising from.  Wink
Reply
#6
(03-23-2023, 05:46 PM)DSMan195276 Wrote: Some recent changes in QB64-PE v3.5.0 caused a problem with _FullScreen and other commands like _ScreenMove being executed close in time to each-other. There's a bug report here, it's on my list of things to get to. I would try adding a short `_Delay .1` after your `_ScreenMove` and see if that fixes the problem as a temporary fix.

For QB64 v2.0.2, that had other issues (which I fixed in v3.5.0) that could cause _FullScreen like you're using to not work. I don't think I would expect the _same_ behavior though, so that's a bit odd and makes me think maybe something else is going on here...

Thanks for your reply! 
Per bplus's suggestion, I removed the _ScreenMove: 
Code: (Select All)
Screen _NewImage(800, 600, 32)

'_ScreenMove 0, 0 'this or

_FullScreen ' this

Line (100, 100)-(500, 400), _RGB32(255, 0, 0), BF
Line (30, 20)-(200, 200), _RGB32(0, 255, 0), BF
Line (400, 300)-(550, 450), _RGB32(0, 0, 255), BF
Locate 30, 1: Color _RGB32(255, 255, 255)

Print "Press any key to exit"
Sleep
System

and it's still not working. The screen just goes black with a white box (I think it's the outline of the program window before the fullscreen): 

[Image: Full-Screen-woes-2.png]

I tried the exact same code in QB64 v2.0.2, and it also doesn't work, but instead of the black with the white box, all that happens is the screen updating seems to be frozen. The IDE and all the windows on the screen remain the same as the moment you press F5, and you can't see the mouse pointer move. Pressing esc puts you back into the IDE and the mouse and screen updates resume normal behavior.

I tried putting a timer in, but that's not making any difference:

Code: (Select All)
Screen _NewImage(800, 600, 32)
_Delay 3

_FullScreen ' this
_Delay 3

Line (100, 100)-(500, 400), _RGB32(255, 0, 0), BF
Line (30, 20)-(200, 200), _RGB32(0, 255, 0), BF
Line (400, 300)-(550, 450), _RGB32(0, 0, 255), BF
Locate 30, 1: Color _RGB32(255, 255, 255)

Print "Press any key to exit"
Sleep
System

That's all the time I have for now... I appreciate you guys looking into this, and am sorry to be such a pain. 
Have a good one!
Reply




Users browsing this thread: 4 Guest(s)