OSDN Git Service
(root)
/
gikonavigoeson
/
gikonavi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e996b0
)
サウンドファイルの相対ファイル対応
author
h677
<h677>
Sun, 27 Jul 2008 16:43:49 +0000
(16:43 +0000)
committer
h677
<h677>
Sun, 27 Jul 2008 16:43:49 +0000
(16:43 +0000)
Option.pas
patch
|
blob
|
history
diff --git
a/Option.pas
b/Option.pas
index
d9102d6
..
83c6bda
100644
(file)
--- a/
Option.pas
+++ b/
Option.pas
@@
-1325,13
+1325,19
@@
begin
end;
procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
end;
procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
+var
+ s : String;
begin
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
¢
\83
t
\83
@
\83
C
\83
\8b
\82
Å
\82
·', '
\83
G
\83
\89
\81
[', MB_ICONSTOP or MB_OK);
SoundFileEdit.Text := '';
Exit;
end;
MsgBox(Handle, '
\91
¶
\8d
Ý
\82
µ
\82
È
\82
¢
\83
t
\83
@
\83
C
\83
\8b
\82
Å
\82
·', '
\83
G
\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;
sndPlaySound(nil, SND_ASYNC);
end;
end;