Force line ending type for specific files

Different operation systems (Unix vs. Windows) use different line ending types.
It can easily happen that users from different systems edit files and replace
all line endings of a file with the system specific version. This screws up
diffs and makes merges harder.

Git can normalize line endings for specific files and avoid this problem.
Binary files should be marked to avoid accidentally normalization.
This commit is contained in:
Sven Eckelmann 2013-12-19 14:17:38 +01:00
parent 3df8090f8c
commit cb6db1a90e
5 changed files with 1125 additions and 1087 deletions

38
.gitattributes vendored Normal file
View file

@ -0,0 +1,38 @@
* text=auto
# normal text files
*.6 text
AUTHORS text
*.c text
*.cfg text
*.cht text
*.conf text
COPYING text
*.cpp text
*.def text
*-license text
*.h text
*.html text
*.ini text
INSTALL text
LICENSES text
Makefile text
*.py text
README text
RELEASE text
*.S text
*.sh text
*.txt text
*.ver text
# windows specific text files
*.sln text eol=crlf
*.vcproj text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
# binary files
*.gz binary
*.ttf binary
cursor.tex binary
font.tex binary

View file

@ -1,217 +1,217 @@
<?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">
<ProjectGuid>{7D4AFF6A-B7D9-4C25-975A-038B8079098E}</ProjectGuid>
<RootNamespace>mupen64plusvideorice</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</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" />
</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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Blender.cpp" />
<ClCompile Include="..\..\src\liblinux\BMGImage.c" />
<ClCompile Include="..\..\src\liblinux\BMGUtils.c" />
<ClCompile Include="..\..\src\liblinux\bmp.c" />
<ClCompile Include="..\..\src\CNvTNTCombiner.cpp" />
<ClCompile Include="..\..\src\Combiner.cpp" />
<ClCompile Include="..\..\src\CombinerTable.cpp" />
<ClCompile Include="..\..\src\Config.cpp" />
<ClCompile Include="..\..\src\ConvertImage.cpp" />
<ClCompile Include="..\..\src\ConvertImage16.cpp" />
<ClCompile Include="..\..\src\Debugger.cpp" />
<ClCompile Include="..\..\src\DecodedMux.cpp" />
<ClCompile Include="..\..\src\DeviceBuilder.cpp" />
<ClCompile Include="..\..\src\DirectXDecodedMux.cpp" />
<ClCompile Include="..\..\src\FrameBuffer.cpp" />
<ClCompile Include="..\..\src\GeneralCombiner.cpp" />
<ClCompile Include="..\..\src\GraphicsContext.cpp" />
<ClCompile Include="..\..\src\OGLCombiner.cpp" />
<ClCompile Include="..\..\src\OGLCombinerNV.cpp" />
<ClCompile Include="..\..\src\OGLCombinerTNT2.cpp" />
<ClCompile Include="..\..\src\OGLDecodedMux.cpp" />
<ClCompile Include="..\..\src\OGLExtCombiner.cpp" />
<ClCompile Include="..\..\src\OGLExtensions.cpp" />
<ClCompile Include="..\..\src\OGLExtRender.cpp" />
<ClCompile Include="..\..\src\OGLFragmentShaders.cpp" />
<ClCompile Include="..\..\src\OGLGraphicsContext.cpp" />
<ClCompile Include="..\..\src\OGLRender.cpp" />
<ClCompile Include="..\..\src\OGLRenderExt.cpp" />
<ClCompile Include="..\..\src\OGLTexture.cpp" />
<ClCompile Include="..\..\src\osal_dynamiclib_win32.c" />
<ClCompile Include="..\..\src\osal_files_win32.c" />
<ClCompile Include="..\..\src\liblinux\pngrw.c" />
<ClCompile Include="..\..\src\Render.cpp" />
<ClCompile Include="..\..\src\RenderBase.cpp" />
<ClCompile Include="..\..\src\RenderExt.cpp" />
<ClCompile Include="..\..\src\RenderTexture.cpp" />
<ClCompile Include="..\..\src\RSP_Parser.cpp" />
<ClCompile Include="..\..\src\RSP_S2DEX.cpp" />
<ClCompile Include="..\..\src\Texture.cpp" />
<ClCompile Include="..\..\src\TextureFilters.cpp" />
<ClCompile Include="..\..\src\TextureFilters_2xsai.cpp" />
<ClCompile Include="..\..\src\TextureFilters_hq2x.cpp" />
<ClCompile Include="..\..\src\TextureFilters_hq4x.cpp" />
<ClCompile Include="..\..\src\TextureManager.cpp" />
<ClCompile Include="..\..\src\VectorMath.cpp" />
<ClCompile Include="..\..\src\Video.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\Blender.h" />
<ClInclude Include="..\..\src\liblinux\BMGDLL.h" />
<ClInclude Include="..\..\src\liblinux\BMGImage.h" />
<ClInclude Include="..\..\src\liblinux\BMGLibPNG.h" />
<ClInclude Include="..\..\src\liblinux\BMGUtils.h" />
<ClInclude Include="..\..\src\CNvTNTCombiner.h" />
<ClInclude Include="..\..\src\COLOR.h" />
<ClInclude Include="..\..\src\Combiner.h" />
<ClInclude Include="..\..\src\CombinerDefs.h" />
<ClInclude Include="..\..\src\Config.h" />
<ClInclude Include="..\..\src\ConvertImage.h" />
<ClInclude Include="..\..\src\CritSect.h" />
<ClInclude Include="..\..\src\CSortedList.h" />
<ClInclude Include="..\..\src\Debugger.h" />
<ClInclude Include="..\..\src\DecodedMux.h" />
<ClInclude Include="..\..\src\DeviceBuilder.h" />
<ClInclude Include="..\..\src\DirectXDecodedMux.h" />
<ClInclude Include="..\..\src\ExtendedRender.h" />
<ClInclude Include="..\..\src\FrameBuffer.h" />
<ClInclude Include="..\..\src\GeneralCombiner.h" />
<ClInclude Include="..\..\src\GraphicsContext.h" />
<ClInclude Include="..\..\src\IColor.h" />
<ClInclude Include="..\..\src\liblinux\inffixed.h" />
<ClInclude Include="..\..\src\liblinux\jpegrw.h" />
<ClInclude Include="..\..\src\OGLCombiner.h" />
<ClInclude Include="..\..\src\OGLCombinerNV.h" />
<ClInclude Include="..\..\src\OGLCombinerTNT2.h" />
<ClInclude Include="..\..\src\OGLDebug.h" />
<ClInclude Include="..\..\src\OGLDecodedMux.h" />
<ClInclude Include="..\..\src\OGLExtCombiner.h" />
<ClInclude Include="..\..\src\OGLExtensions.h" />
<ClInclude Include="..\..\src\OGLExtRender.h" />
<ClInclude Include="..\..\src\OGLFragmentShaders.h" />
<ClInclude Include="..\..\src\OGLGraphicsContext.h" />
<ClInclude Include="..\..\src\OGLRender.h" />
<ClInclude Include="..\..\src\OGLTexture.h" />
<ClInclude Include="..\..\src\osal_dynamiclib.h" />
<ClInclude Include="..\..\src\osal_files.h" />
<ClInclude Include="..\..\src\osal_preproc.h" />
<ClInclude Include="..\..\src\liblinux\pngrw.h" />
<ClInclude Include="..\..\src\RDP_Texture.h" />
<ClInclude Include="..\..\src\Render.h" />
<ClInclude Include="..\..\src\RenderBase.h" />
<ClInclude Include="..\..\src\RenderTexture.h" />
<ClInclude Include="..\..\src\RSP_GBI0.h" />
<ClInclude Include="..\..\src\RSP_GBI1.h" />
<ClInclude Include="..\..\src\RSP_GBI2.h" />
<ClInclude Include="..\..\src\RSP_GBI2_ext.h" />
<ClInclude Include="..\..\src\RSP_GBI_Others.h" />
<ClInclude Include="..\..\src\RSP_GBI_Sprite2D.h" />
<ClInclude Include="..\..\src\RSP_Parser.h" />
<ClInclude Include="..\..\src\RSP_S2DEX.h" />
<ClInclude Include="..\..\src\Texture.h" />
<ClInclude Include="..\..\src\TextureFilters.h" />
<ClInclude Include="..\..\src\TextureFilters_hq2x.h" />
<ClInclude Include="..\..\src\TextureFilters_hq4x.h" />
<ClInclude Include="..\..\src\TextureFilters_lq2x.h" />
<ClInclude Include="..\..\src\TextureManager.h" />
<ClInclude Include="..\..\src\liblinux\tiffrw.h" />
<ClInclude Include="..\..\src\Timing.h" />
<ClInclude Include="..\..\src\typedefs.h" />
<ClInclude Include="..\..\src\ucode.h" />
<ClInclude Include="..\..\src\UcodeDefs.h" />
<ClInclude Include="..\..\src\VectorMath.h" />
<ClInclude Include="..\..\src\version.h" />
<ClInclude Include="..\..\src\VertexShaderConstantDef.h" />
<ClInclude Include="..\..\src\Video.h" />
<ClInclude Include="..\..\src\liblinux\zconf.h" />
<ClInclude Include="..\..\src\liblinux\zlib.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?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">
<ProjectGuid>{7D4AFF6A-B7D9-4C25-975A-038B8079098E}</ProjectGuid>
<RootNamespace>mupen64plusvideorice</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</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" />
</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" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\include;..\..\..\mupen64plus-win32-deps\zlib-1.2.3\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>user32.lib;gdi32.lib;opengl32.lib;glu32.lib;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib;..\..\..\mupen64plus-win32-deps\libpng-1.2.37\lib\libpng.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Blender.cpp" />
<ClCompile Include="..\..\src\liblinux\BMGImage.c" />
<ClCompile Include="..\..\src\liblinux\BMGUtils.c" />
<ClCompile Include="..\..\src\liblinux\bmp.c" />
<ClCompile Include="..\..\src\CNvTNTCombiner.cpp" />
<ClCompile Include="..\..\src\Combiner.cpp" />
<ClCompile Include="..\..\src\CombinerTable.cpp" />
<ClCompile Include="..\..\src\Config.cpp" />
<ClCompile Include="..\..\src\ConvertImage.cpp" />
<ClCompile Include="..\..\src\ConvertImage16.cpp" />
<ClCompile Include="..\..\src\Debugger.cpp" />
<ClCompile Include="..\..\src\DecodedMux.cpp" />
<ClCompile Include="..\..\src\DeviceBuilder.cpp" />
<ClCompile Include="..\..\src\DirectXDecodedMux.cpp" />
<ClCompile Include="..\..\src\FrameBuffer.cpp" />
<ClCompile Include="..\..\src\GeneralCombiner.cpp" />
<ClCompile Include="..\..\src\GraphicsContext.cpp" />
<ClCompile Include="..\..\src\OGLCombiner.cpp" />
<ClCompile Include="..\..\src\OGLCombinerNV.cpp" />
<ClCompile Include="..\..\src\OGLCombinerTNT2.cpp" />
<ClCompile Include="..\..\src\OGLDecodedMux.cpp" />
<ClCompile Include="..\..\src\OGLExtCombiner.cpp" />
<ClCompile Include="..\..\src\OGLExtensions.cpp" />
<ClCompile Include="..\..\src\OGLExtRender.cpp" />
<ClCompile Include="..\..\src\OGLFragmentShaders.cpp" />
<ClCompile Include="..\..\src\OGLGraphicsContext.cpp" />
<ClCompile Include="..\..\src\OGLRender.cpp" />
<ClCompile Include="..\..\src\OGLRenderExt.cpp" />
<ClCompile Include="..\..\src\OGLTexture.cpp" />
<ClCompile Include="..\..\src\osal_dynamiclib_win32.c" />
<ClCompile Include="..\..\src\osal_files_win32.c" />
<ClCompile Include="..\..\src\liblinux\pngrw.c" />
<ClCompile Include="..\..\src\Render.cpp" />
<ClCompile Include="..\..\src\RenderBase.cpp" />
<ClCompile Include="..\..\src\RenderExt.cpp" />
<ClCompile Include="..\..\src\RenderTexture.cpp" />
<ClCompile Include="..\..\src\RSP_Parser.cpp" />
<ClCompile Include="..\..\src\RSP_S2DEX.cpp" />
<ClCompile Include="..\..\src\Texture.cpp" />
<ClCompile Include="..\..\src\TextureFilters.cpp" />
<ClCompile Include="..\..\src\TextureFilters_2xsai.cpp" />
<ClCompile Include="..\..\src\TextureFilters_hq2x.cpp" />
<ClCompile Include="..\..\src\TextureFilters_hq4x.cpp" />
<ClCompile Include="..\..\src\TextureManager.cpp" />
<ClCompile Include="..\..\src\VectorMath.cpp" />
<ClCompile Include="..\..\src\Video.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\Blender.h" />
<ClInclude Include="..\..\src\liblinux\BMGDLL.h" />
<ClInclude Include="..\..\src\liblinux\BMGImage.h" />
<ClInclude Include="..\..\src\liblinux\BMGLibPNG.h" />
<ClInclude Include="..\..\src\liblinux\BMGUtils.h" />
<ClInclude Include="..\..\src\CNvTNTCombiner.h" />
<ClInclude Include="..\..\src\COLOR.h" />
<ClInclude Include="..\..\src\Combiner.h" />
<ClInclude Include="..\..\src\CombinerDefs.h" />
<ClInclude Include="..\..\src\Config.h" />
<ClInclude Include="..\..\src\ConvertImage.h" />
<ClInclude Include="..\..\src\CritSect.h" />
<ClInclude Include="..\..\src\CSortedList.h" />
<ClInclude Include="..\..\src\Debugger.h" />
<ClInclude Include="..\..\src\DecodedMux.h" />
<ClInclude Include="..\..\src\DeviceBuilder.h" />
<ClInclude Include="..\..\src\DirectXDecodedMux.h" />
<ClInclude Include="..\..\src\ExtendedRender.h" />
<ClInclude Include="..\..\src\FrameBuffer.h" />
<ClInclude Include="..\..\src\GeneralCombiner.h" />
<ClInclude Include="..\..\src\GraphicsContext.h" />
<ClInclude Include="..\..\src\IColor.h" />
<ClInclude Include="..\..\src\liblinux\inffixed.h" />
<ClInclude Include="..\..\src\liblinux\jpegrw.h" />
<ClInclude Include="..\..\src\OGLCombiner.h" />
<ClInclude Include="..\..\src\OGLCombinerNV.h" />
<ClInclude Include="..\..\src\OGLCombinerTNT2.h" />
<ClInclude Include="..\..\src\OGLDebug.h" />
<ClInclude Include="..\..\src\OGLDecodedMux.h" />
<ClInclude Include="..\..\src\OGLExtCombiner.h" />
<ClInclude Include="..\..\src\OGLExtensions.h" />
<ClInclude Include="..\..\src\OGLExtRender.h" />
<ClInclude Include="..\..\src\OGLFragmentShaders.h" />
<ClInclude Include="..\..\src\OGLGraphicsContext.h" />
<ClInclude Include="..\..\src\OGLRender.h" />
<ClInclude Include="..\..\src\OGLTexture.h" />
<ClInclude Include="..\..\src\osal_dynamiclib.h" />
<ClInclude Include="..\..\src\osal_files.h" />
<ClInclude Include="..\..\src\osal_preproc.h" />
<ClInclude Include="..\..\src\liblinux\pngrw.h" />
<ClInclude Include="..\..\src\RDP_Texture.h" />
<ClInclude Include="..\..\src\Render.h" />
<ClInclude Include="..\..\src\RenderBase.h" />
<ClInclude Include="..\..\src\RenderTexture.h" />
<ClInclude Include="..\..\src\RSP_GBI0.h" />
<ClInclude Include="..\..\src\RSP_GBI1.h" />
<ClInclude Include="..\..\src\RSP_GBI2.h" />
<ClInclude Include="..\..\src\RSP_GBI2_ext.h" />
<ClInclude Include="..\..\src\RSP_GBI_Others.h" />
<ClInclude Include="..\..\src\RSP_GBI_Sprite2D.h" />
<ClInclude Include="..\..\src\RSP_Parser.h" />
<ClInclude Include="..\..\src\RSP_S2DEX.h" />
<ClInclude Include="..\..\src\Texture.h" />
<ClInclude Include="..\..\src\TextureFilters.h" />
<ClInclude Include="..\..\src\TextureFilters_hq2x.h" />
<ClInclude Include="..\..\src\TextureFilters_hq4x.h" />
<ClInclude Include="..\..\src\TextureFilters_lq2x.h" />
<ClInclude Include="..\..\src\TextureManager.h" />
<ClInclude Include="..\..\src\liblinux\tiffrw.h" />
<ClInclude Include="..\..\src\Timing.h" />
<ClInclude Include="..\..\src\typedefs.h" />
<ClInclude Include="..\..\src\ucode.h" />
<ClInclude Include="..\..\src\UcodeDefs.h" />
<ClInclude Include="..\..\src\VectorMath.h" />
<ClInclude Include="..\..\src\version.h" />
<ClInclude Include="..\..\src\VertexShaderConstantDef.h" />
<ClInclude Include="..\..\src\Video.h" />
<ClInclude Include="..\..\src\liblinux\zconf.h" />
<ClInclude Include="..\..\src\liblinux\zlib.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

File diff suppressed because it is too large Load diff

View file

@ -1,74 +1,74 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus-ui-console - osal_dynamiclib_win32.c *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include "m64p_types.h"
#include "osal_dynamiclib.h"
m64p_error osal_dynlib_open(m64p_dynlib_handle *pLibHandle, const char *pccLibraryPath)
{
if (pLibHandle == NULL || pccLibraryPath == NULL)
return M64ERR_INPUT_ASSERT;
*pLibHandle = LoadLibrary(pccLibraryPath);
if (*pLibHandle == NULL)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "LoadLibrary('%s') error: %s\n", pccLibraryPath, pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INPUT_NOT_FOUND;
}
return M64ERR_SUCCESS;
}
void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName)
{
if (pccProcedureName == NULL)
return NULL;
return GetProcAddress(LibHandle, pccProcedureName);
}
m64p_error osal_dynlib_close(m64p_dynlib_handle LibHandle)
{
int rval = FreeLibrary(LibHandle);
if (rval == 0)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "FreeLibrary() error: %s\n", pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INTERNAL;
}
return M64ERR_SUCCESS;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus-ui-console - osal_dynamiclib_win32.c *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include "m64p_types.h"
#include "osal_dynamiclib.h"
m64p_error osal_dynlib_open(m64p_dynlib_handle *pLibHandle, const char *pccLibraryPath)
{
if (pLibHandle == NULL || pccLibraryPath == NULL)
return M64ERR_INPUT_ASSERT;
*pLibHandle = LoadLibrary(pccLibraryPath);
if (*pLibHandle == NULL)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "LoadLibrary('%s') error: %s\n", pccLibraryPath, pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INPUT_NOT_FOUND;
}
return M64ERR_SUCCESS;
}
void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName)
{
if (pccProcedureName == NULL)
return NULL;
return GetProcAddress(LibHandle, pccProcedureName);
}
m64p_error osal_dynlib_close(m64p_dynlib_handle LibHandle)
{
int rval = FreeLibrary(LibHandle);
if (rval == 0)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "FreeLibrary() error: %s\n", pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INTERNAL;
}
return M64ERR_SUCCESS;
}

