app_server: match screen configurations with empty serial number
My laptop LCD has no serial number. Because of this check, it would never "exact match" with the previous data stored in the workspace settings. As a result, every time I set a new video mode, a new "screen" would be stored in the settings file, and the old entry would just stay there and never be used again. I currently find myself with about 100K of workspace settings, tracing the history of video mode changes over the last few years. Change-Id: Iea236a6ad09bc8bae9f6df8d63780bbfd4fa5619 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2135 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
8d763b7f0d
commit
35e9e7c3eb
@ -76,9 +76,8 @@ ScreenConfigurations::BestFit(int32 id, const monitor_info* info,
|
|||||||
&& !strcasecmp(configuration->info.name, info->name)
|
&& !strcasecmp(configuration->info.name, info->name)
|
||||||
&& configuration->info.product_id == info->product_id) {
|
&& configuration->info.product_id == info->product_id) {
|
||||||
score += 2;
|
score += 2;
|
||||||
if (info->serial_number[0] != '\0'
|
if (strcmp(configuration->info.serial_number,
|
||||||
&& !strcmp(configuration->info.serial_number,
|
info->serial_number) == 0) {
|
||||||
info->serial_number)) {
|
|
||||||
exactMatch = true;
|
exactMatch = true;
|
||||||
score += 2;
|
score += 2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user