Skip to content

Commit

Permalink
[RCFILE] Fixed ROLLING_LOG when setup in a profile only
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Feb 7, 2025
1 parent 16f0ade commit 997140f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/include/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extern char* ftrace_name;
STRING(BOX64_RCFILE, envfile) \
BOOLEAN(BOX64_RDTSC_1GHZ, rdtsc_1ghz, 0) \
BOOLEAN(BOX64_RESERVE_HIGH, reserve_high, 0) \
BOOLEAN(BOX64_ROLLING_LOG, rolling_log, 0) \
BOOLEAN(BOX64_ROLLING_LOG, cycle_log, 0) \
BOOLEAN(BOX64_SDL2_JGUID, sdl2_jguid, 0) \
BOOLEAN(BOX64_SHAEXT, shaext, 1) \
BOOLEAN(BOX64_SHOWBT, showbt, 0) \
Expand Down Expand Up @@ -186,6 +186,7 @@ typedef struct box64env_s {
int maxcpu;
int dynarec_test;
int avx2;
int rolling_log;
uintptr_t dynarec_test_start;
uintptr_t dynarec_test_end;
uintptr_t nodynarec_start;
Expand Down
16 changes: 11 additions & 5 deletions src/tools/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@ static void applyCustomRules()
SET_BOX64ENV(dump, 1);
}

if (BOX64ENV(rolling_log) == 1) {
SET_BOX64ENV(rolling_log, 16);
}
if (BOX64ENV(rolling_log) && BOX64ENV(log) > LOG_INFO) {
SET_BOX64ENV(rolling_log, 0);
if(box64env.is_cycle_log_overridden) {
freeCycleLog(my_context);
box64env.rolling_log = BOX64ENV(cycle_log);

if (BOX64ENV(rolling_log) == 1) {
box64env.rolling_log = 16;
}
if (BOX64ENV(rolling_log) && BOX64ENV(log) > LOG_INFO) {
box64env.rolling_log = 0;
}
initCycleLog(my_context);
}

if (box64env.is_dynarec_test_str_overridden) {
Expand Down

0 comments on commit 997140f

Please sign in to comment.