Skip to content

Commit

Permalink
C1: Display
Browse files Browse the repository at this point in the history
  • Loading branch information
Owersun committed Jul 19, 2015
1 parent c9fb49d commit b32ec25
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 109 deletions.
74 changes: 73 additions & 1 deletion xbmc/utils/AMLUtils.cpp
Expand Up @@ -174,7 +174,7 @@ enum AML_DEVICE_TYPE aml_get_device_type()
aml_device_type = AML_DEVICE_TYPE_M8M2;
else
aml_device_type = AML_DEVICE_TYPE_M8;
} else if (cpu_hardware.find("Meson8B") != std::string::npos)
} else if (cpu_hardware.find("Meson8B") != std::string::npos && cpu_hardware.find("ODROID") == std::string::npos)
aml_device_type = AML_DEVICE_TYPE_M8B;
else
aml_device_type = AML_DEVICE_TYPE_UNKNOWN;
Expand Down Expand Up @@ -338,6 +338,51 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 60;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "720p23.98hz"))
{
res->iWidth = 1280;
res->iHeight= 720;
res->iScreenWidth = 1280;
res->iScreenHeight= 720;
res->fRefreshRate = 23.98;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "720p24hz"))
{
res->iWidth = 1280;
res->iHeight= 720;
res->iScreenWidth = 1280;
res->iScreenHeight= 720;
res->fRefreshRate = 24;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "720p25hz"))
{
res->iWidth = 1280;
res->iHeight= 720;
res->iScreenWidth = 1280;
res->iScreenHeight= 720;
res->fRefreshRate = 25;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "720p29.98hz"))
{
res->iWidth = 1280;
res->iHeight= 720;
res->iScreenWidth = 1280;
res->iScreenHeight= 720;
res->fRefreshRate = 29.98;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "720p30hz"))
{
res->iWidth = 1280;
res->iHeight= 720;
res->iScreenWidth = 1280;
res->iScreenHeight= 720;
res->fRefreshRate = 30;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "720p50hz"))
{
res->iWidth = 1280;
Expand All @@ -356,6 +401,15 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 60;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "1080p23.98hz"))
{
res->iWidth = 1920;
res->iHeight= 1080;
res->iScreenWidth = 1920;
res->iScreenHeight= 1080;
res->fRefreshRate = 23.98;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "1080p24hz"))
{
res->iWidth = 1920;
Expand All @@ -365,6 +419,24 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 24;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "1080p25hz"))
{
res->iWidth = 1920;
res->iHeight= 1080;
res->iScreenWidth = 1920;
res->iScreenHeight= 1080;
res->fRefreshRate = 25;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "1080p29.98hz"))
{
res->iWidth = 1920;
res->iHeight= 1080;
res->iScreenWidth = 1920;
res->iScreenHeight= 1080;
res->fRefreshRate = 29.98;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
else if (StringUtils::EqualsNoCase(fromMode, "1080p30hz"))
{
res->iWidth = 1920;
Expand Down

0 comments on commit b32ec25

Please sign in to comment.