Remove libretro core - core will now be maintained by libretro

libretro have agreed to take over maintenance of the core.

Please see their fork at https://github.com/libretro/duckstation if you
wish to continue to use it.
This commit is contained in:
Connor McLaughlin
2021-01-08 01:11:19 +10:00
parent 573c8370d7
commit 419726f4cc
42 changed files with 108 additions and 8065 deletions

View File

@ -1,6 +1,24 @@
add_library(frontend-common
common_host_interface.cpp
common_host_interface.h
controller_interface.cpp
controller_interface.h
cubeb_audio_stream.cpp
cubeb_audio_stream.h
game_list.cpp
game_list.h
game_settings.cpp
game_settings.h
icon.cpp
icon.h
ini_settings_interface.cpp
ini_settings_interface.h
imgui_impl_opengl3.cpp
imgui_impl_opengl3.h
imgui_impl_vulkan.cpp
imgui_impl_vulkan.h
imgui_styles.cpp
imgui_styles.h
opengl_host_display.cpp
opengl_host_display.h
postprocessing_chain.cpp
@ -9,97 +27,55 @@ add_library(frontend-common
postprocessing_shader.h
postprocessing_shadergen.cpp
postprocessing_shadergen.h
save_state_selector_ui.cpp
save_state_selector_ui.h
vulkan_host_display.cpp
vulkan_host_display.h
)
target_link_libraries(frontend-common PUBLIC core common glad vulkan-loader)
target_compile_definitions(frontend-common PRIVATE "WITH_IMGUI=1")
target_link_libraries(frontend-common PUBLIC core common glad vulkan-loader cubeb imgui simpleini tinyxml2 scmversion)
if(WIN32)
target_sources(frontend-common PRIVATE
d3d11_host_display.cpp
d3d11_host_display.h
dinput_controller_interface.cpp
dinput_controller_interface.h
imgui_impl_dx11.cpp
imgui_impl_dx11.h
xinput_controller_interface.cpp
xinput_controller_interface.h
)
target_link_libraries(frontend-common PRIVATE d3d11.lib dxgi.lib)
endif()
if(NOT BUILD_LIBRETRO_CORE)
target_sources(frontend-common PRIVATE
imgui_impl_opengl3.h
imgui_impl_opengl3.cpp
)
target_sources(frontend-common PRIVATE
imgui_impl_vulkan.h
imgui_impl_vulkan.cpp
if(SDL2_FOUND)
target_sources(frontend-common PRIVATE
sdl_audio_stream.cpp
sdl_audio_stream.h
sdl_controller_interface.cpp
sdl_controller_interface.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})
target_link_libraries(frontend-common PRIVATE ${SDL2_LIBRARIES})
# Copy bundled SDL2 to output on Windows.
if(WIN32)
target_sources(frontend-common PRIVATE
imgui_impl_dx11.h
imgui_impl_dx11.cpp
)
add_custom_command(TARGET frontend-common POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SDL2_DLL_PATH}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SDL2.dll")
endif()
target_sources(frontend-common PRIVATE
common_host_interface.cpp
common_host_interface.h
controller_interface.cpp
controller_interface.h
cubeb_audio_stream.cpp
cubeb_audio_stream.h
game_list.cpp
game_list.h
icon.cpp
icon.h
imgui_styles.cpp
imgui_styles.h
ini_settings_interface.cpp
ini_settings_interface.h
save_state_selector_ui.cpp
save_state_selector_ui.h
)
if(WIN32)
target_sources(frontend-common PRIVATE
dinput_controller_interface.cpp
dinput_controller_interface.h
xinput_controller_interface.cpp
xinput_controller_interface.h
)
endif()
target_compile_definitions(frontend-common PRIVATE "WITH_IMGUI=1")
target_link_libraries(frontend-common PUBLIC cubeb imgui simpleini tinyxml2 scmversion)
if(SDL2_FOUND)
target_sources(frontend-common PRIVATE
sdl_audio_stream.cpp
sdl_audio_stream.h
sdl_controller_interface.cpp
sdl_controller_interface.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})
target_link_libraries(frontend-common PRIVATE ${SDL2_LIBRARIES})
# Copy bundled SDL2 to output on Windows.
if(WIN32)
add_custom_command(TARGET frontend-common POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SDL2_DLL_PATH}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SDL2.dll")
endif()
endif()
if(ENABLE_DISCORD_PRESENCE AND NOT BUILD_LIBRETRO_CORE)
target_compile_definitions(frontend-common PUBLIC -DWITH_DISCORD_PRESENCE=1)
target_link_libraries(frontend-common PRIVATE discord-rpc)
endif()
# Copy the provided data directory to the output directory.
add_custom_command(TARGET frontend-common POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/data" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
)
endif()
if(ENABLE_DISCORD_PRESENCE)
target_compile_definitions(frontend-common PUBLIC -DWITH_DISCORD_PRESENCE=1)
target_link_libraries(frontend-common PRIVATE discord-rpc)
endif()
# Copy the provided data directory to the output directory.
add_custom_command(TARGET frontend-common POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/data" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
)

