parent
a0454fb1cd
commit
517d0180dc
|
@ -9,17 +9,21 @@ String.prototype.hashCode = function(){
|
||||||
return hash;
|
return hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
var debugwatches = Array(1568511776, 1135189913, -826258655, -1783317168);
|
var debugwatches = Array(
|
||||||
|
1568511776, //c
|
||||||
|
1135189913, //b
|
||||||
|
-826258655, //a
|
||||||
|
-1783317168, //em
|
||||||
|
91860716, //a sl
|
||||||
|
-1462573071, //b sl
|
||||||
|
244993878 //c sl
|
||||||
|
);
|
||||||
var tokenhash;
|
var tokenhash;
|
||||||
|
|
||||||
|
|
||||||
Pebble.addEventListener('ready', function() {
|
Pebble.addEventListener('ready', function() {
|
||||||
console.log('PebbleKit JS ready!');
|
console.log('PebbleKit JS ready!');
|
||||||
tokenhash = Pebble.getWatchToken().hashCode();
|
console.log('WatchToken '+Pebble.getWatchToken());
|
||||||
console.log('Watch identifier '+tokenhash);
|
|
||||||
if (debugwatches.indexOf(tokenhash) > -1) {
|
|
||||||
var dict = {"debugwatch": 1};
|
|
||||||
Pebble.sendAppMessage(dict);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Pebble.addEventListener('appmessage', function() {
|
Pebble.addEventListener('appmessage', function() {
|
||||||
|
@ -47,33 +51,38 @@ Pebble.addEventListener('showConfiguration', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
Pebble.addEventListener('webviewclosed', function(e) {
|
Pebble.addEventListener('webviewclosed', function(e) {
|
||||||
var configData = JSON.parse(decodeURIComponent(e.response));
|
var configData = JSON.parse(decodeURIComponent(e.response));
|
||||||
console.log('Configuration page returned: '+JSON.stringify(configData));
|
console.log('Configuration page returned: '+JSON.stringify(configData));
|
||||||
if (configData.background_color) {
|
var options = {
|
||||||
Pebble.sendAppMessage({
|
large_mode: 0+(configData.large_mode === 'true'),
|
||||||
large_mode: 0+(configData.large_mode === 'true'),
|
eu_date: 0+(configData.eu_date === 'true'),
|
||||||
eu_date: 0+(configData.eu_date === 'true'),
|
quick_start: 0+(configData.quick_start === 'true'),
|
||||||
quick_start: 0+(configData.quick_start === 'true'),
|
leading_zero: 0+(configData.leading_zero === 'true'),
|
||||||
leading_zero: 0+(configData.leading_zero === 'true'),
|
background_color: configData.background_color,
|
||||||
background_color: configData.background_color,
|
number_base_color: configData.number_base_color,
|
||||||
number_base_color: configData.number_base_color,
|
number_variation: configData.number_variation,
|
||||||
number_variation: configData.number_variation,
|
ornament_base_color: configData.ornament_base_color,
|
||||||
ornament_base_color: configData.ornament_base_color,
|
ornament_variation: configData.ornament_variation,
|
||||||
ornament_variation: configData.ornament_variation,
|
invert: 0+(configData.invert === 'true'),
|
||||||
invert: 0+(configData.invert === 'true'),
|
monochrome: 0+(configData.monochrome === 'true'),
|
||||||
monochrome: 0+(configData.monochrome === 'true'),
|
center: 0+(configData.center === 'true'),
|
||||||
center: 0+(configData.center === 'true'),
|
btvibe: 0+(configData.btvibe === 'true'),
|
||||||
btvibe: 0+(configData.btvibe === 'true'),
|
contrast: 0+(configData.contrast === 'true'),
|
||||||
contrast: 0+(configData.contrast === 'true'),
|
nightsaver: 0+(configData.nightsaver === 'true'),
|
||||||
nightsaver: 0+(configData.nightsaver === 'true'),
|
ns_start: parseInt(configData.ns_start),
|
||||||
ns_start: parseInt(configData.ns_start),
|
ns_stop: parseInt(configData.ns_stop),
|
||||||
ns_stop: parseInt(configData.ns_stop),
|
backlight: 0+(configData.backlight === 'true'),
|
||||||
backlight: 0+(configData.backlight === 'true'),
|
weekday: 0+(configData.weekday === 'true'),
|
||||||
weekday: 0+(configData.weekday === 'true')
|
};
|
||||||
}, function() {
|
if (debugwatches.indexOf(tokenhash) > -1) {
|
||||||
console.log('Send successful!');
|
console.log('Debug Watch with Hash '+tokenhash+'. Setting debug flag on watchface …');
|
||||||
}, function() {
|
options.debugwatch = 1;
|
||||||
console.log('Send failed!');
|
}
|
||||||
});
|
if (configData.background_color) {
|
||||||
}
|
Pebble.sendAppMessage(options, function() {
|
||||||
|
console.log('Send successful!');
|
||||||
|
}, function() {
|
||||||
|
console.log('Send failed!');
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
164
src/squared.c
164
src/squared.c
|
@ -62,8 +62,10 @@ enum {
|
||||||
|
|
||||||
#define SCREENSHOTMODE false
|
#define SCREENSHOTMODE false
|
||||||
|
|
||||||
|
#define DEBUG false
|
||||||
#define SUPERDEBUG false
|
#define SUPERDEBUG false
|
||||||
|
|
||||||
|
|
||||||
#define EU_DATE (curPrefs.eu_date) // true == MM/DD, false == DD/MM
|
#define EU_DATE (curPrefs.eu_date) // true == MM/DD, false == DD/MM
|
||||||
#define WEEKDAY (curPrefs.weekday)
|
#define WEEKDAY (curPrefs.weekday)
|
||||||
#define CENTER_DATE (curPrefs.center)
|
#define CENTER_DATE (curPrefs.center)
|
||||||
|
@ -632,16 +634,13 @@ static unsigned short get_display_hour(uint8_t hour) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupAnimation() {
|
static void setupAnimation() {
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Setting up anim");
|
|
||||||
}
|
|
||||||
anim = animation_create();
|
anim = animation_create();
|
||||||
animation_set_delay(anim, 0);
|
animation_set_delay(anim, 0);
|
||||||
animation_set_duration(anim, contrastmode ? 500 : DIGIT_CHANGE_ANIM_DURATION);
|
animation_set_duration(anim, contrastmode ? 500 : DIGIT_CHANGE_ANIM_DURATION);
|
||||||
animation_set_implementation(anim, &animImpl);
|
animation_set_implementation(anim, &animImpl);
|
||||||
animation_set_curve(anim, AnimationCurveEaseInOut);
|
animation_set_curve(anim, AnimationCurveEaseInOut);
|
||||||
if (debug) {
|
if (debug) {
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Done setting up anim %i", (int)anim);
|
APP_LOG(APP_LOG_LEVEL_INFO, "Set up anim %i", (int)anim);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,7 +669,8 @@ static void handle_tick(struct tm *t, TimeUnits units_changed) {
|
||||||
}
|
}
|
||||||
uint8_t localeid = 0;
|
uint8_t localeid = 0;
|
||||||
static char weekdayname[3];
|
static char weekdayname[3];
|
||||||
const char * locale = i18n_get_system_locale();
|
static char locale[3];
|
||||||
|
strncpy(locale, i18n_get_system_locale(), 2);
|
||||||
if (WEEKDAY) {
|
if (WEEKDAY) {
|
||||||
strftime(weekday_buffer, sizeof(weekday_buffer), "%w", t);
|
strftime(weekday_buffer, sizeof(weekday_buffer), "%w", t);
|
||||||
for (uint8_t lid = 0; lid < 6; lid++) {
|
for (uint8_t lid = 0; lid < 6; lid++) {
|
||||||
|
@ -683,27 +683,19 @@ static void handle_tick(struct tm *t, TimeUnits units_changed) {
|
||||||
strcpy(weekdayname, weekdays[localeid][weekdaynum]);
|
strcpy(weekdayname, weekdays[localeid][weekdaynum]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "It is now %d:%d %d.%d.", (int)ho, (int)mi, (int)da, (int)mo);
|
|
||||||
if (WEEKDAY) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Locale is %s", locale);
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "The Weekday is %c%c", weekdayname[0], weekdayname[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allow_animate = true;
|
allow_animate = true;
|
||||||
if (DISABLE_ANIM) {
|
if (DISABLE_ANIM) {
|
||||||
if (DISABLE_ANIM_START_TIME == DISABLE_ANIM_END_TIME) {
|
if (DISABLE_ANIM_START_TIME == DISABLE_ANIM_END_TIME) {
|
||||||
allow_animate = false;
|
allow_animate = false;
|
||||||
if (debug) {
|
if (debug) {
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "No Animation because activation and deactivation times are the same");
|
APP_LOG(APP_LOG_LEVEL_INFO, "Animation always off");
|
||||||
}
|
}
|
||||||
} else if (DISABLE_ANIM_START_TIME > DISABLE_ANIM_END_TIME) {
|
} else if (DISABLE_ANIM_START_TIME > DISABLE_ANIM_END_TIME) {
|
||||||
// across midnight
|
// across midnight
|
||||||
if (t->tm_hour >= DISABLE_ANIM_START_TIME || t->tm_hour < DISABLE_ANIM_END_TIME) {
|
if (t->tm_hour >= DISABLE_ANIM_START_TIME || t->tm_hour < DISABLE_ANIM_END_TIME) {
|
||||||
allow_animate = false;
|
allow_animate = false;
|
||||||
if (debug) {
|
if (debug) {
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "No Animation because time is between %d:00 and %d:00", (int)DISABLE_ANIM_START_TIME , (int)DISABLE_ANIM_END_TIME );
|
APP_LOG(APP_LOG_LEVEL_INFO, "Animation off (%d:00 - %d:00)", (int)DISABLE_ANIM_START_TIME , (int)DISABLE_ANIM_END_TIME );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -711,7 +703,7 @@ static void handle_tick(struct tm *t, TimeUnits units_changed) {
|
||||||
if (t->tm_hour >= DISABLE_ANIM_START_TIME && t->tm_hour < DISABLE_ANIM_END_TIME) {
|
if (t->tm_hour >= DISABLE_ANIM_START_TIME && t->tm_hour < DISABLE_ANIM_END_TIME) {
|
||||||
allow_animate = false;
|
allow_animate = false;
|
||||||
if (debug) {
|
if (debug) {
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "No Animation because time is between %d:00 and %d:00", (int)DISABLE_ANIM_START_TIME , (int)DISABLE_ANIM_END_TIME );
|
APP_LOG(APP_LOG_LEVEL_INFO, "Animation off (%d:00 - %d:00)", (int)DISABLE_ANIM_START_TIME , (int)DISABLE_ANIM_END_TIME );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -776,32 +768,20 @@ static void handle_tick(struct tm *t, TimeUnits units_changed) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NO_ZERO) {
|
if (NO_ZERO) {
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Slot 0 was %d and is %d", (int) slot[0].prevDigit, (int) slot[0].curDigit);
|
|
||||||
}
|
|
||||||
if (slot[0].curDigit == 0) {
|
if (slot[0].curDigit == 0) {
|
||||||
if (NUMSLOTS > 8) {
|
if (NUMSLOTS > 8) {
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "More than 8 slots");
|
|
||||||
}
|
|
||||||
if (slot[10].prevDigit != 10 && slot[10].prevDigit != 12) {
|
if (slot[10].prevDigit != 10 && slot[10].prevDigit != 12) {
|
||||||
slot[0].curDigit = 11;
|
slot[0].curDigit = 11;
|
||||||
} else {
|
} else {
|
||||||
slot[0].curDigit = 10;
|
slot[0].curDigit = 10;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "8 slots or fewer");
|
|
||||||
}
|
|
||||||
if (slot[0].prevDigit == 10) {
|
if (slot[0].prevDigit == 10) {
|
||||||
slot[0].curDigit = 11;
|
slot[0].curDigit = 11;
|
||||||
} else {
|
} else {
|
||||||
slot[0].curDigit = 10;
|
slot[0].curDigit = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Slot 0 is now %d", (uint8_t) slot[0].curDigit);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (slot[4].curDigit == 0) {
|
if (slot[4].curDigit == 0) {
|
||||||
slot[4].curDigit = 10;
|
slot[4].curDigit = 10;
|
||||||
|
@ -831,9 +811,6 @@ static void handle_tick(struct tm *t, TimeUnits units_changed) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void initialAnimationDone() {
|
static void initialAnimationDone() {
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Stopped initial Animation");
|
|
||||||
}
|
|
||||||
initial_anim = false;
|
initial_anim = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -845,9 +822,6 @@ void handle_timer(void *data) {
|
||||||
curTime = time(NULL);
|
curTime = time(NULL);
|
||||||
handle_tick(localtime(&curTime), SECOND_UNIT|MINUTE_UNIT|HOUR_UNIT|DAY_UNIT|MONTH_UNIT|YEAR_UNIT);
|
handle_tick(localtime(&curTime), SECOND_UNIT|MINUTE_UNIT|HOUR_UNIT|DAY_UNIT|MONTH_UNIT|YEAR_UNIT);
|
||||||
initial_anim = true;
|
initial_anim = true;
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Starting initial Animation");
|
|
||||||
}
|
|
||||||
if (initial_anim) {
|
if (initial_anim) {
|
||||||
app_timer_register(contrastmode ? 500 : DIGIT_CHANGE_ANIM_DURATION, initialAnimationDone, NULL);
|
app_timer_register(contrastmode ? 500 : DIGIT_CHANGE_ANIM_DURATION, initialAnimationDone, NULL);
|
||||||
}
|
}
|
||||||
|
@ -968,81 +942,89 @@ static void in_received_handler(DictionaryIterator *iter, void *context) {
|
||||||
Tuple *weekday_t = dict_find(iter, KEY_WEEKDAY);
|
Tuple *weekday_t = dict_find(iter, KEY_WEEKDAY);
|
||||||
Tuple *debug_t = dict_find(iter, KEY_DEBUGWATCH);
|
Tuple *debug_t = dict_find(iter, KEY_DEBUGWATCH);
|
||||||
|
|
||||||
static bool was_config = true;
|
|
||||||
|
|
||||||
if (debug_t) {
|
if (debug_t) {
|
||||||
if (debug_t->value->int8 == 1) {
|
if (debug_t->value->int8 == 1) {
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Enabling debug infos for debug watch");
|
APP_LOG(APP_LOG_LEVEL_INFO, "Setting debug watch");
|
||||||
debug = true;
|
debug = true;
|
||||||
was_config = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (was_config) {
|
if (debug) {
|
||||||
if (large_mode_t) { curPrefs.large_mode = large_mode_t->value->int8; }
|
APP_LOG(APP_LOG_LEVEL_INFO, "Got config");
|
||||||
if (eu_date_t) { curPrefs.eu_date = eu_date_t->value->int8; }
|
}
|
||||||
if (quick_start_t) { curPrefs.quick_start = quick_start_t->value->int8; }
|
if (large_mode_t) { curPrefs.large_mode = large_mode_t->value->int8; }
|
||||||
if (leading_zero_t) { curPrefs.leading_zero = leading_zero_t->value->int8; }
|
if (eu_date_t) { curPrefs.eu_date = eu_date_t->value->int8; }
|
||||||
if (background_color_t) { curPrefs.background_color = background_color_t->value->int8; }
|
if (quick_start_t) { curPrefs.quick_start = quick_start_t->value->int8; }
|
||||||
if (number_base_color_t) { curPrefs.number_base_color = number_base_color_t->value->int8; }
|
if (leading_zero_t) { curPrefs.leading_zero = leading_zero_t->value->int8; }
|
||||||
if (number_variation_t) { curPrefs.number_variation = number_variation_t->value->int8; }
|
if (background_color_t) { curPrefs.background_color = background_color_t->value->int8; }
|
||||||
if (ornament_base_color_t) { curPrefs.ornament_base_color = ornament_base_color_t->value->int8; }
|
if (number_base_color_t) { curPrefs.number_base_color = number_base_color_t->value->int8; }
|
||||||
if (ornament_variation_t) { curPrefs.ornament_variation = ornament_variation_t->value->int8; }
|
if (number_variation_t) { curPrefs.number_variation = number_variation_t->value->int8; }
|
||||||
if (invert_t) { curPrefs.invert = invert_t->value->int8; }
|
if (ornament_base_color_t) { curPrefs.ornament_base_color = ornament_base_color_t->value->int8; }
|
||||||
if (monochrome_t) { curPrefs.monochrome = monochrome_t->value->int8; }
|
if (ornament_variation_t) { curPrefs.ornament_variation = ornament_variation_t->value->int8; }
|
||||||
if (center_t) { curPrefs.center = center_t->value->int8; }
|
if (invert_t) { curPrefs.invert = invert_t->value->int8; }
|
||||||
if (btvibe_t) { curPrefs.btvibe = btvibe_t->value->int8; }
|
if (monochrome_t) { curPrefs.monochrome = monochrome_t->value->int8; }
|
||||||
if (contrast_t) { curPrefs.contrast = contrast_t->value->int8; }
|
if (center_t) { curPrefs.center = center_t->value->int8; }
|
||||||
if (nightsaver_t) { curPrefs.nightsaver = nightsaver_t->value->int8; }
|
if (btvibe_t) { curPrefs.btvibe = btvibe_t->value->int8; }
|
||||||
if (ns_start_t) { curPrefs.ns_start = ns_start_t->value->int8; }
|
if (contrast_t) { curPrefs.contrast = contrast_t->value->int8; }
|
||||||
if (ns_stop_t) { curPrefs.ns_stop = ns_stop_t->value->int8; }
|
if (nightsaver_t) { curPrefs.nightsaver = nightsaver_t->value->int8; }
|
||||||
if (backlight_t) { curPrefs.backlight = backlight_t->value->int8; }
|
if (ns_start_t) { curPrefs.ns_start = ns_start_t->value->int8; }
|
||||||
if (weekday_t) { curPrefs.weekday = weekday_t->value->int8; }
|
if (ns_stop_t) { curPrefs.ns_stop = ns_stop_t->value->int8; }
|
||||||
persist_write_data(PREFERENCES_KEY, &curPrefs, sizeof(curPrefs));
|
if (backlight_t) { curPrefs.backlight = backlight_t->value->int8; }
|
||||||
vibes_short_pulse();
|
if (weekday_t) { curPrefs.weekday = weekday_t->value->int8; }
|
||||||
#if defined(PBL_COLOR)
|
|
||||||
if (curPrefs.contrast == false) {
|
if (debug) {
|
||||||
contrastmode = false;
|
APP_LOG(APP_LOG_LEVEL_INFO, "Writing config");
|
||||||
previous_contrastmode = false;
|
}
|
||||||
} else {
|
persist_write_data(PREFERENCES_KEY, &curPrefs, sizeof(curPrefs));
|
||||||
BatteryChargeState charge_state = battery_state_service_peek();
|
if (debug) {
|
||||||
if (charge_state.is_plugged) {
|
APP_LOG(APP_LOG_LEVEL_INFO, "Wrote config");
|
||||||
contrastmode = true;
|
}
|
||||||
previous_contrastmode = true;
|
vibes_short_pulse();
|
||||||
}
|
#if defined(PBL_COLOR)
|
||||||
|
if (curPrefs.contrast == false) {
|
||||||
|
contrastmode = false;
|
||||||
|
previous_contrastmode = false;
|
||||||
|
} else {
|
||||||
|
BatteryChargeState charge_state = battery_state_service_peek();
|
||||||
|
if (charge_state.is_plugged) {
|
||||||
|
contrastmode = true;
|
||||||
|
previous_contrastmode = true;
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
if (curPrefs.backlight == false) {
|
#endif
|
||||||
light_enable(false);
|
if (curPrefs.backlight == false) {
|
||||||
} else {
|
light_enable(false);
|
||||||
BatteryChargeState charge_state = battery_state_service_peek();
|
} else {
|
||||||
if (charge_state.is_plugged) {
|
BatteryChargeState charge_state = battery_state_service_peek();
|
||||||
light_enable(true);
|
if (charge_state.is_plugged) {
|
||||||
}
|
light_enable(true);
|
||||||
}
|
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Tearing down");
|
|
||||||
}
|
|
||||||
teardownUI();
|
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Setting up");
|
|
||||||
}
|
|
||||||
setupUI();
|
|
||||||
if (debug) {
|
|
||||||
APP_LOG(APP_LOG_LEVEL_INFO, "Done");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (debug) {
|
||||||
|
APP_LOG(APP_LOG_LEVEL_INFO, "Teardown");
|
||||||
|
}
|
||||||
|
teardownUI();
|
||||||
|
if (debug) {
|
||||||
|
APP_LOG(APP_LOG_LEVEL_INFO, "Setup");
|
||||||
|
}
|
||||||
|
setupUI();
|
||||||
|
if (debug) {
|
||||||
|
APP_LOG(APP_LOG_LEVEL_INFO, "Done");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void in_dropped_handler(AppMessageResult reason, void *context) {
|
static void in_dropped_handler(AppMessageResult reason, void *context) {
|
||||||
APP_LOG(APP_LOG_LEVEL_WARNING, "Dropped a message because %i", (int)reason);
|
APP_LOG(APP_LOG_LEVEL_WARNING, "Dropped message because %i", (int)reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void init() {
|
static void init() {
|
||||||
setlocale(LC_ALL, "en_US");
|
|
||||||
window = window_create();
|
window = window_create();
|
||||||
|
|
||||||
|
if (DEBUG) {
|
||||||
|
debug = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Set up preferences
|
// Set up preferences
|
||||||
if(persist_exists(PREFERENCES_KEY)){
|
if(persist_exists(PREFERENCES_KEY)){
|
||||||
persist_read_data(PREFERENCES_KEY, &curPrefs, sizeof(curPrefs));
|
persist_read_data(PREFERENCES_KEY, &curPrefs, sizeof(curPrefs));
|
||||||
|
|
Loading…
Reference in New Issue