How to Get Device Native Display Buffer Pointer for BREW 1 devices | developer.brewmp.com How to Get Device Native Display Buffer Pointer for BREW 1 devices | developer.brewmp.com

Developer

How to Get Device Native Display Buffer Pointer for BREW 1 devices

Forums:

For Brew 1 devices we dont have suport of GetDeviceBitMap and IDIB. I need a pointer which points to native data of Device Bitmap. Is any method to get that native data pointer( of device display buffer from where the data for 1st pixel starts) ? Could anyone help me out on this ?

theres no general solution for this

theres no general solution for this

Specifically I need this native device bitmap pointer for SamSumg A530.
What is the method to get it for this device ?
byt* ptr=(byte*) GetDisplayBuff(pIDisplay);
//
long* GetDisplayBuff(IDisplay * pIDisplay)
{
unsigned char *p = ((unsigned char**)pIDisplay)[3];
return *(long**)(*(p + 0x31) * 4 + p + 0x10);

This is the code to get the native data pointer of Device Bitmap for MT720.
I could not understand the code. It does not seem general also.
I need the same type of code for A530.
Let me know if someone has any idea.

Specifically I need this native device bitmap pointer for SamSumg A530.
What is the method to get it for this device ?
byt* ptr=(byte*) GetDisplayBuff(pIDisplay);
//
long* GetDisplayBuff(IDisplay * pIDisplay)
{
unsigned char *p = ((unsigned char**)pIDisplay)[3];
return *(long**)(*(p + 0x31) * 4 + p + 0x10);

This is the code to get the native data pointer of Device Bitmap for MT720.
I could not understand the code. It does not seem general also.
I need the same type of code for A530.
Let me know if someone has any idea.

Doing this in itself is not generally a good idea, hardware / firmware changes in later handset revisions can easily break the code.

Doing this in itself is not generally a good idea, hardware / firmware changes in later handset revisions can easily break the code.

I know this is not an good idea but...I need this to fix a issue of Samsung device.
The issue is
Whenever we draw a line ( whcih is not horizontal and not vertical also )using IGRAPHICS in black color then that line's color becomes "RED". This is found on our device and we have tested it on Hello World App. In my perspective , we have only one way to get rid of this, that is get the native device bitmap pointer and change the value of the native bytes. Thats why I need the native data poiter of device bitmap for A530. I am needing it urgently plz help me out on this .

I know this is not an good idea but...I need this to fix a issue of Samsung device.
The issue is
Whenever we draw a line ( whcih is not horizontal and not vertical also )using IGRAPHICS in black color then that line's color becomes "RED". This is found on our device and we have tested it on Hello World App. In my perspective , we have only one way to get rid of this, that is get the native device bitmap pointer and change the value of the native bytes. Thats why I need the native data poiter of device bitmap for A530. I am needing it urgently plz help me out on this .

why not try drawpolyline, drawtriangle, drawpoint with a linedraw algo, drawrect etc
one of them will probably work

why not try drawpolyline, drawtriangle, drawpoint with a linedraw algo, drawrect etc
one of them will probably work

spanpatte wrote:I know this is not an good idea but...I need this to fix a issue of Samsung device.
The issue is
Whenever we draw a line ( whcih is not horizontal and not vertical also )using IGRAPHICS in black color then that line's color becomes "RED". This is found on our device and we have tested it on Hello World App. In my perspective , we have only one way to get rid of this, that is get the native device bitmap pointer and change the value of the native bytes. Thats why I need the native data poiter of device bitmap for A530. I am needing it urgently plz help me out on this .
There are known issues with this on the Samsung
try drawing a black circle without fill and you will get a red one.
For lines I suggest you just have a bitmap which is a long line and
blit the part you neeed. And unless speed is an issue you could easily
create this bitmap on the fly and run CONVERTBMP on it.

spanpatte wrote:I know this is not an good idea but...I need this to fix a issue of Samsung device.
The issue is
Whenever we draw a line ( whcih is not horizontal and not vertical also )using IGRAPHICS in black color then that line's color becomes "RED". This is found on our device and we have tested it on Hello World App. In my perspective , we have only one way to get rid of this, that is get the native device bitmap pointer and change the value of the native bytes. Thats why I need the native data poiter of device bitmap for A530. I am needing it urgently plz help me out on this .
There are known issues with this on the Samsung
try drawing a black circle without fill and you will get a red one.
For lines I suggest you just have a bitmap which is a long line and
blit the part you neeed. And unless speed is an issue you could easily
create this bitmap on the fly and run CONVERTBMP on it.