View file

@ -1,145 +1,145 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus-core - osal_files_win32.c *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* This file contains the definitions for the unix-specific file handling
* functions
*/
#include <windows.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <direct.h>
#include "osal_files.h"
/* global functions */
int osal_is_directory(const char* name)
{
char DirName[MAX_PATH + 1];
int namelen = 0;
/* we must remove any trailing backslash on the end of the pathname, or this will fail */
strncpy(DirName, name, MAX_PATH);
DirName[MAX_PATH] = 0;
namelen = strlen(DirName);
if (namelen > 0 && DirName[namelen-1] == '\\')
DirName[namelen-1] = 0;
return (GetFileAttributes(DirName) & FILE_ATTRIBUTE_DIRECTORY);
}
int osal_mkdirp(const char *dirpath, int mode)
{
struct _stat fileinfo;
size_t dirpathlen = strlen(dirpath);
char *currpath = _strdup(dirpath);
/* first, remove sub-dirs on the end (by replacing slashes with NULL chars) until we find an existing directory */
while (strlen(currpath) > 1 && _stat(currpath, &fileinfo) != 0)
{
char *lastslash = strrchr(currpath, '\\');
if (lastslash == NULL)
{
free(currpath);
return 1; /* error: we never found an existing directory, this path is bad */
}
*lastslash = 0;
}
/* then walk up the path chain, creating directories along the way */
do
{
if (currpath[strlen(currpath)-1] != '\\' && _stat(currpath, &fileinfo) != 0)
{
if (_mkdir(currpath) != 0)
{
free(currpath);
return 2; /* mkdir failed */
}
}
if (strlen(currpath) == dirpathlen)
break;
else
currpath[strlen(currpath)] = '\\';
} while (1);
free(currpath);
return 0;
}
typedef struct {
HANDLE hFind;
WIN32_FIND_DATA find_data;
} dir_search_info;
void * osal_search_dir_open(const char *pathname)
{
char SearchString[MAX_PATH + 1];
dir_search_info *pInfo = malloc(sizeof(dir_search_info));
if (pInfo == NULL)
return NULL;
pInfo->hFind = INVALID_HANDLE_VALUE;
pInfo->find_data.cFileName[0] = 0;
if (pathname[strlen(pathname)-1] == '\\')
_snprintf(SearchString, MAX_PATH, "%s*", pathname);
else
_snprintf(SearchString, MAX_PATH, "%s\\*", pathname);
SearchString[MAX_PATH] = 0;
pInfo->hFind = FindFirstFile(SearchString, &pInfo->find_data);
return (void *) pInfo;
}
const char *osal_search_dir_read_next(void * search_info)
{
static char last_filename[_MAX_PATH];
dir_search_info *pInfo = (dir_search_info *) search_info;
if (pInfo == NULL || pInfo->hFind == INVALID_HANDLE_VALUE || pInfo->find_data.cFileName[0] == 0)
return NULL;
strcpy(last_filename, pInfo->find_data.cFileName);
if (FindNextFile(pInfo->hFind, &pInfo->find_data) == 0)
{
pInfo->find_data.cFileName[0] = 0;
}
return last_filename;
}
void osal_search_dir_close(void * search_info)
{
dir_search_info *pInfo = (dir_search_info *) search_info;
if (pInfo != NULL)
{
if (pInfo->hFind != INVALID_HANDLE_VALUE)
FindClose(pInfo->hFind);
free(pInfo);
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus-core - osal_files_win32.c *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* This file contains the definitions for the unix-specific file handling
* functions
*/
#include <windows.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <direct.h>
#include "osal_files.h"
/* global functions */
int osal_is_directory(const char* name)
{
char DirName[MAX_PATH + 1];
int namelen = 0;
/* we must remove any trailing backslash on the end of the pathname, or this will fail */
strncpy(DirName, name, MAX_PATH);
DirName[MAX_PATH] = 0;
namelen = strlen(DirName);
if (namelen > 0 && DirName[namelen-1] == '\\')
DirName[namelen-1] = 0;
return (GetFileAttributes(DirName) & FILE_ATTRIBUTE_DIRECTORY);
}
int osal_mkdirp(const char *dirpath, int mode)
{
struct _stat fileinfo;
size_t dirpathlen = strlen(dirpath);
char *currpath = _strdup(dirpath);
/* first, remove sub-dirs on the end (by replacing slashes with NULL chars) until we find an existing directory */
while (strlen(currpath) > 1 && _stat(currpath, &fileinfo) != 0)
{
char *lastslash = strrchr(currpath, '\\');
if (lastslash == NULL)
{
free(currpath);
return 1; /* error: we never found an existing directory, this path is bad */
}
*lastslash = 0;
}
/* then walk up the path chain, creating directories along the way */
do
{
if (currpath[strlen(currpath)-1] != '\\' && _stat(currpath, &fileinfo) != 0)
{
if (_mkdir(currpath) != 0)
{
free(currpath);
return 2; /* mkdir failed */
}
}
if (strlen(currpath) == dirpathlen)
break;
else
currpath[strlen(currpath)] = '\\';
} while (1);
free(currpath);
return 0;
}
typedef struct {
HANDLE hFind;
WIN32_FIND_DATA find_data;
} dir_search_info;
void * osal_search_dir_open(const char *pathname)
{
char SearchString[MAX_PATH + 1];
dir_search_info *pInfo = malloc(sizeof(dir_search_info));
if (pInfo == NULL)
return NULL;
pInfo->hFind = INVALID_HANDLE_VALUE;
pInfo->find_data.cFileName[0] = 0;
if (pathname[strlen(pathname)-1] == '\\')
_snprintf(SearchString, MAX_PATH, "%s*", pathname);
else
_snprintf(SearchString, MAX_PATH, "%s\\*", pathname);
SearchString[MAX_PATH] = 0;
pInfo->hFind = FindFirstFile(SearchString, &pInfo->find_data);
return (void *) pInfo;
}
const char *osal_search_dir_read_next(void * search_info)
{
static char last_filename[_MAX_PATH];
dir_search_info *pInfo = (dir_search_info *) search_info;
if (pInfo == NULL || pInfo->hFind == INVALID_HANDLE_VALUE || pInfo->find_data.cFileName[0] == 0)
return NULL;
strcpy(last_filename, pInfo->find_data.cFileName);
if (FindNextFile(pInfo->hFind, &pInfo->find_data) == 0)
{
pInfo->find_data.cFileName[0] = 0;
}
return last_filename;
}
void osal_search_dir_close(void * search_info)
{
dir_search_info *pInfo = (dir_search_info *) search_info;
if (pInfo != NULL)
{
if (pInfo->hFind != INVALID_HANDLE_VALUE)
FindClose(pInfo->hFind);
free(pInfo);
}
}