Compare commits
16 Commits
ebe92f2099
...
e159486136
Author | SHA1 | Date |
---|---|---|
Camden | e159486136 | |
camdenorrb | 0a59f6e5c9 | |
camdenorrb | de4db4bb0b | |
JMC47 | 1ba8541da9 | |
JMC47 | ac0d6cbaaa | |
OatmealDome | 01f6810a9d | |
Jordan Woyak | b4a1967310 | |
JosJuice | ad24ddb6bb | |
JosJuice | 84ab15e020 | |
Sintendo | d81213c4a5 | |
OatmealDome | e6f335bfcf | |
mitaclaw | 3d0d03b871 | |
mitaclaw | 5f3a8ff0de | |
mitaclaw | be0b13da97 | |
mitaclaw | 4fde0f2868 | |
mitaclaw | 0352f24a8e |
|
@ -62,7 +62,7 @@ bool IsPathAndroidContent(std::string_view uri)
|
||||||
std::string OpenModeToAndroid(std::string mode)
|
std::string OpenModeToAndroid(std::string mode)
|
||||||
{
|
{
|
||||||
// The 'b' specifier is not supported by Android. Since we're on POSIX, it's fine to just skip it.
|
// The 'b' specifier is not supported by Android. Since we're on POSIX, it's fine to just skip it.
|
||||||
mode.erase(std::remove(mode.begin(), mode.end(), 'b'));
|
std::erase(mode, 'b');
|
||||||
|
|
||||||
if (mode == "r")
|
if (mode == "r")
|
||||||
return "r";
|
return "r";
|
||||||
|
|
|
@ -98,7 +98,8 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie
|
||||||
// not because std::filesystem returns duplicates). Also note that this pathname-based uniqueness
|
// not because std::filesystem returns duplicates). Also note that this pathname-based uniqueness
|
||||||
// isn't as thorough as std::filesystem::equivalent.
|
// isn't as thorough as std::filesystem::equivalent.
|
||||||
std::ranges::sort(result);
|
std::ranges::sort(result);
|
||||||
result.erase(std::unique(result.begin(), result.end()), result.end());
|
const auto unique_result = std::ranges::unique(result);
|
||||||
|
result.erase(unique_result.begin(), unique_result.end());
|
||||||
|
|
||||||
// Dolphin expects to be able to use "/" (DIR_SEP) everywhere.
|
// Dolphin expects to be able to use "/" (DIR_SEP) everywhere.
|
||||||
// std::filesystem uses the OS separator.
|
// std::filesystem uses the OS separator.
|
||||||
|
|
|
@ -275,11 +275,21 @@ private:
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
namespace ActionReplay
|
||||||
|
{
|
||||||
|
struct ARCode;
|
||||||
|
}
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
class Volume;
|
class Volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Gecko
|
||||||
|
{
|
||||||
|
class GeckoCode;
|
||||||
|
}
|
||||||
|
|
||||||
class AchievementManager
|
class AchievementManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1085,10 +1085,10 @@ void WiiSockMan::UpdatePollCommands()
|
||||||
std::vector<int> original_order(pfds.size());
|
std::vector<int> original_order(pfds.size());
|
||||||
std::iota(original_order.begin(), original_order.end(), 0);
|
std::iota(original_order.begin(), original_order.end(), 0);
|
||||||
// Select indices with valid fds
|
// Select indices with valid fds
|
||||||
auto mid = std::partition(original_order.begin(), original_order.end(), [&](auto i) {
|
const auto partition_result = std::ranges::partition(original_order, [&](auto i) {
|
||||||
return GetHostSocket(memory.Read_U32(pcmd.buffer_out + 0xc * i)) >= 0;
|
return GetHostSocket(memory.Read_U32(pcmd.buffer_out + 0xc * i)) >= 0;
|
||||||
});
|
});
|
||||||
const auto n_valid = std::distance(original_order.begin(), mid);
|
const auto n_valid = std::distance(original_order.begin(), partition_result.begin());
|
||||||
|
|
||||||
// Move all the valid pollfds to the front of the vector
|
// Move all the valid pollfds to the front of the vector
|
||||||
for (auto i = 0; i < n_valid; ++i)
|
for (auto i = 0; i < n_valid; ++i)
|
||||||
|
|
|
@ -1081,11 +1081,11 @@ void MovieManager::LoadInput(const std::string& movie_path)
|
||||||
std::vector<u8> movInput(m_current_byte);
|
std::vector<u8> movInput(m_current_byte);
|
||||||
t_record.ReadArray(movInput.data(), movInput.size());
|
t_record.ReadArray(movInput.data(), movInput.size());
|
||||||
|
|
||||||
const auto result = std::mismatch(movInput.begin(), movInput.end(), m_temp_input.begin());
|
const auto mismatch_result = std::ranges::mismatch(movInput, m_temp_input);
|
||||||
|
|
||||||
if (result.first != movInput.end())
|
if (mismatch_result.in1 != movInput.end())
|
||||||
{
|
{
|
||||||
const ptrdiff_t mismatch_index = std::distance(movInput.begin(), result.first);
|
const ptrdiff_t mismatch_index = std::distance(movInput.begin(), mismatch_result.in1);
|
||||||
|
|
||||||
// this is a "you did something wrong" alert for the user's benefit.
|
// this is a "you did something wrong" alert for the user's benefit.
|
||||||
// we'll try to say what's going on in excruciating detail, otherwise the user might not
|
// we'll try to say what's going on in excruciating detail, otherwise the user might not
|
||||||
|
|
|
@ -1394,23 +1394,34 @@ void JitArm64::subfic(UGeckoInstruction inst)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const bool will_read = d == a;
|
const bool will_read = d == a;
|
||||||
const bool is_zero = imm == 0;
|
|
||||||
gpr.BindToRegister(d, will_read);
|
gpr.BindToRegister(d, will_read);
|
||||||
|
|
||||||
// d = imm - a
|
|
||||||
ARM64Reg RD = gpr.R(d);
|
ARM64Reg RD = gpr.R(d);
|
||||||
|
|
||||||
|
if (imm == -1)
|
||||||
{
|
{
|
||||||
Arm64GPRCache::ScopedARM64Reg WA(ARM64Reg::WZR);
|
// d = -1 - a = ~a
|
||||||
if (!is_zero)
|
MVN(RD, gpr.R(a));
|
||||||
|
// CA is always set in this case
|
||||||
|
ComputeCarry(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const bool is_zero = imm == 0;
|
||||||
|
|
||||||
|
// d = imm - a
|
||||||
{
|
{
|
||||||
WA = will_read ? gpr.GetScopedReg() : Arm64GPRCache::ScopedARM64Reg(RD);
|
Arm64GPRCache::ScopedARM64Reg WA(ARM64Reg::WZR);
|
||||||
MOVI2R(WA, imm);
|
if (!is_zero)
|
||||||
|
{
|
||||||
|
WA = will_read ? gpr.GetScopedReg() : Arm64GPRCache::ScopedARM64Reg(RD);
|
||||||
|
MOVI2R(WA, imm);
|
||||||
|
}
|
||||||
|
|
||||||
|
CARRY_IF_NEEDED(SUB, SUBS, RD, WA, gpr.R(a));
|
||||||
}
|
}
|
||||||
|
|
||||||
CARRY_IF_NEEDED(SUB, SUBS, RD, WA, gpr.R(a));
|
ComputeCarry();
|
||||||
}
|
}
|
||||||
|
|
||||||
ComputeCarry();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -240,11 +240,9 @@ bool NANDImporter::ExtractCertificates()
|
||||||
|
|
||||||
for (const PEMCertificate& certificate : certificates)
|
for (const PEMCertificate& certificate : certificates)
|
||||||
{
|
{
|
||||||
const auto search_result =
|
const auto search_result = std::ranges::search(content_bytes, certificate.search_bytes);
|
||||||
std::search(content_bytes.begin(), content_bytes.end(), certificate.search_bytes.begin(),
|
|
||||||
certificate.search_bytes.end());
|
|
||||||
|
|
||||||
if (search_result == content_bytes.end())
|
if (search_result.empty())
|
||||||
{
|
{
|
||||||
ERROR_LOG_FMT(DISCIO, "ExtractCertificates: Could not find offset for certficate '{}'",
|
ERROR_LOG_FMT(DISCIO, "ExtractCertificates: Could not find offset for certficate '{}'",
|
||||||
certificate.filename);
|
certificate.filename);
|
||||||
|
@ -252,7 +250,8 @@ bool NANDImporter::ExtractCertificates()
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string pem_file_path = m_nand_root + std::string(certificate.filename);
|
const std::string pem_file_path = m_nand_root + std::string(certificate.filename);
|
||||||
const ptrdiff_t certificate_offset = std::distance(content_bytes.begin(), search_result);
|
const ptrdiff_t certificate_offset =
|
||||||
|
std::distance(content_bytes.begin(), search_result.begin());
|
||||||
constexpr int min_offset = 2;
|
constexpr int min_offset = 2;
|
||||||
if (certificate_offset < min_offset)
|
if (certificate_offset < min_offset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -214,26 +214,27 @@ int main(int argc, char* argv[])
|
||||||
parser->add_option("-p", "--platform")
|
parser->add_option("-p", "--platform")
|
||||||
.action("store")
|
.action("store")
|
||||||
.help("Window platform to use [%choices]")
|
.help("Window platform to use [%choices]")
|
||||||
.choices({"headless"
|
.choices({
|
||||||
|
"headless"
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
,
|
,
|
||||||
"fbdev"
|
"fbdev"
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_DRM
|
#if HAVE_DRM
|
||||||
,
|
,
|
||||||
"drm"
|
"drm"
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_X11
|
#if HAVE_X11
|
||||||
,
|
,
|
||||||
"x11"
|
"x11"
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
,
|
,
|
||||||
"win32"
|
"win32"
|
||||||
#endif
|
#endif
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
,
|
,
|
||||||
"macos"
|
"macos"
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -309,11 +309,9 @@ void Settings::RemovePath(const QString& qpath)
|
||||||
std::string path = qpath.toStdString();
|
std::string path = qpath.toStdString();
|
||||||
std::vector<std::string> paths = Config::GetIsoPaths();
|
std::vector<std::string> paths = Config::GetIsoPaths();
|
||||||
|
|
||||||
auto new_end = std::remove(paths.begin(), paths.end(), path);
|
if (std::erase(paths, path) == 0)
|
||||||
if (new_end == paths.end())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
paths.erase(new_end, paths.end());
|
|
||||||
Config::SetIsoPaths(paths);
|
Config::SetIsoPaths(paths);
|
||||||
emit PathRemoved(qpath);
|
emit PathRemoved(qpath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,8 +133,10 @@ int VerifyCommand(const std::vector<std::string>& args)
|
||||||
hashes_to_calculate.md5 = true;
|
hashes_to_calculate.md5 = true;
|
||||||
else if (algorithm == "sha1")
|
else if (algorithm == "sha1")
|
||||||
hashes_to_calculate.sha1 = true;
|
hashes_to_calculate.sha1 = true;
|
||||||
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||||
else if (algorithm == "rchash")
|
else if (algorithm == "rchash")
|
||||||
rc_hash_calculate = true;
|
rc_hash_calculate = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hashes_to_calculate.crc32 && !hashes_to_calculate.md5 && !hashes_to_calculate.sha1 &&
|
if (!hashes_to_calculate.crc32 && !hashes_to_calculate.md5 && !hashes_to_calculate.sha1 &&
|
||||||
|
@ -163,11 +165,13 @@ int VerifyCommand(const std::vector<std::string>& args)
|
||||||
verifier.Finish();
|
verifier.Finish();
|
||||||
const DiscIO::VolumeVerifier::Result& result = verifier.GetResult();
|
const DiscIO::VolumeVerifier::Result& result = verifier.GetResult();
|
||||||
|
|
||||||
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||||
// Calculate rcheevos hash
|
// Calculate rcheevos hash
|
||||||
if (rc_hash_calculate)
|
if (rc_hash_calculate)
|
||||||
{
|
{
|
||||||
rc_hash_result = AchievementManager::CalculateHash(input_file_path);
|
rc_hash_result = AchievementManager::CalculateHash(input_file_path);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Print the report
|
// Print the report
|
||||||
if (!algorithm_is_set)
|
if (!algorithm_is_set)
|
||||||
|
|
|
@ -129,7 +129,8 @@ BuildExpression(const std::vector<ciface::Core::DeviceContainer::InputDetection>
|
||||||
|
|
||||||
// Remove duplicates
|
// Remove duplicates
|
||||||
std::ranges::sort(alternations);
|
std::ranges::sort(alternations);
|
||||||
alternations.erase(std::unique(alternations.begin(), alternations.end()), alternations.end());
|
const auto unique_result = std::ranges::unique(alternations);
|
||||||
|
alternations.erase(unique_result.begin(), unique_result.end());
|
||||||
|
|
||||||
return fmt::to_string(fmt::join(alternations, "|"));
|
return fmt::to_string(fmt::join(alternations, "|"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,18 +342,20 @@ bool SwapChain::SelectSurfaceFormat()
|
||||||
// because we already apply gamma ourselves, and we might not use sRGB gamma.
|
// because we already apply gamma ourselves, and we might not use sRGB gamma.
|
||||||
// Force using a linear format instead, if this is the case.
|
// Force using a linear format instead, if this is the case.
|
||||||
VkFormat format = VKTexture::GetLinearFormat(surface_format.format);
|
VkFormat format = VKTexture::GetLinearFormat(surface_format.format);
|
||||||
if (format == VK_FORMAT_R8G8B8A8_UNORM)
|
if (surface_format.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR)
|
||||||
surface_format_RGBA8 = &surface_format;
|
{
|
||||||
else if (format == VK_FORMAT_B8G8R8A8_UNORM)
|
if (format == VK_FORMAT_R8G8B8A8_UNORM)
|
||||||
surface_format_BGRA8 = &surface_format;
|
surface_format_RGBA8 = &surface_format;
|
||||||
else if (format == VK_FORMAT_A2B10G10R10_UNORM_PACK32 &&
|
else if (format == VK_FORMAT_B8G8R8A8_UNORM)
|
||||||
surface_format.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR)
|
surface_format_BGRA8 = &surface_format;
|
||||||
surface_format_RGB10_A2 = &surface_format;
|
else if (format == VK_FORMAT_A2B10G10R10_UNORM_PACK32)
|
||||||
|
surface_format_RGB10_A2 = &surface_format;
|
||||||
|
}
|
||||||
else if (format == VK_FORMAT_R16G16B16A16_SFLOAT &&
|
else if (format == VK_FORMAT_R16G16B16A16_SFLOAT &&
|
||||||
surface_format.colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT)
|
surface_format.colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT)
|
||||||
|
{
|
||||||
surface_format_RGBA16F_scRGB = &surface_format;
|
surface_format_RGBA16F_scRGB = &surface_format;
|
||||||
else
|
}
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const VkSurfaceFormatKHR* surface_format = nullptr;
|
const VkSurfaceFormatKHR* surface_format = nullptr;
|
||||||
|
|
|
@ -50,12 +50,12 @@ VULKAN_INSTANCE_ENTRY_POINT(vkGetPhysicalDeviceXlibPresentationSupportKHR, false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(VK_USE_PLATFORM_DISPLAY_KHR)
|
#if defined(VK_USE_PLATFORM_DISPLAY_KHR)
|
||||||
VULKAN_INSTANCE_ENTRY_POINT(vkCreateDisplayPlaneSurfaceKHR, true)
|
VULKAN_INSTANCE_ENTRY_POINT(vkCreateDisplayPlaneSurfaceKHR, false)
|
||||||
VULKAN_INSTANCE_ENTRY_POINT(vkGetDisplayPlaneCapabilitiesKHR, true)
|
VULKAN_INSTANCE_ENTRY_POINT(vkGetDisplayPlaneCapabilitiesKHR, false)
|
||||||
VULKAN_INSTANCE_ENTRY_POINT(vkGetPhysicalDeviceDisplayPlanePropertiesKHR, true)
|
VULKAN_INSTANCE_ENTRY_POINT(vkGetPhysicalDeviceDisplayPlanePropertiesKHR, false)
|
||||||
VULKAN_INSTANCE_ENTRY_POINT(vkGetDisplayPlaneSupportedDisplaysKHR, true)
|
VULKAN_INSTANCE_ENTRY_POINT(vkGetDisplayPlaneSupportedDisplaysKHR, false)
|
||||||
VULKAN_INSTANCE_ENTRY_POINT(vkGetDisplayModePropertiesKHR, true)
|
VULKAN_INSTANCE_ENTRY_POINT(vkGetDisplayModePropertiesKHR, false)
|
||||||
VULKAN_INSTANCE_ENTRY_POINT(vkGetPhysicalDeviceDisplayPropertiesKHR, true)
|
VULKAN_INSTANCE_ENTRY_POINT(vkGetPhysicalDeviceDisplayPropertiesKHR, false)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||||
|
|
Loading…
Reference in New Issue