Skip to content

Commit

Permalink
safety video init/stop
Browse files Browse the repository at this point in the history
  • Loading branch information
ChisBread committed Sep 4, 2022
1 parent 88548f8 commit 7f89610
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Firmware/ESP32/RX5808/main/video/capi_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ enum
};
const uint32_t* pal_palette();
const uint32_t* ntsc_palette();
static bool g_started = false;
void graph_video_start(bool ntsc) {
if(g_started) {
return;
}
g_started = true;
graph = bmp_create(XRES, YRES, 8);
bmp_clear(graph, 0);
_lines = graph->line;
Expand All @@ -44,6 +49,10 @@ void graph_video_start(bool ntsc) {
}
}
void graph_video_stop() {
if(!g_started) {
return;
}
g_started = false;
video_destroy();
bmp_destroy(&graph);
delete []palette_ram;
Expand Down

0 comments on commit 7f89610

Please sign in to comment.