Skip to content

Commit

Permalink
Add ability to change video screen size.
Browse files Browse the repository at this point in the history
This commit close issue SergeyPirogov#76
  • Loading branch information
LiYing2010 committed Jul 6, 2022
1 parent e3e5ad7 commit 5b4e744
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.aeonbits.owner.Config.LoadPolicy;
import org.aeonbits.owner.Config.LoadType;
import org.aeonbits.owner.Config.Sources;
import org.apache.commons.lang3.StringUtils;

import java.awt.*;
import java.io.File;
Expand Down Expand Up @@ -59,7 +60,12 @@ default String folder() {

@Key("video.screen.size")
default Dimension screenSize() {
return SystemUtils.getSystemScreenDimension();
final String screenSize = System.getProperty("video.screen.size", "");
if (StringUtils.isBlank(screenSize)) {
return SystemUtils.getSystemScreenDimension();
}
String[] arr = screenSize.split("x");
return new Dimension(Integer.valueOf(arr[0]), Integer.valueOf(arr[1]));
}

@Key("ffmpeg.format")
Expand Down

0 comments on commit 5b4e744

Please sign in to comment.