Skip to content

Commit

Permalink
update fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-sintes committed Mar 27, 2024
1 parent 720d1d3 commit bdc4796
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 34 deletions.
3 changes: 3 additions & 0 deletions modules/crop_rec/crop_rec.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ enum crop_preset {
NUM_CROP_PRESETS
};

extern int is_more_hacks_selected();
extern int AeWbTask_Disabled();

/* presets are not enabled right away (we need to go to play mode and back)
* so we keep two variables: what's selected in menu and what's actually used.
* note: the menu choices are camera-dependent */
Expand Down
36 changes: 5 additions & 31 deletions modules/mlv_lite/mlv_lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -2153,17 +2153,14 @@ else

int is_more_hacks_selected()
{
if (small_hacks >= 2) return 1;

return 0;
return more_hacks == 0 ? 0 : 1;
}

static int WillSuspendAeWbTask = 0; // flag tells that we are going to suspend AeWb task

int AeWbTask_Disabled()
{
if (WillSuspendAeWbTask) return 1;
return 0;
return WillSuspendAeWbTask;
}

static REQUIRES(RawRecTask)
Expand Down Expand Up @@ -2248,32 +2245,6 @@ void hack_liveview(int unhack)
}
}
}

/* https://www.magiclantern.fm/forum/index.php?topic=26443.0 */
/* The hacks would be disabled/reset after calling PauseLiveView after stopping RAW video recording */

if (!video_mode_crop && !use_h264_proxy()) /* Exlude Movie Crop Mode and H.264 Proxy from these hacks */
{
if (!unhack) /* hack */
{
WillSuspendAeWbTask = 1; // we are going to suspend AeWb task (check code around shutter_blanking_idle in crop_rec.c)
wait_lv_frames(1);

if (small_hacks == 2)
{
lvfaceEnd();
aewbSuspend();
}

if (small_hacks == 3)
{
lvfaceEnd();
aewbSuspend();
CartridgeCancel();
wait_lv_frames(2); /* In some cases the first frame would be corrupted when calling CartridgeCancel */
}
}
}
}

static REQUIRES(LiveViewTask) FAST
Expand All @@ -2292,6 +2263,9 @@ void hack_liveview_more()
cam_5d3_113 ? 0xff16d77c :
cam_5d3_123 ? 0xff16e318 :
0;

WillSuspendAeWbTask = 1; // we are going to suspend AeWb task (check code around shutter_blanking_idle in crop_rec.c)
msleep(20);

lvfaceEnd();

Expand Down
4 changes: 1 addition & 3 deletions modules/mlv_lite/mlv_lite.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
static void raw_start_stop();
#define MAX_PATH 100
extern WEAK_FUNC(ret_0) int is_more_hacks_selected();
extern WEAK_FUNC(ret_0) int AeWbTask_Disabled();
#define MAX_PATH 100

0 comments on commit bdc4796

Please sign in to comment.