end;
procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
+var
+ s : String;
begin
- if not FileExists(SoundFileEdit.Text) then begin
+ s := SoundFileEdit.Text;
+ if (AnsiPos('.\', s) = 1) then begin
+ s := GikoSys.Setting.GetAppDir + Copy(s, 2, Length(s));
+ end;
+ if not FileExists(s) then begin
MsgBox(Handle, '\91¶\8dÝ\82µ\82È\82¢\83t\83@\83C\83\8b\82Å\82·', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
SoundFileEdit.Text := '';
Exit;
end;
- if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
+ if not sndPlaySound(PChar(s), SND_ASYNC or SND_NOSTOP) then begin
sndPlaySound(nil, SND_ASYNC);
end;
end;