Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

WinRT: merged with the latest official SDL source

  • Loading branch information
DavidLudwig committed Dec 17, 2012
2 parents e8f9662 + 042c9d0 commit 0349ac1fe3380c4a27a410c46963883b8dd116a2
Showing with 3,841 additions and 41 deletions.
  1. +3 −2 README.iOS
  2. +481 −0 VisualC/SDL/SDL_VS2012_WinRT.vcxproj
  3. +32 −0 VisualC/SDL_VS2012_WinRT.sln
  4. BIN VisualC/tests/loopwave/WinRT/Assets/Logo.png
  5. BIN VisualC/tests/loopwave/WinRT/Assets/SmallLogo.png
  6. BIN VisualC/tests/loopwave/WinRT/Assets/SplashScreen.png
  7. BIN VisualC/tests/loopwave/WinRT/Assets/StoreLogo.png
  8. +42 −0 VisualC/tests/loopwave/WinRT/Package.appxmanifest
  9. +156 −0 VisualC/tests/loopwave/WinRT/loopwave_VS2012_WinRT.vcxproj
  10. BIN VisualC/tests/loopwave/WinRT/loopwave_VS2012_WinRT_TemporaryKey.pfx
  11. BIN VisualC/tests/testthread/WinRT/Assets/Logo.png
  12. BIN VisualC/tests/testthread/WinRT/Assets/SmallLogo.png
  13. BIN VisualC/tests/testthread/WinRT/Assets/SplashScreen.png
  14. BIN VisualC/tests/testthread/WinRT/Assets/StoreLogo.png
  15. +42 −0 VisualC/tests/testthread/WinRT/Package.appxmanifest
  16. +159 −0 VisualC/tests/testthread/WinRT/testthread_VS2012_WinRT.vcxproj
  17. BIN VisualC/tests/testthread/WinRT/testthread_VS2012_WinRT_TemporaryKey.pfx
  18. +1 −0 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
  19. +2 −0 include/SDL_config.h
  20. +174 −0 include/SDL_config_windowsrt.h
  21. +1 −1 include/SDL_cpuinfo.h
  22. +1 −1 include/SDL_main.h
  23. +21 −2 include/SDL_platform.h
  24. +7 −0 include/SDL_stdinc.h
  25. +2 −0 include/SDL_syswm.h
  26. +2 −2 include/begin_code.h
  27. +2 −0 src/SDL_assert.c
  28. +2 −2 src/SDL_log.c
  29. +1 −1 src/atomic/SDL_spinlock.c
  30. +154 −16 src/audio/xaudio2/SDL_xaudio2.c
  31. +42 −0 src/audio/xaudio2/SDL_xaudio2_winrthelpers.cpp
  32. +40 −0 src/audio/xaudio2/SDL_xaudio2_winrthelpers.h
  33. +2 −0 src/core/windows/SDL_windows.h
  34. +3 −0 src/file/SDL_rwops.c
  35. +14 −0 src/main/windowsrt/SDL_winrt_main.cpp
  36. +2 −0 src/thread/SDL_thread_c.h
  37. +183 −0 src/thread/stdcpp/SDL_syscond.cpp
  38. +113 −0 src/thread/stdcpp/SDL_sysmutex.cpp
  39. +30 −0 src/thread/stdcpp/SDL_sysmutex_c.h
  40. +124 −0 src/thread/stdcpp/SDL_systhread.cpp
  41. +26 −0 src/thread/stdcpp/SDL_systhread_c.h
  42. +22 −1 src/timer/windows/SDL_systimer.c
  43. +3 −0 src/video/SDL_sysvideo.h
  44. +3 −0 src/video/SDL_video.c
  45. +3 −1 src/video/uikit/SDL_uikitwindow.m
  46. +36 −0 src/video/windowsrt/DirectXHelper.h
  47. +489 −0 src/video/windowsrt/SDL_WinRTApp.cpp
  48. +59 −0 src/video/windowsrt/SDL_WinRTApp.h
  49. +41 −0 src/video/windowsrt/SDL_winrtevents.cpp
  50. +27 −0 src/video/windowsrt/SDL_winrtevents_c.h
  51. +104 −0 src/video/windowsrt/SDL_winrtframebuffer.cpp
  52. +27 −0 src/video/windowsrt/SDL_winrtframebuffer_c.h
  53. +146 −0 src/video/windowsrt/SDL_winrtmouse.cpp
  54. +31 −0 src/video/windowsrt/SDL_winrtmouse.h
  55. +584 −0 src/video/windowsrt/SDL_winrtrenderer.cpp
  56. +62 −0 src/video/windowsrt/SDL_winrtrenderer.h
  57. +230 −0 src/video/windowsrt/SDL_winrtvideo.cpp
  58. +43 −0 src/video/windowsrt/SDL_winrtvideo.h
  59. +15 −0 src/video/windowsrt/SDLmain_WinRT_common.h
  60. +15 −0 src/video/windowsrt/SimplePixelShader.hlsl
  61. +22 −0 src/video/windowsrt/SimpleVertexShader.hlsl
  62. +7 −4 test/loopwave.c
  63. +8 −8 test/testthread.c
