mirror of https://github.com/nealey/Twatch
Fixed a crash
This commit is contained in:
parent
7e37cbe44e
commit
cb4021db98
11
appinfo.json
11
appinfo.json
|
@ -15,10 +15,15 @@
|
||||||
"configurable"
|
"configurable"
|
||||||
],
|
],
|
||||||
"companyName": "dartcatcher@gmail.com",
|
"companyName": "dartcatcher@gmail.com",
|
||||||
"longName": "Neale's Watch",
|
"longName": "Twatch \u03b5",
|
||||||
"projectType": "native",
|
"projectType": "native",
|
||||||
"resources": {
|
"resources": {
|
||||||
"media": [
|
"media": [
|
||||||
|
{
|
||||||
|
"file": "images/menu.png",
|
||||||
|
"name": "MENU_IMAGE",
|
||||||
|
"type": "png"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"characterRegex": "[\uf10b]",
|
"characterRegex": "[\uf10b]",
|
||||||
"file": "fonts/fontawesome-webfont.ttf",
|
"file": "fonts/fontawesome-webfont.ttf",
|
||||||
|
@ -34,14 +39,14 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"sdkVersion": "3",
|
"sdkVersion": "3",
|
||||||
"shortName": "Twatch",
|
"shortName": "Twatch \u03b5",
|
||||||
"targetPlatforms": [
|
"targetPlatforms": [
|
||||||
"aplite",
|
"aplite",
|
||||||
"basalt",
|
"basalt",
|
||||||
"chalk"
|
"chalk"
|
||||||
],
|
],
|
||||||
"uuid": "8287a53c-1b7e-4f4b-9104-608de13b9f77",
|
"uuid": "8287a53c-1b7e-4f4b-9104-608de13b9f77",
|
||||||
"versionLabel": "1.0",
|
"versionLabel": "1.1",
|
||||||
"watchapp": {
|
"watchapp": {
|
||||||
"watchface": true
|
"watchface": true
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 225 B |
11
src/main.c
11
src/main.c
|
@ -292,6 +292,11 @@ static void in_received_handler(DictionaryIterator *rec, void *context) {
|
||||||
for (i = 0; i < KEY_LAST; i += 1) {
|
for (i = 0; i < KEY_LAST; i += 1) {
|
||||||
Tuple *cur = dict_find(rec, i);
|
Tuple *cur = dict_find(rec, i);
|
||||||
|
|
||||||
|
if (! cur) {
|
||||||
|
APP_LOG(APP_LOG_LEVEL_DEBUG, "Holy crap! Key %i isn't around!", i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case KEY_COLOR_FACE:
|
case KEY_COLOR_FACE:
|
||||||
case KEY_COLOR_TIC:
|
case KEY_COLOR_TIC:
|
||||||
|
@ -323,10 +328,10 @@ static void init() {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < KEY_LAST; i += 1) {
|
for (i = 0; i < KEY_LAST; i += 1) {
|
||||||
colors[i] = GColorBlack;
|
colors[i] = GColorWhite;
|
||||||
}
|
}
|
||||||
colors[KEY_COLOR_FACE] = GColorWhite;
|
colors[KEY_COLOR_FACE] = GColorBlack;
|
||||||
colors[KEY_COLOR_SEC] = COLOR_FALLBACK(GColorWindsorTan, GColorBlack);
|
colors[KEY_COLOR_SEC] = COLOR_FALLBACK(GColorWindsorTan, GColorWhite);
|
||||||
|
|
||||||
window = window_create();
|
window = window_create();
|
||||||
window_set_window_handlers(window, (WindowHandlers) {
|
window_set_window_handlers(window, (WindowHandlers) {
|
||||||
|
|
Loading…
Reference in New Issue