From 77d4142d6dfe8b2ec889d77e7ebc7a7170326664 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Thu, 29 Jul 2010 10:20:41 +0000 Subject: [PATCH] [win32csr] - Fix compilation with msvc svn path=/trunk/; revision=48349 --- .../subsystems/win32/csrss/win32csr/coninput.c | 4 +++- .../subsystems/win32/csrss/win32csr/guiconsole.c | 15 +++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/reactos/subsystems/win32/csrss/win32csr/coninput.c b/reactos/subsystems/win32/csrss/win32csr/coninput.c index 83aa6e7c71d..30470c70673 100644 --- a/reactos/subsystems/win32/csrss/win32csr/coninput.c +++ b/reactos/subsystems/win32/csrss/win32csr/coninput.c @@ -179,6 +179,8 @@ static NTSTATUS FASTCALL ConioProcessChar(PCSRSS_CONSOLE Console, PINPUT_RECORD InputEvent) { + ConsoleInput *ConInRec; + /* Check for pause or unpause */ if (InputEvent->EventType == KEY_EVENT && InputEvent->Event.KeyEvent.bKeyDown) { @@ -207,7 +209,7 @@ ConioProcessChar(PCSRSS_CONSOLE Console, } /* add event to the queue */ - ConsoleInput *ConInRec = RtlAllocateHeap(Win32CsrApiHeap, 0, sizeof(ConsoleInput)); + ConInRec = RtlAllocateHeap(Win32CsrApiHeap, 0, sizeof(ConsoleInput)); if (ConInRec == NULL) return STATUS_INSUFFICIENT_RESOURCES; ConInRec->InputEvent = *InputEvent; diff --git a/reactos/subsystems/win32/csrss/win32csr/guiconsole.c b/reactos/subsystems/win32/csrss/win32csr/guiconsole.c index ca7388d6f8d..8742538a1b2 100644 --- a/reactos/subsystems/win32/csrss/win32csr/guiconsole.c +++ b/reactos/subsystems/win32/csrss/win32csr/guiconsole.c @@ -1500,11 +1500,13 @@ GuiConsoleGetMinMaxInfo(HWND hWnd, PMINMAXINFO minMaxInfo) { PCSRSS_CONSOLE Console; PGUI_CONSOLE_DATA GuiData; + DWORD windx, windy; + GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); if((Console == NULL)|| (GuiData == NULL)) return; - DWORD windx = CONGUI_MIN_WIDTH * GuiData->CharWidth + 2 * (GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXEDGE)); - DWORD windy = CONGUI_MIN_HEIGHT * GuiData->CharHeight + 2 * (GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYEDGE)) + GetSystemMetrics(SM_CYCAPTION); + windx = CONGUI_MIN_WIDTH * GuiData->CharWidth + 2 * (GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXEDGE)); + windy = CONGUI_MIN_HEIGHT * GuiData->CharHeight + 2 * (GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYEDGE)) + GetSystemMetrics(SM_CYCAPTION); minMaxInfo->ptMinTrackSize.x = windx; minMaxInfo->ptMinTrackSize.y = windy; @@ -1529,18 +1531,19 @@ GuiConsoleResize(HWND hWnd, WPARAM wParam, LPARAM lParam) if ((GuiData->WindowSizeLock == FALSE) && (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED || wParam == SIZE_MINIMIZED)) { PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer; + DWORD windx, windy, charx, chary; GuiData->WindowSizeLock = TRUE; - DWORD windx = LOWORD(lParam); - DWORD windy = HIWORD(lParam); + windx = LOWORD(lParam); + windy = HIWORD(lParam); // Compensate for existing scroll bars (because lParam values do not accommodate scroll bar) if(Console->Size.X < Buff->MaxX) windy += GetSystemMetrics(SM_CYHSCROLL); // window currently has a horizontal scrollbar if(Console->Size.Y < Buff->MaxY) windx += GetSystemMetrics(SM_CXVSCROLL); // window currently has a vertical scrollbar - DWORD charx = windx / GuiData->CharWidth; - DWORD chary = windy / GuiData->CharHeight; + charx = windx / GuiData->CharWidth; + chary = windy / GuiData->CharHeight; // Character alignment (round size up or down) if((windx % GuiData->CharWidth) >= (GuiData->CharWidth / 2)) ++charx;