Bugfix: don't set scalefactor via CLI arg if --scale-factor{x,y} not set

This commit is contained in:
Starbeamrainbowlabs 2023-12-08 21:38:01 +00:00
parent 85dce8acec
commit e73e4b4596
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -17,8 +17,8 @@ namespace MusicBoxConverter
string outputFilename = ""; string outputFilename = "";
bool debug = false; bool debug = false;
MusicBox targetMusicBox = MusicBox.Note30Corrected; MusicBox targetMusicBox = MusicBox.Note30Corrected;
float scaleFactorX = 0.03f; float scaleFactorX = -1f;
float scaleFactorY = 4.0f; float scaleFactorY = -1f;
for(int i = 0; i < args.Length; i++) for(int i = 0; i < args.Length; i++)
{ {
@ -91,7 +91,9 @@ namespace MusicBoxConverter
Debug = debug Debug = debug
}; };
if(scaleFactorX > 0)
converter.SetScaleFactorX(scaleFactorX); converter.SetScaleFactorX(scaleFactorX);
if(scaleFactorY > 0)
converter.SetScaleFactorY(scaleFactorY); converter.SetScaleFactorY(scaleFactorY);
converter.Output(outputFilename); converter.Output(outputFilename);