Index:
[thread]
[date]
[subject]
[author]
From: Marcus Sundberg <mackan@stacken.kth.se>
To : ggi-develop@eskimo.com
Date: Wed, 21 Apr 1999 20:11:12 +0000
Re: GGI help
Steve Cheng wrote:
>
> On Tue, 20 Apr 1999 becka@rz.uni-duesseldorf.de wrote:
>
> > You don't have to set a palette unless you are in a palettized mode.
> > Doing so yields undefined results. You usually do
>
> I think this just makes it unneccesarily hard-to-use (calling Palette
> functions when the mode is not palettized is undefined behavior).
> Why not simply have checks for palette mode, and fail if it is not?
> Some code want to be as mode-independent as possible.
>
> Either way, I'll document this.
The result is not undefined, ggiSetPalette() returns <0 on failure,
whatever the reason may be. The reason that ggiSetColorfulPalette()
fails in this thread is that it needs to allocate (1<<GT_DEPTH(mode))*8
bytes of memory.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan/
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: mackan@stacken.kth.se
Index:
[thread]
[date]
[subject]
[author]