diff --git a/src/detection/phycialdisplay/phycialdisplay.h b/src/detection/phycialdisplay/phycialdisplay.h index faa7a717..81731e87 100644 --- a/src/detection/phycialdisplay/phycialdisplay.h +++ b/src/detection/phycialdisplay/phycialdisplay.h @@ -3,8 +3,8 @@ typedef struct FFPhycialDisplayResult { FFstrbuf name; - uint32_t width; - uint32_t height; + uint32_t width; // native / maximum resolution, in pixels + uint32_t height; // native / maximum resolution, in pixels } FFPhycialDisplayResult; const char* ffDetectPhycialDisplay(FFlist* results); diff --git a/src/detection/phycialdisplay/phycialdisplay_apple.c b/src/detection/phycialdisplay/phycialdisplay_apple.c index e611a28b..82402895 100644 --- a/src/detection/phycialdisplay/phycialdisplay_apple.c +++ b/src/detection/phycialdisplay/phycialdisplay_apple.c @@ -23,14 +23,14 @@ static const char* detectWithDisplayServices(const FFDisplayServerResult* displa width <= 0 || height <= 0) continue; - FFPhycialDisplayResult* display = (FFPhycialDisplayResult*) ffListAdd(results); - display->width = (uint32_t) width; - display->height = (uint32_t) height; - ffStrbufInit(&display->name); + FFPhycialDisplayResult* phycialDisplay = (FFPhycialDisplayResult*) ffListAdd(results); + phycialDisplay->width = (uint32_t) width; + phycialDisplay->height = (uint32_t) height; + ffStrbufInit(&phycialDisplay->name); CFDictionaryRef productNames; if(!ffCfDictGetDict(displayInfo, CFSTR(kDisplayProductName), &productNames)) - ffCfDictGetString(productNames, CFSTR("en_US"), &display->name); + ffCfDictGetString(productNames, CFSTR("en_US"), &phycialDisplay->name); } } } @@ -83,7 +83,7 @@ static const char* detectWithDdcci(FFlist* results) continue; uint32_t width, height; - ffEdidGetPhycialDisplay(CFDataGetBytePtr(edid), &width, &height); + ffEdidGetPhycialResolution(CFDataGetBytePtr(edid), &width, &height); if (width == 0 || height == 0) continue; FFPhycialDisplayResult* display = (FFPhycialDisplayResult*) ffListAdd(results); diff --git a/src/detection/phycialdisplay/phycialdisplay_linux.c b/src/detection/phycialdisplay/phycialdisplay_linux.c index 245f9e68..681eb33d 100644 --- a/src/detection/phycialdisplay/phycialdisplay_linux.c +++ b/src/detection/phycialdisplay/phycialdisplay_linux.c @@ -36,7 +36,7 @@ const char* ffDetectPhycialDisplay(FFlist* results) } uint32_t width, height; - ffEdidGetPhycialDisplay(edidData, &width, &height); + ffEdidGetPhycialResolution(edidData, &width, &height); if (width != 0 && height != 0) { const char* plainName = entry->d_name; diff --git a/src/detection/phycialdisplay/phycialdisplay_windows.c b/src/detection/phycialdisplay/phycialdisplay_windows.c index ad8161ce..999fcf3e 100644 --- a/src/detection/phycialdisplay/phycialdisplay_windows.c +++ b/src/detection/phycialdisplay/phycialdisplay_windows.c @@ -33,7 +33,7 @@ const char* ffDetectPhycialDisplay(FFlist* results) uint8_t edidData[256] = {}; if (!ffRegReadData(hKey, L"EDID", edidData, sizeof(edidData), NULL)) continue; uint32_t width, height; - ffEdidGetPhycialDisplay(edidData, &width, &height); + ffEdidGetPhycialResolution(edidData, &width, &height); if (width == 0 || height == 0) continue; wchar_t wName[MAX_PATH] = {}; // MONITOR\BOE09F9 diff --git a/src/util/edidHelper.c b/src/util/edidHelper.c index 4e6f31a6..646630a1 100644 --- a/src/util/edidHelper.c +++ b/src/util/edidHelper.c @@ -1,6 +1,6 @@ #include "edidHelper.h" -void ffEdidGetPhycialDisplay(const uint8_t edid[128], uint32_t* width, uint32_t* height) +void ffEdidGetPhycialResolution(const uint8_t edid[128], uint32_t* width, uint32_t* height) { const int dtd = 54; *width = (((uint32_t) edid[dtd + 4] >> 4) << 8) | edid[dtd + 2]; diff --git a/src/util/edidHelper.h b/src/util/edidHelper.h index bef07c6c..921f7d76 100644 --- a/src/util/edidHelper.h +++ b/src/util/edidHelper.h @@ -6,7 +6,7 @@ #include #include "util/FFstrbuf.h" -void ffEdidGetPhycialDisplay(const uint8_t edid[128], uint32_t* width, uint32_t* height); void ffEdidGetName(const uint8_t edid[128], FFstrbuf* name); +void ffEdidGetPhycialResolution(const uint8_t edid[128], uint32_t* width, uint32_t* height); #endif