build: Fix compiling citra-qt for iOS. (#6983)
* build: Fix compiling citra-qt for iOS. * Update src/citra_qt/configuration/configure_general.cpp Co-authored-by: Tobias <thm.frey@gmail.com> --------- Co-authored-by: Tobias <thm.frey@gmail.com>
This commit is contained in:
parent
d1c16bad78
commit
28c542c2c2
14 changed files with 57 additions and 38 deletions
|
@ -197,9 +197,9 @@ GatewayCheat::CheatLine::CheatLine(const std::string& line) {
|
|||
if (type_temp == "D" || type_temp == "d")
|
||||
sub_type_temp = line.substr(1, 1);
|
||||
type = static_cast<CheatType>(std::stoi(type_temp + sub_type_temp, 0, 16));
|
||||
first = std::stoul(line.substr(0, 8), 0, 16);
|
||||
first = static_cast<u32>(std::stoul(line.substr(0, 8), 0, 16));
|
||||
address = first & 0x0FFFFFFF;
|
||||
value = std::stoul(line.substr(9, 8), 0, 16);
|
||||
value = static_cast<u32>(std::stoul(line.substr(9, 8), 0, 16));
|
||||
cheat_line = line;
|
||||
} catch (const std::logic_error&) {
|
||||
type = CheatType::Null;
|
||||
|
|
|
@ -513,7 +513,7 @@ bool FFmpegAudioStream::Init(FFmpegMuxer& muxer) {
|
|||
}
|
||||
|
||||
if (codec_context->frame_size) {
|
||||
frame_size = static_cast<u64>(codec_context->frame_size);
|
||||
frame_size = codec_context->frame_size;
|
||||
} else { // variable frame size support
|
||||
frame_size = std::tuple_size<AudioCore::StereoFrame16>::value;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ Loader::ResultStatus FileSys::Plugin3GXLoader::Map(
|
|||
const u32 block_size = mem_region_sizes[header.infos.flags.memory_region_size.Value()];
|
||||
const u32 exe_size = (sizeof(PluginHeader) + text_section.size() + rodata_section.size() +
|
||||
data_section.size() + header.executable.bss_size + 0x1000) &
|
||||
~0xFFF;
|
||||
~0xFFFu;
|
||||
|
||||
// Allocate the framebuffer block so that is in the highest FCRAM position possible
|
||||
auto offset_fb =
|
||||
|
|
|
@ -509,7 +509,8 @@ void SendReply(const char* reply) {
|
|||
u8* ptr = command_buffer;
|
||||
u32 left = command_length + 4;
|
||||
while (left > 0) {
|
||||
int sent_size = send(gdbserver_socket, reinterpret_cast<char*>(ptr), left, 0);
|
||||
s32 sent_size =
|
||||
static_cast<s32>(send(gdbserver_socket, reinterpret_cast<char*>(ptr), left, 0));
|
||||
if (sent_size < 0) {
|
||||
LOG_ERROR(Debug_GDBStub, "gdb: send failed");
|
||||
return Shutdown();
|
||||
|
|
|
@ -589,7 +589,7 @@ std::string GetTitleMetadataPath(Service::FS::MediaType media_type, u64 tid, boo
|
|||
Common::SplitPath(entry.virtualName, nullptr, &filename_filename, &filename_extension);
|
||||
|
||||
if (filename_extension == ".tmd") {
|
||||
const u32 id = std::stoul(filename_filename, nullptr, 16);
|
||||
const u32 id = static_cast<u32>(std::stoul(filename_filename, nullptr, 16));
|
||||
base_id = std::min(base_id, id);
|
||||
update_id = std::max(update_id, id);
|
||||
}
|
||||
|
|
|
@ -982,11 +982,13 @@ void SOC_U::SendToOther(Kernel::HLERequestContext& ctx) {
|
|||
CTRSockAddr ctr_dest_addr;
|
||||
std::memcpy(&ctr_dest_addr, dest_addr_buffer.data(), sizeof(ctr_dest_addr));
|
||||
sockaddr dest_addr = CTRSockAddr::ToPlatform(ctr_dest_addr);
|
||||
ret = ::sendto(fd_info->second.socket_fd, reinterpret_cast<const char*>(input_buff.data()),
|
||||
len, flags, &dest_addr, sizeof(dest_addr));
|
||||
ret = static_cast<s32>(::sendto(fd_info->second.socket_fd,
|
||||
reinterpret_cast<const char*>(input_buff.data()), len,
|
||||
flags, &dest_addr, sizeof(dest_addr)));
|
||||
} else {
|
||||
ret = ::sendto(fd_info->second.socket_fd, reinterpret_cast<const char*>(input_buff.data()),
|
||||
len, flags, nullptr, 0);
|
||||
ret = static_cast<s32>(::sendto(fd_info->second.socket_fd,
|
||||
reinterpret_cast<const char*>(input_buff.data()), len,
|
||||
flags, nullptr, 0));
|
||||
}
|
||||
|
||||
const auto send_error = (ret == SOCKET_ERROR_VALUE) ? GET_ERRNO : 0;
|
||||
|
@ -1040,11 +1042,13 @@ void SOC_U::SendTo(Kernel::HLERequestContext& ctx) {
|
|||
CTRSockAddr ctr_dest_addr;
|
||||
std::memcpy(&ctr_dest_addr, dest_addr_buff.data(), sizeof(ctr_dest_addr));
|
||||
sockaddr dest_addr = CTRSockAddr::ToPlatform(ctr_dest_addr);
|
||||
ret = ::sendto(fd_info->second.socket_fd, reinterpret_cast<const char*>(input_buff.data()),
|
||||
len, flags, &dest_addr, sizeof(dest_addr));
|
||||
ret = static_cast<s32>(::sendto(fd_info->second.socket_fd,
|
||||
reinterpret_cast<const char*>(input_buff.data()), len,
|
||||
flags, &dest_addr, sizeof(dest_addr)));
|
||||
} else {
|
||||
ret = ::sendto(fd_info->second.socket_fd, reinterpret_cast<const char*>(input_buff.data()),
|
||||
len, flags, nullptr, 0);
|
||||
ret = static_cast<s32>(::sendto(fd_info->second.socket_fd,
|
||||
reinterpret_cast<const char*>(input_buff.data()), len,
|
||||
flags, nullptr, 0));
|
||||
}
|
||||
|
||||
auto send_error = (ret == SOCKET_ERROR_VALUE) ? GET_ERRNO : 0;
|
||||
|
@ -1103,15 +1107,17 @@ void SOC_U::RecvFromOther(Kernel::HLERequestContext& ctx) {
|
|||
}
|
||||
|
||||
if (addr_len > 0) {
|
||||
ret = ::recvfrom(fd_info->second.socket_fd, reinterpret_cast<char*>(output_buff.data()),
|
||||
len, flags, &src_addr, &src_addr_len);
|
||||
ret = static_cast<s32>(::recvfrom(fd_info->second.socket_fd,
|
||||
reinterpret_cast<char*>(output_buff.data()), len, flags,
|
||||
&src_addr, &src_addr_len));
|
||||
if (ret >= 0 && src_addr_len > 0) {
|
||||
ctr_src_addr = CTRSockAddr::FromPlatform(src_addr);
|
||||
std::memcpy(addr_buff.data(), &ctr_src_addr, addr_len);
|
||||
}
|
||||
} else {
|
||||
ret = ::recvfrom(fd_info->second.socket_fd, reinterpret_cast<char*>(output_buff.data()),
|
||||
len, flags, NULL, 0);
|
||||
ret = static_cast<s32>(::recvfrom(fd_info->second.socket_fd,
|
||||
reinterpret_cast<char*>(output_buff.data()), len, flags,
|
||||
NULL, 0));
|
||||
addr_buff.resize(0);
|
||||
}
|
||||
int recv_error = (ret == SOCKET_ERROR_VALUE) ? GET_ERRNO : 0;
|
||||
|
@ -1178,15 +1184,17 @@ void SOC_U::RecvFrom(Kernel::HLERequestContext& ctx) {
|
|||
}
|
||||
if (addr_len > 0) {
|
||||
// Only get src adr if input adr available
|
||||
ret = ::recvfrom(fd_info->second.socket_fd, reinterpret_cast<char*>(output_buff.data()),
|
||||
len, flags, &src_addr, &src_addr_len);
|
||||
ret = static_cast<s32>(::recvfrom(fd_info->second.socket_fd,
|
||||
reinterpret_cast<char*>(output_buff.data()), len, flags,
|
||||
&src_addr, &src_addr_len));
|
||||
if (ret >= 0 && src_addr_len > 0) {
|
||||
ctr_src_addr = CTRSockAddr::FromPlatform(src_addr);
|
||||
std::memcpy(addr_buff.data(), &ctr_src_addr, addr_len);
|
||||
}
|
||||
} else {
|
||||
ret = ::recvfrom(fd_info->second.socket_fd, reinterpret_cast<char*>(output_buff.data()),
|
||||
len, flags, NULL, 0);
|
||||
ret = static_cast<s32>(::recvfrom(fd_info->second.socket_fd,
|
||||
reinterpret_cast<char*>(output_buff.data()), len, flags,
|
||||
NULL, 0));
|
||||
addr_buff.resize(0);
|
||||
}
|
||||
int recv_error = (ret == SOCKET_ERROR_VALUE) ? GET_ERRNO : 0;
|
||||
|
@ -1753,7 +1761,11 @@ std::optional<SOC_U::InterfaceInfo> SOC_U::GetDefaultInterfaceInfo() {
|
|||
}
|
||||
|
||||
InterfaceInfo ret;
|
||||
s64 sock_fd = -1;
|
||||
#ifdef _WIN32
|
||||
SOCKET sock_fd = -1;
|
||||
#else
|
||||
int sock_fd = -1;
|
||||
#endif
|
||||
bool interface_found = false;
|
||||
struct sockaddr_in s_in = {.sin_family = AF_INET, .sin_port = htons(53), .sin_addr = {}};
|
||||
s_in.sin_addr.s_addr = inet_addr("8.8.8.8");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue