Compare commits

...

4 Commits

Author SHA1 Message Date
Nikhil Narayana
1f8cec9cb6 ci: one more tiny fix 2025-05-16 15:10:26 -07:00
Nikhil Narayana
1867251a0f fix(ci): windows code signing duex 2025-05-16 14:58:30 -07:00
Nikhil Narayana
f5f2e601e9 fix: default to OpenGL for macOS Playback (#426)
* chore: fmt

* fix: default to OpenGL for macOS Playback

* refactor: remove macOS version check and update comment
2025-05-16 11:45:46 -07:00
Jas Laferriere
edf266bae3 chore: exclude VI memory from rollbacks
This probably isn't that important for Ishii as we haven't had this for forever but on mainline not having this would cause softlocks. Mostly just adding this for parity
2025-05-16 14:18:06 -04:00
3 changed files with 52 additions and 53 deletions

View File

@@ -140,9 +140,10 @@ jobs:
Invoke-WebRequest -Uri https://www.ssl.com/download/codesigntool-for-windows/ -UseBasicParsing -OutFile ".\CodeSignTool.zip"
7z x CodeSignTool.zip
Remove-Item CodeSignTool.zip
cd ..
} else {
cd .\CodeSignTool
}
./CodeSignTool/CodeSignTool.bat sign -credential_id="${{ secrets.ES_CREDENTIAL_ID }}" -username="${{ secrets.ES_USERNAME }}" -password="${{ secrets.ES_PASSWORD }}" -totp_secret="${{ secrets.ES_TOTP_SECRET }}" -input_file_path="${{ github.workspace }}\Binary\x64\Slippi Dolphin.exe" -override="true"
CodeSignTool.bat sign -credential_id="${{ secrets.ES_CREDENTIAL_ID }}" -username="${{ secrets.ES_USERNAME }}" -password="${{ secrets.ES_PASSWORD }}" -totp_secret="${{ secrets.ES_TOTP_SECRET }}" -input_file_path="${{ github.workspace }}\Binary\x64\Slippi Dolphin.exe" -override="true"
- name: "Package ${{ matrix.build_type }} Dolphin"
working-directory: ${{ github.workspace }}
run: |

View File

@@ -93,6 +93,9 @@ void SlippiSavestate::initBackupLocs()
{0x804d77bc, 0x4}, // ???
{0x804de7f0, 0x10}, // ???
// XFB / VI Memory
{0x804c0980, 0x15F8},
// Camera Blocks, Temporarily added here
//{0x80452c7c, 0x2B0}, // Cam Block 1, including gaps
//{0x806e516c, 0xA8}, // Cam Block 2, including gaps

View File

