From ae49898b35ae8333bce8f95711766e1b328f6f09 Mon Sep 17 00:00:00 2001 From: Smiril Date: Sun, 12 May 2024 13:43:03 +0200 Subject: [PATCH] typo fix --- .../3rdparty/easy_profiler/src/profiler.cpp | 42 +++---------------- source/3rdparty/vulkan/source/print.cpp | 2 + source/launcher/src/MainDialog.cpp | 8 ++-- 3 files changed, 12 insertions(+), 40 deletions(-) diff --git a/source/3rdparty/easy_profiler/src/profiler.cpp b/source/3rdparty/easy_profiler/src/profiler.cpp index cb13be2..99364da 100644 --- a/source/3rdparty/easy_profiler/src/profiler.cpp +++ b/source/3rdparty/easy_profiler/src/profiler.cpp @@ -62,22 +62,15 @@ # endif #endif -#if !defined(EASY_PROFILER_VERSION_MAJOR) || !defined(EASY_PROFILER_VERSION_MINOR) || !defined(EASY_PROFILER_VERSION_PATCH) -# ifdef _WIN32 -# error EASY_PROFILER_VERSION_MAJOR and EASY_PROFILER_VERSION_MINOR and EASY_PROFILER_VERSION_PATCH macros must be defined -# else -# error "EASY_PROFILER_VERSION_MAJOR and EASY_PROFILER_VERSION_MINOR and EASY_PROFILER_VERSION_PATCH macros must be defined" -# endif -#endif -#define EASY_PROFILER_PRODUCT_VERSION "v" EASY_STRINGIFICATION(EASY_PROFILER_VERSION_MAJOR) "." \ - EASY_STRINGIFICATION(EASY_PROFILER_VERSION_MINOR) "." \ - EASY_STRINGIFICATION(EASY_PROFILER_VERSION_PATCH) +#define EASY_PROFILER_PRODUCT_VERSION "v" EASY_STRINGIFICATION(EASY_PROFILER_VERSION) "." \ + EASY_STRINGIFICATION(EASY_PROFILER_VERSION) "." \ + EASY_STRINGIFICATION(EASY_PROFILER_VERSION) extern const uint32_t EASY_PROFILER_SIGNATURE = ('E' << 24) | ('a' << 16) | ('s' << 8) | 'y'; -extern const uint32_t EASY_PROFILER_VERSION = (static_cast(EASY_PROFILER_VERSION_MAJOR) << 24) | - (static_cast(EASY_PROFILER_VERSION_MINOR) << 16) | - static_cast(EASY_PROFILER_VERSION_PATCH); +extern const uint32_t EASY_PROFILER_VERSION = (static_cast(EASY_PROFILER_VERSION) << 24) | + (static_cast(EASY_PROFILER_VERSION) << 16) | + static_cast(EASY_PROFILER_VERSION); #undef EASY_VERSION_INT @@ -85,29 +78,6 @@ extern const uint32_t EASY_PROFILER_VERSION = (static_cast(EASY_PROFIL extern "C" { -PROFILER_API uint8_t versionMajor() -{ - static_assert(0 <= EASY_PROFILER_VERSION_MAJOR && EASY_PROFILER_VERSION_MAJOR <= 255, - "EASY_PROFILER_VERSION_MAJOR must be defined in range [0, 255]"); - - return EASY_PROFILER_VERSION_MAJOR; -} - -PROFILER_API uint8_t versionMinor() -{ - static_assert(0 <= EASY_PROFILER_VERSION_MINOR && EASY_PROFILER_VERSION_MINOR <= 255, - "EASY_PROFILER_VERSION_MINOR must be defined in range [0, 255]"); - - return EASY_PROFILER_VERSION_MINOR; -} - -PROFILER_API uint16_t versionPatch() -{ - static_assert(0 <= EASY_PROFILER_VERSION_PATCH && EASY_PROFILER_VERSION_PATCH <= 65535, - "EASY_PROFILER_VERSION_PATCH must be defined in range [0, 65535]"); - - return EASY_PROFILER_VERSION_PATCH; -} PROFILER_API uint32_t version() { diff --git a/source/3rdparty/vulkan/source/print.cpp b/source/3rdparty/vulkan/source/print.cpp index 2418c5b..ac9b784 100644 --- a/source/3rdparty/vulkan/source/print.cpp +++ b/source/3rdparty/vulkan/source/print.cpp @@ -33,6 +33,7 @@ clr::blue::operator const char*() { return "\x1b[34m"; } } // namespace spvtools #elif defined(SPIRV_WINDOWS) +#if defined(WIN32) #include namespace spvtools { @@ -107,6 +108,7 @@ clr::blue::operator const char*() { } } // namespace spvtools +#endif #else namespace spvtools { diff --git a/source/launcher/src/MainDialog.cpp b/source/launcher/src/MainDialog.cpp index e307a05..0750dbc 100644 --- a/source/launcher/src/MainDialog.cpp +++ b/source/launcher/src/MainDialog.cpp @@ -27,7 +27,7 @@ #include "ui_main_dialog.h" -#ifndef __linux__ +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) #include // IWYU pragma: keep #endif @@ -37,7 +37,7 @@ class QWidget; -#ifdef __linux__ +#ifdef __linux__ || __APPLE__ constexpr char SCRIPT_EXE[] = "fc_script"; #else constexpr char SCRIPT_EXE[] = "fc_script.exe"; @@ -59,7 +59,7 @@ constexpr char KYTY_LOAD_SYMBOLS_ALL[] = "kyty_load_symbols_all"; constexpr char KYTY_LOAD_PARAM_SFO[] = "kyty_load_param_sfo"; constexpr char KYTY_INIT[] = "kyty_init"; constexpr char KYTY_LUA_FILE[] = "kyty_run.lua"; -#ifndef __linux__ +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) constexpr DWORD CMD_X_CHARS = 175; constexpr DWORD CMD_Y_CHARS = 1000; #endif @@ -359,7 +359,7 @@ void MainDialog::RunInterpreter(QProcess* process, Kyty::Configuration* info, [[ } #endif process->setWorkingDirectory(dir.path()); -#ifndef __linux__ +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) process->setCreateProcessArgumentsModifier( [](QProcess::CreateProcessArguments* args) {