diff --git a/sunshine/platform/windows.cpp b/sunshine/platform/windows.cpp index 609bf7a5..bde0f880 100644 --- a/sunshine/platform/windows.cpp +++ b/sunshine/platform/windows.cpp @@ -4,8 +4,27 @@ namespace platf { using namespace std::literals; std::string get_local_ip() { return "192.168.0.119"s; } -std::unique_ptr microphone() { return nullptr; } -std::unique_ptr display() { return nullptr; } +class dxi_display_t : public display_t { + std::unique_ptr snapshot(bool cursor) override { + return nullptr; + } +}; + +class dummy_mic_t : public mic_t { + std::vector sample(std::size_t sample_size) override { + std::vector sample_buf; + sample_buf.resize(sample_size); + + return sample_buf; + } +}; + +std::unique_ptr microphone() { + return std::unique_ptr { new dummy_mic_t {} }; +} +std::unique_ptr display() { + return std::unique_ptr { new dxi_display_t {} }; +} input_t input() { return nullptr; diff --git a/sunshine/utility.h b/sunshine/utility.h index 8c654bd2..f2f13832 100644 --- a/sunshine/utility.h +++ b/sunshine/utility.h @@ -568,8 +568,7 @@ struct endianness { defined(__ARMEB__) || \ defined(__THUMBEB__) || \ defined(__AARCH64EB__) || \ - defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) || \ - defined(WIN32) + defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) // It's a big-endian target architecture little = false, #elif defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || \ @@ -577,7 +576,8 @@ struct endianness { defined(__ARMEL__) || \ defined(__THUMBEL__) || \ defined(__AARCH64EL__) || \ - defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) + defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) | \ + defined(_WIN32) // It's a little-endian target architecture little = true, #else diff --git a/sunshine/video.cpp b/sunshine/video.cpp index 9458b450..7a381a42 100644 --- a/sunshine/video.cpp +++ b/sunshine/video.cpp @@ -199,6 +199,11 @@ void capture_display(packet_queue_t packets, idr_event_t idr_events, config_t co auto next_snapshot = std::chrono::steady_clock::now() + time_span; auto img = disp->snapshot(display_cursor); + if(!img) { + std::this_thread::sleep_until(next_snapshot); + continue; + } + images->raise(std::move(img)); img.reset();