Merge remote-tracking branch 'sunshine/master'

This commit is contained in:
Yukino Song
2025-07-13 23:16:01 +08:00
93 changed files with 2952 additions and 493 deletions

View File

@@ -513,7 +513,7 @@ std::string get_local_ip_for_gateway() {
// UDP GSO on Linux currently only supports sending 64K or 64 segments at a time
size_t seg_index = 0;
const size_t seg_max = 65536 / 1500;
struct iovec iovs[(send_info.headers ? std::min(seg_max, send_info.block_count) : 1) * max_iovs_per_msg] = {};
struct iovec iovs[(send_info.headers ? std::min(seg_max, send_info.block_count) : 1) * max_iovs_per_msg];
auto msg_size = send_info.header_size + send_info.payload_size;
while (seg_index < send_info.block_count) {
int iovlen = 0;
@@ -596,10 +596,11 @@ std::string get_local_ip_for_gateway() {
{
// If GSO is not supported, use sendmmsg() instead.
struct mmsghdr msgs[send_info.block_count] = {};
struct iovec iovs[send_info.block_count * (send_info.headers ? 2 : 1)] = {};
struct mmsghdr msgs[send_info.block_count];
struct iovec iovs[send_info.block_count * (send_info.headers ? 2 : 1)];
int iov_idx = 0;
for (size_t i = 0; i < send_info.block_count; i++) {
msgs[i].msg_len = 0;
msgs[i].msg_hdr.msg_iov = &iovs[iov_idx];
msgs[i].msg_hdr.msg_iovlen = send_info.headers ? 2 : 1;
@@ -617,6 +618,7 @@ std::string get_local_ip_for_gateway() {
msgs[i].msg_hdr.msg_namelen = msg.msg_namelen;
msgs[i].msg_hdr.msg_control = cmbuf.buf;
msgs[i].msg_hdr.msg_controllen = cmbuflen;
msgs[i].msg_hdr.msg_flags = 0;
}
// Call sendmmsg() until all messages are sent
@@ -709,7 +711,7 @@ std::string get_local_ip_for_gateway() {
memcpy(CMSG_DATA(pktinfo_cm), &pktInfo, sizeof(pktInfo));
}
struct iovec iovs[2] = {};
struct iovec iovs[2];
int iovlen = 0;
if (send_info.header) {
iovs[iovlen].iov_base = (void *) send_info.header;

View File

@@ -34,7 +34,7 @@
+ (NSString *)getDisplayName:(CGDirectDisplayID)displayID {
for (NSScreen *screen in [NSScreen screens]) {
if (screen.deviceDescription[@"NSScreenNumber"] == [NSNumber numberWithUnsignedInt:displayID]) {
if ([screen.deviceDescription[@"NSScreenNumber"] isEqualToNumber:[NSNumber numberWithUnsignedInt:displayID]]) {
return screen.localizedName;
}
}

View File

@@ -27,10 +27,8 @@ DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x2
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); // DEVPROP_TYPE_STRING
DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2);
#if defined(__x86_64) || defined(_M_AMD64)
#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64)
#define STEAM_DRIVER_SUBDIR L"x64"
#elif defined(__i386) || defined(_M_IX86)
#define STEAM_DRIVER_SUBDIR L"x86"
#else
#warning No known Steam audio driver for this architecture
#endif

View File

@@ -1,13 +1,15 @@
/**
* @file src/platform/windows/windows.rc.in
* @brief Windows resource file template.
* @note The final `windows.rc` is generated from this file during the CMake build.
* @todo Use CMake definitions directly, instead of configuring this file.
* @file src/platform/windows/windows.rc
* @brief Windows resource file.
*/
#include "winver.h"
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
VS_VERSION_INFO VERSIONINFO
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
FILEVERSION PROJECT_VERSION_MAJOR,PROJECT_VERSION_MINOR,PROJECT_VERSION_PATCH,0
PRODUCTVERSION PROJECT_VERSION_MAJOR,PROJECT_VERSION_MINOR,PROJECT_VERSION_PATCH,0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
@@ -16,13 +18,13 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "SudoMaker\0"
VALUE "FileDescription", "Apollo\0"
VALUE "FileVersion", "@PROJECT_VERSION@\0"
VALUE "InternalName", "Apollo\0"
VALUE "LegalCopyright", "https://raw.githubusercontent.com/ClassicOldSong/Apollo/master/LICENSE\0"
VALUE "ProductName", "Apollo\0"
VALUE "ProductVersion", "@PROJECT_VERSION@\0"
VALUE "CompanyName", TOSTRING(PROJECT_VENDOR)
VALUE "FileDescription", TOSTRING(PROJECT_NAME)
VALUE "FileVersion", TOSTRING(PROJECT_VERSION)
VALUE "InternalName", TOSTRING(PROJECT_NAME)
VALUE "ProductName", TOSTRING(PROJECT_NAME)
VALUE "ProductVersion", TOSTRING(PROJECT_VERSION)
VALUE "LegalCopyright", "https://raw.githubusercontent.com/ClassicOldSong/Apollo/master/LICENSE"
END
END
@@ -39,4 +41,4 @@ BEGIN
END
END
SuperDuperAmazing ICON DISCARDABLE "@SUNSHINE_ICON_PATH@"
SuperDuperAmazing ICON DISCARDABLE PROJECT_ICON_PATH