From 5291e3b127b4421e9bcec70ab7e9a8099fbfc304 Mon Sep 17 00:00:00 2001 From: Wanne Date: Tue, 9 Jun 2009 09:31:43 +0000 Subject: [PATCH] - Bugfix: Console now works in VS 2008 (by SpaceViking and The_Bob) - Bugfix: Reset the ALT + \ keys after opening the console in the SGP git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2991 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Console/Console.rc | 5 +++-- Standard Gaming Platform/sgp.cpp | 8 +++++++- ja2_VS2008.vcproj | 4 ++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Console/Console.rc b/Console/Console.rc index 50c3ec3f8..67ea14877 100644 --- a/Console/Console.rc +++ b/Console/Console.rc @@ -1,13 +1,14 @@ //Microsoft Developer Studio generated resource script. // -#include "resource.h" +#include "res\resource.h" #define APSTUDIO_READONLY_SYMBOLS +#define IDC_STATIC 00 ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS diff --git a/Standard Gaming Platform/sgp.cpp b/Standard Gaming Platform/sgp.cpp index 6543b33a6..f09ca3330 100644 --- a/Standard Gaming Platform/sgp.cpp +++ b/Standard Gaming Platform/sgp.cpp @@ -43,7 +43,7 @@ #include "VFS/Location/vfs_slf_library.h" #include "Text.h" -#define USE_CONSOLE 0 +#define USE_CONSOLE 1 #include @@ -54,6 +54,7 @@ #include "Console.h" #include "Lua Interpreter.h" #include "connect.h" +#include "english.h" #ifdef JA2 #include "BuildDefines.h" @@ -527,6 +528,11 @@ INT32 FAR PASCAL WindowProcedure(HWND hWindow, UINT16 Message, WPARAM wParam, LP #endif } } + + // Reset the pressed keys + gfKeyState[ ALT ] = FALSE; + gfKeyState[ CTRL ] = FALSE; + gfKeyState[ 219 ] = FALSE; // "\" } break; diff --git a/ja2_VS2008.vcproj b/ja2_VS2008.vcproj index 26c06790a..e1cd90ae8 100644 --- a/ja2_VS2008.vcproj +++ b/ja2_VS2008.vcproj @@ -531,6 +531,10 @@ + +