Skip to content

Commit ad19353

Browse files
committed
Enable logging/disable joypad rumble
1 parent 9b97888 commit ad19353

File tree

5 files changed

+35
-30
lines changed

5 files changed

+35
-30
lines changed

config.def.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "network/netplay/netplay_defines.h"
3333
#endif
3434

35+
#define DEFAULT_LOG_TO_FILE true
36+
3537
/* Required for 3DS display mode setting */
3638
#if defined(_3DS)
3739
#include "gfx/common/ctr_defines.h"
@@ -967,7 +969,7 @@
967969

968970
#define DEFAULT_QUIT_PRESS_TWICE true
969971

970-
#define DEFAULT_LOG_TO_FILE false
972+
#define DEFAULT_LOG_TO_FILE true
971973

972974
#define DEFAULT_LOG_TO_FILE_TIMESTAMP false
973975

@@ -1549,7 +1551,7 @@
15491551
#define DEFAULT_MENU_WIDGET_SCALE_FACTOR_WINDOWED 1.0f
15501552

15511553
/* Log level for the frontend */
1552-
#define DEFAULT_FRONTEND_LOG_LEVEL 1
1554+
#define DEFAULT_FRONTEND_LOG_LEVEL 0
15531555

15541556
/* Log level for libretro cores (GET_LOG_INTERFACE). */
15551557
#define DEFAULT_LIBRETRO_LOG_LEVEL 1

configuration.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,8 +1832,8 @@ static struct config_bool_setting *populate_settings_bool(
18321832
#ifdef HAVE_THREADS
18331833
SETTING_BOOL("threaded_data_runloop_enable", &settings->bools.threaded_data_runloop_enable, true, DEFAULT_THREADED_DATA_RUNLOOP_ENABLE, false);
18341834
#endif
1835-
SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, DEFAULT_LOG_TO_FILE, false);
1836-
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE);
1835+
SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, true, false);
1836+
//SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE);
18371837
SETTING_BOOL("log_to_file_timestamp", &settings->bools.log_to_file_timestamp, true, DEFAULT_LOG_TO_FILE_TIMESTAMP, false);
18381838
SETTING_BOOL("ai_service_enable", &settings->bools.ai_service_enable, true, DEFAULT_AI_SERVICE_ENABLE, false);
18391839
SETTING_BOOL("ai_service_pause", &settings->bools.ai_service_pause, true, DEFAULT_AI_SERVICE_PAUSE, false);
@@ -3572,17 +3572,7 @@ static void check_verbosity_settings(config_file_t *conf,
35723572
unsigned tmp_uint = 0;
35733573
bool tmp_bool = false;
35743574

3575-
/* Make sure log_to_file is true if 'log-file' command line argument was used. */
3576-
if (retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LOG_TO_FILE, NULL))
3577-
{
3578-
configuration_set_bool(settings, settings->bools.log_to_file, true);
3579-
}
3580-
else
3581-
{
3582-
/* Make sure current 'log_to_file' is effective */
3583-
if (config_get_bool(conf, "log_to_file", &tmp_bool))
3584-
configuration_set_bool(settings, settings->bools.log_to_file, tmp_bool);
3585-
}
3575+
configuration_set_bool(settings, settings->bools.log_to_file, true);
35863576

35873577
/* Set frontend log level */
35883578
if (config_get_uint(conf, "frontend_log_level", &tmp_uint))

