From 3415e23105cf92dd34e566fbb6215cc2abaaef18 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Tue, 13 Feb 2024 20:15:03 +0100 Subject: [PATCH 1/4] delete-artifact keeps failing PR CI even when you tell it not to fail on error so I guess we're just not using it. --- .github/workflows/build-macos.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 349f99d2..1d4b9171 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -43,6 +43,7 @@ jobs: with: name: macOS-${{ matrix.arch }} path: macOS-${{ matrix.arch }}.zip + retention-days: 1 universal-binary: name: Universal binary @@ -75,10 +76,10 @@ jobs: with: name: macOS-universal path: macOS-universal.zip - - name: Clean up architecture-specific artifacts - uses: geekyeggo/delete-artifact@v4 - with: - failOnError: false - name: | - macOS-x86_64 - macOS-arm64 +# - name: Clean up architecture-specific artifacts +# uses: geekyeggo/delete-artifact@v4 +# with: +# failOnError: false +# name: | +# macOS-x86_64 +# macOS-arm64 From a8429af13150dcdb81fbb9aeb1b66b7c5ece582d Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:17:29 -0500 Subject: [PATCH 2/4] dont make a save file on launching a game (#1974) avoids the issue of saves being created for roms that dont use save files. --- src/frontend/qt_sdl/Platform.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/frontend/qt_sdl/Platform.cpp b/src/frontend/qt_sdl/Platform.cpp index 9bb19d1a..0cd4f615 100644 --- a/src/frontend/qt_sdl/Platform.cpp +++ b/src/frontend/qt_sdl/Platform.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "Platform.h" @@ -333,13 +334,29 @@ bool LocalFileExists(const std::string& name) bool CheckFileWritable(const std::string& filepath) { - FileHandle* file = Platform::OpenFile(filepath.c_str(), FileMode::Append); + FileHandle* file = Platform::OpenFile(filepath.c_str(), FileMode::Read); + if (file) { + // if the file exists, check if it can be opened for writing. Platform::CloseFile(file); - return true; + file = Platform::OpenFile(filepath.c_str(), FileMode::Append); + if (file) + { + Platform::CloseFile(file); + return true; + } + else return false; + } + else + { + // if the file does not exist, create a temporary file to check, to avoid creating an empty file. + if (QTemporaryFile(filepath.c_str()).open()) + { + return true; + } + else return false; } - else return false; } bool CheckLocalFileWritable(const std::string& name) From 9430502b16c0b4f1f82cd31d79beff15edd00762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=BBP=2E=28P=20izzy=29?= Date: Mon, 19 Feb 2024 20:33:39 -0600 Subject: [PATCH 3/4] fix malloc on OpenBSD targets (#1979) --- src/frontend/duckstation/gl/context.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/frontend/duckstation/gl/context.cpp b/src/frontend/duckstation/gl/context.cpp index a0a4183b..308b3c40 100644 --- a/src/frontend/duckstation/gl/context.cpp +++ b/src/frontend/duckstation/gl/context.cpp @@ -3,11 +3,7 @@ #include "loader.h" #include #include -#ifdef __APPLE__ #include -#else -#include -#endif Log_SetChannel(GL::Context); #if defined(_WIN32) From 21e2a876ec7392eb3d8d2c4d0f0aee5cd9a298f0 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sat, 24 Feb 2024 01:47:04 +0100 Subject: [PATCH 4/4] build teakra's test_generator.cpp only if building its unit tests is enabled speeds up builds a bit --- src/teakra/src/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/teakra/src/CMakeLists.txt b/src/teakra/src/CMakeLists.txt index b96c500b..30683374 100644 --- a/src/teakra/src/CMakeLists.txt +++ b/src/teakra/src/CMakeLists.txt @@ -32,11 +32,16 @@ add_library(teakra register.h shared_memory.h teakra.cpp - test.h - test_generator.cpp - test_generator.h ) +if (TEAKRA_BUILD_UNIT_TESTS) + target_sources(teakra PUBLIC + test.h + test_generator.cpp + test_generator.h + ) +endif() + create_target_directory_groups(teakra) target_link_libraries(teakra PRIVATE Threads::Threads)