[haiku-gsoc] Re: display_mode: strange issues
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: haiku-gsoc@xxxxxxxxxxxxx
- Date: Tue, 16 Aug 2011 09:55:56 +0200 (MEST)
Nathan Heisey <nathanheisey@xxxxxxxxx> wrote: > Could Haiku be doing something to the structure after I get it? This sounds a lot like you did not correctly allocate the structure, or placed it on the stack, and then it is overwritten later. To get the mode, you would need to do something like: display_mode* mode = malloc(sizeof(display_mode)); if (mode != NULL) screen.GetDisplayMode(mode); (not sure if the BScreen method is called like this, though) Bye, Axel.