Misc: Purge unused definitions

This commit is contained in:
Connor McLaughlin 2022-03-26 22:55:01 +10:00
parent ad26d352d3
commit cb51ab7197
5 changed files with 9 additions and 39 deletions

View File

@ -1,16 +1,9 @@
if(BUILD_LIBRETRO_CORE)
add_definitions("-DLIBRETRO=1")
endif()
add_subdirectory(common) add_subdirectory(common)
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(scmversion) add_subdirectory(scmversion)
add_subdirectory(frontend-common)
if(NOT BUILD_LIBRETRO_CORE) if(NOT ANDROID)
add_subdirectory(frontend-common)
endif()
if(NOT BUILD_LIBRETRO_CORE AND NOT ANDROID)
add_subdirectory(common-tests) add_subdirectory(common-tests)
if(WIN32) if(WIN32)
add_subdirectory(updater) add_subdirectory(updater)
@ -25,10 +18,6 @@ if(BUILD_QT_FRONTEND)
add_subdirectory(duckstation-qt) add_subdirectory(duckstation-qt)
endif() endif()
if(BUILD_LIBRETRO_CORE)
add_subdirectory(duckstation-libretro)
endif()
if(BUILD_REGTEST) if(BUILD_REGTEST)
add_subdirectory(duckstation-regtest) add_subdirectory(duckstation-regtest)
endif() endif()

View File

@ -146,20 +146,15 @@ if(WIN32)
d3d11/stream_buffer.h d3d11/stream_buffer.h
d3d11/texture.cpp d3d11/texture.cpp
d3d11/texture.h d3d11/texture.h
windows_headers.h
)
target_link_libraries(common PRIVATE d3dcompiler.lib)
if(NOT LIBRETRO)
target_sources(common PRIVATE
gl/context_wgl.cpp gl/context_wgl.cpp
gl/context_wgl.h gl/context_wgl.h
thirdparty/StackWalker.cpp thirdparty/StackWalker.cpp
thirdparty/StackWalker.h thirdparty/StackWalker.h
win32_progress_callback.cpp win32_progress_callback.cpp
win32_progress_callback.h win32_progress_callback.h
windows_headers.h
) )
endif() target_link_libraries(common PRIVATE d3dcompiler.lib)
endif() endif()
if(ANDROID) if(ANDROID)
@ -245,9 +240,6 @@ endif()
if(APPLE) if(APPLE)
# Needed for Vulkan Swap Chain. # Needed for Vulkan Swap Chain.
target_link_libraries(common PRIVATE "objc") target_link_libraries(common PRIVATE "objc")
endif()
if(APPLE AND NOT BUILD_LIBRETRO_CORE)
target_sources(common PRIVATE target_sources(common PRIVATE
gl/context_agl.mm gl/context_agl.mm
gl/context_agl.h gl/context_agl.h

View File

@ -113,15 +113,7 @@ static std::string GetFileMappingName()
#error Unknown platform. #error Unknown platform.
#endif #endif
#ifdef LIBRETRO const std::string ret(StringUtil::StdStringFromFormat("duckstation_%u", pid));
// libretro second-instance runahead is insane, and loads a second copy of the module in the same process, which means
// we'd overlap the memory mapping for the "primary" core. Work around this by taking the address of this function,
// which should be unique per instance.
std::string ret(StringUtil::StdStringFromFormat("duckstation_%u_%p", pid, ((void*)&GetFileMappingName)));
#else
std::string ret(StringUtil::StdStringFromFormat("duckstation_%u", pid));
#endif
Log_InfoPrintf("File mapping name: %s", ret.c_str()); Log_InfoPrintf("File mapping name: %s", ret.c_str());
return ret; return ret;
} }

View File

@ -124,9 +124,7 @@ bool InitializeGlslang()
return false; return false;
} }
#ifndef LIBRETRO
std::atexit([]() { glslang::FinalizeProcess(); }); std::atexit([]() { glslang::FinalizeProcess(); });
#endif
glslang_initialized = true; glslang_initialized = true;
return true; return true;

View File

@ -14,7 +14,6 @@ struct WindowInfo
MacOS, MacOS,
Android, Android,
Display, Display,
Libretro,
}; };
enum class SurfaceFormat enum class SurfaceFormat