mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Added force export settings config option
This commit is contained in:
1 parent
cfdce66ede
commit
74c4c3076b
4 files changed
+79
No files matched your search
@@ -107,6 +107,8 @@ public class FlashbackConfig {
|
||||
|
||||
public String defaultExportPath = null;
|
||||
|
||||
public ForceDefaultExportSettings forceDefaultExportSettings = new ForceDefaultExportSettings();
|
||||
|
||||
private transient int saveDelay = 0;
|
||||
|
||||
public boolean signedRenderFilter = false;
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.moulberry.flashback.configuration;
|
||||
|
||||
import com.moulberry.flashback.combo_options.AudioCodec;
|
||||
import com.moulberry.flashback.combo_options.VideoCodec;
|
||||
import com.moulberry.flashback.combo_options.VideoContainer;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ForceDefaultExportSettings {
|
||||
|
||||
public int[] resolution = null;
|
||||
public float[] framerate = null;
|
||||
public Boolean resetRng = null;
|
||||
public Boolean ssaa = null;
|
||||
public Boolean noGui = null;
|
||||
|
||||
public VideoContainer container = null;
|
||||
public VideoCodec videoCodec = null;
|
||||
public int[] selectedVideoEncoder = null;
|
||||
public Boolean useMaximumBitrate = null;
|
||||
|
||||
public Boolean recordAudio = null;
|
||||
public Boolean transparentBackground = null;
|
||||
public AudioCodec audioCodec = null;
|
||||
public Boolean stereoAudio = null;
|
||||
|
||||
public String defaultExportPath = null;
|
||||
|
||||
public void apply(FlashbackConfig config) {
|
||||
if (this.resolution != null) {
|
||||
config.resolution = Arrays.copyOf(this.resolution, 2);
|
||||
}
|
||||
if (this.framerate != null) {
|
||||
config.framerate = Arrays.copyOf(this.framerate, 1);
|
||||
}
|
||||
if (this.resetRng != null) {
|
||||
config.resetRng = this.resetRng;
|
||||
}
|
||||
if (this.ssaa != null) {
|
||||
config.ssaa = this.ssaa;
|
||||
}
|
||||
if (this.noGui != null) {
|
||||
config.noGui = this.noGui;
|
||||
}
|
||||
if (this.container != null) {
|
||||
config.container = this.container;
|
||||
}
|
||||
if (this.videoCodec != null) {
|
||||
config.videoCodec = this.videoCodec;
|
||||
}
|
||||
if (this.selectedVideoEncoder != null) {
|
||||
config.selectedVideoEncoder = Arrays.copyOf(this.selectedVideoEncoder, 1);
|
||||
}
|
||||
if (this.useMaximumBitrate != null) {
|
||||
config.useMaximumBitrate = this.useMaximumBitrate;
|
||||
}
|
||||
if (this.recordAudio != null) {
|
||||
config.recordAudio = this.recordAudio;
|
||||
}
|
||||
if (this.transparentBackground != null) {
|
||||
config.transparentBackground = this.transparentBackground;
|
||||
}
|
||||
if (this.audioCodec != null) {
|
||||
config.audioCodec = this.audioCodec;
|
||||
}
|
||||
if (this.stereoAudio != null) {
|
||||
config.stereoAudio = this.stereoAudio;
|
||||
}
|
||||
if (this.defaultExportPath != null) {
|
||||
config.defaultExportPath = this.defaultExportPath;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,6 +39,8 @@ public class ExportScreenshotWindow {
|
||||
}
|
||||
|
||||
FlashbackConfig config = Flashback.getConfig();
|
||||
config.forceDefaultExportSettings.apply(config);
|
||||
|
||||
if (config.resolution == null || config.resolution.length != 2) {
|
||||
config.resolution = new int[]{1920, 1080};
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ public class StartExportWindow {
|
||||
}
|
||||
|
||||
FlashbackConfig config = Flashback.getConfig();
|
||||
config.forceDefaultExportSettings.apply(config);
|
||||
|
||||
if (config.resolution == null || config.resolution.length != 2) {
|
||||
config.resolution = new int[]{1920, 1080};
|
||||
|
||||
Reference in new issue
Block a user