windows 1

This commit is contained in:
lizzie 2026-03-18 05:11:28 +00:00
parent 36b77f2e47
commit 742aa5423d
9 changed files with 27 additions and 17 deletions

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -166,7 +169,7 @@ static_assert(sizeof(DataPayloadHeader) == 8, "DataPayloadHeader size is incorre
struct DomainMessageHeader {
enum class CommandType : u32_le {
SendMessage = 1,
SendMessageWith = 1,
CloseVirtualHandle = 2,
};

View file

@ -859,7 +859,7 @@ Result ProcessSendMessagePointerDescriptors(int& offset, int& pointer_key,
R_SUCCEED();
}
Result SendMessage(KernelCore& kernel, uint64_t src_message_buffer, size_t src_buffer_size,
Result SendMessageWith(KernelCore& kernel, uint64_t src_message_buffer, size_t src_buffer_size,
KPhysicalAddress src_message_paddr, KThread& dst_thread,
uint64_t dst_message_buffer, size_t dst_buffer_size, KServerSession* session,
KSessionRequest* request) {
@ -1263,7 +1263,7 @@ Result KServerSession::SendReply(uintptr_t server_message, uintptr_t server_buff
// HLE servers write directly to a pointer to the thread command buffer. Therefore
// the reply has already been written in this case.
} else {
result = SendMessage(m_kernel, server_message, server_buffer_size, server_message_paddr,
result = SendMessageWith(m_kernel, server_message, server_buffer_size, server_message_paddr,
*client_thread, client_message, client_buffer_size, this, request);
}
} else if (!is_hle) {

View file

@ -16,8 +16,10 @@
#include <nlohmann/json.hpp>
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
#include <httplib.h>
#undef INVALID_SOCKET
# include <httplib.h>
# ifndef _WIN32
# undef INVALID_SOCKET
# endif
#endif
#include <chrono>

View file

@ -8,8 +8,8 @@
#include <cstring>
#include <ctime>
#include <fmt/chrono.h>
#include "common/logging.h"
#include "common/scm_rev.h"
#include "common/logging.h"
#include "common/swap.h"
#include "core/core.h"
#include "core/hle/service/fatal/fatal.h"
@ -44,7 +44,7 @@ struct FatalInfo {
u64_le afsr0{};
u64_le afsr1{};
u64_le esr{};
u64_le far{};
u64_le far_{}; //windows defines far
std::array<u64_le, 32> backtrace{};
u64_le program_entry_point{};
@ -90,7 +90,7 @@ static void GenerateErrorReport(Core::System& system, Result error_code, const F
crash_report += fmt::format(" AFSR0: {:016x}\n", info.afsr0);
crash_report += fmt::format(" AFSR1: {:016x}\n", info.afsr1);
crash_report += fmt::format(" ESR: {:016x}\n", info.esr);
crash_report += fmt::format(" FAR: {:016x}\n", info.far);
crash_report += fmt::format(" FAR: {:016x}\n", info.far_);
crash_report += "\nBacktrace:\n";
for (u32 i = 0; i < std::min<u32>(info.backtrace_size, 32); i++) {
crash_report +=
@ -105,7 +105,7 @@ static void GenerateErrorReport(Core::System& system, Result error_code, const F
system.GetReporter().SaveCrashReport(
title_id, error_code, info.set_flags, info.program_entry_point, info.sp, info.pc,
info.pstate, info.afsr0, info.afsr1, info.esr, info.far, info.registers, info.backtrace,
info.pstate, info.afsr0, info.afsr1, info.esr, info.far_, info.registers, info.backtrace,
info.backtrace_size, info.ArchAsString(), info.unk10);
}

View file

@ -96,7 +96,7 @@ Result SessionRequestManager::HandleDomainSyncRequest(Kernel::KServerSession* se
const auto& domain_message_header = context.GetDomainMessageHeader();
const u32 object_id{domain_message_header.object_id};
switch (domain_message_header.command) {
case IPC::DomainMessageHeader::CommandType::SendMessage:
case IPC::DomainMessageHeader::CommandType::SendMessageWith:
if (object_id > this->DomainHandlerCount()) {
LOG_CRITICAL(IPC,
"object_id {} is too big! This probably means a recent service call "

View file

@ -14,7 +14,9 @@
#include "update_checker.h"
#include <httplib.h>
#undef INVALID_SOCKET
#ifndef _WIN32
# undef INVALID_SOCKET
#endif
#ifdef YUZU_BUNDLED_OPENSSL
#include <openssl/cert.h>

View file

@ -10,7 +10,9 @@
#include <QEventLoop>
#include <boost/algorithm/string/replace.hpp>
#include <httplib.h>
#undef INVALID_SOCKET
#ifndef _WIN32
# undef INVALID_SOCKET
#endif
#include <discord_rpc.h>
#include <fmt/format.h>

View file

@ -17,7 +17,9 @@
#endif
#endif
#include <httplib.h>
#undef INVALID_SOCKET
#ifndef _WIN32
# undef INVALID_SOCKET
#endif
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

View file

@ -41,10 +41,9 @@ constexpr std::array<u32, 7> LOCALE_BLOCKLIST{
0b0100111100001000000, // Taiwan
};
static bool IsValidLocale(u32 region_index, u32 language_index) {
if (region_index >= LOCALE_BLOCKLIST.size()) {
static bool IsValidSystemLocale(u32 region_index, u32 language_index) {
if (region_index >= LOCALE_BLOCKLIST.size())
return false;
}
return ((LOCALE_BLOCKLIST.at(region_index) >> language_index) & 1) == 0;
}
@ -64,7 +63,7 @@ ConfigureSystem::ConfigureSystem(Core::System& system_,
const auto locale_check = [this]() {
const auto region_index = combo_region->currentIndex();
const auto language_index = combo_language->currentIndex();
const bool valid_locale = IsValidLocale(region_index, language_index);
const bool valid_locale = IsValidSystemLocale(region_index, language_index);
ui->label_warn_invalid_locale->setVisible(!valid_locale);
if (!valid_locale) {
ui->label_warn_invalid_locale->setText(