]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add callback function for emulator drawing
authorFred Sundvik <fsundvik@gmail.com>
Wed, 18 May 2016 06:03:42 +0000 (09:03 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Wed, 18 May 2016 06:03:42 +0000 (09:03 +0300)
visualizer.c
visualizer.h

index bbb00debcf283b82494ccf2f6374760ce086ee4f..607a64566aab23374b952721b2dd33842ce818c0 100644 (file)
@@ -413,6 +413,10 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
 #ifdef LED_ENABLE
         gdispGFlush(LED_DISPLAY);
 #endif
+
+#if EMULATOR
+        draw_emulator();
+#endif
         // The animation can enable the visualizer
         // And we might need to update the state when that happens
         // so don't sleep
index 4d6a61dda3da8e834fa613df41f915b2dd704048..a3828e35f43ac1d6091e2d946ade48267dc6adb2 100644 (file)
@@ -50,6 +50,11 @@ void visualizer_resume(void);
 GDisplay* get_lcd_display(void);
 GDisplay* get_led_display(void);
 
+// For emulator builds, this function need to be implemented
+#if EMULATOR
+void draw_emulator(void);
+#endif
+
 // If you need support for more than 16 keyframes per animation, you can change this
 #define MAX_VISUALIZER_KEY_FRAMES 16
 
@@ -134,7 +139,7 @@ bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualiz
 // directly from the initalize_user_visualizer function (the animation can be null)
 bool enable_visualization(keyframe_animation_t* animation, visualizer_state_t* state);
 
-// These two functions have to be implemented by the user
+// These functions have to be implemented by the user
 void initialize_user_visualizer(visualizer_state_t* state);
 void update_user_visualizer_state(visualizer_state_t* state);
 void user_visualizer_suspend(visualizer_state_t* state);