我正在執行SDL_BlitSurface(s_pScreen, 0, s_pScreen, 0);
以使顯示屏變黑如下。如果src和dest在SDL_BlitSurface中相同,會發生什麼情況?
它的作品,但有時它看起來像崩潰。 我收到錯誤消息 "The exception Privileged Instruction. (0xC0000096) occured in the application at location (0x00700070)"
計劃:
Lock lock(&s_layer_cs);
// clear the back buffer
SDL_FillRect(s_pScreen, NULL, 0);
// Blit each layer to the back buffer
for (int i = 0; i < s_layers; ++i)
{
if (!s_layer_disabled[i])
{
if (0U == IlluminationCmd)
{
//Make the display black
SDL_BlitSurface(s_pScreen, 0, s_pScreen, 0);
}
else
{
SDL_BlitSurface(s_pSurface[i], 0, s_pScreen, 0);
}
}
}
// Flip buffers
SDL_Flip(s_pScreen);
什麼's_pSurface'的聲明? – 2012-02-17 06:54:50