@@ -6,9 +6,10 @@
// TODO: ugly
#ifdef _WIN32
#include "VideoBackends/DX9/VideoBackend.h"
#include "VideoBackends/DX11/VideoBackend.h"
#include "VideoBackends/D3D12/VideoBackend.h"
#include "VideoBackends/DX11/VideoBackend.h"
#include "VideoBackends/DX9/VideoBackend.h"
#endif
#include "VideoBackends/OGL/VideoBackend.h"
#include "VideoBackends/Software/VideoBackend.h"
@@ -19,14 +20,15 @@
#endif
std::vector<std::unique_ptr<VideoBackendBase>> g_available_video_backends;
VideoBackendBase* g_video_backend = nullptr;
static VideoBackendBase* s_default_backend = nullptr;
VideoBackendBase *g_video_backend = nullptr;
static VideoBackendBase *s_default_backend = nullptr;
#ifdef _WIN32
#include <windows.h>
#include <VersionHelpers.h>
#define _WIN32_WINNT_WINTHRESHOLD 0x0A00 // Windows 10
#define _WIN32_WINNT_WIN10 0x0A00 // Windows 10
#include <windows.h>
#define _WIN32_WINNT_WINTHRESHOLD 0x0A00 // Windows 10
#define _WIN32_WINNT_WIN10 0x0A00 // Windows 10
#endif
// A runtime method for determining whether to allow
@@ -38,31 +40,31 @@ static VideoBackendBase* s_default_backend = nullptr;
static bool PlatformSupportsVulkan()
{
#if defined(VK_USE_PLATFORM_METAL_EXT)
// We want to only allow Vulkan to be loaded on macOS 14 (Mojave) or higher.
// Bail out if we're on macOS and can't detect it, or the version is lower.
//
// This code is borrowed liberally from mainline Dolphin.
id processInfo = reinterpret_cast<id (*)(Class, SEL)>(objc_msgSend)(
objc_getClass("NSProcessInfo"), sel_getUid("processInfo"));
if (!processInfo)
return false;
// We want to only allow Vulkan to be loaded on macOS 14 (Mojave) or higher.
// Bail out if we're on macOS and can't detect it, or the version is lower.
//
// This code is borrowed liberally from mainline Dolphin.
id processInfo =
reinterpret_cast<id (*)(Class, SEL)>(objc_msgSend)(objc_getClass("NSProcessInfo"), sel_getUid("processInfo"));
if (!processInfo)
return false;
struct OSVersion // NSOperatingSystemVersion
{
size_t major_version; // NSInteger majorVersion
size_t minor_version; // NSInteger minorVersion
size_t patch_version; // NSInteger patchVersion
};
struct OSVersion // NSOperatingSystemVersion
{
size_t major_version; // NSInteger majorVersion
size_t minor_version; // NSInteger minorVersion
size_t patch_version; // NSInteger patchVersion
};
// const bool meets_requirement = [processInfo isOperatingSystemAtLeastVersion:required_version];
constexpr OSVersion required_version = {10, 14, 0};
const bool meets_requirement = reinterpret_cast<bool (*)(id, SEL, OSVersion)>(objc_msgSend)(
processInfo, sel_getUid("isOperatingSystemAtLeastVersion:"), required_version);
return meets_requirement;
// const bool meets_requirement = [processInfo isOperatingSystemAtLeastVersion:required_version];
constexpr OSVersion required_version = {10, 14, 0};
const bool meets_requirement = reinterpret_cast<bool (*)(id, SEL, OSVersion)>(objc_msgSend)(
processInfo, sel_getUid("isOperatingSystemAtLeastVersion:"), required_version);
return meets_requirement;
#endif
// Vulkan support defaults to true (supported).
return true;
// Vulkan support defaults to true (supported).
return true;
}
void VideoBackendBase::PopulateList()
@@ -85,32 +87,25 @@ void VideoBackendBase::PopulateList()
// disable OGL video Backend while is merged from master
g_available_video_backends.push_back(std::make_unique<OGL::VideoBackend>());
// on macOS, we want to push users to use Vulkan on 10.14+ (Mojave onwards). OpenGL has been
// long deprecated by Apple there and is a known stumbling block for performance for new players.
// we want to push macOS users to Vulkan since OpenGL has been long deprecated
// by Apple and is a known stumbling block for performance for new players.
//
// That said, we still support High Sierra, which can't use Metal (it will load, but lacks certain critical pieces).
//
// This mirrors a recent (2021) change in mainline Dolphin, so should be relatively safe to do here as well. All
// we're doing is shoving Vulkan to the front if it's macOS 10.14 or later, so it loads first.
if(PlatformSupportsVulkan()) {
#ifdef __APPLE__
if (__builtin_available(macOS 10.14, *)) {
g_available_video_backends.emplace(
g_available_video_backends.begin(),
std::make_unique<Vulkan::VideoBackend>()
);
}
else
// That said, we have seen issues with Vulkan on Playback builds and defaulting to
// OpenGL should be fine in our supported versions since it translates to Metal under the hood.
if (PlatformSupportsVulkan())
{
#if defined(__APPLE__) && !defined(IS_PLAYBACK)
g_available_video_backends.emplace(g_available_video_backends.begin(),
std::make_unique<Vulkan::VideoBackend>());
#else
g_available_video_backends.push_back(std::make_unique<Vulkan::VideoBackend>());
#endif
{
g_available_video_backends.push_back(std::make_unique<Vulkan::VideoBackend>());
}
}
}
// Disable software video backend as is currently not working
//g_available_video_backends.push_back(std::make_unique<SW::VideoSoftware>());
// g_available_video_backends.push_back(std::make_unique<SW::VideoSoftware>());
for (auto& backend : g_available_video_backends)
for (auto &backend : g_available_video_backends)
{
if (backend)
{
@@ -125,12 +120,12 @@ void VideoBackendBase::ClearList()
g_available_video_backends.clear();
}
void VideoBackendBase::ActivateBackend(const std::string& name)
void VideoBackendBase::ActivateBackend(const std::string &name)
{
if (name.empty()) // If nullptr, set it to the default backend (expected behavior)
g_video_backend = s_default_backend;
for (auto& backend : g_available_video_backends)
for (auto &backend : g_available_video_backends)
if (name == backend->GetName())
g_video_backend = backend.get();
}