From af1135d455de9250b51cf425c704ecf7a1f20a82 Mon Sep 17 00:00:00 2001 From: loki Date: Wed, 29 Apr 2020 22:01:43 +0200 Subject: [PATCH] fix row_pitch --- appveyor.yml | 11 +---------- sunshine/platform/windows/display_ram.cpp | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3bc4d9b1..5cec4420 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,17 +8,8 @@ environment: - BUILD_TYPE: Release install: - - sh: sudo add-apt-repository ppa:hnakamur/icu - - sh: sudo add-apt-repository ppa:hnakamur/boost - - - sh: sudo add-apt-repository ppa:savoury1/build-tools - - sh: sudo add-apt-repository ppa:savoury1/backports - - sh: sudo add-apt-repository ppa:savoury1/graphics - - sh: sudo add-apt-repository ppa:savoury1/multimedia - - sh: sudo add-apt-repository ppa:savoury1/ffmpeg4 - - sh: sudo apt update - - sh: sudo apt install -y fakeroot cmake libssl-dev libavdevice-dev libboost-thread1.67-dev libboost-filesystem1.67-dev libboost-log1.67-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev + - sh: sudo apt install -y fakeroot cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev - sh: sudo update-alternatives --set gcc /usr/bin/gcc-8 - cmd: C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -S mingw-w64-x86_64-openssl mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-opus mingw-w64-x86_64-x265 mingw-w64-x86_64-boost git yasm nasm diffutils make" diff --git a/sunshine/platform/windows/display_ram.cpp b/sunshine/platform/windows/display_ram.cpp index 2f26eca5..15d608fe 100644 --- a/sunshine/platform/windows/display_ram.cpp +++ b/sunshine/platform/windows/display_ram.cpp @@ -252,7 +252,7 @@ std::shared_ptr display_ram_t::alloc_img() { auto img = std::make_shared(); img->pixel_pitch = 4; - img->row_pitch = img->pixel_pitch * width; + img->row_pitch = img_info.RowPitch; img->width = width; img->height = height; img->data = new std::uint8_t[img->row_pitch * height]; @@ -298,4 +298,4 @@ int display_ram_t::init() { return 0; } -} \ No newline at end of file +}