1) It does not auto-stretch;
2) The windowed screen flickers (does not do so if auto-stretch is disabled or #PB_Screen_NoSynchronization is set).
Am I right to assume this is a limitation rather than a bug?
Code: Select all
InitEngine3D()
If InitSprite() = 0
MessageRequester("Error", "Can't open screen & sprite environment!", 0)
End
EndIf
If OpenWindow(0, 0, 0, 320, 200, "A screen in a window...", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
CreateStatusBar(0, WindowID(0))
AddStatusBarField(320)
StatusBarText(0, 0, "Automatically zoomed screen area when changing window size...")
If OpenWindowedScreen(WindowID(0), 0, 0, 320, 200, 1, 0, 20) ; we don't need exact screen width/height,
; because it will be automatically stretched...
CreateSprite(0, 50, 50) ; Create an empty sprite, will be whole black
Repeat
; It's very important to process all the events remaining in the queue at each frame
;
Repeat
Event = WaitWindowEvent(10)
If Event = #PB_Event_CloseWindow
End
EndIf
Until Event = 0
FlipBuffers()
ClearScreen(RGB(0, 0, 200)) ; A blue background
DisplaySprite(0, 10, 10) ; Display our black box at the left-top corner
DisplaySprite(0, 260, 10) ; Display our black box at the right-top corner
ForEver
Else
MessageRequester("Error", "Can't open windowed screen!", 0)
EndIf
EndIf

