diff options
Diffstat (limited to 'apps/plugins/alpine_cdc.c')
-rw-r--r-- | apps/plugins/alpine_cdc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index 134bb3dee6..65108680c6 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c | |||
@@ -1122,8 +1122,10 @@ void thread(void) | |||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | /* callback to end the TSR plugin, called before a new one gets loaded */ | 1124 | /* callback to end the TSR plugin, called before a new one gets loaded */ |
1125 | void exit_tsr(void) | 1125 | bool exit_tsr(bool reenter) |
1126 | { | 1126 | { |
1127 | if (reenter) | ||
1128 | return false; /* dont let it start again */ | ||
1127 | gTread.exiting = true; /* tell the thread to end */ | 1129 | gTread.exiting = true; /* tell the thread to end */ |
1128 | while (!gTread.ended) /* wait until it did */ | 1130 | while (!gTread.ended) /* wait until it did */ |
1129 | rb->yield(); | 1131 | rb->yield(); |
@@ -1133,6 +1135,7 @@ void exit_tsr(void) | |||
1133 | timer_set_mode(TM_OFF); /* timer interrupt off */ | 1135 | timer_set_mode(TM_OFF); /* timer interrupt off */ |
1134 | 1136 | ||
1135 | sound_normal(); /* restore sound settings */ | 1137 | sound_normal(); /* restore sound settings */ |
1138 | return true; | ||
1136 | } | 1139 | } |
1137 | 1140 | ||
1138 | /****************** main ******************/ | 1141 | /****************** main ******************/ |