chore: update global workflows (#3813)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
@@ -414,12 +414,7 @@ namespace config {
|
||||
auto final_resolution = entry.template get_optional<std::string>("final_resolution"s);
|
||||
auto final_refresh_rate = entry.template get_optional<std::string>("final_refresh_rate"s);
|
||||
|
||||
output_field.push_back(video_t::dd_t::mode_remapping_entry_t {
|
||||
requested_resolution.value_or(""),
|
||||
requested_fps.value_or(""),
|
||||
final_resolution.value_or(""),
|
||||
final_refresh_rate.value_or("")
|
||||
});
|
||||
output_field.push_back(video_t::dd_t::mode_remapping_entry_t {requested_resolution.value_or(""), requested_fps.value_or(""), final_resolution.value_or(""), final_refresh_rate.value_or("")});
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace net {
|
||||
|
||||
std::uint16_t map_port(int port) {
|
||||
// calculate the port from the config port
|
||||
auto mapped_port = (std::uint16_t)((int) config::sunshine.port + port);
|
||||
auto mapped_port = (std::uint16_t) ((int) config::sunshine.port + port);
|
||||
|
||||
// Ensure port is in the range of 1024-65535
|
||||
if (mapped_port < 1024 || mapped_port > 65535) {
|
||||
|
||||
@@ -19,7 +19,7 @@ extern "C" {
|
||||
// There aren't that many DRM_FORMAT I need to use, so define them here
|
||||
//
|
||||
// They aren't likely to change any time soon.
|
||||
#define fourcc_code(a, b, c, d) ((std::uint32_t)(a) | ((std::uint32_t)(b) << 8) | ((std::uint32_t)(c) << 16) | ((std::uint32_t)(d) << 24))
|
||||
#define fourcc_code(a, b, c, d) ((std::uint32_t) (a) | ((std::uint32_t) (b) << 8) | ((std::uint32_t) (c) << 16) | ((std::uint32_t) (d) << 24))
|
||||
#define fourcc_mod_code(vendor, val) ((((uint64_t) vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
|
||||
#define DRM_FORMAT_MOD_INVALID fourcc_mod_code(0, ((1ULL << 56) - 1))
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace platf::dxgi {
|
||||
{
|
||||
util::buffer_t<std::uint8_t> cursor_img = img_data;
|
||||
std::for_each((std::uint32_t *) std::begin(cursor_img), (std::uint32_t *) std::end(cursor_img), [](auto &pixel) {
|
||||
auto alpha = (std::uint8_t)((pixel >> 24) & 0xFF);
|
||||
auto alpha = (std::uint8_t) ((pixel >> 24) & 0xFF);
|
||||
if (alpha == 0xFF) {
|
||||
// Pixels with 0xFF alpha will be XOR-blended as is.
|
||||
} else if (alpha == 0x00) {
|
||||
@@ -286,7 +286,7 @@ namespace platf::dxgi {
|
||||
{
|
||||
util::buffer_t<std::uint8_t> cursor_img = img_data;
|
||||
std::for_each((std::uint32_t *) std::begin(cursor_img), (std::uint32_t *) std::end(cursor_img), [](auto &pixel) {
|
||||
auto alpha = (std::uint8_t)((pixel >> 24) & 0xFF);
|
||||
auto alpha = (std::uint8_t) ((pixel >> 24) & 0xFF);
|
||||
if (alpha == 0xFF) {
|
||||
// Pixels with 0xFF alpha will be XOR-blended by make_cursor_xor_image().
|
||||
// We make them transparent for the alpha-blended cursor image.
|
||||
|
||||
@@ -92,10 +92,10 @@ namespace platf {
|
||||
|
||||
constexpr float EARTH_G = 9.80665f;
|
||||
|
||||
#define MPS2_TO_DS4_ACCEL(x) (int32_t)(((x) / EARTH_G) * 8192)
|
||||
#define DPS_TO_DS4_GYRO(x) (int32_t)((x) * (1024 / 64))
|
||||
#define MPS2_TO_DS4_ACCEL(x) (int32_t) (((x) / EARTH_G) * 8192)
|
||||
#define DPS_TO_DS4_GYRO(x) (int32_t) ((x) * (1024 / 64))
|
||||
|
||||
#define APPLY_CALIBRATION(val, bias, scale) (int32_t)(((float) (val) + (bias)) / (scale))
|
||||
#define APPLY_CALIBRATION(val, bias, scale) (int32_t) (((float) (val) + (bias)) / (scale))
|
||||
|
||||
constexpr DS4_TOUCH ds4_touch_unused = {
|
||||
.bPacketCounter = 0,
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace rtsp_stream {
|
||||
boost::asio::async_read(sock, boost::asio::buffer(begin, sizeof(encrypted_rtsp_header_t)), boost::bind(&socket_t::handle_read_encrypted_header, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred));
|
||||
} else {
|
||||
sock.async_read_some(
|
||||
boost::asio::buffer(begin, (std::size_t)(std::end(msg_buf) - begin)),
|
||||
boost::asio::buffer(begin, (std::size_t) (std::end(msg_buf) - begin)),
|
||||
boost::bind(
|
||||
&socket_t::handle_read_plaintext,
|
||||
shared_from_this(),
|
||||
@@ -253,7 +253,7 @@ namespace rtsp_stream {
|
||||
}
|
||||
|
||||
sock.async_read_some(
|
||||
boost::asio::buffer(begin, (std::size_t)(std::end(msg_buf) - begin)),
|
||||
boost::asio::buffer(begin, (std::size_t) (std::end(msg_buf) - begin)),
|
||||
boost::bind(
|
||||
&socket_t::handle_plaintext_payload,
|
||||
shared_from_this(),
|
||||
@@ -289,7 +289,7 @@ namespace rtsp_stream {
|
||||
|
||||
auto end = socket->begin + bytes;
|
||||
msg_t req {new msg_t::element_type {}};
|
||||
if (auto status = parseRtspMessage(req.get(), socket->msg_buf.data(), (std::size_t)(end - socket->msg_buf.data()))) {
|
||||
if (auto status = parseRtspMessage(req.get(), socket->msg_buf.data(), (std::size_t) (end - socket->msg_buf.data()))) {
|
||||
BOOST_LOG(error) << "Malformed RTSP message: ["sv << status << ']';
|
||||
|
||||
respond(socket->sock, *socket->session, nullptr, 400, "BAD REQUEST", 0, {});
|
||||
@@ -321,7 +321,7 @@ namespace rtsp_stream {
|
||||
|
||||
if (end - socket->crlf >= content_length) {
|
||||
if (end - socket->crlf > content_length) {
|
||||
BOOST_LOG(warning) << "(end - socket->crlf) > content_length -- "sv << (std::size_t)(end - socket->crlf) << " > "sv << content_length;
|
||||
BOOST_LOG(warning) << "(end - socket->crlf) > content_length -- "sv << (std::size_t) (end - socket->crlf) << " > "sv << content_length;
|
||||
}
|
||||
|
||||
fg.disable();
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace util {
|
||||
return (std::uint8_t) ch - '0';
|
||||
}
|
||||
|
||||
return (std::uint8_t)(ch | (char) 32) - 'a' + (char) 10;
|
||||
return (std::uint8_t) (ch | (char) 32) - 'a' + (char) 10;
|
||||
};
|
||||
|
||||
std::fill_n(buf + buf_size, padding, 0);
|
||||
@@ -429,7 +429,7 @@ namespace util {
|
||||
return (std::uint8_t) ch - '0';
|
||||
}
|
||||
|
||||
return (std::uint8_t)(ch | (char) 32) - 'a' + (char) 10;
|
||||
return (std::uint8_t) (ch | (char) 32) - 'a' + (char) 10;
|
||||
};
|
||||
|
||||
for (auto &el : buf) {
|
||||
@@ -483,12 +483,12 @@ namespace util {
|
||||
std::int64_t res {};
|
||||
std::int64_t mul = 1;
|
||||
while (begin != --end) {
|
||||
res += (std::int64_t)(*end - '0') * mul;
|
||||
res += (std::int64_t) (*end - '0') * mul;
|
||||
|
||||
mul *= 10;
|
||||
}
|
||||
|
||||
return *begin != '-' ? res + (std::int64_t)(*begin - '0') * mul : -res;
|
||||
return *begin != '-' ? res + (std::int64_t) (*begin - '0') * mul : -res;
|
||||
}
|
||||
|
||||
inline std::int64_t from_view(const std::string_view &number) {
|
||||
@@ -955,7 +955,7 @@ namespace util {
|
||||
|
||||
template<class It>
|
||||
std::string_view view(It begin, It end) {
|
||||
return std::string_view {(const char *) begin, (std::size_t)(end - begin)};
|
||||
return std::string_view {(const char *) begin, (std::size_t) (end - begin)};
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user