When I do the following small example the width and height returned from the functions GetWidth() and GetHeight() are wrong. They return 320 x 240 while they should be 220x176.
What am I doing wrong?
Again this is in the emulator. I don't know what the result is in a real phone.
What am I doing wrong?
- Code:
HRESULT hr;
//Open Display
if( FAILED( hr = g_display.OpenDisplay(hWnd, GDOPENDISPLAY_SMARTPHONE)))
{
return hr;
}
// Switch to landscape mode
g_display.SetDisplayMode( GDDISPMODE_NORMAL );
// Set g_backbuffer as display backbuffer
g_display.GetBackBuffer( &g;_backbuffer );
// Screen size
dwWidth = g_display.GetWidth();
dwHeight = g_display.GetHeight();
//print values to file
STLOG_WRITE(_T("Height from display_1: %d ),dwHeight);
STLOG_WRITE(_T("Width from display_1: %d ),dwWidth );
Again this is in the emulator. I don't know what the result is in a real phone.