Screen corruption when returning to program
BlitzPlus Forums/BlitzPlus Programming/Screen corruption when returning to program
| ||
I currently have Autosuspend on. When I Alt-Tab away from the full screen Blitz program and then switch back to it, the screen is horribly corrupted on my laptop and blank on my desktop machine. Is there something I should be doing to prevent this? |
| ||
Could you try looking for a $2002 event and then redraw your canvases when a $2002 is detected? |
| ||
I tried that, but the result is the same. |
| ||
Are you using the correct flag values when using LoadImage/LoadAnimImage/CreateImage etc? To preserve the images after an ALT-TAB, you need to either use managed mode or reload the images manually. From the documentation: 1 : managed (image is frequently drawn but seldom modified - this is the default) 2 : dynamic (image is frequently drawn and modified) 4 : scratch (image is seldom drawn or modified) Managed images are the default. Dynamic images are the fastest, but can be 'lost' when the display mode changes. This means the contents of the image will be scrambled, and you will need to restore the image content. If you are frequently redrawing the image contents, this isn't really a problem. If not, you should use managed images!I hope this helps. |
| ||
Thanks. I was not using any flags with CreateImage. I assumed that the flag information quoted above, listed only in the LoadImage help, applied to all of the image commands. Managed images are clearly *not* the default when using CreateImage. |
| ||
If that's true then add that to the comments section of CreateImage in the BlitzPlus Manual on this site. |
| ||
I think CreateImage's default flag changed to Dynamic in build 1.38 of Blitz+ (although I might be wrong). I can't check right now because I've been forced to revert to 1.37, due to a bug that was introduced in 1.38. |
| ||
It did, i read that in the updates .txt thing, and i've always used Createimage with an added flag of 1 because of it. |
| ||
here is a bit more on the same topic hope it helps |