mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Correct compile errorswith Qt6.7
This commit is contained in:
@@ -64,7 +64,7 @@ static BOOL CALLBACK DirectSoundEnumProcessor(LPGUID deviceIdGuid, LPCTSTR devic
|
||||
CoTaskMemFree(deviceIdStr);
|
||||
|
||||
// Process Device Information
|
||||
QString deviceName = QString::fromLocal8Bit(deviceDescStr);
|
||||
QString deviceName = QString::fromWCharArray(deviceDescStr);
|
||||
|
||||
Debug(Logger::getInstance("AUDIOGRABBER"), "Found Audio Device: %s", deviceDescStr);
|
||||
|
||||
|
@@ -413,9 +413,13 @@ namespace hyperion
|
||||
}
|
||||
|
||||
// Compute the average of each color channel
|
||||
const uint8_t avgRed = uint8_t(std::min(std::lround(sqrt(static_cast<double>(cummRed/pixelNum))), 255L));
|
||||
const uint8_t avgGreen = uint8_t(std::min(std::lround(sqrt(static_cast<double>(cummGreen/pixelNum))), 255L));
|
||||
const uint8_t avgBlue = uint8_t(std::min(std::lround(sqrt(static_cast<double>(cummBlue/pixelNum))), 255L));
|
||||
|
||||
#ifdef WIN32
|
||||
#undef min
|
||||
#endif
|
||||
const uint8_t avgRed = static_cast<uint8_t>(std::min(std::lround(std::sqrt(static_cast<double>(cummRed / pixelNum))), 255L));
|
||||
const uint8_t avgGreen = static_cast<uint8_t>(std::min(std::lround(sqrt(static_cast<double>(cummGreen / pixelNum))), 255L));
|
||||
const uint8_t avgBlue = static_cast<uint8_t>(std::min(std::lround(sqrt(static_cast<double>(cummBlue / pixelNum))), 255L));
|
||||
|
||||
// Return the computed color
|
||||
return {avgRed, avgGreen, avgBlue};
|
||||
|
Reference in New Issue
Block a user