From ae9c5bf018f04b0699cfa145035b3e49432725c4 Mon Sep 17 00:00:00 2001 From: h677 Date: Sun, 27 Jul 2008 16:43:49 +0000 Subject: [PATCH] =?utf8?q?=E3=82=B5=E3=82=A6=E3=83=B3=E3=83=89=E3=83=95?= =?utf8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE=E7=9B=B8=E5=AF=BE=E3=83=95?= =?utf8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Option.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Option.pas b/Option.pas index d9102d6..83c6bda 100644 --- a/Option.pas +++ b/Option.pas @@ -1325,13 +1325,19 @@ begin 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, '‘¶Ý‚µ‚È‚¢ƒtƒ@ƒCƒ‹‚Å‚·', 'ƒGƒ‰[', 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; -- 2.11.0