[FL-3462] External apps icounter (#2928)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		
							parent
							
								
									be86b0f38a
								
							
						
					
					
						commit
						035e447009
					
				
							
								
								
									
										5
									
								
								applications/external/hid_app/hid.c
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								applications/external/hid_app/hid.c
									
									
									
									
										vendored
									
									
								
							@ -1,7 +1,6 @@
 | 
				
			|||||||
#include "hid.h"
 | 
					#include "hid.h"
 | 
				
			||||||
#include "views.h"
 | 
					#include "views.h"
 | 
				
			||||||
#include <notification/notification_messages.h>
 | 
					#include <notification/notification_messages.h>
 | 
				
			||||||
#include <dolphin/dolphin.h>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define TAG "HidApp"
 | 
					#define TAG "HidApp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -389,8 +388,6 @@ int32_t hid_usb_app(void* p) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    bt_hid_connection_status_changed_callback(BtStatusConnected, app);
 | 
					    bt_hid_connection_status_changed_callback(BtStatusConnected, app);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    dolphin_deed(DolphinDeedPluginStart);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    view_dispatcher_run(app->view_dispatcher);
 | 
					    view_dispatcher_run(app->view_dispatcher);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    furi_hal_usb_set_config(usb_mode_prev, NULL);
 | 
					    furi_hal_usb_set_config(usb_mode_prev, NULL);
 | 
				
			||||||
@ -429,8 +426,6 @@ int32_t hid_ble_app(void* p) {
 | 
				
			|||||||
    furi_hal_bt_start_advertising();
 | 
					    furi_hal_bt_start_advertising();
 | 
				
			||||||
    bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);
 | 
					    bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    dolphin_deed(DolphinDeedPluginStart);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    view_dispatcher_run(app->view_dispatcher);
 | 
					    view_dispatcher_run(app->view_dispatcher);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bt_set_status_changed_callback(app->bt, NULL, NULL);
 | 
					    bt_set_status_changed_callback(app->bt, NULL, NULL);
 | 
				
			||||||
 | 
				
			|||||||
@ -39,7 +39,7 @@ static const DolphinDeedWeight dolphin_deed_weights[] = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    {1, DolphinAppPlugin}, // DolphinDeedGpioUartBridge
 | 
					    {1, DolphinAppPlugin}, // DolphinDeedGpioUartBridge
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {1, DolphinAppPlugin}, // DolphinDeedPluginStart
 | 
					    {2, DolphinAppPlugin}, // DolphinDeedPluginStart
 | 
				
			||||||
    {1, DolphinAppPlugin}, // DolphinDeedPluginGameStart
 | 
					    {1, DolphinAppPlugin}, // DolphinDeedPluginGameStart
 | 
				
			||||||
    {10, DolphinAppPlugin}, // DolphinDeedPluginGameWin
 | 
					    {10, DolphinAppPlugin}, // DolphinDeedPluginGameWin
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
#include <gui/gui.h>
 | 
					#include <gui/gui.h>
 | 
				
			||||||
#include <gui/view_holder.h>
 | 
					#include <gui/view_holder.h>
 | 
				
			||||||
#include <gui/modules/loading.h>
 | 
					#include <gui/modules/loading.h>
 | 
				
			||||||
 | 
					#include <dolphin/dolphin.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define TAG "LoaderApplications"
 | 
					#define TAG "LoaderApplications"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -119,6 +120,8 @@ static void loader_pubsub_callback(const void* message, void* context) {
 | 
				
			|||||||
static void loader_applications_start_app(LoaderApplicationsApp* app) {
 | 
					static void loader_applications_start_app(LoaderApplicationsApp* app) {
 | 
				
			||||||
    const char* name = furi_string_get_cstr(app->fap_path);
 | 
					    const char* name = furi_string_get_cstr(app->fap_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dolphin_deed(DolphinDeedPluginStart);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // load app
 | 
					    // load app
 | 
				
			||||||
    FuriThreadId thread_id = furi_thread_get_current_id();
 | 
					    FuriThreadId thread_id = furi_thread_get_current_id();
 | 
				
			||||||
    FuriPubSubSubscription* subscription =
 | 
					    FuriPubSubSubscription* subscription =
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user