diff options
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | externals/ffmpeg/CMakeLists.txt | 2 | ||||
-rw-r--r-- | externals/libusb/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 14 | ||||
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.h | 1 | ||||
-rw-r--r-- | src/core/hle/service/nfp/nfp_types.h | 2 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.cpp | 6 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 7 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 16 |
9 files changed, 44 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 20dd1383f..957df54f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,7 +252,7 @@ if(ENABLE_QT) endif() # Check for headers - Include(FindPkgConfig REQUIRED) + find_package(PkgConfig REQUIRED) pkg_check_modules(QT_DEP_GLU QUIET glu>=9.0.0) if (NOT QT_DEP_GLU_FOUND) message(FATAL_ERROR "Qt bundled pacakge dependency `glu` not found. \ @@ -386,7 +386,7 @@ endif() # Ensure libusb is properly configured (based on dolphin libusb include) if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB) - include(FindPkgConfig) + find_package(PkgConfig) if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD") pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24) else() @@ -410,7 +410,7 @@ set(FFmpeg_COMPONENTS swscale) if (UNIX AND NOT APPLE) - Include(FindPkgConfig REQUIRED) + find_package(PkgConfig REQUIRED) pkg_check_modules(LIBVA libva) endif() if (NOT YUZU_USE_BUNDLED_FFMPEG) diff --git a/externals/ffmpeg/CMakeLists.txt b/externals/ffmpeg/CMakeLists.txt index 20ad716ea..0baac8e17 100644 --- a/externals/ffmpeg/CMakeLists.txt +++ b/externals/ffmpeg/CMakeLists.txt @@ -43,7 +43,7 @@ if (NOT WIN32) CACHE PATH "Paths to FFmpeg libraries" FORCE) endforeach() - Include(FindPkgConfig REQUIRED) + find_package(PkgConfig REQUIRED) pkg_check_modules(LIBVA libva) pkg_check_modules(CUDA cuda) pkg_check_modules(FFNVCODEC ffnvcodec) diff --git a/externals/libusb/CMakeLists.txt b/externals/libusb/CMakeLists.txt index 055b89295..3cb1b3687 100644 --- a/externals/libusb/CMakeLists.txt +++ b/externals/libusb/CMakeLists.txt @@ -108,7 +108,7 @@ if (MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux") OR APPLE) target_include_directories(usb INTERFACE "${LIBUSB_INCLUDE_DIRS}") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - Include(FindPkgConfig) + find_package(PkgConfig) pkg_check_modules(LIBUDEV REQUIRED libudev) if (LIBUDEV_FOUND) diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index e23eae36a..c08274ef9 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -707,7 +707,7 @@ FSP_SRV::FSP_SRV(Core::System& system_) {31, nullptr, "OpenGameCardFileSystem"}, {32, nullptr, "ExtendSaveDataFileSystem"}, {33, nullptr, "DeleteCacheStorage"}, - {34, nullptr, "GetCacheStorageSize"}, + {34, &FSP_SRV::GetCacheStorageSize, "GetCacheStorageSize"}, {35, nullptr, "CreateSaveDataFileSystemByHashSalt"}, {36, nullptr, "OpenHostFileSystemWithOption"}, {51, &FSP_SRV::OpenSaveDataFileSystem, "OpenSaveDataFileSystem"}, @@ -1107,6 +1107,18 @@ void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) { rb.Push(access_log_program_index); } +void FSP_SRV::GetCacheStorageSize(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto index{rp.Pop<s32>()}; + + LOG_WARNING(Service_FS, "(STUBBED) called with index={}", index); + + IPC::ResponseBuilder rb{ctx, 6}; + rb.Push(ResultSuccess); + rb.Push(s64{0}); + rb.Push(s64{0}); +} + class IMultiCommitManager final : public ServiceFramework<IMultiCommitManager> { public: explicit IMultiCommitManager(Core::System& system_) diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h index 36f552e05..3d88b97f9 100644 --- a/src/core/hle/service/filesystem/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp_srv.h @@ -54,6 +54,7 @@ private: void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); void GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx); void OpenMultiCommitManager(Kernel::HLERequestContext& ctx); + void GetCacheStorageSize(Kernel::HLERequestContext& ctx); FileSystemController& fsc; const FileSys::ContentProvider& content_provider; diff --git a/src/core/hle/service/nfp/nfp_types.h b/src/core/hle/service/nfp/nfp_types.h index 867ea2f36..c09f9ddb6 100644 --- a/src/core/hle/service/nfp/nfp_types.h +++ b/src/core/hle/service/nfp/nfp_types.h @@ -167,7 +167,7 @@ struct AmiiboDate { bool IsValidDate() const { const bool is_day_valid = GetDay() > 0 && GetDay() < 32; - const bool is_month_valid = GetMonth() >= 0 && GetMonth() < 13; + const bool is_month_valid = GetMonth() > 0 && GetMonth() < 13; const bool is_year_valid = GetYear() >= 2000; return is_year_valid && is_month_valid && is_day_valid; } diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp index d96720b80..7934f2a51 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.cpp +++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp @@ -139,6 +139,7 @@ void Scheduler::WorkerThread(std::stop_token stop_token) { Common::SetCurrentThreadName("VulkanWorker"); do { std::unique_ptr<CommandChunk> work; + bool has_submit{false}; { std::unique_lock lock{work_mutex}; if (work_queue.empty()) { @@ -150,9 +151,10 @@ void Scheduler::WorkerThread(std::stop_token stop_token) { } work = std::move(work_queue.front()); work_queue.pop(); + + has_submit = work->HasSubmit(); + work->ExecuteAll(current_cmdbuf); } - const bool has_submit = work->HasSubmit(); - work->ExecuteAll(current_cmdbuf); if (has_submit) { AllocateWorkerCommandBuffer(); } diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 87e5d0f48..bd69d04a6 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -57,9 +57,10 @@ ConfigureGraphics::ConfigureGraphics(const Core::System& system_, QWidget* paren UpdateBackgroundColorButton(new_bg_color); }); - ui->api->setEnabled(!UISettings::values.has_broken_vulkan); - ui->api_widget->setEnabled(!UISettings::values.has_broken_vulkan || - Settings::IsConfiguringGlobal()); + ui->api->setEnabled(!UISettings::values.has_broken_vulkan && ui->api->isEnabled()); + ui->api_widget->setEnabled( + (!UISettings::values.has_broken_vulkan || Settings::IsConfiguringGlobal()) && + ui->api_widget->isEnabled()); ui->bg_label->setVisible(Settings::IsConfiguringGlobal()); ui->bg_combobox->setVisible(!Settings::IsConfiguringGlobal()); } diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 4146ebc2c..f45a25410 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -262,6 +262,18 @@ static QString PrettyProductName() { return QSysInfo::prettyProductName(); } +#ifdef _WIN32 +static void OverrideWindowsFont() { + // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrllic characters + // Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters. + const QString startup_font = QApplication::font().family(); + const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")}; + if (ugly_fonts.contains(startup_font)) { + QApplication::setFont(QFont(QStringLiteral("MS Shell Dlg 2"), 9, QFont::Normal)); + } +} +#endif + bool GMainWindow::CheckDarkMode() { #ifdef __linux__ const QPalette test_palette(qApp->palette()); @@ -4137,6 +4149,10 @@ int main(int argc, char* argv[]) { QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity); QApplication app(argc, argv); +#ifdef _WIN32 + OverrideWindowsFont(); +#endif + // Workaround for QTBUG-85409, for Suzhou numerals the number 1 is actually \u3021 // so we can see if we get \u3008 instead // TL;DR all other number formats are consecutive in unicode code points |