summaryrefslogtreecommitdiffstats
path: root/buttons.cpp
diff options
context:
space:
mode:
authorConfuSomu2021-08-01 13:48:15 -0400
committerConfuSomu2021-08-01 13:48:15 -0400
commitec6c7be7ba57d4ac9f87b66c252fd23fa3f6eb13 (patch)
tree76a94d5a453b9bddc0fc36d9897c8604bca4e3fc /buttons.cpp
parent5d896b77910431cdaac2ee4bfbfa8bbc91ab39ef (diff)
downloadpico-watch-ec6c7be7ba57d4ac9f87b66c252fd23fa3f6eb13.tar
pico-watch-ec6c7be7ba57d4ac9f87b66c252fd23fa3f6eb13.tar.gz
pico-watch-ec6c7be7ba57d4ac9f87b66c252fd23fa3f6eb13.zip
Implement virtual getter for app attributes
This is done to allow each app to be able to set their own app attributes without having them be overshadowed by BaseApp's defaults.
Diffstat (limited to 'buttons.cpp')
-rw-r--r--buttons.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/buttons.cpp b/buttons.cpp
index 23c5ab1..df947db 100644
--- a/buttons.cpp
+++ b/buttons.cpp
@@ -16,7 +16,7 @@ void gpio_interrupt_cb(uint gpio, uint32_t events) {
if (delta_since_press > g_s.button_delay_time) {
if (app_api.m_interpret_button_press) {
- if (gpio == BUTTON_HOME && (g_s.current_app->app_id != 0)) // Home app
+ if (gpio == BUTTON_HOME && (g_s.current_app->app_get_attributes().id != 0)) // Home app
app_switch_request(0);
else
app_btnpressed(g_s.current_app, gpio, delta_since_press);