Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008
This commit is contained in:
parent
b33881a48e
commit
10b8372bd3
42 changed files with 1137 additions and 3437 deletions
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
# Visual Studio 2005
|
# Visual Studio 2008
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcproj", "{C598024D-8030-4F9C-AB76-69BF4CA0645F}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcproj", "{C598024D-8030-4F9C-AB76-69BF4CA0645F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcproj", "{5AC88B84-5EAA-4C1E-948D-332DA34227F6}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcproj", "{5AC88B84-5EAA-4C1E-948D-332DA34227F6}"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,10 +1,11 @@
|
||||||
<?xml version="1.0" encoding="windows-1251"?>
|
<?xml version="1.0" encoding="windows-1251"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="9.00"
|
||||||
Name="SDLmain"
|
Name="SDLmain"
|
||||||
ProjectGUID="{5AC88B84-5EAA-4C1E-948D-332DA34227F6}"
|
ProjectGUID="{5AC88B84-5EAA-4C1E-948D-332DA34227F6}"
|
||||||
RootNamespace="SDLmain"
|
RootNamespace="SDLmain"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
@ -88,6 +89,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -171,6 +175,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -254,6 +261,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -337,6 +347,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -420,6 +433,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -506,6 +522,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/SDLmain.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -530,62 +549,8 @@
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\main\win32\SDL_win32_main.c"
|
RelativePath="..\..\src\main\windows\SDL_windows_main.c"
|
||||||
>
|
>
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Smartphone 2003 (ARMV4)"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Pocket PC 2003 (ARMV4)"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Smartphone 2003 (ARMV4)"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Pocket PC 2003 (ARMV4)"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
|
|
||||||
>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<?xml version="1.0" encoding="windows-1251"?>
|
<?xml version="1.0" encoding="windows-1251"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="9.00"
|
||||||
Name="loopwave"
|
Name="loopwave"
|
||||||
ProjectGUID="{6F642636-CB11-4DC7-855E-27FE1744003A}"
|
ProjectGUID="{6F642636-CB11-4DC7-855E-27FE1744003A}"
|
||||||
RootNamespace="loopwave"
|
RootNamespace="loopwave"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
@ -74,6 +75,8 @@
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)/loopwave.pdb"
|
ProgramDatabaseFile="$(OutDir)/loopwave.pdb"
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -84,6 +87,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -125,7 +131,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
ExecutionBucket="7"
|
ExecutionBucket="7"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\nclude"
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
|
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
|
@ -154,6 +160,8 @@
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)/loopwave.pdb"
|
ProgramDatabaseFile="$(OutDir)/loopwave.pdb"
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -164,6 +172,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -236,6 +247,8 @@
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -246,6 +259,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -317,6 +333,8 @@
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -327,6 +345,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<?xml version="1.0" encoding="windows-1251"?>
|
<?xml version="1.0" encoding="windows-1251"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="9.00"
|
||||||
Name="testalpha"
|
Name="testalpha"
|
||||||
ProjectGUID="{DF401CB3-6F70-4485-996B-B7C357CF7EE7}"
|
ProjectGUID="{DF401CB3-6F70-4485-996B-B7C357CF7EE7}"
|
||||||
RootNamespace="testalpha"
|
RootNamespace="testalpha"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
@ -94,6 +95,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -106,6 +109,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -195,6 +201,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -207,6 +215,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -300,6 +311,8 @@
|
||||||
LinkTimeCodeGeneration="1"
|
LinkTimeCodeGeneration="1"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -312,6 +325,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -400,6 +416,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -412,6 +430,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -500,6 +521,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -512,6 +535,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -600,6 +626,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -612,6 +640,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testalpha.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<?xml version="1.0" encoding="windows-1251"?>
|
<?xml version="1.0" encoding="windows-1251"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="9.00"
|
||||||
Name="testtimer"
|
Name="testtimer"
|
||||||
ProjectGUID="{D482D7EE-6FF0-4254-9027-C59F8F03AB1F}"
|
ProjectGUID="{D482D7EE-6FF0-4254-9027-C59F8F03AB1F}"
|
||||||
RootNamespace="testtimer"
|
RootNamespace="testtimer"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
@ -74,6 +75,8 @@
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)/testtimer.pdb"
|
ProgramDatabaseFile="$(OutDir)/testtimer.pdb"
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -84,6 +87,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -125,6 +131,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
ExecutionBucket="7"
|
ExecutionBucket="7"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
|
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
|
@ -153,6 +160,8 @@
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)/testtimer.pdb"
|
ProgramDatabaseFile="$(OutDir)/testtimer.pdb"
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -163,6 +172,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -235,6 +247,8 @@
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -245,6 +259,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -286,6 +303,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
ExecutionBucket="7"
|
ExecutionBucket="7"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
|
AdditionalIncludeDirectories="..\..\include"
|
||||||
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
|
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_WINDOWS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
|
@ -315,6 +333,8 @@
|
||||||
SubSystem="0"
|
SubSystem="0"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -325,6 +345,9 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<?xml version="1.0" encoding="windows-1251"?>
|
<?xml version="1.0" encoding="windows-1251"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="9.00"
|
||||||
Name="testwin"
|
Name="testwin"
|
||||||
ProjectGUID="{DC516978-88CB-4F9A-A39A-C351C258613B}"
|
ProjectGUID="{DC516978-88CB-4F9A-A39A-C351C258613B}"
|
||||||
RootNamespace="testwin"
|
RootNamespace="testwin"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
|
@ -93,6 +94,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -105,6 +108,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -194,6 +200,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -206,6 +214,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -295,6 +306,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -307,6 +320,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -395,6 +411,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -407,6 +425,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -495,6 +516,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -507,6 +530,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
@ -595,6 +621,8 @@
|
||||||
StackCommitSize="4096"
|
StackCommitSize="4096"
|
||||||
EntryPointSymbol="WinMainCRTStartup"
|
EntryPointSymbol="WinMainCRTStartup"
|
||||||
BaseAddress="0x00010000"
|
BaseAddress="0x00010000"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
|
@ -607,6 +635,9 @@
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
OutputFile="$(PlatformName)\$(ConfigurationName)/testwin.bsc"
|
||||||
/>
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCodeSignTool"
|
Name="VCCodeSignTool"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -50,7 +50,7 @@ on the assertion line and not in some random guts of SDL, and so each
|
||||||
assert can have unique static variables associated with it.
|
assert can have unique static variables associated with it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(_WIN32_WCE)
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||||
#elif (defined(__GNUC__) && ((__i386__) || (__x86_64__)))
|
#elif (defined(__GNUC__) && ((__i386__) || (__x86_64__)))
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
/* Need to do this here because intrin.h has C++ code in it */
|
/* Need to do this here because intrin.h has C++ code in it */
|
||||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && !defined(_WIN32_WCE)
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#define HAVE_MSC_ATOMICS
|
#define HAVE_MSC_ATOMICS
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -65,7 +65,7 @@ extern "C" {
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
/* Platform */
|
/* Platform */
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
#undef __WIN32__
|
#undef __WIN32__
|
||||||
#define __WIN32__ 1
|
#define __WIN32__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
slouken@libsdl.org
|
slouken@libsdl.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SDL_config_windows2_h
|
#ifndef _SDL_config_windows_h
|
||||||
#define _SDL_config_windows2_h
|
#define _SDL_config_windows_h
|
||||||
|
|
||||||
#include "SDL_platform.h"
|
#include "SDL_platform.h"
|
||||||
|
|
||||||
|
@ -178,7 +178,11 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||||
#define SDL_VIDEO_DRIVER_WINDOWS 1
|
#define SDL_VIDEO_DRIVER_WINDOWS 1
|
||||||
|
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
#define SDL_VIDEO_RENDER_GAPI 1
|
||||||
|
#else
|
||||||
#define SDL_VIDEO_RENDER_D3D 1
|
#define SDL_VIDEO_RENDER_D3D 1
|
||||||
|
#endif
|
||||||
#define SDL_VIDEO_RENDER_GDI 1
|
#define SDL_VIDEO_RENDER_GDI 1
|
||||||
|
|
||||||
/* Enable OpenGL support */
|
/* Enable OpenGL support */
|
||||||
|
@ -196,4 +200,4 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_ASSEMBLY_ROUTINES 1
|
#define SDL_ASSEMBLY_ROUTINES 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _SDL_config_windows2_h */
|
#endif /* _SDL_config_windows_h */
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* Redefine main() on some platforms so that it is called by SDL.
|
* Redefine main() on some platforms so that it is called by SDL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__WINDOWS__) || \
|
#if defined(__WIN32__) || \
|
||||||
(defined(__MWERKS__) && !defined(__BEOS__)) || \
|
(defined(__MWERKS__) && !defined(__BEOS__)) || \
|
||||||
defined(__SYMBIAN32__) || defined(__IPHONEOS__) || \
|
defined(__SYMBIAN32__) || defined(__IPHONEOS__) || \
|
||||||
defined(__ANDROID__)
|
defined(__ANDROID__)
|
||||||
|
@ -66,7 +66,7 @@ extern C_LINKAGE int SDL_main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
|
||||||
/* From the SDL library code -- needed for registering the app on Win32 */
|
/* From the SDL library code -- needed for registering the app on Win32 */
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
|
|
||||||
#include "begin_code.h"
|
#include "begin_code.h"
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#include "SDL_config.h"
|
#include "SDL_config.h"
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
#define NOMINMAX /* Don't defined min() and max() */
|
#define NOMINMAX /* Don't defined min() and max() */
|
||||||
|
|
|
@ -125,8 +125,8 @@
|
||||||
#define __SOLARIS__ 1
|
#define __SOLARIS__ 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32) || defined(_WIN32)
|
#if defined(WIN32) || defined(_WIN32)
|
||||||
#undef __WINDOWS__
|
#undef __WIN32__
|
||||||
#define __WINDOWS__ 1
|
#define __WIN32__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__NDS__)
|
#if defined(__NDS__)
|
||||||
|
|
|
@ -83,7 +83,7 @@ typedef struct SDL_RWops
|
||||||
Uint32 type;
|
Uint32 type;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
SDL_bool append;
|
SDL_bool append;
|
||||||
|
|
|
@ -55,7 +55,7 @@ typedef unsigned long SDL_threadID;
|
||||||
*/
|
*/
|
||||||
typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
|
typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
|
||||||
|
|
||||||
#if defined(__WINDOWS__) && !defined(HAVE_LIBC)
|
#if defined(__WIN32__) && !defined(HAVE_LIBC)
|
||||||
/**
|
/**
|
||||||
* \file SDL_thread.h
|
* \file SDL_thread.h
|
||||||
*
|
*
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC __declspec(export)
|
# define DECLSPEC __declspec(export)
|
||||||
# endif
|
# endif
|
||||||
# elif defined(__WINDOWS__)
|
# elif defined(__WIN32__)
|
||||||
# ifdef __BORLANDC__
|
# ifdef __BORLANDC__
|
||||||
# ifdef BUILD_SDL
|
# ifdef BUILD_SDL
|
||||||
# define DECLSPEC
|
# define DECLSPEC
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
/* By default SDL uses the C calling convention */
|
/* By default SDL uses the C calling convention */
|
||||||
#ifndef SDLCALL
|
#ifndef SDLCALL
|
||||||
#if defined(__WINDOWS__) && !defined(__GNUC__)
|
#if defined(__WIN32__) && !defined(__GNUC__)
|
||||||
#define SDLCALL __cdecl
|
#define SDLCALL __cdecl
|
||||||
#else
|
#else
|
||||||
#define SDLCALL
|
#define SDLCALL
|
||||||
|
|
12
src/SDL.c
12
src/SDL.c
|
@ -39,7 +39,7 @@ extern void SDL_StartTicks(void);
|
||||||
extern int SDL_TimerInit(void);
|
extern int SDL_TimerInit(void);
|
||||||
extern void SDL_TimerQuit(void);
|
extern void SDL_TimerQuit(void);
|
||||||
#endif
|
#endif
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WIN32__)
|
||||||
extern int SDL_HelperWindowCreate(void);
|
extern int SDL_HelperWindowCreate(void);
|
||||||
extern int SDL_HelperWindowDestroy(void);
|
extern int SDL_HelperWindowDestroy(void);
|
||||||
#endif
|
#endif
|
||||||
|
@ -147,7 +147,7 @@ SDL_Init(Uint32 flags)
|
||||||
/* Clear the error message */
|
/* Clear the error message */
|
||||||
SDL_ClearError();
|
SDL_ClearError();
|
||||||
|
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WIN32__)
|
||||||
if (SDL_HelperWindowCreate() < 0) {
|
if (SDL_HelperWindowCreate() < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ SDL_Quit(void)
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WIN32__)
|
||||||
SDL_HelperWindowDestroy();
|
SDL_HelperWindowDestroy();
|
||||||
#endif
|
#endif
|
||||||
SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
|
SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
|
||||||
|
@ -312,7 +312,7 @@ SDL_GetPlatform()
|
||||||
return "RISC OS";
|
return "RISC OS";
|
||||||
#elif __SOLARIS__
|
#elif __SOLARIS__
|
||||||
return "Solaris";
|
return "Solaris";
|
||||||
#elif __WINDOWS__
|
#elif __WIN32__
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
return "Windows CE";
|
return "Windows CE";
|
||||||
#else
|
#else
|
||||||
|
@ -325,7 +325,7 @@ SDL_GetPlatform()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WIN32__)
|
||||||
|
|
||||||
#if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
|
#if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
|
||||||
/* Need to include DllMain() on Watcom C for some reason.. */
|
/* Need to include DllMain() on Watcom C for some reason.. */
|
||||||
|
@ -347,6 +347,6 @@ _DllMainCRTStartup(HANDLE hModule,
|
||||||
}
|
}
|
||||||
#endif /* building DLL with Watcom C */
|
#endif /* building DLL with Watcom C */
|
||||||
|
|
||||||
#endif /* __WINDOWS__ */
|
#endif /* __WIN32__ */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -26,9 +26,19 @@
|
||||||
#include "SDL_assert_c.h"
|
#include "SDL_assert_c.h"
|
||||||
#include "video/SDL_sysvideo.h"
|
#include "video/SDL_sysvideo.h"
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
#ifndef WS_OVERLAPPEDWINDOW
|
||||||
|
#define WS_OVERLAPPEDWINDOW 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
#define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
|
||||||
|
#else
|
||||||
|
#define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
|
||||||
|
#endif
|
||||||
#else /* fprintf, _exit(), etc. */
|
#else /* fprintf, _exit(), etc. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -57,11 +67,12 @@ debug_print(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
|
||||||
static void
|
static void
|
||||||
debug_print(const char *fmt, ...)
|
debug_print(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
/* Format into a buffer for OutputDebugStringA(). */
|
/* Format into a buffer for OutputDebugStringA(). */
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
char *startptr;
|
char *startptr;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
LPTSTR tstr;
|
||||||
int len;
|
int len;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
@ -78,15 +89,19 @@ debug_print(const char *fmt, ...)
|
||||||
for (ptr = startptr; *ptr; ptr++) {
|
for (ptr = startptr; *ptr; ptr++) {
|
||||||
if (*ptr == '\n') {
|
if (*ptr == '\n') {
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
OutputDebugStringA(startptr);
|
tstr = WIN_UTF8ToString(startptr);
|
||||||
OutputDebugStringA("\r\n");
|
OutputDebugString(tstr);
|
||||||
|
SDL_free(tstr);
|
||||||
|
OutputDebugString(TEXT("\r\n"));
|
||||||
startptr = ptr+1;
|
startptr = ptr+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* catch that last piece if it didn't have a newline... */
|
/* catch that last piece if it didn't have a newline... */
|
||||||
if (startptr != ptr) {
|
if (startptr != ptr) {
|
||||||
OutputDebugStringA(startptr);
|
tstr = WIN_UTF8ToString(startptr);
|
||||||
|
OutputDebugString(tstr);
|
||||||
|
SDL_free(tstr);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* Unix has it easy. Just dump it to stderr. */
|
/* Unix has it easy. Just dump it to stderr. */
|
||||||
|
@ -99,7 +114,7 @@ debug_print(const char *fmt, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
static SDL_assert_state SDL_Windows_AssertChoice = SDL_ASSERTION_ABORT;
|
static SDL_assert_state SDL_Windows_AssertChoice = SDL_ASSERTION_ABORT;
|
||||||
static const SDL_assert_data *SDL_Windows_AssertData = NULL;
|
static const SDL_assert_data *SDL_Windows_AssertData = NULL;
|
||||||
|
|
||||||
|
@ -113,6 +128,7 @@ SDL_Assertion_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
/* !!! FIXME: all this code stinks. */
|
/* !!! FIXME: all this code stinks. */
|
||||||
const SDL_assert_data *data = SDL_Windows_AssertData;
|
const SDL_assert_data *data = SDL_Windows_AssertData;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
LPTSTR tstr;
|
||||||
const int w = 100;
|
const int w = 100;
|
||||||
const int h = 25;
|
const int h = 25;
|
||||||
const int gap = 10;
|
const int gap = 10;
|
||||||
|
@ -121,14 +137,14 @@ SDL_Assertion_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
int len;
|
int len;
|
||||||
int i;
|
int i;
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *name;
|
LPCTSTR name;
|
||||||
SDL_assert_state state;
|
SDL_assert_state state;
|
||||||
} buttons[] = {
|
} buttons[] = {
|
||||||
{"Abort", SDL_ASSERTION_ABORT },
|
{TEXT("Abort"), SDL_ASSERTION_ABORT },
|
||||||
{"Break", SDL_ASSERTION_BREAK },
|
{TEXT("Break"), SDL_ASSERTION_BREAK },
|
||||||
{"Retry", SDL_ASSERTION_RETRY },
|
{TEXT("Retry"), SDL_ASSERTION_RETRY },
|
||||||
{"Ignore", SDL_ASSERTION_IGNORE },
|
{TEXT("Ignore"), SDL_ASSERTION_IGNORE },
|
||||||
{"Always Ignore", SDL_ASSERTION_ALWAYS_IGNORE },
|
{TEXT("Always Ignore"), SDL_ASSERTION_ALWAYS_IGNORE },
|
||||||
};
|
};
|
||||||
|
|
||||||
len = (int) SDL_snprintf(buf, sizeof (buf),
|
len = (int) SDL_snprintf(buf, sizeof (buf),
|
||||||
|
@ -140,14 +156,16 @@ SDL_Assertion_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
buf[sizeof (buf) - 1] = '\0';
|
buf[sizeof (buf) - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateWindowA("STATIC", buf,
|
tstr = WIN_UTF8ToString(buf);
|
||||||
|
CreateWindow(TEXT("STATIC"), tstr,
|
||||||
WS_VISIBLE | WS_CHILD | SS_LEFT,
|
WS_VISIBLE | WS_CHILD | SS_LEFT,
|
||||||
x, y, 550, 100,
|
x, y, 550, 100,
|
||||||
hwnd, (HMENU) 1, NULL, NULL);
|
hwnd, (HMENU) 1, NULL, NULL);
|
||||||
|
SDL_free(tstr);
|
||||||
y += 110;
|
y += 110;
|
||||||
|
|
||||||
for (i = 0; i < (sizeof (buttons) / sizeof (buttons[0])); i++) {
|
for (i = 0; i < (sizeof (buttons) / sizeof (buttons[0])); i++) {
|
||||||
CreateWindowA("BUTTON", buttons[i].name,
|
CreateWindow(TEXT("BUTTON"), buttons[i].name,
|
||||||
WS_VISIBLE | WS_CHILD,
|
WS_VISIBLE | WS_CHILD,
|
||||||
x, y, w, h,
|
x, y, w, h,
|
||||||
hwnd, (HMENU) buttons[i].state, NULL, NULL);
|
hwnd, (HMENU) buttons[i].state, NULL, NULL);
|
||||||
|
@ -248,7 +266,7 @@ static void SDL_GenerateAssertionReport(void)
|
||||||
|
|
||||||
static void SDL_ExitProcess(int exitcode)
|
static void SDL_ExitProcess(int exitcode)
|
||||||
{
|
{
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
ExitProcess(42);
|
ExitProcess(42);
|
||||||
#else
|
#else
|
||||||
_exit(42);
|
_exit(42);
|
||||||
|
@ -311,7 +329,7 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
|
||||||
|
|
||||||
/* platform-specific UI... */
|
/* platform-specific UI... */
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
state = SDL_PromptAssertion_windows(data);
|
state = SDL_PromptAssertion_windows(data);
|
||||||
|
|
||||||
#elif __MACOSX__
|
#elif __MACOSX__
|
||||||
|
|
|
@ -26,8 +26,13 @@
|
||||||
|
|
||||||
/* Don't do the check for Visual Studio 2005, it's safe here */
|
/* Don't do the check for Visual Studio 2005, it's safe here */
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
/* This function is where all the magic happens... */
|
/* This function is where all the magic happens... */
|
||||||
SDL_bool
|
SDL_bool
|
||||||
|
|
|
@ -971,7 +971,7 @@ open_audio_device(const char *devname, int iscapture,
|
||||||
if (!current_audio.impl.ProvidesOwnCallbackThread) {
|
if (!current_audio.impl.ProvidesOwnCallbackThread) {
|
||||||
/* Start the audio thread */
|
/* Start the audio thread */
|
||||||
/* !!! FIXME: this is nasty. */
|
/* !!! FIXME: this is nasty. */
|
||||||
#if (defined(__WINDOWS__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
|
#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
|
||||||
#undef SDL_CreateThread
|
#undef SDL_CreateThread
|
||||||
device->thread = SDL_CreateThread(SDL_RunAudio, device, NULL, NULL);
|
device->thread = SDL_CreateThread(SDL_RunAudio, device, NULL, NULL);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -319,7 +319,7 @@ SDL_GetCPUCount()
|
||||||
sysctlbyname("hw.ncpu", &SDL_CPUCount, &size, NULL, 0);
|
sysctlbyname("hw.ncpu", &SDL_CPUCount, &size, NULL, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
if (SDL_CPUCount <= 0) {
|
if (SDL_CPUCount <= 0) {
|
||||||
SYSTEM_INFO info;
|
SYSTEM_INFO info;
|
||||||
GetSystemInfo(&info);
|
GetSystemInfo(&info);
|
||||||
|
|
|
@ -170,7 +170,7 @@ SDL_StartEventThread(Uint32 flags)
|
||||||
|
|
||||||
/* The event thread will handle timers too */
|
/* The event thread will handle timers too */
|
||||||
SDL_SetTimerThreaded(2);
|
SDL_SetTimerThreaded(2);
|
||||||
#if (defined(__WINDOWS__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
|
#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
|
||||||
#undef SDL_CreateThread
|
#undef SDL_CreateThread
|
||||||
SDL_EventThread =
|
SDL_EventThread =
|
||||||
SDL_CreateThread(SDL_GobbleEvents, NULL, NULL, NULL);
|
SDL_CreateThread(SDL_GobbleEvents, NULL, NULL, NULL);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#define MUST_THREAD_EVENTS
|
#define MUST_THREAD_EVENTS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WINDOWS__ /* Windows doesn't allow a separate event thread */
|
#ifdef __WIN32__ /* Windows doesn't allow a separate event thread */
|
||||||
#define CANT_THREAD_EVENTS
|
#define CANT_THREAD_EVENTS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include <fat.h>
|
#include <fat.h>
|
||||||
#endif /* __NDS__ */
|
#endif /* __NDS__ */
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
|
|
||||||
/* Functions to read/write Win32 API file pointers */
|
/* Functions to read/write Win32 API file pointers */
|
||||||
/* Will not use it on WinCE because stdio is buffered, it means
|
/* Will not use it on WinCE because stdio is buffered, it means
|
||||||
|
@ -295,7 +295,7 @@ windows_file_close(SDL_RWops * context)
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
#endif /* __WINDOWS__ */
|
#endif /* __WIN32__ */
|
||||||
|
|
||||||
#ifdef HAVE_STDIO_H
|
#ifdef HAVE_STDIO_H
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ SDL_RWFromFile(const char *file, const char *mode)
|
||||||
SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
|
SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WIN32__)
|
||||||
rwops = SDL_AllocRW();
|
rwops = SDL_AllocRW();
|
||||||
if (!rwops)
|
if (!rwops)
|
||||||
return NULL; /* SDL_SetError already setup by SDL_AllocRW() */
|
return NULL; /* SDL_SetError already setup by SDL_AllocRW() */
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
/*#include <endian.h>*/
|
/*#include <endian.h>*/
|
||||||
#include "SDL_endian.h"
|
#include "SDL_endian.h"
|
||||||
#include <sys/types.h>
|
/*#include <sys/types.h>*/
|
||||||
|
|
||||||
#define attribute_hidden
|
#define attribute_hidden
|
||||||
#define libm_hidden_proto(x)
|
#define libm_hidden_proto(x)
|
||||||
|
|
|
@ -61,7 +61,7 @@ SDL_LoadObject(const char *sofile)
|
||||||
SDL_free(sofile_t);
|
SDL_free(sofile_t);
|
||||||
SDL_free(errbuf_t);
|
SDL_free(errbuf_t);
|
||||||
|
|
||||||
#else /*if defined(__WINDOWS__) */
|
#else /*if defined(__WIN32__) */
|
||||||
char errbuf[512];
|
char errbuf[512];
|
||||||
|
|
||||||
handle = (void *) LoadLibrary(sofile);
|
handle = (void *) LoadLibrary(sofile);
|
||||||
|
|
|
@ -32,11 +32,20 @@
|
||||||
SDL_bool
|
SDL_bool
|
||||||
SDL_GetPowerInfo_Windows(SDL_PowerState * state, int *seconds, int *percent)
|
SDL_GetPowerInfo_Windows(SDL_PowerState * state, int *seconds, int *percent)
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
SYSTEM_POWER_STATUS_EX status;
|
||||||
|
#else
|
||||||
SYSTEM_POWER_STATUS status;
|
SYSTEM_POWER_STATUS status;
|
||||||
|
#endif
|
||||||
SDL_bool need_details = SDL_FALSE;
|
SDL_bool need_details = SDL_FALSE;
|
||||||
|
|
||||||
/* This API should exist back to Win95 and Windows CE. */
|
/* This API should exist back to Win95 and Windows CE. */
|
||||||
if (!GetSystemPowerStatus(&status)) {
|
#ifdef _WIN32_WCE
|
||||||
|
if (!GetSystemPowerStatusEx(&status, FALSE))
|
||||||
|
#else
|
||||||
|
if (!GetSystemPowerStatus(&status))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
/* !!! FIXME: push GetLastError() into SDL_GetError() */
|
/* !!! FIXME: push GetLastError() into SDL_GetError() */
|
||||||
*state = SDL_POWERSTATE_UNKNOWN;
|
*state = SDL_POWERSTATE_UNKNOWN;
|
||||||
} else if (status.BatteryFlag == 0xFF) { /* unknown state */
|
} else if (status.BatteryFlag == 0xFF) { /* unknown state */
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#ifndef HAVE_GETENV
|
#ifndef HAVE_GETENV
|
||||||
|
|
||||||
#if defined(__WINDOWS__) && !defined(_WIN32_WCE)
|
#if defined(__WIN32__) && !defined(_WIN32_WCE)
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -163,7 +163,7 @@ SDL_getenv(const char *name)
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __WINDOWS__ */
|
#endif /* __WIN32__ */
|
||||||
|
|
||||||
#endif /* !HAVE_GETENV */
|
#endif /* !HAVE_GETENV */
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,7 @@
|
||||||
__declspec(selectany) int _fltused = 1;
|
__declspec(selectany) int _fltused = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _M_IX86
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
void
|
void
|
||||||
__declspec(naked)
|
__declspec(naked)
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct SDL_semaphore
|
||||||
#else
|
#else
|
||||||
HANDLE id;
|
HANDLE id;
|
||||||
#endif
|
#endif
|
||||||
LONG volatile count;
|
LONG count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,10 @@
|
||||||
|
|
||||||
/* Win32 thread management routines for SDL */
|
/* Win32 thread management routines for SDL */
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#include "SDL_thread.h"
|
#include "SDL_thread.h"
|
||||||
#include "../SDL_thread_c.h"
|
#include "../SDL_thread_c.h"
|
||||||
#include "../SDL_systhread.h"
|
#include "../SDL_systhread.h"
|
||||||
|
#include "SDL_systhread_c.h"
|
||||||
|
|
||||||
#ifndef SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
#ifndef SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||||
#ifndef _WIN32_WCE
|
#ifndef _WIN32_WCE
|
||||||
|
|
|
@ -1181,7 +1181,7 @@ GL_RenderDrawLines(SDL_Renderer * renderer, const SDL_Point * points,
|
||||||
}
|
}
|
||||||
data->glEnd();
|
data->glEnd();
|
||||||
} else {
|
} else {
|
||||||
#if defined(__APPLE__) || defined(__WINDOWS__)
|
#if defined(__APPLE__) || defined(__WIN32__)
|
||||||
#else
|
#else
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1200,7 +1200,7 @@ GL_RenderDrawLines(SDL_Renderer * renderer, const SDL_Point * points,
|
||||||
* least it would be pixel perfect.
|
* least it would be pixel perfect.
|
||||||
*/
|
*/
|
||||||
data->glBegin(GL_POINTS);
|
data->glBegin(GL_POINTS);
|
||||||
#if defined(__APPLE__) || defined(__WINDOWS__)
|
#if defined(__APPLE__) || defined(__WIN32__)
|
||||||
/* Mac OS X and Windows seem to always leave the second point open */
|
/* Mac OS X and Windows seem to always leave the second point open */
|
||||||
data->glVertex2f(0.5f + points[count-1].x, 0.5f + points[count-1].y);
|
data->glVertex2f(0.5f + points[count-1].x, 0.5f + points[count-1].y);
|
||||||
#else
|
#else
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -167,8 +167,10 @@ GDI_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata;
|
SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata;
|
||||||
SDL_Renderer *renderer;
|
SDL_Renderer *renderer;
|
||||||
GDI_RenderData *data;
|
GDI_RenderData *data;
|
||||||
|
#ifndef NO_GETDIBBITS
|
||||||
int bmi_size;
|
int bmi_size;
|
||||||
HBITMAP hbm;
|
HBITMAP hbm;
|
||||||
|
#endif
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
|
renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
|
||||||
|
|
|
@ -192,20 +192,20 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
/* transform coords for VGA, WVGA... */
|
/* transform coords for VGA, WVGA... */
|
||||||
{
|
{
|
||||||
SDL_VideoData *videodata = data->videodata;
|
SDL_VideoData *videodata = data->videodata;
|
||||||
if(videodata->CoordTransform &&
|
if(videodata->CoordTransform &&
|
||||||
(videodata->render == RENDER_GAPI || videodata->render == RENDER_RAW))
|
(videodata->render == RENDER_GAPI || videodata->render == RENDER_RAW))
|
||||||
{
|
{
|
||||||
POINT pt;
|
POINT pt;
|
||||||
pt.x = LOWORD(lParam);
|
pt.x = LOWORD(lParam);
|
||||||
pt.y = HIWORD(lParam);
|
pt.y = HIWORD(lParam);
|
||||||
videodata->CoordTransform(data->window, &pt);
|
videodata->CoordTransform(data->window, &pt);
|
||||||
SDL_SendMouseMotion(data->window, 0, pt.x, pt.y);
|
SDL_SendMouseMotion(data->window, 0, pt.x, pt.y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
SDL_SendMouseMotion(data->window, 0, LOWORD(lParam), HIWORD(lParam));
|
SDL_SendMouseMotion(data->window, 0, LOWORD(lParam), HIWORD(lParam));
|
||||||
break;
|
break;
|
||||||
|
@ -252,12 +252,15 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WM_MOUSELEAVE
|
||||||
|
/* FIXME: Do we need the SDL 1.2 hack to generate WM_MOUSELEAVE now? */
|
||||||
case WM_MOUSELEAVE:
|
case WM_MOUSELEAVE:
|
||||||
if (SDL_GetMouseFocus() == data->window) {
|
if (SDL_GetMouseFocus() == data->window) {
|
||||||
SDL_SetMouseFocus(NULL);
|
SDL_SetMouseFocus(NULL);
|
||||||
}
|
}
|
||||||
returnCode = 0;
|
returnCode = 0;
|
||||||
break;
|
break;
|
||||||
|
#endif /* WM_MOUSELEAVE */
|
||||||
|
|
||||||
case WM_SYSKEYDOWN:
|
case WM_SYSKEYDOWN:
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
|
@ -382,13 +385,16 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
returnCode = 0;
|
returnCode = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef WM_INPUTLANGCHANGE
|
||||||
case WM_INPUTLANGCHANGE:
|
case WM_INPUTLANGCHANGE:
|
||||||
{
|
{
|
||||||
WIN_UpdateKeymap();
|
WIN_UpdateKeymap();
|
||||||
}
|
}
|
||||||
returnCode = 1;
|
returnCode = 1;
|
||||||
break;
|
break;
|
||||||
|
#endif /* WM_INPUTLANGCHANGE */
|
||||||
|
|
||||||
|
#ifdef WM_GETMINMAXINFO
|
||||||
case WM_GETMINMAXINFO:
|
case WM_GETMINMAXINFO:
|
||||||
{
|
{
|
||||||
MINMAXINFO *info;
|
MINMAXINFO *info;
|
||||||
|
@ -447,6 +453,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
returnCode = 0;
|
returnCode = 0;
|
||||||
break;
|
break;
|
||||||
|
#endif /* WM_GETMINMAXINFO */
|
||||||
|
|
||||||
case WM_WINDOWPOSCHANGED:
|
case WM_WINDOWPOSCHANGED:
|
||||||
{
|
{
|
||||||
|
@ -534,6 +541,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
|
#if defined(SC_SCREENSAVE) || defined(SC_MONITORPOWER)
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
{
|
{
|
||||||
/* Don't start the screensaver or blank the monitor in fullscreen apps */
|
/* Don't start the screensaver or blank the monitor in fullscreen apps */
|
||||||
|
@ -545,6 +553,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif /* System has screensaver support */
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
{
|
{
|
||||||
|
@ -656,7 +665,9 @@ SDL_RegisterApp(char *name, Uint32 style, void *hInst)
|
||||||
}
|
}
|
||||||
if (!name && !SDL_Appname) {
|
if (!name && !SDL_Appname) {
|
||||||
name = "SDL_app";
|
name = "SDL_app";
|
||||||
|
#if defined(CS_BYTEALIGNCLIENT) || defined(CS_OWNDC)
|
||||||
SDL_Appstyle = (CS_BYTEALIGNCLIENT | CS_OWNDC);
|
SDL_Appstyle = (CS_BYTEALIGNCLIENT | CS_OWNDC);
|
||||||
|
#endif
|
||||||
SDL_Instance = hInst ? hInst : GetModuleHandle(NULL);
|
SDL_Instance = hInst ? hInst : GetModuleHandle(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_config.h"
|
#include "SDL_config.h"
|
||||||
|
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
#define SDL_DISABLE_WINDOWS_IME
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SDL_windowsvideo.h"
|
#include "SDL_windowsvideo.h"
|
||||||
|
|
||||||
#include "../../events/SDL_keyboard_c.h"
|
#include "../../events/SDL_keyboard_c.h"
|
||||||
|
@ -29,10 +33,12 @@
|
||||||
#include <imm.h>
|
#include <imm.h>
|
||||||
#include <oleauto.h>
|
#include <oleauto.h>
|
||||||
|
|
||||||
|
#ifndef SDL_DISABLE_WINDOWS_IME
|
||||||
static void IME_Init(SDL_VideoData *videodata, HWND hwnd);
|
static void IME_Init(SDL_VideoData *videodata, HWND hwnd);
|
||||||
static void IME_Enable(SDL_VideoData *videodata, HWND hwnd);
|
static void IME_Enable(SDL_VideoData *videodata, HWND hwnd);
|
||||||
static void IME_Disable(SDL_VideoData *videodata, HWND hwnd);
|
static void IME_Disable(SDL_VideoData *videodata, HWND hwnd);
|
||||||
static void IME_Quit(SDL_VideoData *videodata);
|
static void IME_Quit(SDL_VideoData *videodata);
|
||||||
|
#endif /* !SDL_DISABLE_WINDOWS_IME */
|
||||||
|
|
||||||
#ifndef MAPVK_VK_TO_VSC
|
#ifndef MAPVK_VK_TO_VSC
|
||||||
#define MAPVK_VK_TO_VSC 0
|
#define MAPVK_VK_TO_VSC 0
|
||||||
|
@ -172,12 +178,15 @@ WIN_UpdateKeymap()
|
||||||
void
|
void
|
||||||
WIN_QuitKeyboard(_THIS)
|
WIN_QuitKeyboard(_THIS)
|
||||||
{
|
{
|
||||||
|
#ifndef SDL_DISABLE_WINDOWS_IME
|
||||||
IME_Quit((SDL_VideoData *)_this->driverdata);
|
IME_Quit((SDL_VideoData *)_this->driverdata);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WIN_StartTextInput(_THIS)
|
WIN_StartTextInput(_THIS)
|
||||||
{
|
{
|
||||||
|
#ifndef SDL_DISABLE_WINDOWS_IME
|
||||||
SDL_Window *window = SDL_GetKeyboardFocus();
|
SDL_Window *window = SDL_GetKeyboardFocus();
|
||||||
if (window) {
|
if (window) {
|
||||||
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||||
|
@ -186,11 +195,13 @@ WIN_StartTextInput(_THIS)
|
||||||
IME_Init(videodata, hwnd);
|
IME_Init(videodata, hwnd);
|
||||||
IME_Enable(videodata, hwnd);
|
IME_Enable(videodata, hwnd);
|
||||||
}
|
}
|
||||||
|
#endif /* !SDL_DISABLE_WINDOWS_IME */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WIN_StopTextInput(_THIS)
|
WIN_StopTextInput(_THIS)
|
||||||
{
|
{
|
||||||
|
#ifndef SDL_DISABLE_WINDOWS_IME
|
||||||
SDL_Window *window = SDL_GetKeyboardFocus();
|
SDL_Window *window = SDL_GetKeyboardFocus();
|
||||||
if (window) {
|
if (window) {
|
||||||
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||||
|
@ -198,6 +209,7 @@ WIN_StopTextInput(_THIS)
|
||||||
IME_Init(videodata, hwnd);
|
IME_Init(videodata, hwnd);
|
||||||
IME_Disable(videodata, hwnd);
|
IME_Disable(videodata, hwnd);
|
||||||
}
|
}
|
||||||
|
#endif /* !SDL_DISABLE_WINDOWS_IME */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -207,6 +219,21 @@ WIN_SetTextInputRect(_THIS, SDL_Rect *rect)
|
||||||
videodata->ime_rect = *rect;
|
videodata->ime_rect = *rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SDL_DISABLE_WINDOWS_IME
|
||||||
|
|
||||||
|
|
||||||
|
SDL_bool
|
||||||
|
IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoData *videodata)
|
||||||
|
{
|
||||||
|
return SDL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IME_Present(SDL_VideoData *videodata)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#undef DEFINE_GUID
|
#undef DEFINE_GUID
|
||||||
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||||
|
@ -1552,4 +1579,6 @@ void IME_Present(SDL_VideoData *videodata)
|
||||||
SDL_RenderCopy(videodata->ime_candtex, NULL, &videodata->ime_candlistrect);
|
SDL_RenderCopy(videodata->ime_candtex, NULL, &videodata->ime_candlistrect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* SDL_DISABLE_WINDOWS_IME */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -23,13 +23,19 @@
|
||||||
|
|
||||||
#include "SDL_windowsvideo.h"
|
#include "SDL_windowsvideo.h"
|
||||||
|
|
||||||
|
/* Windows CE compatibility */
|
||||||
|
#ifndef CDS_FULLSCREEN
|
||||||
|
#define CDS_FULLSCREEN 0
|
||||||
|
#endif
|
||||||
|
|
||||||
static SDL_bool
|
static SDL_bool
|
||||||
WIN_GetDisplayMode(LPCTSTR deviceName, DWORD index, SDL_DisplayMode * mode)
|
WIN_GetDisplayMode(LPCTSTR deviceName, DWORD index, SDL_DisplayMode * mode)
|
||||||
{
|
{
|
||||||
SDL_DisplayModeData *data;
|
SDL_DisplayModeData *data;
|
||||||
DEVMODE devmode;
|
DEVMODE devmode;
|
||||||
|
#ifndef _WIN32_WCE
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
#endif
|
||||||
|
|
||||||
devmode.dmSize = sizeof(devmode);
|
devmode.dmSize = sizeof(devmode);
|
||||||
devmode.dmDriverExtra = 0;
|
devmode.dmDriverExtra = 0;
|
||||||
|
|
|
@ -161,9 +161,9 @@ WIN_CreateDevice(int devindex)
|
||||||
|
|
||||||
data->userDLL = LoadLibrary(TEXT("USER32.DLL"));
|
data->userDLL = LoadLibrary(TEXT("USER32.DLL"));
|
||||||
if (data->userDLL) {
|
if (data->userDLL) {
|
||||||
data->CloseTouchInputHandle = (BOOL (WINAPI *)( HTOUCHINPUT )) GetProcAddress(data->userDLL, "CloseTouchInputHandle");
|
data->CloseTouchInputHandle = (BOOL (WINAPI *)( HTOUCHINPUT )) GetProcAddress(data->userDLL, TEXT("CloseTouchInputHandle"));
|
||||||
data->GetTouchInputInfo = (BOOL (WINAPI *)( HTOUCHINPUT, UINT, PTOUCHINPUT, int )) GetProcAddress(data->userDLL, "GetTouchInputInfo");
|
data->GetTouchInputInfo = (BOOL (WINAPI *)( HTOUCHINPUT, UINT, PTOUCHINPUT, int )) GetProcAddress(data->userDLL, TEXT("GetTouchInputInfo"));
|
||||||
data->RegisterTouchWindow = (BOOL (WINAPI *)( HWND, ULONG )) GetProcAddress(data->userDLL, "RegisterTouchWindow");
|
data->RegisterTouchWindow = (BOOL (WINAPI *)( HWND, ULONG )) GetProcAddress(data->userDLL, TEXT("RegisterTouchWindow"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the function pointers */
|
/* Set the function pointers */
|
||||||
|
@ -222,11 +222,7 @@ WIN_CreateDevice(int devindex)
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoBootStrap WINDOWS_bootstrap = {
|
VideoBootStrap WINDOWS_bootstrap = {
|
||||||
#ifdef _WIN32_WCE
|
"windows", "SDL Windows video driver", WIN_Available, WIN_CreateDevice
|
||||||
"wince", "SDL WinCE video driver", WINCE_Available, WIN_CreateDevice
|
|
||||||
#else
|
|
||||||
"windows", "SDL Win32/64 video driver", WIN_Available, WIN_CreateDevice
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#ifndef __GNUC__
|
#if defined(_MSC_VER) && !defined(_WIN32_WCE)
|
||||||
#include <msctf.h>
|
#include <msctf.h>
|
||||||
#else
|
#else
|
||||||
#include "SDL_msctf.h"
|
#include "SDL_msctf.h"
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
#include "SDL_syswm.h"
|
#include "SDL_syswm.h"
|
||||||
#include "SDL_gapirender.h"
|
#include "SDL_gapirender.h"
|
||||||
|
|
||||||
|
/* Windows CE compatibility */
|
||||||
|
#ifndef SWP_NOCOPYBITS
|
||||||
|
#define SWP_NOCOPYBITS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Fake window to help with DirectInput events. */
|
/* Fake window to help with DirectInput events. */
|
||||||
HWND SDL_HelperWindow = NULL;
|
HWND SDL_HelperWindow = NULL;
|
||||||
|
@ -68,13 +72,21 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up the window proc function */
|
/* Set up the window proc function */
|
||||||
|
#ifdef GWLP_WNDPROC
|
||||||
data->wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
|
data->wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC);
|
||||||
if (data->wndproc == WIN_WindowProc) {
|
if (data->wndproc == WIN_WindowProc) {
|
||||||
data->wndproc = NULL;
|
data->wndproc = NULL;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) WIN_WindowProc);
|
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) WIN_WindowProc);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
data->wndproc = (WNDPROC) GetWindowLong(hwnd, GWL_WNDPROC);
|
||||||
|
if (data->wndproc == WIN_WindowProc) {
|
||||||
|
data->wndproc = NULL;
|
||||||
|
} else {
|
||||||
|
SetWindowLong(hwnd, GWL_WNDPROC, (LONG_PTR) WIN_WindowProc);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Fill in the SDL window with the window data */
|
/* Fill in the SDL window with the window data */
|
||||||
{
|
{
|
||||||
|
@ -112,14 +124,20 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
|
||||||
} else {
|
} else {
|
||||||
window->flags &= ~SDL_WINDOW_RESIZABLE;
|
window->flags &= ~SDL_WINDOW_RESIZABLE;
|
||||||
}
|
}
|
||||||
|
#ifdef WS_MAXIMIZE
|
||||||
if (style & WS_MAXIMIZE) {
|
if (style & WS_MAXIMIZE) {
|
||||||
window->flags |= SDL_WINDOW_MAXIMIZED;
|
window->flags |= SDL_WINDOW_MAXIMIZED;
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
window->flags &= ~SDL_WINDOW_MAXIMIZED;
|
window->flags &= ~SDL_WINDOW_MAXIMIZED;
|
||||||
}
|
}
|
||||||
|
#ifdef WS_MINIMIZE
|
||||||
if (style & WS_MINIMIZE) {
|
if (style & WS_MINIMIZE) {
|
||||||
window->flags |= SDL_WINDOW_MINIMIZED;
|
window->flags |= SDL_WINDOW_MINIMIZED;
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
window->flags &= ~SDL_WINDOW_MINIMIZED;
|
window->flags &= ~SDL_WINDOW_MINIMIZED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
#define PRIu32 "u"
|
#define PRIu32 "u"
|
||||||
#endif
|
#endif
|
||||||
#ifndef PRIs64
|
#ifndef PRIs64
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
#define PRIs64 "I64"
|
#define PRIs64 "I64"
|
||||||
#else
|
#else
|
||||||
#define PRIs64 "lld"
|
#define PRIs64 "lld"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef PRIu64
|
#ifndef PRIu64
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WIN32__
|
||||||
#define PRIu64 "I64u"
|
#define PRIu64 "I64u"
|
||||||
#else
|
#else
|
||||||
#define PRIu64 "llu"
|
#define PRIu64 "llu"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue