screen rotation problem in lg_9100 | developer.brewmp.com screen rotation problem in lg_9100 | developer.brewmp.com

Developer

screen rotation problem in lg_9100

Forums:

Hi , i want to make a sample application for lg_9100; in that the screen sud rotate from protrait to landscape mode when the flip is opened. i went throug the forum

found some code and implemented but the screen still doesnt rotate. i have added the code help. pls help me in solving the problem. let me knkow where i m doing the mistake.

///////////////code//////////////////////////

AECHAR str_txt[] = L"this is the test string";

uint16 retval = 0;//AEE_SO_PORTRAIT;
int size = sizeof(retval);
char buf[30];

int val_return = 9999;

retval = ISHELL_GetDeviceInfoEx(pMe->pIShell, AEE_DEVICESTATE_SCR_ORIENTATION,(void*)&retval, &size );

DBGPRINTF("retval = %d",retval);

switch (retval)
{
case 1: //landscape
STRCPY(buf, "h:176,w:206,r:90");
val_return= IDISPLAY_SetPrefs(pMe->pIDisplay, buf, STRLEN(buf));

SUCCESS

DBGPRINTF("val_return = %d",val_return);
DBGPRINTF("landscape");
break;

case 0: //portrait
STRCPY(buf, "h:176,w:206,r:90");
val_return= IDISPLAY_SetPrefs(pMe->pIDisplay, buf, STRLEN(buf));

DBGPRINTF("val_return = %d",val_return);
DBGPRINTF("portrait");
break;

default:
STRCPY(buf, "h:176,w:206,r:90");
val_return= IDISPLAY_SetPrefs(pMe->pIDisplay, buf, STRLEN(buf));

DBGPRINTF("val_return = %d",val_return);
DBGPRINTF("default");
break;

ISHELL_GetDeviceInfo(pMe->pIShell,&pMe->post_rot_di);

DBGPRINTF("post_rot_di width = %d , height = %d",pMe->post_rot_di.cxScreen,pMe->post_rot_di.cyScreen);

IDISPLAY_ClearScreen(pMe->pIDisplay);
pMe->rect.x = 0;
pMe->rect.y = 0;
pMe->rect.dx = pMe->post_rot_di.cxScreen;
pMe->rect.dy = pMe->post_rot_di.cyScreen;

IDISPLAY_SetClipRect(pMe->pIDisplay, &pMe->rect);
IDISPLAY_GetClipRect(pMe->pIDisplay, &pMe->rect);

IDISPLAY_DrawText(pMe->pIDisplay,AEE_FONT_NORMAL,str_txt,-1,0,20,&pMe->rect,IDF_ALIGN_CENTER);

IDISPLAY_Update(pMe->pIDisplay);

////////////////////////////////////////////////

in the loger i checked

val_return= IDISPLAY_SetPrefs(pMe->pIDisplay, buf, STRLEN(buf));

for case 0: (when the slider is opened)
val_return = 21 ( #define EPRIVLEVEL 21 // Security violation )

i also have added the id ( #define AEECLSID_TOUCH_SCREEN 0x01030810 )

in the dependency tab of mif file.

i am using brew 3.1.5

Did you check the sample application listed under LG AX260 in the BREW device details page?
https://brewx.qualcomm.com/brew/sdk/authdownload.jsp?page=deviceknowniss...

Did you check the sample application listed under LG AX260 in the BREW device details page?
https://brewx.qualcomm.com/brew/sdk/authdownload.jsp?page=deviceknowniss...

Hi All
After going through the sample app mentioned in the above post, I tried it on my LG RD 9100 device.
I am able to rotate the screen but its not actually taking up the whole user screen.
What I am seeing in the portrait mode - it simply rotated in Landscape, but then my softkeys vanished and the screen width is also not exact.
Can anyone please explian what I might be doing wrong??
Regards
Akshay

Hi All
After going through the sample app mentioned in the above post, I tried it on my LG RD 9100 device.
I am able to rotate the screen but its not actually taking up the whole user screen.
What I am seeing in the portrait mode - it simply rotated in Landscape, but then my softkeys vanished and the screen width is also not exact.
Can anyone please explian what I might be doing wrong??
Regards
Akshay

akshay1384 wrote:Hi All
After going through the sample app mentioned in the above post, I tried it on my LG RD 9100 device.
I am able to rotate the screen but its not actually taking up the whole user screen.
What I am seeing in the portrait mode - it simply rotated in Landscape, but then my softkeys vanished and the screen width is also not exact.
Can anyone please explian what I might be doing wrong??
Regards
Akshay
hi akshay,
after the screen rotation , the screen size changes . In each rotation the origin point of the screen changes. So you have to draw the screen each time you rotate it, i.e while from portrait to landscape and viceversa, using new screen size. This is the solution.

akshay1384 wrote:Hi All
After going through the sample app mentioned in the above post, I tried it on my LG RD 9100 device.
I am able to rotate the screen but its not actually taking up the whole user screen.
What I am seeing in the portrait mode - it simply rotated in Landscape, but then my softkeys vanished and the screen width is also not exact.
Can anyone please explian what I might be doing wrong??
Regards
Akshay
hi akshay,
after the screen rotation , the screen size changes . In each rotation the origin point of the screen changes. So you have to draw the screen each time you rotate it, i.e while from portrait to landscape and viceversa, using new screen size. This is the solution.

nayak.prasant wrote:hi akshay,
after the screen rotation , the screen size changes . In each rotation the origin point of the screen changes. So you have to draw the screen each time you rotate it, i.e while from portrait to landscape and viceversa, using new screen size. This is the solution.
Hi Prasant
Thanks for the reply. But on getting the rotate event, I again take the device info coordinates and then assign the new one's to create the screen.
Still I am not able to get the proper output.
Please help.
Akshay

nayak.prasant wrote:hi akshay,
after the screen rotation , the screen size changes . In each rotation the origin point of the screen changes. So you have to draw the screen each time you rotate it, i.e while from portrait to landscape and viceversa, using new screen size. This is the solution.
Hi Prasant
Thanks for the reply. But on getting the rotate event, I again take the device info coordinates and then assign the new one's to create the screen.
Still I am not able to get the proper output.
Please help.
Akshay

try to add "0x0103081d" id in the dependency tab, i think it sud work
Actually its the id of "AEEDispSettings.bid" file. Present in "BREW315\sdk\inc"

try to add "0x0103081d" id in the dependency tab, i think it sud work
Actually its the id of "AEEDispSettings.bid" file. Present in "BREW315\sdk\inc"

Also, make sure that you dispose and recreate your IGRAPHICS interface after the screen rotation has changed.
Jonny

Also, make sure that you dispose and recreate your IGRAPHICS interface after the screen rotation has changed.
Jonny