Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Thu, 22 Apr 1999 12:50:41 +1000

Re: GGI help

Steve Cheng writes:

>  On Wed, 21 Apr 1999, Marcus Sundberg wrote:
>  
>  > 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.
>  
>  Oh yes, you're right, but why try to allocate memory when you know
>  ggiSetPalette() will fail (not palettized mode).  Or ggiSetPalette() can
>  conceivably work in that case?

Text mode, possibly, but that's all.

>  Otherwise programs will have to check for palettized mode before
>  calling ggiSetColorfulPalette() anyway.

IMHO that is not unreasonable, but I agree that ggiSetColorfulPalette()
should check for GT_PALETTE & GT_TEXT and return an error instead of
trying to allocate 16 MB (etc) of memory.

Cheers,
___________________________________________________
                                               \  /
  Andrew Apted   <ajapted@netspace.net.au>      \/
 

Index: [thread] [date] [subject] [author]