From 209c32aa33b352883b1a5ccc26837bbe2600ff44 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 10 Feb 2008 05:14:28 +0000 Subject: [PATCH] Updated Visual C++ project --- VisualC/SDL/SDL.vcproj | 24 ++- VisualC/tests/checkkeys/checkkeys.dsp | 102 +++++++++++ VisualC/tests/checkkeys/checkkeys.vcproj | 217 +++++++++++++++++++++++ VisualC/tests/tests.sln | 6 + src/video/win32/SDL_win32events.c | 2 +- 5 files changed, 342 insertions(+), 9 deletions(-) create mode 100644 VisualC/tests/checkkeys/checkkeys.dsp create mode 100644 VisualC/tests/checkkeys/checkkeys.vcproj diff --git a/VisualC/SDL/SDL.vcproj b/VisualC/SDL/SDL.vcproj index 8797ec595..2eaf5f9b7 100644 --- a/VisualC/SDL/SDL.vcproj +++ b/VisualC/SDL/SDL.vcproj @@ -416,6 +416,14 @@ RelativePath="..\..\src\video\SDL_blit_A.c" > + + + + @@ -428,6 +436,10 @@ RelativePath="..\..\src\video\SDL_blit_N.c" > + + @@ -512,6 +524,10 @@ RelativePath="..\..\src\SDL_fatal.h" > + + @@ -648,14 +664,6 @@ RelativePath="..\..\src\video\SDL_rect_c.h" > - - - - diff --git a/VisualC/tests/checkkeys/checkkeys.dsp b/VisualC/tests/checkkeys/checkkeys.dsp new file mode 100644 index 000000000..2dd0c86a0 --- /dev/null +++ b/VisualC/tests/checkkeys/checkkeys.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="checkkeys" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=checkkeys - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "checkkeys.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "checkkeys.mak" CFG="checkkeys - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "checkkeys - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "checkkeys - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "checkkeys - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "checkkeys - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "checkkeys - Win32 Release" +# Name "checkkeys - Win32 Debug" +# Begin Source File + +SOURCE=..\..\..\test\checkkeys.c +# End Source File +# Begin Source File + +SOURCE=..\..\Sdl\Debug\SDL.lib +# End Source File +# Begin Source File + +SOURCE=..\..\SDLmain\Debug\SDLmain.lib +# End Source File +# End Target +# End Project diff --git a/VisualC/tests/checkkeys/checkkeys.vcproj b/VisualC/tests/checkkeys/checkkeys.vcproj new file mode 100644 index 000000000..8c4182096 --- /dev/null +++ b/VisualC/tests/checkkeys/checkkeys.vcproj @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VisualC/tests/tests.sln b/VisualC/tests/tests.sln index 16940173c..d953140a2 100644 --- a/VisualC/tests/tests.sln +++ b/VisualC/tests/tests.sln @@ -26,6 +26,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "testfile\testfi EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "testgl2\testgl2.vcproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "checkkeys\checkkeys.vcproj", "{26828762-C95D-4637-9CB1-7F0979523813}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -84,6 +86,10 @@ Global {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/video/win32/SDL_win32events.c b/src/video/win32/SDL_win32events.c index f33fa0f5d..71c81a54c 100644 --- a/src/video/win32/SDL_win32events.c +++ b/src/video/win32/SDL_win32events.c @@ -54,7 +54,7 @@ RemapVKEY(WPARAM wParam, LPARAM lParam) We try to provide USB scancodes, so undo this mapping. */ if (wParam >= 'A' && wParam <= 'Z') { - BYTE scancode = (lParam >> 16) & 0xFF; + BYTE scancode = (BYTE)((lParam >> 16) & 0xFF); int i; if (scancode != alpha_scancodes[wParam - 'A']) {