SetGamma patch coding questions

Hi,

I woke up this morning and looked at the patch for windowed and openGL
mode, it is cut-n-paste-ugly!

I ran into naming quandaries and uncertainty about where to put the common
code (the code that does the DIB gamma), then the #ifdefs reared their
ugly heads …

Looks like shared code (between windib and directx) should be put in the
wincommon folder, but in which existing file?

Is it better to shoehorn the functions into “SDL_sysevents.c” than to
add a new source and header file?

What about adding a dependency between the DIB and DX versions (yuck)?

Maybe it doesn’t really matter for such a relatively small chunk of code.
Then again, cut-n-paste-code-rot does creep up and get you :frowning:

cheers,
John.
PS time for a nice cup of tea, then, perhaps I should read more of the
source …

Hi,

I woke up this morning and looked at the patch for windowed and openGL
mode, it is cut-n-paste-ugly!

Heheh. I’ll look into it this morning too, maybe between us we can cook
up a decent patch. :slight_smile:

PS time for a nice cup of tea, then, perhaps I should read more of the
source …

Cheers,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

How about cooking up a few eggs too while you’re at it?

(I’ll shut up now.) ;)On Thu, Apr 11, 2002 at 06:28:14AM -0700, Sam Lantinga wrote:

I woke up this morning and looked at the patch for windowed and openGL
mode, it is cut-n-paste-ugly!

Heheh. I’ll look into it this morning too, maybe between us we can cook
up a decent patch. :slight_smile:


Joseph Carter Available in cherry and grape

While the year 2000 (y2k) problem is not an issue for us, all Linux
implementations will impacted by the year 2038 (y2.038k) issue. The
Debian Project is committed to working with the industry on this issue
and we will have our full plans and strategy posted by the first quarter
of 2020.

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020411/f338ed80/attachment.pgp

Okay, I have what appears to be a fairly elegant solution for the windows
gamma ramp problem. I cheated. :slight_smile:

Go ahead and try it out in the latest CVS snapshot:
http://www.libsdl.org/cvs.html

It appears to work well for DirectX fullscreen, windowed, and OpenGL modes.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi Sam and John,
This is excellent news!

Dominique.

Sam Lantinga wrote:> Okay, I have what appears to be a fairly elegant solution for the windows

gamma ramp problem. I cheated. :slight_smile:

Go ahead and try it out in the latest CVS snapshot:
http://www.libsdl.org/cvs.html

It appears to work well for DirectX fullscreen, windowed, and OpenGL modes.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


http://www.DelphiGamer.com := for all your Object Pascal game
development needs;
http://www.delphi-jedi.org/Jedi:TEAM_SDL_HOME := Home of JEDI-SDL;
Cross-platform game development with Pascal, has never been easier.