Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
2368a330
Commit
2368a330
authored
Mar 01, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for Windows cursors
parent
4b86de31
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
772 additions
and
8 deletions
+772
-8
SDL_VS2008.sln
VisualC/SDL_VS2008.sln
+13
-0
SDL_VS2010.sln
VisualC/SDL_VS2010.sln
+11
-2
testcursor_VS2005.vcproj
VisualC/tests/testcursor/testcursor_VS2005.vcproj
+239
-0
testcursor_VS2008.vcproj
VisualC/tests/testcursor/testcursor_VS2008.vcproj
+217
-0
testcursor_VS2010.vcxproj
VisualC/tests/testcursor/testcursor_VS2010.vcxproj
+157
-0
SDL_windowsevents.c
src/video/windows/SDL_windowsevents.c
+1
-6
SDL_windowsmouse.c
src/video/windows/SDL_windowsmouse.c
+132
-0
SDL_windowsmouse.h
src/video/windows/SDL_windowsmouse.h
+2
-0
No files found.
VisualC/SDL_VS2008.sln
100644 → 100755
View file @
2368a330
...
...
@@ -144,6 +144,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testato
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testcursor", "tests\testcursor\testcursor_VS2008.vcproj", "{39B2FE52-578B-4C92-944E-50F50C581683}"
ProjectSection(ProjectDependencies) = postProject
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
...
...
@@ -306,6 +312,12 @@ Global
{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|Win32.ActiveCfg = Release|Win32
{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|Win32.Build.0 = Release|Win32
{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|x64.ActiveCfg = Release|Win32
{39B2FE52-578B-4C92-944E-50F50C581683}.Debug|Win32.ActiveCfg = Debug|Win32
{39B2FE52-578B-4C92-944E-50F50C581683}.Debug|Win32.Build.0 = Debug|Win32
{39B2FE52-578B-4C92-944E-50F50C581683}.Debug|x64.ActiveCfg = Debug|Win32
{39B2FE52-578B-4C92-944E-50F50C581683}.Release|Win32.ActiveCfg = Release|Win32
{39B2FE52-578B-4C92-944E-50F50C581683}.Release|Win32.Build.0 = Release|Win32
{39B2FE52-578B-4C92-944E-50F50C581683}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
@@ -334,5 +346,6 @@ Global
{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
{66B32F7E-5716-48D0-B5B9-D832FD052DD5} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
{39B2FE52-578B-4C92-944E-50F50C581683} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
EndGlobalSection
EndGlobal
VisualC/SDL_VS2010.sln
View file @
2368a330
...
...
@@ -133,6 +133,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpowe
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testcursor", "tests\testcursor\testcursor_VS2010.vcxproj", "{20839E82-6F23-429D-91D7-8A2601BC7EA8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
...
...
@@ -151,8 +153,8 @@ Global
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|
x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|
x64
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|
Win32
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|
Win32
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64
...
...
@@ -282,6 +284,12 @@ Global
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32
{20839E82-6F23-429D-91D7-8A2601BC7EA8}.Debug|Win32.ActiveCfg = Debug|Win32
{20839E82-6F23-429D-91D7-8A2601BC7EA8}.Debug|Win32.Build.0 = Debug|Win32
{20839E82-6F23-429D-91D7-8A2601BC7EA8}.Debug|x64.ActiveCfg = Debug|Win32
{20839E82-6F23-429D-91D7-8A2601BC7EA8}.Release|Win32.ActiveCfg = Release|Win32
{20839E82-6F23-429D-91D7-8A2601BC7EA8}.Release|Win32.Build.0 = Release|Win32
{20839E82-6F23-429D-91D7-8A2601BC7EA8}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
@@ -308,5 +316,6 @@ Global
{EDEA9D00-AF64-45DE-8F60-5957048F2F0F} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
{20839E82-6F23-429D-91D7-8A2601BC7EA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
EndGlobalSection
EndGlobal
VisualC/tests/testcursor/testcursor_VS2005.vcproj
0 → 100755
View file @
2368a330
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"8.00"
Name=
"testcursor"
ProjectGUID=
"{26932B24-EFC6-4E3A-B277-ED653DA37968}"
>
<Platforms>
<Platform
Name=
"Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name=
"Debug|Win32"
OutputDirectory=
".\Debug"
IntermediateDirectory=
".\Debug"
ConfigurationType=
"1"
InheritedPropertySheets=
"$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC=
"0"
ATLMinimizesCRunTimeLibraryUsage=
"false"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
PreprocessorDefinitions=
"_DEBUG"
MkTypLibCompatible=
"true"
SuppressStartupBanner=
"true"
TargetEnvironment=
"1"
TypeLibraryName=
".\Debug/testcursor.tlb"
HeaderFileName=
""
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
"..\..\..\include"
PreprocessorDefinitions=
"WIN32;_DEBUG;_WINDOWS"
MinimalRebuild=
"true"
RuntimeLibrary=
"2"
PrecompiledHeaderFile=
".\Debug/testcursor.pch"
AssemblerListingLocation=
".\Debug/"
ObjectFile=
".\Debug/"
ProgramDataBaseFileName=
".\Debug/"
WarningLevel=
"3"
SuppressStartupBanner=
"true"
DebugInformationFormat=
"4"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
PreprocessorDefinitions=
"_DEBUG"
Culture=
"1033"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
OutputFile=
".\Debug/testcursor.exe"
LinkIncremental=
"2"
SuppressStartupBanner=
"true"
GenerateDebugInformation=
"true"
ProgramDatabaseFile=
".\Debug/testcursor.pdb"
SubSystem=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
SuppressStartupBanner=
"true"
OutputFile=
".\Debug/testcursor.bsc"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release|Win32"
OutputDirectory=
".\Release"
IntermediateDirectory=
".\Release"
ConfigurationType=
"1"
InheritedPropertySheets=
"$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC=
"0"
ATLMinimizesCRunTimeLibraryUsage=
"false"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
PreprocessorDefinitions=
"NDEBUG"
MkTypLibCompatible=
"true"
SuppressStartupBanner=
"true"
TargetEnvironment=
"1"
TypeLibraryName=
".\Release/testcursor.tlb"
HeaderFileName=
""
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"2"
InlineFunctionExpansion=
"1"
AdditionalIncludeDirectories=
"..\..\..\include"
PreprocessorDefinitions=
"WIN32;NDEBUG;_WINDOWS"
StringPooling=
"true"
RuntimeLibrary=
"2"
EnableFunctionLevelLinking=
"true"
PrecompiledHeaderFile=
".\Release/testcursor.pch"
AssemblerListingLocation=
".\Release/"
ObjectFile=
".\Release/"
ProgramDataBaseFileName=
".\Release/"
WarningLevel=
"3"
SuppressStartupBanner=
"true"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
PreprocessorDefinitions=
"NDEBUG"
Culture=
"1033"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
OutputFile=
".\Release/testcursor.exe"
LinkIncremental=
"1"
SuppressStartupBanner=
"true"
ProgramDatabaseFile=
".\Release/testcursor.pdb"
SubSystem=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
SuppressStartupBanner=
"true"
OutputFile=
".\Release/testcursor.bsc"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=
"..\..\Sdl\Debug\SDL.lib"
>
</File>
<File
RelativePath=
"..\..\SDLmain\Debug\SDLmain.lib"
>
</File>
<File
RelativePath=
"..\..\..\Test\testcursor.c"
>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""
PreprocessorDefinitions=
""
/>
</FileConfiguration>
<FileConfiguration
Name=
"Release|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""
PreprocessorDefinitions=
""
/>
</FileConfiguration>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
VisualC/tests/testcursor/testcursor_VS2008.vcproj
0 → 100755
View file @
2368a330
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"9.00"
Name=
"testcursor"
ProjectGUID=
"{39B2FE52-578B-4C92-944E-50F50C581683}"
RootNamespace=
"testcursor"
TargetFrameworkVersion=
"131072"
>
<Platforms>
<Platform
Name=
"Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name=
"Debug|Win32"
OutputDirectory=
".\Debug"
IntermediateDirectory=
".\Debug"
ConfigurationType=
"1"
InheritedPropertySheets=
"$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC=
"0"
ATLMinimizesCRunTimeLibraryUsage=
"false"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
PreprocessorDefinitions=
"_DEBUG"
MkTypLibCompatible=
"true"
SuppressStartupBanner=
"true"
TargetEnvironment=
"1"
TypeLibraryName=
".\Debug/testcursor.tlb"
HeaderFileName=
""
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
"..\..\..\include"
PreprocessorDefinitions=
"WIN32;_DEBUG;_WINDOWS"
MinimalRebuild=
"true"
RuntimeLibrary=
"3"
PrecompiledHeaderFile=
".\Debug/testcursor.pch"
AssemblerListingLocation=
".\Debug/"
ObjectFile=
".\Debug/"
ProgramDataBaseFileName=
".\Debug/"
WarningLevel=
"3"
SuppressStartupBanner=
"true"
DebugInformationFormat=
"4"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
PreprocessorDefinitions=
"_DEBUG"
Culture=
"1033"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
OutputFile=
".\Debug/testcursor.exe"
LinkIncremental=
"2"
SuppressStartupBanner=
"true"
GenerateDebugInformation=
"true"
ProgramDatabaseFile=
".\Debug/testcursor.pdb"
SubSystem=
"2"
RandomizedBaseAddress=
"1"
DataExecutionPrevention=
"0"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
SuppressStartupBanner=
"true"
OutputFile=
".\Debug/testcursor.bsc"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
Description=
"Copy SDL"
CommandLine=
"copy $(SolutionDir)\SDL\$(ConfigurationName)\SDL.dll $(TargetDir)\SDL.dll"
/>
</Configuration>
<Configuration
Name=
"Release|Win32"
OutputDirectory=
".\Release"
IntermediateDirectory=
".\Release"
ConfigurationType=
"1"
InheritedPropertySheets=
"$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC=
"0"
ATLMinimizesCRunTimeLibraryUsage=
"false"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
PreprocessorDefinitions=
"NDEBUG"
MkTypLibCompatible=
"true"
SuppressStartupBanner=
"true"
TargetEnvironment=
"1"
TypeLibraryName=
".\Release/testcursor.tlb"
HeaderFileName=
""
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"2"
InlineFunctionExpansion=
"1"
AdditionalIncludeDirectories=
"..\..\..\include"
PreprocessorDefinitions=
"WIN32;NDEBUG;_WINDOWS"
StringPooling=
"true"
RuntimeLibrary=
"2"
EnableFunctionLevelLinking=
"true"
PrecompiledHeaderFile=
".\Release/testcursor.pch"
AssemblerListingLocation=
".\Release/"
ObjectFile=
".\Release/"
ProgramDataBaseFileName=
".\Release/"
WarningLevel=
"3"
SuppressStartupBanner=
"true"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
PreprocessorDefinitions=
"NDEBUG"
Culture=
"1033"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
OutputFile=
".\Release/testcursor.exe"
LinkIncremental=
"1"
SuppressStartupBanner=
"true"
ProgramDatabaseFile=
".\Release/testcursor.pdb"
SubSystem=
"2"
RandomizedBaseAddress=
"1"
DataExecutionPrevention=
"0"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
SuppressStartupBanner=
"true"
OutputFile=
".\Release/testcursor.bsc"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
Description=
"Copy SDL"
CommandLine=
"copy $(SolutionDir)\SDL\$(ConfigurationName)\SDL.dll $(TargetDir)\SDL.dll"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=
"..\..\..\Test\testcursor.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
VisualC/tests/testcursor/testcursor_VS2010.vcxproj
0 → 100755
View file @
2368a330
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup
Label=
"ProjectConfigurations"
>
<ProjectConfiguration
Include=
"Debug|Win32"
>
<Configuration>
Debug
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|Win32"
>
<Configuration>
Release
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<ProjectName>
testcursor
</ProjectName>
<RootNamespace>
testcursor
</RootNamespace>
<ProjectGuid>
{20839E82-6F23-429D-91D7-8A2601BC7EA8}
</ProjectGuid>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.Default.props"
/>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseOfMfc>
false
</UseOfMfc>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseOfMfc>
false
</UseOfMfc>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props"
/>
</ImportGroup>
<PropertyGroup
Label=
"UserMacros"
/>
<PropertyGroup>
<_ProjectFileVersion>
10.0.30319.1
</_ProjectFileVersion>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
.\Debug\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
.\Debug\
</IntDir>
<LinkIncremental
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</LinkIncremental>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
.\Release\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
.\Release\
</IntDir>
<LinkIncremental
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
false
</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<Midl>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MkTypLibCompatible>
true
</MkTypLibCompatible>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
<TargetEnvironment>
Win32
</TargetEnvironment>
<TypeLibraryName>
.\Debug/testcursor.tlb
</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
..\..\..\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MinimalRebuild>
true
</MinimalRebuild>
<RuntimeLibrary>
MultiThreadedDebugDLL
</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
.\Debug/testcursor.pch
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>
.\Debug/
</AssemblerListingLocation>
<ObjectFileName>
.\Debug/
</ObjectFileName>
<ProgramDataBaseFileName>
.\Debug/
</ProgramDataBaseFileName>
<WarningLevel>
Level3
</WarningLevel>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
<DebugInformationFormat>
EditAndContinue
</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
_DEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<Culture>
0x0409
</Culture>
</ResourceCompile>
<Link>
<OutputFile>
.\Debug/testcursor.exe
</OutputFile>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<ProgramDatabaseFile>
.\Debug/testcursor.pdb
</ProgramDatabaseFile>
<SubSystem>
Windows
</SubSystem>
<TargetMachine>
MachineX86
</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
<OutputFile>
.\Debug/testcursor.bsc
</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>
copy $(SolutionDir)\SDL\$(ConfigurationName)\SDL.dll $(TargetDir)\SDL.dll
</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>
Copy SDL
</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<Midl>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MkTypLibCompatible>
true
</MkTypLibCompatible>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
<TargetEnvironment>
Win32
</TargetEnvironment>
<TypeLibraryName>
.\Release/testcursor.tlb
</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>
MaxSpeed
</Optimization>
<InlineFunctionExpansion>
OnlyExplicitInline
</InlineFunctionExpansion>
<AdditionalIncludeDirectories>
..\..\..\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<StringPooling>
true
</StringPooling>
<RuntimeLibrary>
MultiThreadedDLL
</RuntimeLibrary>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>
.\Release/testcursor.pch
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>
.\Release/
</AssemblerListingLocation>
<ObjectFileName>
.\Release/
</ObjectFileName>
<ProgramDataBaseFileName>
.\Release/
</ProgramDataBaseFileName>
<WarningLevel>
Level3
</WarningLevel>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>
NDEBUG;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<Culture>
0x0409
</Culture>
</ResourceCompile>
<Link>
<OutputFile>
.\Release/testcursor.exe
</OutputFile>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
<ProgramDatabaseFile>
.\Release/testcursor.pdb
</ProgramDatabaseFile>
<SubSystem>
Windows
</SubSystem>
<TargetMachine>
MachineX86
</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>
true
</SuppressStartupBanner>
<OutputFile>
.\Release/testcursor.bsc
</OutputFile>
</Bscmake>
<PostBuildEvent>
<Command>
copy $(SolutionDir)\SDL\$(ConfigurationName)\SDL.dll $(TargetDir)\SDL.dll
</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>
Copy SDL
</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Library
Include=
"..\..\Sdl\Debug\SDL.lib"
/>
<Library
Include=
"..\..\SDLmain\Debug\SDLmain.lib"
/>
</ItemGroup>
<ItemGroup>
<ClCompile
Include=
"..\..\..\Test\testcursor.c"
>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
\ No newline at end of file
src/video/windows/SDL_windowsevents.c
View file @
2368a330
...
...
@@ -490,12 +490,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
hittest
=
LOWORD
(
lParam
);
if
(
hittest
==
HTCLIENT
)
{
/* FIXME: Implement the cursor API */
static
HCURSOR
cursor
;
if
(
!
cursor
)
{
cursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
}
SetCursor
(
cursor
);
SetCursor
(
SDL_cursor
);
returnCode
=
TRUE
;
}
}
...
...
src/video/windows/SDL_windowsmouse.c
View file @
2368a330
...
...
@@ -24,9 +24,141 @@
#include "SDL_windowsvideo.h"
#include "../../events/SDL_mouse_c.h"
HCURSOR
SDL_cursor
=
NULL
;
static
SDL_Cursor
*
WIN_CreateDefaultCursor
()
{
SDL_Cursor
*
cursor
;
cursor
=
SDL_calloc
(
1
,
sizeof
(
*
cursor
));
if
(
cursor
)
{
cursor
->
driverdata
=
LoadCursor
(
NULL
,
IDC_ARROW
);
}
else
{
SDL_OutOfMemory
();
}
return
cursor
;
}
static
SDL_Cursor
*
WIN_CreateCursor
(
SDL_Surface
*
surface
,
int
hot_x
,
int
hot_y
)
{
SDL_Cursor
*
cursor
;
SDL_Surface
*
cvt
;
HICON
hicon
;
HDC
hdc
;
BITMAPV4HEADER
bmh
;
LPVOID
pixels
;
ICONINFO
ii
;
SDL_zero
(
bmh
);
bmh
.
bV4Size
=
sizeof
(
bmh
);
bmh
.
bV4Width
=
surface
->
w
;
bmh
.
bV4Height
=
-
surface
->
h
;
/* Invert the image */
bmh
.
bV4Planes
=
1
;
bmh
.
bV4BitCount
=
32
;
bmh
.
bV4V4Compression
=
BI_BITFIELDS
;
bmh
.
bV4AlphaMask
=
0xFF000000
;
bmh
.
bV4RedMask
=
0x00FF0000
;
bmh
.
bV4GreenMask
=
0x0000FF00
;
bmh
.
bV4BlueMask
=
0x000000FF
;
hdc
=
GetDC
(
NULL
);
SDL_zero
(
ii
);
ii
.
fIcon
=
FALSE
;
ii
.
xHotspot
=
(
DWORD
)
hot_x
;
ii
.
yHotspot
=
(
DWORD
)
hot_y
;
ii
.
hbmColor
=
CreateDIBSection
(
hdc
,
(
BITMAPINFO
*
)
&
bmh
,
DIB_RGB_COLORS
,
&
pixels
,
NULL
,
0
);
ii
.
hbmMask
=
CreateBitmap
(
surface
->
w
,
surface
->
h
,
1
,
1
,
NULL
);
ReleaseDC
(
NULL
,
hdc
);
cvt
=
SDL_ConvertSurfaceFormat
(
surface
,
SDL_PIXELFORMAT_ARGB8888
,
0
);
if
(
!
cvt
)
{
return
NULL
;
}
SDL_memcpy
(
pixels
,
cvt
->
pixels
,
cvt
->
h
*
cvt
->
pitch
);
SDL_FreeSurface
(
cvt
);
hicon
=
CreateIconIndirect
(
&
ii
);
DeleteObject
(
ii
.
hbmColor
);
DeleteObject
(
ii
.
hbmMask
);
if
(
!
hicon
)
{
WIN_SetError
(
"CreateIconIndirect()"
);
return
NULL
;
}
cursor
=
SDL_calloc
(
1
,
sizeof
(
*
cursor
));
if
(
cursor
)
{
cursor
->
driverdata
=
hicon
;
}
else
{
DestroyIcon
(
hicon
);
SDL_OutOfMemory
();
}
return
cursor
;
}
static
void
WIN_FreeCursor
(
SDL_Cursor
*
cursor
)
{
HICON
hicon
=
(
HICON
)
cursor
->
driverdata
;
DestroyIcon
(
hicon
);
SDL_free
(
cursor
);
}
static
int
WIN_ShowCursor
(
SDL_Cursor
*
cursor
)
{
if
(
cursor
)
{
SDL_cursor
=
(
HCURSOR
)
cursor
->
driverdata
;
}
else
{
SDL_cursor
=
NULL
;
}
if
(
SDL_GetMouseFocus
()
!=
NULL
)
{
SetCursor
(
SDL_cursor
);
}
return
0
;
}
static
void
WIN_WarpMouse
(
SDL_Window
*
window
,
int
x
,
int
y
)
{
HWND
hwnd
=
((
SDL_WindowData
*
)
window
->
driverdata
)
->
hwnd
;
POINT
pt
;
pt
.
x
=
x
;
pt
.
y
=
y
;
ClientToScreen
(
hwnd
,
&
pt
);
SetCursorPos
(
pt
.
x
,
pt
.
y
);
}
static
int
WIN_SetRelativeMouseMode
(
SDL_bool
enabled
)
{
SDL_Unsupported
();
return
-
1
;
}
void
WIN_InitMouse
(
_THIS
)
{
SDL_Mouse
*
mouse
=
SDL_GetMouse
();
mouse
->
CreateCursor
=
WIN_CreateCursor
;
mouse
->
ShowCursor
=
WIN_ShowCursor
;
mouse
->
FreeCursor
=
WIN_FreeCursor
;
mouse
->
WarpMouse
=
WIN_WarpMouse
;
mouse
->
SetRelativeMouseMode
=
WIN_SetRelativeMouseMode
;
SDL_SetDefaultCursor
(
WIN_CreateDefaultCursor
());
}
void
...
...
src/video/windows/SDL_windowsmouse.h
View file @
2368a330
...
...
@@ -24,6 +24,8 @@
#ifndef _SDL_windowsmouse_h
#define _SDL_windowsmouse_h
extern
HCURSOR
SDL_cursor
;
extern
void
WIN_InitMouse
(
_THIS
);
extern
void
WIN_QuitMouse
(
_THIS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment