This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Treo 700w/wx screen and gapi problem.


Treo 700w/wx screen and gapi problem.

Postby Fredo1975 » Nov 13, 2007 @ 12:17pm

Hi,

I have a issue with the treo 700w/wx device and gapi.
Apperently, their is some problem with the screen address and gapi.

My applications work great on many squared devices and also on the treo 750v, but not on the 700w/wx and I don't have this device to test by myself.

I received many message for my applications from 700w/wx users, they told me that the problem made a white screen and then a error message appeared.

Here is a code to determine what address and how gapi work.
I also attached a precompiled file to this message.

r=GXOpenDisplay(hWnd,dwFlags);
if (r!=0)
{
WORD VDRAM;
HDC hdc = GetDC(NULL);
ExtEscape(hdc, GETRAWFRAMEBUFFER, 0, NULL,
sizeof(RawFrameBufferInfo), (char *) &rfbi);
ReleaseDC(NULL, hdc);

VDRAM=GXIsDisplayDRAMBuffer();

if (!VDRAM) pBuffer = (void *)GXBeginDraw();
else pBuffer = rfbi.pFramePointer;

stream = _wfopen(TEXT("result.txt"), TEXT("w"));
fprintf(stream,"Hardware Information \n");
fprintf(stream,"==================== \n");
fprintf(stream,"\n");
fprintf(stream,"[BEGIN]\n");
fprintf(stream,"wFormat =%d\n",rfbi.wFormat);
fprintf(stream,"wBPP =%d\n",rfbi.wBPP);
fprintf(stream,"pFramePointer =%p\n",rfbi.pFramePointer);
fprintf(stream,"cxStride =%d\n",rfbi.cxStride);
fprintf(stream,"cyStride =%d\n",rfbi.cyStride);
fprintf(stream,"cxPixels =%d\n",rfbi.cxPixels);
fprintf(stream,"cyPixels =%d\n",rfbi.cyPixels);
fprintf(stream,"VDRAM =%d\n",VDRAM);
fprintf(stream,"GetSystemMetrics CX =%d\n",GetSystemMetrics(SM_CXSCREEN));
fprintf(stream,"GetSystemMetrics CY =%d\n",GetSystemMetrics(SM_CYSCREEN));
fprintf(stream,"\n");
fprintf(stream,"[END]\n");
fprintf(stream,"--------------------------------------\n");
fclose( stream );
}

I've got this result on the Treo 750v.
Hardware Information
===============
[BEGIN]
wFormat =1
wBPP =16
pFramePointer =4C800000
cxStride =2
cyStride =480
cxPixels =240
cyPixels =240
VDRAM =0
GetSystemMetrics CX =240
GetSystemMetrics CY =240
[END]

I someone could try this code, maybe I could reach a small deduction and fix the damn 700w bug.
Or if someone have the solution/information about the gapi 700w/wx screen issue, that would be more that usefull.

Thanks,
Fredo
Attachments
testgapi.zip
(15.02 KiB) Downloaded 806 times
Fredo1975
pm Member
 
Posts: 3
Joined: Nov 12, 2007 @ 3:09pm


Postby Kzinti » Nov 13, 2007 @ 5:59pm

There is nothing wrong with the Treo 700w. Your code doesn't look correct: you are mixing GAPI and GETRAWFRAMEBUFFER APIs. You also assume that GETRAWFRAMEBUFFER will work if GXOpenDisplay() does: there is no relation between the two. It also sounds like you forgot to call GXCloseDisplay() in case you use GETRAWFRAMEBUFFER.

I suggest you remove all GAPI code and just go with GETRAWFRAMEBUFFER. If *that* fails, then maybe try GAPI (although that's a bad idea with all the devices doing emulation behind your back).
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Fredo1975 » Nov 13, 2007 @ 9:48pm

Thanks for your reply,

This isn't the full code, I only put the interested part.
The complet code work great on many other devices.

Today I have received some feedback, it's appeared that the VDRAM is different in the treo 700w.
Fredo1975
pm Member
 
Posts: 3
Joined: Nov 12, 2007 @ 3:09pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron