Skip to content

Commit

Permalink
Simple support for emery platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
matopeto committed Oct 19, 2016
1 parent 2c0ce4b commit 6fceaf0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
4 changes: 3 additions & 1 deletion appinfo.json
Expand Up @@ -35,7 +35,9 @@
"targetPlatforms": [
"aplite",
"basalt",
"chalk"
"chalk",
"diorite",
"emery"
],
"uuid": "133215f0-cf20-4c05-997b-3c9be5a64e5b",
"versionCode": 1,
Expand Down
6 changes: 6 additions & 0 deletions src/js/platform/feature.js
Expand Up @@ -25,41 +25,47 @@ Feature.blackAndWhite = Feature.makePlatformTest({
basalt: false,
chalk: false,
diorite: true,
emery: false,
});

Feature.color = Feature.makePlatformTest({
aplite: false,
basalt: true,
chalk: true,
diorite: false,
emery: true,
});

Feature.rectangle = Feature.makePlatformTest({
aplite: true,
basalt: true,
chalk: false,
diorite: true,
emery: true,
});

Feature.round = Feature.makePlatformTest({
aplite: false,
basalt: false,
chalk: true,
diorite: false,
emery: false,
});

Feature.microphone = Feature.makePlatformTest({
aplite: false,
basalt: true,
chalk: true,
diorite: true,
emery: true,
});

Feature.resolution = Feature.makePlatformTest({
aplite: new Vector2(144, 168),
basalt: new Vector2(144, 168),
chalk: new Vector2(180, 180),
diorite: new Vector2(144, 168),
emery: new Vector2(200, 228),
});

Feature.actionBarWidth = function() {
Expand Down
2 changes: 1 addition & 1 deletion src/util/compat.h
Expand Up @@ -9,7 +9,7 @@
*/

// Compatibility definitions for aplite on 2.9
#if !defined(PBL_PLATFORM_APLITE) && !defined(PBL_PLATFORM_BASALT) && !defined(PBL_PLATFORM_CHALK) && !defined(PBL_PLATFORM_DIORITE)
#if !defined(PBL_PLATFORM_APLITE) && !defined(PBL_PLATFORM_BASALT) && !defined(PBL_PLATFORM_CHALK) && !defined(PBL_PLATFORM_DIORITE) && !defined(PBL_PLATFORM_EMERY)

#define PBL_SDK_2

Expand Down
8 changes: 8 additions & 0 deletions src/util/platform.h
Expand Up @@ -33,3 +33,11 @@
#define IF_DIORITE_ELSE(diorite, other) other
#define DIORITE_USAGE __attribute__((unused))
#endif

#if defined(PBL_PLATFORM_EMERY)
#define IF_EMERY_ELSE(emery, other) emery
#define EMERY_USAGE
#else
#define IF_EMERY_ELSE(emery, other) other
#define EMERY_USAGE __attribute__((unused))
#endif

0 comments on commit 6fceaf0

Please sign in to comment.