set height before building modes

This commit is contained in:
philippe44
2020-03-22 20:23:51 -07:00
parent be59d8461b
commit 3eb2c76d6b
5 changed files with 10 additions and 7 deletions

View File

@@ -210,7 +210,7 @@ my @extra = (
);
@modes = (@modes, @extra) if $cprefs->get('height') > 32;
return \@modes;
}

View File

@@ -32,13 +32,16 @@ sub playerSettingsFrame {
$value = (unpack('Cn', $$data_ref))[1];
if ($value > 100 && $value < 400) {
$prefs->client($client)->set('width', $value);
my $height = (unpack('Cnn', $$data_ref))[2];
$prefs->client($client)->set('height', $height || 0);
$client->display->modes($client->display->build_modes);
$client->display->widthOverride(1, $value);
$client->update;
$log->info("Setting player $value" . "x" . "$height for ", $client->name);
}
my $height = (unpack('Cnn', $$data_ref))[2];
$prefs->client($client)->set('height', $height || 0);
$log->info("Setting player $value" . "x" . "$height for ", $client->name);
}
$client->SUPER::playerSettingsFrame($data_ref);

View File

@@ -10,6 +10,6 @@
<name>PLUGIN_SQUEEZEESP32</name>
<description>PLUGIN_SQUEEZEESP32_DESC</description>
<module>Plugins::SqueezeESP32::Plugin</module>
<version>0.60</version>
<version>0.61</version>
<creator>Philippe</creator>
</extensions>