diff --git a/dep/msvc/vsprops/SDL2Compile.props b/dep/msvc/vsprops/SDL2Compile.props
index 96ec97500..87ffdcca2 100644
--- a/dep/msvc/vsprops/SDL2Compile.props
+++ b/dep/msvc/vsprops/SDL2Compile.props
@@ -13,6 +13,11 @@
$(SDL2Dir)lib64;%(AdditionalLibraryDirectories)
SDL2.lib;%(AdditionalDependencies)
+
+ $(SDL2Dir)lib32;%(AdditionalLibraryDirectories)
+ $(SDL2Dir)lib64;%(AdditionalLibraryDirectories)
+ SDL2.lib;%(AdditionalDependencies)
+
diff --git a/duckstation.sln b/duckstation.sln
index 041bd6484..07671de9e 100644
--- a/duckstation.sln
+++ b/duckstation.sln
@@ -39,6 +39,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lzma", "dep\lzma\lzma.vcxpr
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duckstation-sdl", "src\duckstation-sdl\duckstation-sdl.vcxproj", "{DAA8F93D-9C17-4DE2-BD0B-57891E0FF0D9}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frontend-common", "src\frontend-common\frontend-common.vcxproj", "{6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -323,6 +325,22 @@ Global
{DAA8F93D-9C17-4DE2-BD0B-57891E0FF0D9}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
{DAA8F93D-9C17-4DE2-BD0B-57891E0FF0D9}.ReleaseLTCG|x86.ActiveCfg = ReleaseLTCG|Win32
{DAA8F93D-9C17-4DE2-BD0B-57891E0FF0D9}.ReleaseLTCG|x86.Build.0 = ReleaseLTCG|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Debug|x64.ActiveCfg = Debug|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Debug|x64.Build.0 = Debug|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Debug|x86.ActiveCfg = Debug|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Debug|x86.Build.0 = Debug|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugFast|x64.ActiveCfg = DebugFast|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugFast|x64.Build.0 = DebugFast|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugFast|x86.ActiveCfg = DebugFast|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugFast|x86.Build.0 = DebugFast|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Release|x64.ActiveCfg = Release|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Release|x64.Build.0 = Release|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Release|x86.ActiveCfg = Release|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.Release|x86.Build.0 = Release|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseLTCG|x86.ActiveCfg = ReleaseLTCG|Win32
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseLTCG|x86.Build.0 = ReleaseLTCG|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 07e2e299a..33527b7eb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,6 @@
add_subdirectory(common)
add_subdirectory(core)
+add_subdirectory(frontend-common)
if(BUILD_SDL_FRONTEND)
add_subdirectory(duckstation-sdl)
diff --git a/src/duckstation-qt/duckstation-qt.vcxproj b/src/duckstation-qt/duckstation-qt.vcxproj
index 22cba77f4..c058c3dbf 100644
--- a/src/duckstation-qt/duckstation-qt.vcxproj
+++ b/src/duckstation-qt/duckstation-qt.vcxproj
@@ -88,6 +88,9 @@
{868b98c8-65a1-494b-8346-250a73a48c0a}
+
+ {6245dec8-d2da-47ee-a373-cbd6fcf3ece6}
+
diff --git a/src/duckstation-sdl/CMakeLists.txt b/src/duckstation-sdl/CMakeLists.txt
index 413896a50..35bd899d1 100644
--- a/src/duckstation-sdl/CMakeLists.txt
+++ b/src/duckstation-sdl/CMakeLists.txt
@@ -1,15 +1,9 @@
add_executable(duckstation-sdl
- icon.cpp
- icon.h
imgui_impl_sdl.cpp
imgui_impl_sdl.h
- imgui_styles.cpp
- imgui_styles.h
main.cpp
opengl_host_display.cpp
opengl_host_display.h
- sdl_audio_stream.cpp
- sdl_audio_stream.h
sdl_host_interface.cpp
sdl_host_interface.h
sdl_settings_interface.cpp
@@ -17,7 +11,7 @@ add_executable(duckstation-sdl
)
target_include_directories(duckstation-sdl PRIVATE ${SDL2_INCLUDE_DIRS})
-target_link_libraries(duckstation-sdl PRIVATE core common imgui nativefiledialog glad simpleini ${SDL2_LIBRARIES})
+target_link_libraries(duckstation-sdl PRIVATE core common imgui nativefiledialog glad simpleini frontend-common ${SDL2_LIBRARIES})
if(WIN32)
target_sources(duckstation-sdl PRIVATE
@@ -26,3 +20,4 @@ if(WIN32)
)
target_link_libraries(duckstation-sdl PRIVATE d3d11.lib dxgi.lib winmm.lib ${SDL2MAIN_LIBRARIES})
endif()
+
diff --git a/src/duckstation-sdl/duckstation-sdl.vcxproj b/src/duckstation-sdl/duckstation-sdl.vcxproj
index 07544648c..80db3b834 100644
--- a/src/duckstation-sdl/duckstation-sdl.vcxproj
+++ b/src/duckstation-sdl/duckstation-sdl.vcxproj
@@ -47,14 +47,14 @@
{868b98c8-65a1-494b-8346-250a73a48c0a}
+
+ {6245dec8-d2da-47ee-a373-cbd6fcf3ece6}
+
-
-
-
@@ -62,10 +62,7 @@
-
-
-
@@ -392,4 +389,4 @@
-
\ No newline at end of file
+
diff --git a/src/duckstation-sdl/duckstation-sdl.vcxproj.filters b/src/duckstation-sdl/duckstation-sdl.vcxproj.filters
index bac219152..0d8aef02b 100644
--- a/src/duckstation-sdl/duckstation-sdl.vcxproj.filters
+++ b/src/duckstation-sdl/duckstation-sdl.vcxproj.filters
@@ -2,22 +2,16 @@
-
-
-
-
-
-
diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp
index dfb50d43f..009edcb41 100644
--- a/src/duckstation-sdl/sdl_host_interface.cpp
+++ b/src/duckstation-sdl/sdl_host_interface.cpp
@@ -7,11 +7,11 @@
#include "core/gpu.h"
#include "core/host_display.h"
#include "core/system.h"
-#include "icon.h"
#include "imgui_impl_sdl.h"
-#include "imgui_styles.h"
+#include "frontend-common/icon.h"
+#include "frontend-common/imgui_styles.h"
+#include "frontend-common/sdl_audio_stream.h"
#include "opengl_host_display.h"
-#include "sdl_audio_stream.h"
#include "sdl_settings_interface.h"
#include
#include
diff --git a/src/frontend-common/CMakeLists.txt b/src/frontend-common/CMakeLists.txt
new file mode 100644
index 000000000..134c750d9
--- /dev/null
+++ b/src/frontend-common/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_library(frontend-common
+ icon.cpp
+ icon.h
+ imgui_styles.cpp
+ imgui_styles.h
+ sdl_audio_stream.cpp
+ sdl_audio_stream.h
+)
+
+target_include_directories(frontend-common PRIVATE ${SDL2_INCLUDE_DIRS})
+target_link_libraries(frontend-common PRIVATE core common imgui ${SDL2_LIBRARIES})
+
diff --git a/src/duckstation-sdl/font_roboto_regular.inl b/src/frontend-common/font_roboto_regular.inl
similarity index 100%
rename from src/duckstation-sdl/font_roboto_regular.inl
rename to src/frontend-common/font_roboto_regular.inl
diff --git a/src/frontend-common/frontend-common.vcxproj b/src/frontend-common/frontend-common.vcxproj
new file mode 100644
index 000000000..e86f81745
--- /dev/null
+++ b/src/frontend-common/frontend-common.vcxproj
@@ -0,0 +1,431 @@
+
+
+
+
+ DebugFast
+ Win32
+
+
+ DebugFast
+ x64
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ ReleaseLTCG
+ Win32
+
+
+ ReleaseLTCG
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+
+ {72f9423c-91ee-4487-aac6-555ed6f61aa1}
+
+
+ {43540154-9e1e-409c-834f-b84be5621388}
+
+
+ {6a4208ed-e3dc-41e1-81cd-f61025fc285a}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}
+ Win32Proj
+ frontend-common
+ 10.0
+ frontend-common
+
+
+
+
+
+
+ StaticLibrary
+ true
+ NotSet
+ v142
+
+
+ StaticLibrary
+ true
+ NotSet
+ v142
+
+
+ StaticLibrary
+ true
+ NotSet
+ v142
+
+
+ StaticLibrary
+ true
+ NotSet
+ v142
+
+
+ StaticLibrary
+ false
+ true
+ NotSet
+ v142
+
+
+ StaticLibrary
+ false
+ true
+ NotSet
+ v142
+
+
+ StaticLibrary
+ false
+ true
+ NotSet
+ v142
+
+
+ StaticLibrary
+ false
+ true
+ NotSet
+ v142
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+ true
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+ true
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+ true
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+ false
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+ false
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+ false
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+ false
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+ $(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ProgramDatabase
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ true
+ stdcpp17
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32-debug;%(AdditionalLibraryDirectories)
+
+
+
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)\dep\msvc\lib32-debug;%(AdditionalLibraryDirectories)
+
+
+
+
+
+
+ Level3
+ Disabled
+ _ITERATOR_DEBUG_LEVEL=1;WIN32;_DEBUGFAST;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ProgramDatabase
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ Default
+ false
+ true
+ stdcpp17
+ OnlyExplicitInline
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32-debug;%(AdditionalLibraryDirectories)
+
+
+
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)\dep\msvc\lib32-debug;%(AdditionalLibraryDirectories)
+
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ProgramDatabase
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ true
+ stdcpp17
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32-debug;%(AdditionalLibraryDirectories)
+
+
+
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)\dep\msvc\lib64-debug;%(AdditionalLibraryDirectories)
+
+
+
+
+
+
+ Level3
+ Disabled
+ _ITERATOR_DEBUG_LEVEL=1;WIN32;_DEBUGFAST;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ ProgramDatabase
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ Default
+ false
+ true
+ stdcpp17
+ OnlyExplicitInline
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32-debug;%(AdditionalLibraryDirectories)
+
+
+
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)\dep\msvc\lib64-debug;%(AdditionalLibraryDirectories)
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ true
+ stdcpp17
+ false
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ true
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32;%(AdditionalLibraryDirectories)
+
+
+
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ true
+ true
+ stdcpp17
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ true
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32;%(AdditionalLibraryDirectories)
+
+
+
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)\dep\msvc\lib32;%(AdditionalLibraryDirectories)
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ true
+ stdcpp17
+ false
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ true
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32;%(AdditionalLibraryDirectories)
+
+
+
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ $(SolutionDir)dep\msvc\include\SDL;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)
+ true
+ true
+ stdcpp17
+ true
+ $(IntDir)/%(RelativeDir)/
+
+
+ Console
+ true
+ true
+ true
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)dep\msvc\lib32;%(AdditionalLibraryDirectories)
+
+
+
+ SDL2.lib;%(AdditionalDependencies)
+ $(SolutionDir)\dep\msvc\lib64;%(AdditionalLibraryDirectories)
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/frontend-common/frontend-common.vcxproj.filters b/src/frontend-common/frontend-common.vcxproj.filters
new file mode 100644
index 000000000..9b1e945a7
--- /dev/null
+++ b/src/frontend-common/frontend-common.vcxproj.filters
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/duckstation-sdl/icon.cpp b/src/frontend-common/icon.cpp
similarity index 100%
rename from src/duckstation-sdl/icon.cpp
rename to src/frontend-common/icon.cpp
diff --git a/src/duckstation-sdl/icon.h b/src/frontend-common/icon.h
similarity index 100%
rename from src/duckstation-sdl/icon.h
rename to src/frontend-common/icon.h
diff --git a/src/duckstation-sdl/imgui_styles.cpp b/src/frontend-common/imgui_styles.cpp
similarity index 100%
rename from src/duckstation-sdl/imgui_styles.cpp
rename to src/frontend-common/imgui_styles.cpp
diff --git a/src/duckstation-sdl/imgui_styles.h b/src/frontend-common/imgui_styles.h
similarity index 100%
rename from src/duckstation-sdl/imgui_styles.h
rename to src/frontend-common/imgui_styles.h
diff --git a/src/duckstation-sdl/sdl_audio_stream.cpp b/src/frontend-common/sdl_audio_stream.cpp
similarity index 100%
rename from src/duckstation-sdl/sdl_audio_stream.cpp
rename to src/frontend-common/sdl_audio_stream.cpp
diff --git a/src/duckstation-sdl/sdl_audio_stream.h b/src/frontend-common/sdl_audio_stream.h
similarity index 100%
rename from src/duckstation-sdl/sdl_audio_stream.h
rename to src/frontend-common/sdl_audio_stream.h