Fix possible crash on stream init
This commit is contained in:
@@ -916,7 +916,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
int32_t max_height = 0;
|
||||
for (size_t i = 0; i < view_count; ++i)
|
||||
{
|
||||
extents[i] = defoveator->defoveated_size(foveation[i]);
|
||||
extents[i] = stream_defoveator::defoveated_size(foveation[i]);
|
||||
max_width = std::max(max_width, extents[i].width);
|
||||
max_height = std::max(max_height, extents[i].height);
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ static uint16_t count_pixels(const std::vector<uint16_t> & param)
|
||||
return res;
|
||||
}
|
||||
|
||||
XrExtent2Di stream_defoveator::defoveated_size(const wivrn::to_headset::foveation_parameter & view) const
|
||||
XrExtent2Di stream_defoveator::defoveated_size(const wivrn::to_headset::foveation_parameter & view)
|
||||
{
|
||||
return {
|
||||
count_pixels(view.x),
|
||||
|
||||
@@ -87,5 +87,5 @@ public:
|
||||
const std::array<input, 2> & inputs,
|
||||
int destination);
|
||||
|
||||
XrExtent2Di defoveated_size(const wivrn::to_headset::foveation_parameter &) const;
|
||||
static XrExtent2Di defoveated_size(const wivrn::to_headset::foveation_parameter &);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user