mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[host] dxgi: match the last entry in the downsample rule list
This commit is contained in:
parent
2eec459b47
commit
15334c89d6
1 changed files with 13 additions and 8 deletions
|
@ -598,24 +598,29 @@ static bool dxgi_init(void)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->targetWidth = this->width;
|
this->downsampleLevel = 0;
|
||||||
this->targetHeight = this->height;
|
this->targetWidth = this->width;
|
||||||
|
this->targetHeight = this->height;
|
||||||
|
|
||||||
DownsampleRule * rule;
|
DownsampleRule * rule, * match = NULL;
|
||||||
vector_forEachRef(rule, &downsampleRules)
|
vector_forEachRef(rule, &downsampleRules)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
( rule->greater && (this->width > rule->x || this->height > rule->y)) ||
|
( rule->greater && (this->width > rule->x || this->height > rule->y)) ||
|
||||||
(!rule->greater && (this->width == rule->x && this->height == rule->y)))
|
(!rule->greater && (this->width == rule->x && this->height == rule->y)))
|
||||||
{
|
{
|
||||||
DEBUG_INFO("Matched downsample rule %d", rule->id);
|
match = rule;
|
||||||
this->downsampleLevel = rule->level;
|
|
||||||
this->targetWidth >>= rule->level;
|
|
||||||
this->targetHeight >>= rule->level;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (match)
|
||||||
|
{
|
||||||
|
DEBUG_INFO("Matched downsample rule %d", rule->id);
|
||||||
|
this->downsampleLevel = match->level;
|
||||||
|
this->targetWidth >>= match->level;
|
||||||
|
this->targetHeight >>= match->level;
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_INFO("Request Size : %u x %u", this->targetWidth, this->targetHeight);
|
DEBUG_INFO("Request Size : %u x %u", this->targetWidth, this->targetHeight);
|
||||||
|
|
||||||
const char * copyBackend = option_get_string("dxgi", "copyBackend");
|
const char * copyBackend = option_get_string("dxgi", "copyBackend");
|
||||||
|
|
Loading…
Reference in a new issue