View File

@ -344,11 +344,8 @@ bool D3D11HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view
bool D3D11HostDisplay::InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
bool threaded_presentation)
{
if (m_window_info.type != WindowInfo::Type::Surfaceless && m_window_info.type != WindowInfo::Type::Libretro &&
!CreateSwapChain(nullptr))
{
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain(nullptr))
return false;
}
if (!CreateResources())
return false;

View File

@ -11,12 +11,10 @@
#include <utility>
Log_SetChannel(GameSettings);
#ifndef LIBRETRO
#ifdef WIN32
#include "common/windows_headers.h"
#endif
#include "SimpleIni.h"
#endif
namespace GameSettings {
@ -183,8 +181,6 @@ bool Entry::SaveToStream(ByteStream* stream) const
WriteStringToStream(stream, memory_card_2_shared_path) && WriteStringToStream(stream, input_profile_name);
}
#ifndef LIBRETRO
static void ParseIniSection(Entry* entry, const char* section, const CSimpleIniA& ini)
{
for (u32 trait = 0; trait < static_cast<u32>(Trait::Count); trait++)
@ -897,8 +893,6 @@ void Entry::SetValueForKey(const std::string_view& key, const std::optional<std:
SetEntryValueForKey(*this, key, value);
}
#endif
void Entry::ApplySettings(bool display_osd_messages) const
{
constexpr float osd_duration = 10.0f;

View File

@ -93,8 +93,6 @@ struct Entry
void SetValueForKey(const std::string_view& key, const std::optional<std::string>& value);
};
#ifndef LIBRETRO
class Database
{
public:
@ -110,6 +108,4 @@ private:
std::unordered_map<std::string, Entry> m_entries;
};
#endif
}; // namespace GameSettings

View File

@ -9,7 +9,7 @@
#include "imgui_impl_opengl3.h"
#endif
#include "postprocessing_shadergen.h"
Log_SetChannel(LibretroOpenGLHostDisplay);
Log_SetChannel(OpenGLHostDisplay);
namespace FrontendCommon {

View File

@ -499,7 +499,6 @@ void main()
void VulkanHostDisplay::DestroyResources()
{
#ifndef LIBRETRO
Vulkan::Util::SafeDestroyPipelineLayout(m_post_process_pipeline_layout);
Vulkan::Util::SafeDestroyPipelineLayout(m_post_process_ubo_pipeline_layout);
Vulkan::Util::SafeDestroyDescriptorSetLayout(m_post_process_descriptor_set_layout);
@ -509,7 +508,6 @@ void VulkanHostDisplay::DestroyResources()
m_post_processing_stages.clear();
m_post_processing_ubo.Destroy(true);
m_post_processing_chain.ClearStages();
#endif
m_display_pixels_texture.Destroy(false);
m_readback_staging_texture.Destroy(false);