F1 and F10 finally immune to crossfades (Bug #455) - Michael
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2662 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
Changes towards version 0.7:
|
Changes towards version 0.7:
|
||||||
|
- Popup windows for "Really Exit?" and Game Pause are immune to fades
|
||||||
|
and crossfades (Bug #455) - Michael
|
||||||
- No longer depend on SDLK_LAST statically; key input should now be safe
|
- No longer depend on SDLK_LAST statically; key input should now be safe
|
||||||
if compiled with a different version of SDL than the one running the
|
if compiled with a different version of SDL than the one running the
|
||||||
program (Bug #936, possibly also #883) - Michael
|
program (Bug #936, possibly also #883) - Michael
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ DoConfirmExit (void)
|
|||||||
s.origin = r.corner;
|
s.origin = r.corner;
|
||||||
F = CaptureDrawable (LoadDisplayPixmap (&r, (FRAME)0));
|
F = CaptureDrawable (LoadDisplayPixmap (&r, (FRAME)0));
|
||||||
|
|
||||||
|
SetSystemRect (&r);
|
||||||
|
|
||||||
DrawConfirmationWindow (response);
|
DrawConfirmationWindow (response);
|
||||||
|
|
||||||
// Releasing the lock lets the rotate_planet_task
|
// Releasing the lock lets the rotate_planet_task
|
||||||
@@ -159,6 +161,7 @@ DoConfirmExit (void)
|
|||||||
s.frame = F;
|
s.frame = F;
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
DestroyDrawable (ReleaseDrawable (s.frame));
|
DestroyDrawable (ReleaseDrawable (s.frame));
|
||||||
|
ClearSystemRect ();
|
||||||
if (response)
|
if (response)
|
||||||
{
|
{
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
|
|||||||
@@ -275,6 +275,8 @@ extern void FlushColorXForms (void);
|
|||||||
#define GetColorMapAddress GetStringAddress
|
#define GetColorMapAddress GetStringAddress
|
||||||
#define GetColorMapContents GetStringContents
|
#define GetColorMapContents GetStringContents
|
||||||
|
|
||||||
|
void SetSystemRect (PRECT pRect);
|
||||||
|
void ClearSystemRect (void);
|
||||||
|
|
||||||
#endif /* _GFX_PROTOS */
|
#endif /* _GFX_PROTOS */
|
||||||
|
|
||||||
|
|||||||
@@ -214,6 +214,25 @@ TFB_ProcessEvents ()
|
|||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOLEAN system_box_active = 0;
|
||||||
|
static SDL_Rect system_box;
|
||||||
|
|
||||||
|
void
|
||||||
|
SetSystemRect (PRECT r)
|
||||||
|
{
|
||||||
|
system_box_active = TRUE;
|
||||||
|
system_box.x = r->corner.x;
|
||||||
|
system_box.y = r->corner.y;
|
||||||
|
system_box.w = r->extent.width;
|
||||||
|
system_box.h = r->extent.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClearSystemRect (void)
|
||||||
|
{
|
||||||
|
system_box_active = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFB_SwapBuffers (int force_full_redraw)
|
TFB_SwapBuffers (int force_full_redraw)
|
||||||
{
|
{
|
||||||
@@ -259,6 +278,11 @@ TFB_SwapBuffers (int force_full_redraw)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (system_box_active)
|
||||||
|
{
|
||||||
|
graphics_backend->screen (TFB_SCREEN_MAIN, 255, &system_box);
|
||||||
|
}
|
||||||
|
|
||||||
graphics_backend->postprocess ();
|
graphics_backend->postprocess ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ PauseGame (void)
|
|||||||
s.origin = r.corner;
|
s.origin = r.corner;
|
||||||
s.frame = ActivityFrame;
|
s.frame = ActivityFrame;
|
||||||
F = CaptureDrawable (LoadDisplayPixmap (&r, (FRAME)0));
|
F = CaptureDrawable (LoadDisplayPixmap (&r, (FRAME)0));
|
||||||
|
SetSystemRect (&r);
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
|
|
||||||
// Releasing the lock lets the rotate_planet_task
|
// Releasing the lock lets the rotate_planet_task
|
||||||
@@ -201,6 +202,7 @@ PauseGame (void)
|
|||||||
s.frame = F;
|
s.frame = F;
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
DestroyDrawable (ReleaseDrawable (s.frame));
|
DestroyDrawable (ReleaseDrawable (s.frame));
|
||||||
|
ClearSystemRect ();
|
||||||
|
|
||||||
SetContextClipRect (&OldRect);
|
SetContextClipRect (&OldRect);
|
||||||
SetFrameHot (Screen, OldHot);
|
SetFrameHot (Screen, OldHot);
|
||||||
|
|||||||
Reference in New Issue
Block a user