File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
scriptmodules/supplementary Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ function install_bin_runcommand() {
43
43
iniSet " governor" " "
44
44
iniSet " disable_menu" " 0"
45
45
iniSet " image_delay" " 2"
46
+ iniSet " log_dir" " "
46
47
chown $user :$user " $configdir /all/runcommand.cfg"
47
48
fi
48
49
if [[ ! -f " $configdir /all/runcommand-launch-dialog.cfg" ]]; then
@@ -110,6 +111,7 @@ function gui_runcommand() {
110
111
' disable_joystick=0' \
111
112
' image_delay=2' \
112
113
' governor=' \
114
+ ' log_dir=' \
113
115
) "
114
116
115
117
[[ -z " $governor " ]] && governor=" Default: don't change"
@@ -137,6 +139,7 @@ function gui_runcommand() {
137
139
138
140
options+=(4 " Launch image delay in seconds (currently $image_delay )" )
139
141
options+=(5 " CPU governor configuration (currently: $governor )" )
142
+ options+=(6 " Set log/scratch directory (currently: ${log_dir:-/ dev/ shm} )" )
140
143
141
144
local choice=$( " ${cmd[@]} " " ${options[@]} " 2>&1 > /dev/tty)
142
145
[[ -z " $choice " ]] && break
@@ -159,6 +162,11 @@ function gui_runcommand() {
159
162
5)
160
163
governor_runcommand
161
164
;;
165
+ 6)
166
+ cmd=(dialog --backtitle " $__backtitle " --inputbox " Please enter the log directory" 10 60 " $log_dir " )
167
+ choice=$( " ${cmd[@]} " 2>&1 > /dev/tty)
168
+ iniSet " log_dir" " $choice "
169
+ ;;
162
170
esac
163
171
done
164
172
}
Original file line number Diff line number Diff line change 79
79
80
80
ROOTDIR=" /opt/retropie"
81
81
CONFIGDIR=" $ROOTDIR /configs"
82
- OUTPUTDIR=" /dev/shm"
83
- [ -d " ${OUTPUTDIR} " ] \
84
- && [ -w " ${OUTPUTDIR} " ] \
85
- || OUTPUTDIR=/tmp
86
- LOG=" ${OUTPUTDIR} /runcommand.log"
87
82
88
83
RUNCOMMAND_CONF=" $CONFIGDIR /all/runcommand.cfg"
89
84
VIDEO_CONF=" $CONFIGDIR /all/videomodes.cfg"
@@ -123,6 +118,10 @@ function get_config() {
123
118
iniGet " image_delay"
124
119
IMAGE_DELAY=" $ini_value "
125
120
[[ -z " $IMAGE_DELAY " ]] && IMAGE_DELAY=2
121
+ iniGet " log_dir"
122
+ LOG_DIR=" $ini_value "
123
+ [[ -z " $LOGDIR " ]] && LOGDIR=" /dev/shm"
124
+ LOG=" $LOG_DIR /runcommand.log"
126
125
fi
127
126
128
127
if [[ -n " $DISPLAY " ]] && $XRANDR & > /dev/null; then
@@ -933,7 +932,7 @@ function switch_fb_res() {
933
932
934
933
function build_xinitrc() {
935
934
local mode=" $1 "
936
- local xinitrc=" ${OUTPUTDIR} /retropie_xinitrc"
935
+ local xinitrc=" $LOG_DIR /retropie_xinitrc"
937
936
938
937
case " $mode " in
939
938
clear)
@@ -1072,7 +1071,7 @@ function config_backend() {
1072
1071
}
1073
1072
1074
1073
function retroarch_append_config() {
1075
- local conf="${OUTPUTDIR} /retroarch.cfg"
1074
+ local conf="$LOG_DIR /retroarch.cfg"
1076
1075
local dim
1077
1076
1078
1077
# only for retroarch emulators
@@ -1321,7 +1320,7 @@ function launch_command() {
1321
1320
}
1322
1321
1323
1322
function log_info() {
1324
- echo -e " $SYSTEM \n $EMULATOR \n $ROM \n $COMMAND " >${OUTPUTDIR} /runcommand.info
1323
+ echo -e " $SYSTEM \n $EMULATOR \n $ROM \n $COMMAND " >" $LOG_DIR /runcommand.info"
1325
1324
}
1326
1325
1327
1326
function runcommand() {
You can’t perform that action at this time.
0 commit comments