Compile and execute a windows executable

This commit is contained in:
loki 2020-01-03 23:20:55 +01:00
parent a3f8ab5da1
commit 494e341fe9
3 changed files with 29 additions and 5 deletions

View File

@ -4,8 +4,27 @@ namespace platf {
using namespace std::literals;
std::string get_local_ip() { return "192.168.0.119"s; }
std::unique_ptr<mic_t> microphone() { return nullptr; }
std::unique_ptr<display_t> display() { return nullptr; }
class dxi_display_t : public display_t {
std::unique_ptr<img_t> snapshot(bool cursor) override {
return nullptr;
}
};
class dummy_mic_t : public mic_t {
std::vector<std::int16_t> sample(std::size_t sample_size) override {
std::vector<std::int16_t> sample_buf;
sample_buf.resize(sample_size);
return sample_buf;
}
};
std::unique_ptr<mic_t> microphone() {
return std::unique_ptr<mic_t> { new dummy_mic_t {} };
}
std::unique_ptr<display_t> display() {
return std::unique_ptr<display_t> { new dxi_display_t {} };
}
input_t input() {
return nullptr;

View File

@ -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

View File

@ -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();