We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 431 - Mac OS Classic gamma ramp support...
Summary: Mac OS Classic gamma ramp support...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS Classic
: P1 enhancement
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL: http://lists.libsdl.org/pipermail/sdl...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-02 21:59 UTC by Ryan C. Gordon
Modified: 2007-06-14 23:31 UTC (History)
1 user (show)

See Also:


Attachments
Patch to support macrom gamma. (4.37 KB, patch)
2007-06-02 22:04 UTC, Ryan C. Gordon
Details | Diff
MacGamma code from ADC. (20.08 KB, text/plain)
2007-06-02 22:04 UTC, Ryan C. Gordon
Details
Gamma ramp functions header from ADC. (3.96 KB, text/plain)
2007-06-02 22:05 UTC, Ryan C. Gordon
Details
Updated patch. (17.71 KB, patch)
2007-06-02 23:54 UTC, Ryan C. Gordon
Details | Diff
Updated patch for macrom AND macdsp... (18.10 KB, patch)
2007-06-03 12:40 UTC, Ryan C. Gordon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2007-06-02 21:59:58 UTC
(Mailing list post in the URL field...)

Patch to add gamma ramp support to Mac OS Classic for SDL 1.2.

--ryan.
Comment 1 Ryan C. Gordon 2007-06-02 22:04:08 UTC
Created attachment 207 [details]
Patch to support macrom gamma.


Patch to macrom.

--ryan.
Comment 2 Ryan C. Gordon 2007-06-02 22:04:51 UTC
Created attachment 208 [details]
MacGamma code from ADC.

Source code from Apple Developer Connection to provide gamma ramp API.

--ryan.
Comment 3 Ryan C. Gordon 2007-06-02 22:05:40 UTC
Created attachment 209 [details]
Gamma ramp functions header from ADC.


Header file from Apple Developer Connection for those gamma ramp APIs.

--ryan.
Comment 4 Ryan C. Gordon 2007-06-02 22:06:27 UTC
I'd really like to get the MacGamma.c code merged into src/video/macrom/SDL_romvideo.c so that we don't have to change the project files.

--ryan.

Comment 5 Ryan C. Gordon 2007-06-02 22:06:56 UTC
(Bumping to P1 so it gets considered for 1.2.12...)

--ryan.

Comment 6 Ryan C. Gordon 2007-06-02 23:54:58 UTC
Created attachment 210 [details]
Updated patch.

Merged this all into one patch, cleaned it up a little.

--ryan.
Comment 7 Ryan C. Gordon 2007-06-03 01:08:51 UTC
CC'ing Greg...I can't get SDL to build on Mac OS Classic at all to test the updated patch. Can you try it and let me know if it works?

Thanks,
--ryan.

Comment 8 Gregory Smith 2007-06-03 07:52:33 UTC
I haven't applied it, but reading it, it looks like your new patch doesn't add gamma support to DrawSprocket, only the toolbox video driver.

If you don't mind having the MacGamma.c code duplicated in SDL_dspvideo and SDL_romvideo (that's why I had the file separate), I could see about a patch to both files that wouldn't require a new project file to be created.
Comment 9 Ryan C. Gordon 2007-06-03 12:40:57 UTC
Created attachment 211 [details]
Updated patch for macrom AND macdsp...


Whoops, I missed that in the original patch. I've moved the gamma code to maccommon, so now the changes to macdsp and macrom are extremely minimal.

Attaching patch against latest Subversion.

--ryan.
Comment 10 Gregory Smith 2007-06-10 19:10:55 UTC
OK I'm working on getting this to compile. For some reason I'm getting I'm getting undefined symbols for PBStatus, which is weird because MacGamma worked fine for me before. I'll let you know
Comment 11 Ryan C. Gordon 2007-06-10 23:14:21 UTC
I had that problem on OS X (PBStatusSync() isn't in Carbonlib)...I don't know what library it's in for Classic.

--ryan.

Comment 12 Gregory Smith 2007-06-14 18:02:47 UTC
Changing PBStatus(..., 0) to PBStatusAsync(...) fixed it. Compiled with the standard project file, and works great.
Comment 13 Ryan C. Gordon 2007-06-14 23:31:37 UTC
I tweaked it from PBStatusAsync() to PBStatusSync(), since that '0' says we need it synchronously, and appears to solve the linking issue without risk of a race condition.

This patch is now in source control, svn revision #3073 for the 1.2 branch (and isn't applicable to the 1.3 branch).

When you get a moment, update to the latest in Subversion and make sure this still works. It should, so I'm resolving the bug, but just reopening it if I screwed something up.

Thanks for the legwork on this one, Gregory!

--ryan.