[RCFILE] Fixed ROLLING_LOG when setup in a profile only

This commit is contained in:
ptitSeb 2025-02-07 18:55:32 +01:00
parent 16f0adec6f
commit 997140f500
2 changed files with 13 additions and 6 deletions

View File

@ -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) \
@ -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;

View File

@ -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) {