Skip to content

Commit ce3ea2f

Browse files
committed
Ensure there's enough memory to load animations.
Signed-off-by: Katharine Berry <[email protected]>
1 parent 33a6f3f commit ce3ea2f

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

app/src/c/alarms/alarm_window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void prv_window_load(Window *window) {
124124
action_bar_layer_set_click_config_provider(data->action_bar, prv_click_config_provider);
125125
action_bar_layer_add_to_window(data->action_bar, window);
126126
data->animation_layer = vector_sequence_layer_create(GRect((rect.size.w - ACTION_BAR_WIDTH) / 2 - 25, rect.size.h - 55, 50, 50));
127-
data->draw_commands = gdraw_command_sequence_create_with_resource(RESOURCE_ID_TIRED_PONY);
127+
data->draw_commands = bgdraw_command_sequence_create_with_resource(RESOURCE_ID_TIRED_PONY);
128128
data->vibes = prv_load_vibe_score(data->is_timer);
129129
vector_sequence_layer_set_sequence(data->animation_layer, data->draw_commands);
130130
layer_add_child(root_layer, (Layer *)data->animation_layer);

app/src/c/converse/report_window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static void prv_window_load(Window *window) {
120120
bitmap_layer_set_bitmap(data->select_indicator_layer, data->select_indicator);
121121
bitmap_layer_set_compositing_mode(data->select_indicator_layer, GCompOpSet);
122122

123-
data->loading_sequence = gdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
123+
data->loading_sequence = bgdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
124124
GSize pony_size = gdraw_command_sequence_get_bounds_size(data->loading_sequence);
125125
data->loading_layer = vector_sequence_layer_create(GRect(bounds.size.w / 2 - pony_size.w / 2, bounds.size.h / 2 - pony_size.h / 2, pony_size.w, pony_size.h));
126126
vector_sequence_layer_set_sequence(data->loading_layer, data->loading_sequence);

app/src/c/menus/feedback_window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static void prv_window_load(Window *window) {
119119
bitmap_layer_set_bitmap(data->select_indicator_layer, data->select_indicator);
120120
bitmap_layer_set_compositing_mode(data->select_indicator_layer, GCompOpSet);
121121

122-
data->loading_sequence = gdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
122+
data->loading_sequence = bgdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
123123
GSize pony_size = gdraw_command_sequence_get_bounds_size(data->loading_sequence);
124124
data->loading_layer = vector_sequence_layer_create(GRect(bounds.size.w / 2 - pony_size.w / 2, bounds.size.h / 2 - pony_size.h / 2, pony_size.w, pony_size.h));
125125
vector_sequence_layer_set_sequence(data->loading_layer, data->loading_sequence);

app/src/c/menus/quota_window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void prv_window_load(Window* window) {
6868
scroll_layer_add_child(data->scroll_layer, (Layer *)data->explanation_layer);
6969
scroll_layer_add_child(data->scroll_layer, (Layer *)data->usage_layer);
7070
// We need to look up the quota, so we'll show a running pony while we do that.
71-
data->loading_sequence = gdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
71+
data->loading_sequence = bgdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
7272
GSize pony_size = gdraw_command_sequence_get_bounds_size(data->loading_sequence);
7373
data->loading_layer = vector_sequence_layer_create(GRect(bounds.size.w / 2 - pony_size.w / 2, bounds.size.h / 2 - pony_size.h / 2, pony_size.w, pony_size.h));
7474
vector_sequence_layer_set_sequence(data->loading_layer, data->loading_sequence);

app/src/c/menus/reminders_menu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static void prv_window_load(Window *window) {
129129
gcolor_legible_over(SELECTION_HIGHLIGHT_COLOUR));
130130

131131
// Show loading animation
132-
data->loading_sequence = gdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
132+
data->loading_sequence = bgdraw_command_sequence_create_with_resource(RESOURCE_ID_RUNNING_PONY);
133133
GSize pony_size = gdraw_command_sequence_get_bounds_size(data->loading_sequence);
134134
data->loading_layer = vector_sequence_layer_create(GRect(
135135
bounds.size.w / 2 - pony_size.w / 2,

app/src/c/util/memory/sdk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ GDrawCommandImage *bgdraw_command_image_create_with_resource(uint32_t resource_i
130130
return NULL;
131131
}
132132

133-
GDrawCommandImage *bgdraw_command_sequence_create_with_resource(uint32_t resource_id) {
133+
GDrawCommandSequence *bgdraw_command_sequence_create_with_resource(uint32_t resource_id) {
134134
int heap_size = heap_bytes_free();
135135
void *ptr = gdraw_command_sequence_create_with_resource(resource_id);
136136
if (ptr) {

app/src/c/util/memory/sdk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ ScrollLayer *bscroll_layer_create(GRect frame);
2929
StatusBarLayer *bstatus_bar_layer_create();
3030
GBitmap *bgbitmap_create_with_resource(uint32_t resource_id);
3131
GDrawCommandImage *bgdraw_command_image_create_with_resource(uint32_t resource_id);
32-
GDrawCommandImage *bgdraw_command_sequence_create_with_resource(uint32_t resource_id);
32+
GDrawCommandSequence *bgdraw_command_sequence_create_with_resource(uint32_t resource_id);

0 commit comments

Comments
 (0)