Commit bf65c71

Nick committed on
Fix bugs with UI not being in sync with song
commit bf65c71029e35e4cb26aee71f30190882d605c89 parent d81da90
3 changed files +8−9
ModifiedGBEmu.lpi +1−8
@@ -134,16 +134,9 @@
134 <Version Value="2"/> 134 <Version Value="2"/>
135 </PublishOptions> 135 </PublishOptions>
136 <RunParams> 136 <RunParams>
137 <local>
138 <CommandLineParams Value="&quot;C:\Projects\GB-Stuff\uge\SampleSongs\WVL - Yyna is a Girl.uge&quot;"/>
139 </local>
140 <FormatVersion Value="2"/> 137 <FormatVersion Value="2"/>
141 <Modes Count="1"> 138 <Modes Count="1">
142 <Mode0 Name="default"> 139 <Mode0 Name="default"/>
143 <local>
144 <CommandLineParams Value="&quot;C:\Projects\GB-Stuff\uge\SampleSongs\WVL - Yyna is a Girl.uge&quot;"/>
145 </local>
146 </Mode0>
147 </Modes> 140 </Modes>
148 </RunParams> 141 </RunParams>
149 <RequiredPackages Count="6"> 142 <RequiredPackages Count="6">
Modifiedsong.pas +5−1
@@ -263,7 +263,10 @@ begin
263 Comment := ''; 263 Comment := '';
264 end; 264 end;
265 265
266 for I := Low(S.Instruments.Duty) to High(S.Instruments.Duty) do 266 for I := Low(S.Instruments.All) to High(S.Instruments.All) do
267 S.Instruments.All[I] := Default(TInstrument);
268
269 for I := Low(S.Instruments.Duty) to High(S.Instruments.Duty) do begin
267 with S.Instruments.Duty[I] do begin 270 with S.Instruments.Duty[I] do begin
268 Type_ := itSquare; 271 Type_ := itSquare;
269 Length := 0; 272 Length := 0;
@@ -280,6 +283,7 @@ begin
280 283
281 OutputLevel := 1; 284 OutputLevel := 1;
282 end; 285 end;
286 end;
283 287
284 for I := Low(S.Instruments.Wave) to High(S.Instruments.Wave) do 288 for I := Low(S.Instruments.Wave) to High(S.Instruments.Wave) do
285 with S.Instruments.Wave[I] do begin 289 with S.Instruments.Wave[I] do begin
Modifiedtracker.pas +2−0
@@ -1137,6 +1137,8 @@ begin
1137 // If a command line param was passed, try to open it 1137 // If a command line param was passed, try to open it
1138 if FileExists(ParamStr(1)) and (ExtractFileExt(ParamStr(1)) = '.uge') then 1138 if FileExists(ParamStr(1)) and (ExtractFileExt(ParamStr(1)) = '.uge') then
1139 LoadSong(ParamStr(1)); 1139 LoadSong(ParamStr(1));
1140
1141 UpdateUIAfterLoad;
1140 end; 1142 end;
1141 1143
1142 procedure TfrmTracker.FormKeyDown(Sender: TObject; var Key: Word; 1144 procedure TfrmTracker.FormKeyDown(Sender: TObject; var Key: Word;