Move variable position.

Signed-off-by: benb365 <liuyongchang@seu.edu.cn>
This commit is contained in:
benb365
2022-03-29 14:35:41 +08:00
parent 6d37109925
commit 86fcf536c5
+1 -1
View File
@@ -1094,11 +1094,11 @@ struct JSPageSpecific jsPageSpecific;
uint16_t GetHorizontalResolution()
{
constexpr uint16_t resConst = 454;
// SCREENSIZE_SPECIFIED is temporarily set, when ui and graphic unifid, this can be removed
#if ((defined __LITEOS__) || (defined __linux__) || (SCREENSIZE_SPECIFIED == 1))
return Screen::GetInstance().GetWidth();
#else
constexpr uint16_t resConst = 454;
uint16_t horizontalResolution = resConst;
uint16_t verticalResolution = resConst;
ProductAdapter::GetScreenSize(horizontalResolution, verticalResolution);