mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-10 13:29:56 +00:00
Fix for Bug #13425 (Full Screen mode: drawing/erasing of the buttons on the RHS of the screen)
This commit is contained in:
parent
facfa0ba25
commit
8c01f76d71
@ -1318,23 +1318,30 @@ HDC FrameGetDC () {
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
HDC FrameGetVideoDC (LPBYTE *addr, LONG *pitch) {
|
||||
if (fullscreen && g_bAppActive && !painting) {
|
||||
RECT rect = {FSVIEWPORTX,
|
||||
FSVIEWPORTY,
|
||||
FSVIEWPORTX+VIEWPORTCX,
|
||||
FSVIEWPORTY+VIEWPORTCY};
|
||||
DDSURFACEDESC surfacedesc;
|
||||
surfacedesc.dwSize = sizeof(surfacedesc);
|
||||
if (surface->Lock(&rect,&surfacedesc,0,NULL) == DDERR_SURFACELOST) {
|
||||
surface->Restore();
|
||||
surface->Lock(&rect,&surfacedesc,0,NULL);
|
||||
}
|
||||
*addr = (LPBYTE)surfacedesc.lpSurface+(VIEWPORTCY-1)*surfacedesc.lPitch;
|
||||
*pitch = -surfacedesc.lPitch;
|
||||
return (HDC)0;
|
||||
}
|
||||
else return FrameGetDC();
|
||||
HDC FrameGetVideoDC (LPBYTE *addr, LONG *pitch)
|
||||
{
|
||||
if (fullscreen && g_bAppActive && !painting)
|
||||
{
|
||||
RECT rect = { FSVIEWPORTX,
|
||||
FSVIEWPORTY,
|
||||
FSVIEWPORTX+VIEWPORTCX,
|
||||
FSVIEWPORTY+VIEWPORTCY};
|
||||
DDSURFACEDESC surfacedesc;
|
||||
surfacedesc.dwSize = sizeof(surfacedesc);
|
||||
// TC: Use DDLOCK_WAIT - see Bug #13425
|
||||
if (surface->Lock(&rect,&surfacedesc,DDLOCK_WAIT,NULL) == DDERR_SURFACELOST)
|
||||
{
|
||||
surface->Restore();
|
||||
surface->Lock(&rect,&surfacedesc,DDLOCK_WAIT,NULL);
|
||||
}
|
||||
*addr = (LPBYTE)surfacedesc.lpSurface+(VIEWPORTCY-1)*surfacedesc.lPitch;
|
||||
*pitch = -surfacedesc.lPitch;
|
||||
return (HDC)0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FrameGetDC();
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user