Hi,
2018-05-22 9:38 GMT+02:00 Stephan Aßmus <superstippi@xxxxxx>:
Am 20.05.2018 um 22:38 schrieb waddlesplash:
diff --git a/src/servers/app/Screen.cpp b/src/servers/app/Screen.cpp
index 0fc58008bd..9ae34015e6 100644
--- a/src/servers/app/Screen.cpp
+++ b/src/servers/app/Screen.cpp
@@ -265,7 +265,7 @@ Screen::_FindBestMode(const display_mode* modes,
uint32 count,
// TODO: check if these scores make sense
int32 diff = 1000 * abs(mode.timing.v_display - height)
+ int32(fabs(get_mode_frequency(mode) - frequency)
* 10)
- + 100 * abs(mode.space - colorSpace);
+ + 100 * abs((int)(mode.space - colorSpace));
This doesn't look right to me. Since this just computes a score, it probably
doesn't matter, but the cast to int should probably happen like this:
+ 100 * abs((int)mode.space - colorSpace);
This makes the computation happen with ints. Otherwise abs() shouldn't be
needed in the first place, if the result is unsigned.