diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 59654d8907..78d78bce5a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +September 29, 2009 +- Fixed: Alt+F4 no longer quit the program. + September 28, 2009 (Changes by Graf Zahl) - Added BHS's death special flags submission. - Added Gez's A_Blast submission. diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index 722d8aad37..f1d9aee838 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -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 ret = Parts[i].Texture->CopyTrueColorTranslated(bmp, 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); } else @@ -601,7 +601,7 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, i } ret = Parts[i].Texture->CopyTrueColorPixels(bmp, 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); } } @@ -617,8 +617,7 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, i Parts[i].Texture->CopyTrueColorPixels(&bmp1, 0, 0); bmp->CopyPixelDataRGB( x+Parts[i].OriginX, y+Parts[i].OriginY, bmp1.GetPixels(), - MIN(w-Parts[i].OriginX, bmp1.GetWidth()), - MIN(h-Parts[i].OriginY, bmp1.GetHeight()), + bmp1.GetWidth(), bmp1.GetHeight(), 4, bmp1.GetPitch()*4, Parts[i].Rotate, CF_BGRA, inf); } } diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index 48aa2b4d89..7ee8f138f8 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -431,6 +431,11 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { ToggleFullscreen = !ToggleFullscreen; } + // Pressing Alt+F4 quits the program. + if (wParam == VK_F4 && !(lParam & 0x40000000)) + { + PostQuitMessage(0); + } break; case WM_SYSCOMMAND: diff --git a/src/win32/i_keyboard.cpp b/src/win32/i_keyboard.cpp index 47419d5414..8e1488fc37 100644 --- a/src/win32/i_keyboard.cpp +++ b/src/win32/i_keyboard.cpp @@ -121,7 +121,8 @@ FKeyboard::~FKeyboard() // // 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 // straight forward: Scan codes without any prefix are passed unmodified. // 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. // // This is a bit complicated only because the state of PC key codes is a bit