improve rotation

This commit is contained in:
lixianjing 2023-10-23 12:48:53 +08:00
parent 5f91d88389
commit d2341b5c5a
5 changed files with 18 additions and 10 deletions

View File

@ -4,6 +4,7 @@
* 增加函数wbuffer\_create/wbuffer\_destroy/rbuffer\_create/rbuffer\_destroy
* 增加杀死子进程的函数和设置子程序工作目录函数(感谢智明提供补丁)
* 新增让本地窗口全屏的函数(感谢智明提供补丁)
* 修改pc端模拟运行旋转和嵌入式不正确的问题(感谢智明提供补丁)
2023/10/20
* 完善conf\_node\_set\_value

View File

@ -489,11 +489,12 @@ class AppHelperBase:
self.BUILD_SHARED = self.complie_helper.get_value('SHARED', False)
self.GEN_IDL_DEF = self.complie_helper.get_value('IDL_DEF', True)
if LCD_ORIENTATION == '90' or LCD_ORIENTATION == '270' :
tmp = LCD_WIDTH;
LCD_WIDTH = LCD_HEIGHT;
LCD_HEIGHT = tmp;
if not self.LINUX_FB :
if LCD_ORIENTATION == '90' or LCD_ORIENTATION == '270' :
tmp = LCD_WIDTH;
LCD_WIDTH = LCD_HEIGHT;
LCD_HEIGHT = tmp;
APP_CCFLAGS = ' -DLCD_WIDTH=' + LCD_WIDTH + ' -DLCD_HEIGHT=' + LCD_HEIGHT + ' '
APP_CCFLAGS = APP_CCFLAGS + ' -DAPP_DEFAULT_FONT=\\\"' + APP_DEFAULT_FONT + '\\\" '

View File

@ -266,7 +266,7 @@ class res_config:
def get_res_lcd_orientation(self, theme_name = ''):
orientation = '0'
if theme_name == '' and 'lcdOrientation' in self.assets :
if 'lcdOrientation' in self.assets :
orientation = self.assets['lcdOrientation']
elif theme_name != '' and self.has_lcd(theme_name) and 'orientation' in self.assets['themes'][theme_name]['lcd'] :
orientation = self.assets['themes'][theme_name]['lcd']['orientation']

View File

@ -208,14 +208,14 @@ int main(int argc, char* argv[]) {
}
#endif /*WITH_LCD_PORTRAIT*/
#ifndef TK_IS_PC
#ifdef APP_LCD_ORIENTATION
if (system_info()->app_type != APP_SIMULATOR) {
#if defined(APP_ENABLE_FAST_LCD_PORTRAIT)
tk_enable_fast_lcd_portrait(TRUE);
tk_enable_fast_lcd_portrait(TRUE);
#endif
tk_set_lcd_orientation(APP_LCD_ORIENTATION);
}
tk_set_lcd_orientation(APP_LCD_ORIENTATION);
#endif
#endif/*TK_IS_PC*/
system_info_set_default_font(system_info(), APP_DEFAULT_FONT);
assets_init();

View File

@ -558,4 +558,10 @@ typedef struct _lcd_t lcd_t;
#define TK_DOUBLE_CLICK_XY 10
#endif /*TK_DOUBLE_CLICK_XY*/
#ifndef TK_IS_PC
#if defined(WITH_SDL) && !defined(ANDROID) && !defined(IOS)
#define TK_IS_PC 1
#endif
#endif /*TK_IS_PC*/
#endif /*TK_TYPES_DEF_H*/