MCPcopy Create free account
hub / github.com/clementgallet/libTAS / update_config

Method update_config

src/program/ui/EncodeWindow.cpp:132–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void EncodeWindow::update_config()
133{
134 if (context->config.dumpfile.empty()) {
135 encodePath->setText(context->gamepath.c_str());
136 }
137 else {
138 encodePath->setText(context->config.dumpfile.c_str());
139 }
140
141 /* Set video codec and bitrate */
142 videoChoice->setCurrentIndex(context->config.sc.video_codec);
143 videoBitrate->setValue(context->config.sc.video_bitrate);
144
145 /* Set audio codec and bitrate */
146 audioChoice->setCurrentIndex(context->config.sc.audio_codec);
147 audioBitrate->setValue(context->config.sc.audio_bitrate);
148
149 /* Set ffmpeg options */
150 ffmpegOptions->setText(context->config.ffmpegoptions.c_str());
151
152 /* Set video framerate */
153 framerateGroupBox->setChecked(context->config.sc.video_framerate);
154 if (context->config.sc.video_framerate)
155 videoFramerate->setValue(context->config.sc.video_framerate);
156 else
157 videoFramerate->setValue(context->config.sc.initial_framerate_num / context->config.sc.initial_framerate_den);
158
159 if (context->config.ffmpegoptions.empty()) {
160 slotUpdate();
161 }
162}
163
164void EncodeWindow::slotUpdate()
165{

Callers 3

encodeWindowMethod · 0.45
executableWindowMethod · 0.45
reloadConfigWindowsMethod · 0.45

Calls 2

emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected