FrontendCommon: Remove SDLInitializer

Not needed anymore.
This commit is contained in:
Connor McLaughlin 2022-08-04 21:35:31 +10:00
parent ea65c0970c
commit 31a17cd3c6
5 changed files with 0 additions and 36 deletions

View file

@ -90,8 +90,6 @@ if(SDL2_FOUND)
target_sources(frontend-common PRIVATE target_sources(frontend-common PRIVATE
sdl_input_source.cpp sdl_input_source.cpp
sdl_input_source.h sdl_input_source.h
sdl_initializer.cpp
sdl_initializer.h
) )
target_compile_definitions(frontend-common PUBLIC "WITH_SDL2=1") target_compile_definitions(frontend-common PUBLIC "WITH_SDL2=1")
target_include_directories(frontend-common PRIVATE ${SDL2_INCLUDE_DIRS}) target_include_directories(frontend-common PRIVATE ${SDL2_INCLUDE_DIRS})

View file

@ -34,9 +34,6 @@
<ClCompile Include="postprocessing_chain.cpp" /> <ClCompile Include="postprocessing_chain.cpp" />
<ClCompile Include="postprocessing_shader.cpp" /> <ClCompile Include="postprocessing_shader.cpp" />
<ClCompile Include="postprocessing_shadergen.cpp" /> <ClCompile Include="postprocessing_shadergen.cpp" />
<ClCompile Include="sdl_initializer.cpp">
<ExcludedFromBuild Condition="'$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="sdl_input_source.cpp" /> <ClCompile Include="sdl_input_source.cpp" />
<ClCompile Include="vulkan_host_display.cpp"> <ClCompile Include="vulkan_host_display.cpp">
<ExcludedFromBuild Condition="'$(Platform)'=='ARM64' Or '$(BuildingForUWP)'=='true'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Platform)'=='ARM64' Or '$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>
@ -77,9 +74,6 @@
<ClInclude Include="postprocessing_chain.h" /> <ClInclude Include="postprocessing_chain.h" />
<ClInclude Include="postprocessing_shader.h" /> <ClInclude Include="postprocessing_shader.h" />
<ClInclude Include="postprocessing_shadergen.h" /> <ClInclude Include="postprocessing_shadergen.h" />
<ClInclude Include="sdl_initializer.h">
<ExcludedFromBuild Condition="'$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="sdl_input_source.h" /> <ClInclude Include="sdl_input_source.h" />
<ClInclude Include="vulkan_host_display.h"> <ClInclude Include="vulkan_host_display.h">
<ExcludedFromBuild Condition="'$(Platform)'=='ARM64' Or '$(BuildingForUWP)'=='true'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Platform)'=='ARM64' Or '$(BuildingForUWP)'=='true'">true</ExcludedFromBuild>

View file

@ -2,7 +2,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup> <ItemGroup>
<ClCompile Include="icon.cpp" /> <ClCompile Include="icon.cpp" />
<ClCompile Include="sdl_initializer.cpp" />
<ClCompile Include="common_host.cpp" /> <ClCompile Include="common_host.cpp" />
<ClCompile Include="vulkan_host_display.cpp" /> <ClCompile Include="vulkan_host_display.cpp" />
<ClCompile Include="d3d11_host_display.cpp" /> <ClCompile Include="d3d11_host_display.cpp" />
@ -34,7 +33,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="icon.h" /> <ClInclude Include="icon.h" />
<ClInclude Include="sdl_initializer.h" />
<ClInclude Include="common_host.h" /> <ClInclude Include="common_host.h" />
<ClInclude Include="vulkan_host_display.h" /> <ClInclude Include="vulkan_host_display.h" />
<ClInclude Include="d3d11_host_display.h" /> <ClInclude Include="d3d11_host_display.h" />

View file

@ -1,21 +0,0 @@
#include "sdl_initializer.h"
#include "common/assert.h"
#include <SDL.h>
namespace FrontendCommon {
static bool s_sdl_initialized = false;
void EnsureSDLInitialized()
{
if (s_sdl_initialized)
return;
if (SDL_Init(0) < 0)
{
Panic("SDL_Init(0) failed");
return;
}
s_sdl_initialized = true;
}
} // namespace FrontendCommon

View file

@ -1,5 +0,0 @@
#pragma once
namespace FrontendCommon {
void EnsureSDLInitialized();
}