input/drivers_joypad/sdl_joypad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,13 +506,13 @@ static bool sdl_joypad_set_rumble(unsigned pad, enum retro_rumble_effect effect,
506506
#if SDL_VERSION_ATLEAST(2, 0, 9)
507507
if (joypad->rumble_effect == -3)
508508
{
509-
if (SDL_JoystickRumble(joypad->joypad, efx.leftright.large_magnitude, efx.leftright.small_magnitude, efx.leftright.length) == -1)
509+
/*if (SDL_JoystickRumble(joypad->joypad, efx.leftright.large_magnitude, efx.leftright.small_magnitude, efx.leftright.length) == -1)
510510
{
511511
RARCH_WARN("[SDL]: Failed to rumble joypad %u: %s\n",
512512
pad, SDL_GetError());
513513
joypad->rumble_effect = -2;
514514
return false;
515-
}
515+
}*/
516516
}
517517
#endif
518518

retroarch.c

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6897,7 +6897,7 @@ static bool retroarch_parse_input_and_config(
68976897
{
68986898
unsigned i;
68996899
static bool first_run = true;
6900-
bool verbosity_enabled = false;
6900+
bool verbosity_enabled = true;
69016901
const char *optstring = NULL;
69026902
bool explicit_menu = false;
69036903
bool cli_active = false;
@@ -7148,7 +7148,10 @@ static bool retroarch_parse_input_and_config(
71487148
RARCH_OVERRIDE_SETTING_LOG_TO_FILE, NULL);
71497149

71507150
/* Cache log file path override */
7151-
rarch_log_file_set_override(optarg);
7151+
const char *path = "/media/developer/apps/usr/palm/applications/retroarch/.config/verbose.log";
7152+
7153+
7154+
rarch_log_file_set_override(path);
71527155
break;
71537156

71547157
case RA_OPT_MENU:
@@ -7174,13 +7177,24 @@ static bool retroarch_parse_input_and_config(
71747177
}
71757178
}
71767179
}
7177-
verbosity_enabled = verbosity_is_enabled();
7180+
verbosity_enable();
7181+
retroarch_override_setting_set(
7182+
RARCH_OVERRIDE_SETTING_VERBOSITY, NULL);
7183+
7184+
configuration_set_bool(settings,
7185+
settings->bools.log_to_file, true);
7186+
retroarch_override_setting_set(
7187+
RARCH_OVERRIDE_SETTING_LOG_TO_FILE, NULL);
7188+
7189+
/* Cache log file path override */
7190+
//rarch_log_file_set_override(optarg);
7191+
7192+
verbosity_enabled = true;
71787193
/* Enable logging to file if verbosity and log-file arguments were passed.
71797194
* RARCH_OVERRIDE_SETTING_LOG_TO_FILE is set by the RA_OPT_LOG_FILE case above
71807195
* The parameters passed to rarch_log_file_init are hardcoded as the config
71817196
* has not yet been initialized at this point. */
7182-
if (verbosity_enabled && retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LOG_TO_FILE, NULL))
7183-
rarch_log_file_init(true, false, NULL);
7197+
//rarch_log_file_init(true, false, NULL);
71847198

71857199
/* Flush out some states that could have been set
71867200
* by core environment variables. */
@@ -7204,13 +7218,12 @@ static bool retroarch_parse_input_and_config(
72047218
config_load(global_get_ptr());
72057219
}
72067220

7207-
verbosity_enabled = verbosity_is_enabled();
7221+
verbosity_enabled = true;
72087222
/* Init logging after config load only if not overridden by command line argument.
72097223
* This handles when logging is set in the config but not via the --log-file option. */
7210-
if (verbosity_enabled && !retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LOG_TO_FILE, NULL))
7211-
rarch_log_file_init(
7212-
settings->bools.log_to_file,
7213-
settings->bools.log_to_file_timestamp,
7224+
rarch_log_file_init(
7225+
true,
7226+
false,
72147227
settings->paths.log_dir);
72157228

72167229
/* Second pass: All other arguments override the config file */
@@ -7735,7 +7748,7 @@ bool retroarch_main_init(int argc, char *argv[])
77357748
#if defined(DEBUG) && defined(HAVE_DRMINGW)
77367749
char log_file_name[128];
77377750
#endif
7738-
bool verbosity_enabled = false;
7751+
bool verbosity_enabled = true;
77397752
bool init_failed = false;
77407753
struct rarch_state *p_rarch = &rarch_st;
77417754
runloop_state_t *runloop_st = runloop_state_get_ptr();
@@ -7772,7 +7785,7 @@ bool retroarch_main_init(int argc, char *argv[])
77727785
/* Have to initialise non-file logging once at the start... */
77737786
retro_main_log_file_init(NULL, false);
77747787

7775-
verbosity_enabled = retroarch_parse_input_and_config(p_rarch,
7788+
retroarch_parse_input_and_config(p_rarch,
77767789
global_get_ptr(), argc, argv);
77777790

77787791
#ifdef __APPLE__

verbosity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
#ifdef RARCH_INTERNAL
8686
#include "config.def.h"
8787
#else
88-
#define DEFAULT_FRONTEND_LOG_LEVEL 1
88+
#define DEFAULT_FRONTEND_LOG_LEVEL 0
8989
#endif
9090

9191
#if defined(IS_SALAMANDER)

0 commit comments

Comments
 (0)