I'm trying to make a buffer, one that's a few times wider than the LCD. That shouldn't be a problem ... right? Here's how I'm going about it:
The trouble comes when I compile and run the gxb on GeePee32.exe to test it - It dies with an application error. It doesn't seem to crash when I coment out the lines to do with drawing on/blitting with mySurface ... :huh:
Code:
GPDRAWSURFACE mySurface, LCD[2];
GpLcdSurfaceGet(&LCD[0], 0);
GpLcdSurfaceGet(&LCD[1], 1);
GpSurfaceSet(&LCD[0]);
mySurface.buf_w = LCD[0].buf_w * 2;
mySurface.buf_h = LCD[0].buf_h;
/* Scrawl on the surface (black BG with white diagonals) */
GpRectFill(NULL, &mySurface, 0, 0, mySurface.buf_w, mySurface.buf_h, 0x00);
GpLineDraw(&mySurface, 0, 0, mySurface.buf_w, mySurface.buf_h, 0xff);
GpLineDraw(&mySurface, 0, mySurface.buf_h, mySurface.buf_w, 0, 0xff);
/* Blit some of the surface onto the backbuffer */
GpBitBlt(NULL, &LCD[1], 0, 0, LCD[1].buf_w, LCD[1].buf_h, mySurface.ptbuffer, 0, 0, mySurface.buf_w, mySurface.buf_h);
/* Show the back buffer */
GpSurfaceSet(&LCD[1]);
The trouble comes when I compile and run the gxb on GeePee32.exe to test it - It dies with an application error. It doesn't seem to crash when I coment out the lines to do with drawing on/blitting with mySurface ... :huh: