mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 03:57:07 +03:00
initial refactoring
This commit is contained in:
@@ -268,15 +268,15 @@ static const struct GDS_Device SSD1351 = {
|
||||
.Mode = GDS_RGB565, .Depth = 16,
|
||||
};
|
||||
|
||||
struct GDS_Device* SSD1351_Detect(char *Driver, struct GDS_Device* Device) {
|
||||
struct GDS_Device* SSD1351_Detect(sys_Display * Driver, struct GDS_Device* Device) {
|
||||
int Depth;
|
||||
|
||||
if (!strcasestr(Driver, "SSD1351")) return NULL;
|
||||
if(Driver->common.driver != sys_DisplayDriverEnum_SSD1351) return NULL;
|
||||
|
||||
if (!Device) Device = calloc(1, sizeof(struct GDS_Device));
|
||||
|
||||
*Device = SSD1351;
|
||||
sscanf(Driver, "%*[^:]:%u", &Depth);
|
||||
Depth = Driver->common.bitDepth != 0?Driver->common.bitDepth:18;
|
||||
|
||||
if (Depth == 18) {
|
||||
Device->Mode = GDS_RGB666;
|
||||
|
||||
Reference in New Issue
Block a user