Skip to content

Commit ef15faf

Browse files
committed
Fix wrong vertical frame mirror for different sized channels
1 parent ce0b490 commit ef15faf

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

deflect/server/FrameDispatcher.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "ReceiveBuffer.h"
4444

4545
#include <cassert>
46+
#include <unordered_map>
4647

4748
namespace deflect
4849
{
@@ -75,9 +76,15 @@ class FrameDispatcher::Impl
7576

7677
void mirrorTilesPositionsVertically(Frame& frame) const
7778
{
78-
const auto height = frame.computeDimensions().height();
79+
std::unordered_map<int, int> heights;
80+
for (const auto& tile : frame.tiles)
81+
heights[tile.channel] = 0;
82+
83+
for (auto& entry : heights)
84+
entry.second = frame.computeDimensions(entry.first).height();
85+
7986
for (auto& tile : frame.tiles)
80-
tile.y = height - tile.y - tile.height;
87+
tile.y = heights[tile.channel] - tile.y - tile.height;
8188
}
8289

8390
bool allConnectionsClosed(const QString& uri) const

doc/Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog {#Changelog}
44
## Deflect 1.0
55

66
### 1.0.1 (master)
7+
* [207](https://github.com/BlueBrain/Deflect/pull/207):
8+
Fix wrong vertical frame mirror for different sized channels
79
* [203](https://github.com/BlueBrain/Deflect/pull/203):
810
QmlStreamer resizes the window only if the received size event is within the
911
specified min/max size hints.

0 commit comments

Comments
 (0)