@@ -51,8 +51,9 @@ Here is a more manual method:
1. Create a new iPhone view based application.
2. Build the SDL static libraries (libSDL.a and libSDLSimulator.a) for iPhone and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator.
3. Include the SDL header files in your project.
4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically.
5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code.
4. Remove the AppDelegate.h and AppDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove ViewController.h, ViewController.m, and ViewController.xib -- SDL for iPhone produces its user interface programmatically.
5. Make sure your project links to the following, iOS-provided frameworks: OpenGLES.framework, AudioToolbox.framework, and QuartzCore.framework
6. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code.

==============================================================================
Notes -- Accelerometer as Joystick

Large diffs are not rendered by default.

@@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows 8
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL_VS2012_WinRT", "SDL\SDL_VS2012_WinRT.vcxproj", "{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|ARM = Release|ARM
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Debug|ARM.ActiveCfg = Debug|ARM
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Debug|ARM.Build.0 = Debug|ARM
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Debug|Win32.ActiveCfg = Debug|Win32
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Debug|Win32.Build.0 = Debug|Win32
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Debug|x64.ActiveCfg = Debug|x64
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Debug|x64.Build.0 = Debug|x64
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Release|ARM.ActiveCfg = Release|ARM
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Release|ARM.Build.0 = Release|ARM
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Release|Win32.ActiveCfg = Release|Win32
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Release|Win32.Build.0 = Release|Win32
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Release|x64.ActiveCfg = Release|x64
{AEAEA3A2-D4E6-45B1-8EC6-53D84287FC14}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">

<Identity Name="1702c480-cf09-431e-a5e4-b21b283ec818"
Publisher="CN=David"
Version="1.0.0.0" />

<Properties>
<DisplayName>loopwave_VS2012_WinRT</DisplayName>
<PublisherDisplayName>David</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>

<Prerequisites>
<OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>

<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="loopwave_VS2012_WinRT.App">
<VisualElements
DisplayName="loopwave_VS2012_WinRT"
Logo="Assets\Logo.png"
SmallLogo="Assets\SmallLogo.png"
Description="loopwave_VS2012_WinRT"
ForegroundText="light"
BackgroundColor="#464646">
<DefaultTile ShowName="allLogos" />
<SplashScreen Image="Assets\SplashScreen.png" />
</VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
@@ -0,0 +1,156 @@
<?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>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{03fcc293-9406-49c2-acf6-6e7d460c3239}</ProjectGuid>
<RootNamespace>loopwave_VS2012_WinRT</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<PackageCertificateKeyFile>loopwave_VS2012_WinRT_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>d2d1.lib; d3d11.lib; dxgi.lib; ole32.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>$(ProjectDir);$(IntermediateOutputPath);$(ProjectDir)..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4453</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<Image Include="Assets\Logo.png" />
<Image Include="Assets\SmallLogo.png" />
<Image Include="Assets\StoreLogo.png" />
<Image Include="Assets\SplashScreen.png" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="loopwave_VS2012_WinRT_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\src\main\windowsrt\SDL_winrt_main.cpp" />
<ClCompile Include="..\..\..\..\test\loopwave.c">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsWinRT>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Media Include="..\..\..\..\test\sample.wav" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\SDL\SDL_VS2012_WinRT.vcxproj">
<Project>{aeaea3a2-d4e6-45b1-8ec6-53d84287fc14}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">

<Identity Name="ca3178f1-b2b2-43bf-97dd-28ee1b7d32c5"
Publisher="CN=David"
Version="1.0.0.0" />

<Properties>
<DisplayName>testthread_VS2012_WinRT</DisplayName>
<PublisherDisplayName>David</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>

<Prerequisites>
<OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>

<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="testthread_VS2012_WinRT.App">
<VisualElements
DisplayName="testthread_VS2012_WinRT"
Logo="Assets\Logo.png"
SmallLogo="Assets\SmallLogo.png"
Description="testthread_VS2012_WinRT"
ForegroundText="light"
BackgroundColor="#464646">
<DefaultTile ShowName="allLogos" />
<SplashScreen Image="Assets\SplashScreen.png" />
</VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

0 comments on commit 0349ac1

Please sign in to comment.