mingw64 gcc/clang support
All checks were successful
eden-license / license-header (pull_request) Successful in 23s
All checks were successful
eden-license / license-header (pull_request) Successful in 23s
removed unnecessary undefs in src\dynarmic\src\dynarmic\ir\opcodes.h removed unecessary #define stat _stat64 macro in src\core\file_sys\vfs\vfs_real.cpp add headers in src\core\file_sys\vfs\vfs_real.cpp disambiguation of formatters in src\video_core\texture_cache\formatter.h and src\common\logging\formatter.h fixed license heades fo broth fomratter.h files
This commit is contained in:
parent
b906abf9fc
commit
29c32d0f45
10 changed files with 58 additions and 17 deletions
|
@ -1,18 +1,26 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
// adapted from https://github.com/fmtlib/fmt/issues/2704
|
||||
// a generic formatter for enum classes
|
||||
// Opt-out trait for enums that have their own custom fmt::formatter specialization.
|
||||
namespace Common::Logging {
|
||||
template <class T>
|
||||
struct enable_generic_enum_formatter : std::true_type {};
|
||||
} // namespace Common::Logging
|
||||
|
||||
#if FMT_VERSION >= 80100
|
||||
template <typename T>
|
||||
struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>
|
||||
: formatter<std::underlying_type_t<T>> {
|
||||
struct fmt::formatter<
|
||||
T,
|
||||
std::enable_if_t<
|
||||
std::is_enum_v<T> &&
|
||||
Common::Logging::enable_generic_enum_formatter<T>::value,
|
||||
char>>
|
||||
: fmt::formatter<std::underlying_type_t<T>> {
|
||||
template <typename FormatContext>
|
||||
auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
|
||||
return fmt::formatter<std::underlying_type_t<T>>::format(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
@ -16,10 +16,6 @@
|
|||
// For FileTimeStampRaw
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define stat _stat64
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
#include "common/fs/fs_android.h"
|
||||
#endif
|
||||
|
@ -442,11 +438,12 @@ std::vector<VirtualFile> RealVfsDirectory::GetFiles() const {
|
|||
FileTimeStampRaw RealVfsDirectory::GetFileTimeStamp(std::string_view path_) const {
|
||||
const auto full_path = FS::SanitizePath(path + '/' + std::string(path_));
|
||||
const auto fs_path = std::filesystem::path{FS::ToU8String(full_path)};
|
||||
struct stat file_status;
|
||||
|
||||
#ifdef _WIN32
|
||||
struct _stat64 file_status;
|
||||
const auto stat_result = _wstat64(fs_path.c_str(), &file_status);
|
||||
#else
|
||||
struct stat file_status;
|
||||
const auto stat_result = stat(fs_path.c_str(), &file_status);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
#undef interface
|
||||
#include <wlanapi.h>
|
||||
#pragma pop_macro("interface")
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "wlanapi.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#include <wlanapi.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "wlanapi.lib")
|
||||
#endif
|
||||
#endif
|
||||
#include <common/settings.h>
|
||||
|
||||
#include <mutex>
|
||||
|
|
|
@ -15,8 +15,10 @@ using namespace std::chrono_literals;
|
|||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#include <wlanapi.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "wlanapi.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace Network {
|
||||
#ifdef ENABLE_WIFI_SCAN
|
||||
|
|
|
@ -23,6 +23,16 @@ enum class Opcode {
|
|||
#define OPCODE(name, type, ...) name,
|
||||
#define A32OPC(name, type, ...) A32##name,
|
||||
#define A64OPC(name, type, ...) A64##name,
|
||||
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#ifdef RotateRight32
|
||||
#undef RotateRight32
|
||||
#endif
|
||||
#ifdef RotateRight64
|
||||
#undef RotateRight64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "./opcodes.inc"
|
||||
#undef OPCODE
|
||||
#undef A32OPC
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -9,6 +9,12 @@
|
|||
|
||||
#include "video_core/surface.h"
|
||||
#include "video_core/texture_cache/types.h"
|
||||
#include "common/logging/formatter.h"
|
||||
|
||||
namespace Common::Logging {
|
||||
template <>
|
||||
struct enable_generic_enum_formatter<VideoCore::Surface::PixelFormat> : std::false_type {};
|
||||
}
|
||||
|
||||
template <>
|
||||
struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::string_view> {
|
||||
|
|
|
@ -506,4 +506,9 @@ endif()
|
|||
add_subdirectory(externals)
|
||||
target_link_libraries(yuzu PRIVATE QuaZip::QuaZip)
|
||||
|
||||
if (WIN32 AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
target_link_libraries(yuzu PRIVATE ws2_32 mswsock iphlpapi wlanapi dwmapi stdc++ winpthread)
|
||||
target_compile_definitions(yuzu PRIVATE SDL_MAIN_HANDLED)
|
||||
endif()
|
||||
|
||||
create_target_directory_groups(yuzu)
|
||||
|
|
|
@ -178,7 +178,11 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
|||
#include <QPlatformSurfaceEvent>
|
||||
#include <dwmapi.h>
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "Dwmapi.lib")
|
||||
#endif
|
||||
|
||||
|
||||
static inline void ApplyWindowsTitleBarDarkMode(HWND hwnd, bool enabled) {
|
||||
if (!hwnd)
|
||||
|
@ -386,7 +390,7 @@ static void OverrideWindowsFont() {
|
|||
}
|
||||
#endif
|
||||
|
||||
inline static bool isDarkMode() {
|
||||
[[maybe_unused]] inline static bool isDarkMode() {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
const auto scheme = QGuiApplication::styleHints()->colorScheme();
|
||||
return scheme == Qt::ColorScheme::Dark;
|
||||
|
|
|
@ -67,4 +67,9 @@ if (YUZU_USE_PRECOMPILED_HEADERS)
|
|||
target_precompile_headers(yuzu-cmd PRIVATE precompiled_headers.h)
|
||||
endif()
|
||||
|
||||
if (WIN32 AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
target_link_libraries(yuzu-cmd PRIVATE ws2_32 mswsock iphlpapi wlanapi dwmapi stdc++ winpthread)
|
||||
target_compile_definitions(yuzu-cmd PRIVATE SDL_MAIN_HANDLED)
|
||||
endif()
|
||||
|
||||
create_target_directory_groups(yuzu-cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue