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