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(core)
add_subdirectory(scmversion)
add_subdirectory(frontend-common)
if(NOT BUILD_LIBRETRO_CORE)
add_subdirectory(frontend-common)
endif()
if(NOT BUILD_LIBRETRO_CORE AND NOT ANDROID)
if(NOT ANDROID)
add_subdirectory(common-tests)
if(WIN32)
add_subdirectory(updater)
@ -25,10 +18,6 @@ if(BUILD_QT_FRONTEND)
add_subdirectory(duckstation-qt)
endif()
if(BUILD_LIBRETRO_CORE)
add_subdirectory(duckstation-libretro)
endif()
if(BUILD_REGTEST)
add_subdirectory(duckstation-regtest)
endif()

View file

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

View file

@ -113,15 +113,7 @@ static std::string GetFileMappingName()
#error Unknown platform.
#endif
#ifdef LIBRETRO
// 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
const std::string ret(StringUtil::StdStringFromFormat("duckstation_%u", pid));
Log_InfoPrintf("File mapping name: %s", ret.c_str());
return ret;
}

View file

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

View file

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