Fix incorrect extension for custom screenshot file name (fixes #337)
This commit is contained in:
@@ -95,6 +95,11 @@ public class GuiCreateScreenshot extends GuiRenderSettings implements Loadable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(RenderSettings settings) {
|
||||
super.load(settings.withEncodingPreset(RenderSettings.EncodingPreset.PNG));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Path getSettingsPath() {
|
||||
return getMinecraft().runDirectory.toPath().resolve("config/replaymod-screenshotsettings.json");
|
||||
|
||||
@@ -206,6 +206,30 @@ public class RenderSettings {
|
||||
this.highPerformance = highPerformance;
|
||||
}
|
||||
|
||||
public RenderSettings withEncodingPreset(EncodingPreset encodingPreset) {
|
||||
return new RenderSettings(
|
||||
renderMethod,
|
||||
encodingPreset,
|
||||
videoWidth,
|
||||
videoHeight,
|
||||
framesPerSecond,
|
||||
bitRate,
|
||||
outputFile,
|
||||
renderNameTags,
|
||||
stabilizeYaw,
|
||||
stabilizePitch,
|
||||
stabilizeRoll,
|
||||
chromaKeyingColor,
|
||||
sphericalFovX,
|
||||
sphericalFovY,
|
||||
injectSphericalMetadata,
|
||||
antiAliasing,
|
||||
exportCommand,
|
||||
exportArguments,
|
||||
highPerformance
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the width of the output video during rendering, including the upscale for Anti-Aliasing.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user