- Fixed: Alt+F4 no longer quit the program.

SVN r1888 (trunk)
This commit is contained in:
Randy Heit 2009-09-30 04:44:14 +00:00
parent 9aab795c18
commit ed8f1ec8db
4 changed files with 14 additions and 6 deletions

View file

@ -1,3 +1,6 @@
September 29, 2009
- Fixed: Alt+F4 no longer quit the program.
September 28, 2009 (Changes by Graf Zahl) September 28, 2009 (Changes by Graf Zahl)
- Added BHS's death special flags submission. - Added BHS's death special flags submission.
- Added Gez's A_Blast submission. - Added Gez's A_Blast submission.

View file

@ -570,7 +570,7 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, i
// Using a translation forces downconversion to the base palette // Using a translation forces downconversion to the base palette
ret = Parts[i].Texture->CopyTrueColorTranslated(bmp, ret = Parts[i].Texture->CopyTrueColorTranslated(bmp,
x+Parts[i].OriginX, y+Parts[i].OriginY, x+Parts[i].OriginX, y+Parts[i].OriginY,
w-Parts[i].OriginX, h-Parts[i].OriginY, Parts[i].Texture->GetWidth(), Parts[i].Texture->GetHeight(),
Parts[i].Rotate, Parts[i].Translation, &info); Parts[i].Rotate, Parts[i].Translation, &info);
} }
else else
@ -601,7 +601,7 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, i
} }
ret = Parts[i].Texture->CopyTrueColorPixels(bmp, ret = Parts[i].Texture->CopyTrueColorPixels(bmp,
x+Parts[i].OriginX, y+Parts[i].OriginY, x+Parts[i].OriginX, y+Parts[i].OriginY,
w-Parts[i].OriginX, h-Parts[i].OriginY, Parts[i].Texture->GetWidth(), Parts[i].Texture->GetHeight(),
Parts[i].Rotate, &info); Parts[i].Rotate, &info);
} }
} }
@ -617,8 +617,7 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, i
Parts[i].Texture->CopyTrueColorPixels(&bmp1, 0, 0); Parts[i].Texture->CopyTrueColorPixels(&bmp1, 0, 0);
bmp->CopyPixelDataRGB( bmp->CopyPixelDataRGB(
x+Parts[i].OriginX, y+Parts[i].OriginY, bmp1.GetPixels(), x+Parts[i].OriginX, y+Parts[i].OriginY, bmp1.GetPixels(),
MIN<int>(w-Parts[i].OriginX, bmp1.GetWidth()), bmp1.GetWidth(), bmp1.GetHeight(),
MIN<int>(h-Parts[i].OriginY, bmp1.GetHeight()),
4, bmp1.GetPitch()*4, Parts[i].Rotate, CF_BGRA, inf); 4, bmp1.GetPitch()*4, Parts[i].Rotate, CF_BGRA, inf);
} }
} }

View file

@ -431,6 +431,11 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
ToggleFullscreen = !ToggleFullscreen; ToggleFullscreen = !ToggleFullscreen;
} }
// Pressing Alt+F4 quits the program.
if (wParam == VK_F4 && !(lParam & 0x40000000))
{
PostQuitMessage(0);
}
break; break;
case WM_SYSCOMMAND: case WM_SYSCOMMAND:

View file

@ -121,7 +121,8 @@ FKeyboard::~FKeyboard()
// //
// FKeyboard :: CheckAndSetKey // FKeyboard :: CheckAndSetKey
// //
// Returns true if the key was already in the desired, false if it wasn't. // Returns true if the key was already in the desired state, false if it
// wasn't.
// //
//========================================================================== //==========================================================================
@ -437,7 +438,7 @@ bool FRawKeyboard::GetDevice()
// Convert scan codes to DirectInput key codes. For the most part, this is // Convert scan codes to DirectInput key codes. For the most part, this is
// straight forward: Scan codes without any prefix are passed unmodified. // straight forward: Scan codes without any prefix are passed unmodified.
// Scan codes with an 0xE0 prefix byte are generally passed by ORing them // Scan codes with an 0xE0 prefix byte are generally passed by ORing them
// with 0x80. And scan codes with an 0xE1 prefix are the annowing Pause key // with 0x80. And scan codes with an 0xE1 prefix are the annoying Pause key
// which will generate another scan code that looks like Num Lock. // which will generate another scan code that looks like Num Lock.
// //
// This is a bit complicated only because the state of PC key codes is a bit // This is a bit complicated only because the state of PC key codes is a bit