mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2025-10-10 17:38:05 +00:00
fix night drop early boot
This commit is contained in:
Binary file not shown.
@@ -9,6 +9,8 @@ static uint32_t (*real_local_sdk_video_set_fps)(int encChn);
|
||||
|
||||
int local_sdk_video_set_fps(int encChn) {
|
||||
|
||||
fprintf(stderr, "[command] [night_drop.c] local_sdk_video_set_fps called with fps value: %d\n", encChn);
|
||||
|
||||
const char *nd_enable="/opt/wz_mini/tmp/.nd";
|
||||
const char *product_T31="/opt/wz_mini/tmp/.T31";
|
||||
const char *product_T20="/opt/wz_mini/tmp/.T20";
|
||||
@@ -28,11 +30,16 @@ int local_sdk_video_set_fps(int encChn) {
|
||||
fprintf(stderr, "[command] [night_drop.c] Calling local_sdk_video_set_fps to: %d\n", encChn);
|
||||
real_local_sdk_video_set_fps(encChn);
|
||||
}
|
||||
|
||||
}
|
||||
//If nd is disabled, pass all requests along
|
||||
} else {
|
||||
printf("[command] [night_drop.c] Night Drop not enabled\n");
|
||||
fprintf(stderr, "[command] [night_drop.c] Requested FPS Value: %d\n", encChn);
|
||||
fprintf(stderr, "[command] [night_drop.c] Calling local_sdk_video_set_fps to: %d\n", encChn);
|
||||
real_local_sdk_video_set_fps(encChn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void __attribute ((constructor)) nigh_drop_init(void) {
|
||||
static void __attribute ((constructor)) night_drop_init(void) {
|
||||
real_local_sdk_video_set_fps = dlsym(dlopen("/system/lib/liblocalsdk.so", RTLD_LAZY), "local_sdk_video_set_fps");
|
||||
}
|
||||
|
Reference in New Issue
Block a user