Skip to content
This repository was archived by the owner on Nov 7, 2020. It is now read-only.

Commit 92e4ee6

Browse files
author
Matthew Tole
committed
Add back Aplite support
1 parent d83a2f5 commit 92e4ee6

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

appinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"shortName": "Hearts",
44
"longName": "Hearts",
55
"companyName": "Matthew Tole",
6-
"targetPlatforms": ["basalt", "chalk"],
6+
"targetPlatforms": ["aplite", "basalt", "chalk"],
77
"sdkVersion": "3",
88
"versionCode": 1,
99
"versionLabel": "5.0",

src/js/pebble-js-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,7 @@ module.exports = {
17781778
"shortName": "Hearts",
17791779
"longName": "Hearts",
17801780
"companyName": "Matthew Tole",
1781-
"targetPlatforms": ["basalt", "chalk"],
1781+
"targetPlatforms": ["aplite", "basalt", "chalk"],
17821782
"sdkVersion": "3",
17831783
"versionCode": 1,
17841784
"versionLabel": "5.0",

src/js/src/generated/appinfo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040
"shortName": "Hearts",
4141
"longName": "Hearts",
4242
"companyName": "Matthew Tole",
43-
"targetPlatforms": ["basalt", "chalk"],
43+
"targetPlatforms": ["aplite", "basalt", "chalk"],
4444
"sdkVersion": "3",
4545
"versionCode": 1,
4646
"versionLabel": "5.0",

src/windows/win-main.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ static Window* s_window;
6868
static Layer* s_layer_count;
6969
static Layer* s_layer_name;
7070
static Layer* s_layer_dots;
71-
static Layer* s_indicator_up_layer;
72-
static Layer* s_indicator_down_layer;
7371
static AppInfo* s_app_info;
7472
static uint8_t s_app_position = 0;
7573
static uint8_t s_app_position_new = 0;
@@ -85,8 +83,13 @@ static uint16_t s_name_offset = 0;
8583
static uint8_t s_animation_direction;
8684
static uint16_t s_dot_current_x = 0;
8785
static GSize s_window_size;
86+
87+
#ifdef PBL_SDK_3
88+
static Layer* s_indicator_up_layer;
89+
static Layer* s_indicator_down_layer;
8890
static ContentIndicator* s_indicator_up;
8991
static ContentIndicator* s_indicator_down;
92+
#endif
9093

9194
void win_main_init(void) {
9295
s_window = window_create();
@@ -139,10 +142,12 @@ static void window_load(Window* window) {
139142
layer_set_update_proc(s_layer_count, layer_update_count);
140143
layer_add_to_window(s_layer_count, window);
141144

142-
s_layer_dots = layer_create(GRect(0, 120, s_window_size.w, 12));
145+
s_layer_dots = layer_create(GRect(0, 130, s_window_size.w, 12));
143146
layer_set_update_proc(s_layer_dots, layer_update_dots);
144147
layer_add_to_window(s_layer_dots, window);
145148

149+
#ifdef PBL_SDK_3
150+
146151
s_indicator_up_layer = layer_create(GRect(0, 0,
147152
s_window_size.w, STATUS_BAR_LAYER_HEIGHT));
148153
s_indicator_down_layer = layer_create(GRect(0, s_window_size.h - STATUS_BAR_LAYER_HEIGHT,
@@ -178,6 +183,7 @@ static void window_load(Window* window) {
178183

179184
content_indicator_set_content_available(s_indicator_down, ContentIndicatorDirectionDown, true);
180185
content_indicator_set_content_available(s_indicator_up, ContentIndicatorDirectionUp, false);
186+
#endif
181187
}
182188

183189
static void window_unload(Window* window) {
@@ -201,8 +207,10 @@ static void do_transition(void) {
201207
transition_animation_implementation.update = transition_animation_update;
202208
transition_animation_run(ANIMATION_DURATION, 0, &transition_animation_implementation, true);
203209

210+
#ifdef PBL_SDK_3
204211
content_indicator_set_content_available(s_indicator_down, ContentIndicatorDirectionDown, s_app_position < (app_info_count - 1));
205212
content_indicator_set_content_available(s_indicator_up, ContentIndicatorDirectionUp, s_app_position > 0);
213+
#endif
206214
}
207215

208216
static void up_click_handler(ClickRecognizerRef recognizer, void *context) {

0 commit comments

Comments
 (0)