| Summary: | Mac: Drop runtime support for OS X 10.5 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | CC: | lrflew, philipp.wiesemann |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X (All) | ||
|
Description
Alex Szpakowski
2015-10-06 02:07:39 UTC
I pushed a few commits (including Dominik's patch in bug #3127) to my fork, removing 10.5 support: https://bitbucket.org/slime73/sdl-experiments/branch/Mac-no-10.5#diff I'm not sure where to put this comment, and I don't think this deserves a new issue, so I'm going to put it here. When you upgrade the project to build for 10.6 instead of 10.5, new warnings appear. In src/video/cocoa/, the files SDL_cocoamouse.m, SDL_cocoamousetap.m, and SDL_cocoawindow.m have the following lines: CGSetLocalEventsSuppressionInterval(0.0); CGWarpMouseCursorPosition(point); CGSetLocalEventsSuppressionInterval(0.25); (Note, SDL_cocoawindow.m uses CGDisplayMoveCursorToPoint, but they're doing pretty much the same thing) The problem with these lines is that CGSetLocalEventsSuppressionInterval was deprecated as of 10.6. While the comments added in SDL_cocoamouse.m and SDL_cocoawindow.m mention CGEventSource, this doesn't actually seem to be the answer. The implementation in the code now seems like a workaround instead of the actual solution. When searching this problem, I found this alternative solution: CGWarpMouseCursorPosition(point); CGAssociateMouseAndMouseCursorPosition(true); This solution avoids messing with the suppression intervals completely, and just performs the action required. I think I tried that solution at one point, but it didn't quite work properly. Maybe my implementation was imperfect though. (In reply to Alex Szpakowski from comment #3) > I think I tried that solution at one point, but it didn't quite work > properly. Maybe my implementation was imperfect though. Do you mind clarify what didn't work correctly? I tried it with a simple test case (resetting the mouse to the center of the window each frame) and I was unable to see any difference. (In reply to LRFLEW from comment #4) > Do you mind clarify what didn't work correctly? I tried it with a simple > test case (resetting the mouse to the center of the window each frame) and I > was unable to see any difference. I don't actually remember. Maybe I'll test it again later this week. I've replaced CGSetLocalEventsSuppressionInterval with CGAssociateMouseAndMouseCursorPosition in https://hg.libsdl.org/SDL/rev/f0645cd8fd39 Removed via this commit: https://hg.libsdl.org/SDL/rev/3115d38204aa The SDL buildbot fails to compile for Mac OS X since this commit. The SDL buildbot compile failure was fixed here: http://hg.libsdl.org/SDL/rev/4980c48b8dbe |