From 31a17cd3c61d67862a5d55068a86984f33c2c0b4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 4 Aug 2022 21:35:31 +1000 Subject: [PATCH] FrontendCommon: Remove SDLInitializer Not needed anymore. --- src/frontend-common/CMakeLists.txt | 2 -- src/frontend-common/frontend-common.vcxproj | 6 ------ .../frontend-common.vcxproj.filters | 2 -- src/frontend-common/sdl_initializer.cpp | 21 ------------------- src/frontend-common/sdl_initializer.h | 5 ----- 5 files changed, 36 deletions(-) delete mode 100644 src/frontend-common/sdl_initializer.cpp delete mode 100644 src/frontend-common/sdl_initializer.h diff --git a/src/frontend-common/CMakeLists.txt b/src/frontend-common/CMakeLists.txt index ed5f12923..9a090e70f 100644 --- a/src/frontend-common/CMakeLists.txt +++ b/src/frontend-common/CMakeLists.txt @@ -90,8 +90,6 @@ if(SDL2_FOUND) target_sources(frontend-common PRIVATE sdl_input_source.cpp sdl_input_source.h - sdl_initializer.cpp - sdl_initializer.h ) target_compile_definitions(frontend-common PUBLIC "WITH_SDL2=1") target_include_directories(frontend-common PRIVATE ${SDL2_INCLUDE_DIRS}) diff --git a/src/frontend-common/frontend-common.vcxproj b/src/frontend-common/frontend-common.vcxproj index 92819c77a..4e34c63fb 100644 --- a/src/frontend-common/frontend-common.vcxproj +++ b/src/frontend-common/frontend-common.vcxproj @@ -34,9 +34,6 @@ - - true - true @@ -77,9 +74,6 @@ - - true - true diff --git a/src/frontend-common/frontend-common.vcxproj.filters b/src/frontend-common/frontend-common.vcxproj.filters index 8b47d2e3e..b7d37a9ff 100644 --- a/src/frontend-common/frontend-common.vcxproj.filters +++ b/src/frontend-common/frontend-common.vcxproj.filters @@ -2,7 +2,6 @@ - @@ -34,7 +33,6 @@ - diff --git a/src/frontend-common/sdl_initializer.cpp b/src/frontend-common/sdl_initializer.cpp deleted file mode 100644 index e69e6b204..000000000 --- a/src/frontend-common/sdl_initializer.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "sdl_initializer.h" -#include "common/assert.h" -#include - -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 diff --git a/src/frontend-common/sdl_initializer.h b/src/frontend-common/sdl_initializer.h deleted file mode 100644 index 22af3c439..000000000 --- a/src/frontend-common/sdl_initializer.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -namespace FrontendCommon { -void EnsureSDLInitialized(); -} \ No newline at end of file