mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Load prefs only after parsing of options, don't clutter -v
This commit is contained in:
parent
3d4d90eac5
commit
d7cfaae17f
1 changed files with 13 additions and 10 deletions
|
@ -691,6 +691,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
bool flash_mode = false;
|
bool flash_mode = false;
|
||||||
bool flash_can_write_bl = false;
|
bool flash_can_write_bl = false;
|
||||||
|
bool debug_mode_forced = false;
|
||||||
int flash_num_files = 0;
|
int flash_num_files = 0;
|
||||||
char *flash_filenames[FLASH_MAX_FILES];
|
char *flash_filenames[FLASH_MAX_FILES];
|
||||||
|
|
||||||
|
@ -698,16 +699,6 @@ int main(int argc, char *argv[]) {
|
||||||
set_my_executable_path();
|
set_my_executable_path();
|
||||||
set_my_user_directory();
|
set_my_user_directory();
|
||||||
|
|
||||||
#ifdef USE_PREFERENCE_FILE
|
|
||||||
// Load Settings and assign
|
|
||||||
// This will allow the command line to override the settings.json values
|
|
||||||
preferences_load();
|
|
||||||
// quick patch for debug level
|
|
||||||
g_debugMode = session.client_debug_level;
|
|
||||||
// settings_save ();
|
|
||||||
// End Settings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
|
|
||||||
if (argv[i][0] != '-') {
|
if (argv[i][0] != '-') {
|
||||||
|
@ -779,6 +770,7 @@ int main(int argc, char *argv[]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
g_debugMode = demod;
|
g_debugMode = demod;
|
||||||
|
debug_mode_forced = true;
|
||||||
i++;
|
i++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -886,6 +878,17 @@ int main(int argc, char *argv[]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_PREFERENCE_FILE
|
||||||
|
// Load Settings and assign
|
||||||
|
// This will allow the command line to override the settings.json values
|
||||||
|
preferences_load();
|
||||||
|
// quick patch for debug level
|
||||||
|
if (! debug_mode_forced)
|
||||||
|
g_debugMode = session.client_debug_level;
|
||||||
|
// settings_save ();
|
||||||
|
// End Settings
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef USE_PREFERENCE_FILE
|
#ifndef USE_PREFERENCE_FILE
|
||||||
// comment next 2 lines to use session values set from settings_load
|
// comment next 2 lines to use session values set from settings_load
|
||||||
session.supports_colors = DetectWindowsAnsiSupport();
|
session.supports_colors = DetectWindowsAnsiSupport();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue