1. 程式人生 > >修改android 預設橫豎屏

修改android 預設橫豎屏

device/..產品../ProjectConfig.mk下有個巨集,修改這個巨集即可。

如:device/wisky/wisky8735_3g_h/ProjectConfig.mk

MTK_LCM_PHYSICAL_ROTATION = 901

修改這個巨集,可能會影響其他地方。


=====轉======

修改recovery程式碼,用固定的方向。

bootable/recovery/minui/graphics_fbdev.c
若要旋轉90度,將return改為: return 1;
// Read configuration from MTK_LCM_PHYSICAL_ROTATION
static int
rotate_config(GRSurface *gr_draw) { if (rotate_index<0) { if (gr_draw->pixel_bytes != 4) rotate_index=0; // support 4 bytes pixel only else if (0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "90", 2)) rotate_index=1; else if (0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "180", 3
)) rotate_index=2; else if (0 == strncmp(MTK_LCM_PHYSICAL_ROTATION, "270", 3)) rotate_index=3; else rotate_index=0; printf("[graphics] rotate_config %d %s\n", rotate_index, MTK_LCM_PHYSICAL_ROTATION); } return rotate_index; }