From 7a017c2eb8c229b05da7c87a8c8ec90a9f6b12c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=AF=E6=AD=8C?= Date: Tue, 28 Feb 2023 14:45:30 +0000 Subject: [PATCH] modify numberpicker,fix an uninit val --- apps/uidemo2/main.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/uidemo2/main.cc b/apps/uidemo2/main.cc index 12f40c82..c5151a80 100644 --- a/apps/uidemo2/main.cc +++ b/apps/uidemo2/main.cc @@ -6,7 +6,16 @@ int main(int argc,const char*argv[]){ App app(argc,argv); - Window*w=new ControlCenter(0,0,1280,720); + unsigned int width,height; + GFXGetDisplaySize(0,&width,&height); + printf("screensize=%dx%d\r\n",width,height); + if((GFXGetRotation(0)==ROTATE_90)||(GFXGetRotation(0)==ROTATE_270)){ + int tmp = width; + width = height; + height=tmp; + } + printf("size=%dx%d rotate=%d/%d/%d\r\n",width,height,GFXGetRotation(0),ROTATE_90,ROTATE_270); + Window*w=new ControlCenter(0,0,width,height); return app.exec(); }