Verfasst: 04.07.2006 08:21
habs mal in 3.94 probiert, da funktioniert alles. der bug tritt nur in 4 auf. (und auch nur im fullscreen, nicht im windowed-screen.)
Das deutsche PureBasic-Forum
https://www.purebasic.fr/german/
Code: Alles auswählen
InitEngine3D()
InitSprite()
OpenWindow(1,100,100,200,100,"WindowedScreen1")
result =OpenWindowedScreen(WindowID(1),0,0,200,100,0,0,0)
Debug result ; <-- dieser ist ok
CloseScreen()
OpenWindow(2,350,100,200,100,"WindowedScreen2")
result = OpenWindowedScreen(WindowID(2),0,0,200,100,0,0,0)
Debug result ; <-- warum zum Geier lässt sich dieser nicht öffnen ?
Repeat
Until WaitWindowEvent(1) = #PB_Event_CloseWindow
End
Code: Alles auswählen
; After a switch with <Alt-Tab> from Fullscreen To
; OS-Desktop, at the Return To Fullscreen you get
; an 'Invalid Memory Access' at FlipBuffers(), If
; you used LoadSprite() Or CreateSprite() with
; #PB_Any, no matter wether you display the Sprite
; or you don't. Without #PB_Any, to say with
; Constants, everthing works fine.
;
; Further, LoadImage() works with #PB_Any as well
; as with Constants.
;
; Also in PB 3.94 there is no such Problem, only in
; PB 4.00, and also only with Fullscreen, not with
; windowed screen.
;
;
; Windows XP - SP 2
; german forum: http://www.purebasic.fr/german/viewtopic.php?t=9043
Global picBG.l
InitSprite()
OpenScreen(1024,768,32,"fllscrn")
file$="data\ding.bmp"
Select 3
Case 1 :picBG=LoadSprite( #PB_Any,file$) ; <-- does not work
Case 2 :picBG=CreateSprite(#PB_Any, 80,50) ; <-- does not work
Case 3 :LoadSprite(0,file$)
Case 4 :CreateSprite(0, 80,50)
Case 5 :picBG=LoadImage( #PB_Any,file$)
Case 6 :LoadImage( 0,file$)
EndSelect
; Procedure drawstuff()
; StartDrawing( ScreenOutput() )
; Circle(200,200,Random(50), $00ff00 )
; StopDrawing()
; DisplaySprite(picBG,100,100)
; EndProcedure
Repeat
If IsScreenActive()
ClearScreen(100<<16)
;drawstuff()
EndIf
FlipBuffers() ; <---------------------- "invalid memory access" in case 1 and 2
Delay(10)
Until 0