Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Fixes for some of the minor issues blocking 64-bit Mac support#3036

Merged
livecodefraser merged 9 commits intolivecode:developfrom
livecodefraser:mac64-minor_fixes
Oct 12, 2015
Merged

Fixes for some of the minor issues blocking 64-bit Mac support#3036
livecodefraser merged 9 commits intolivecode:developfrom
livecodefraser:mac64-minor_fixes

Conversation

@livecodefraser
Copy link
Copy Markdown
Contributor

Each of the commits in this PR addresses a different issue so are best reviewed individually. The general theme of this PR is changing some Carbon-specific APIs to their Cocoa replacements.

There are a number of large chunks of code that aren't 64-bit compatible yet; this PR just cleans up some of the low-hanging fruit.

For 64-bit OSX, the type CGFloat is a typedef for double, not
float. So make sure we pass an array of CGFloat and not float
to a method expecting CGFloat.
CGFloat is a double (== float64_t) and not a float, so if we want
to use min/max on it, we need this overload.
There isn't a direct replacement, so an undocumented preferences
key needs to be queried instead (NSTextInsertionPointBlinkPeriod).
This key is widely discussed on the internet so seems to be fairly
reliable.

Just in case it isn't, a fallback value is provided that uses
the default blink rate for my OSX system.
@peter-b
Copy link
Copy Markdown
Contributor

peter-b commented Oct 9, 2015

Reviewed 1 of 1 files at r1, 4 of 4 files at r2, 1 of 1 files at r4, 1 of 1 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, 1 of 1 files at r8.
Review status: 9 of 10 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending.


engine/src/osxprefix.h, line 26 [r3] (raw file):
Is foundation.h included at this point? Should this use MCMemoryMove()?


Comments from the review on Reviewable.io

@peter-b
Copy link
Copy Markdown
Contributor

peter-b commented Oct 12, 2015

Per off-line conversation with @livecodefraser, osxprefix.h is supposed to be included before anything else, so MCMemoryMove() isn't guaranteed to be available.

@livecode-vulcan review ok 4224c5e

@livecode-vulcan
Copy link
Copy Markdown
Contributor

💙 review by @peter-b ok 4224c5e

livecode-vulcan added a commit that referenced this pull request Oct 12, 2015
Fixes for some of the minor issues blocking 64-bit Mac support

Each of the commits in this PR addresses a different issue so are best reviewed individually. The general theme of this PR is changing some Carbon-specific APIs to their Cocoa replacements.

There are a number of large chunks of code that aren't 64-bit compatible yet; this PR just cleans up some of the low-hanging fruit.
@livecode-vulcan
Copy link
Copy Markdown
Contributor

😎 test success 4224c5e

livecodefraser added a commit that referenced this pull request Oct 12, 2015
Fixes for some of the minor issues blocking 64-bit Mac support
@livecodefraser livecodefraser merged commit c500411 into livecode:develop Oct 12, 2015
@livecodefraser livecodefraser deleted the mac64-minor_fixes branch October 12, 2015 15:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants