(svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror().
This commit is contained in:
@@ -24,7 +24,7 @@ static void PrepareHeader(WAVEHDR *hdr)
|
||||
hdr->lpData = MallocT<char>(_bufsize * 4);
|
||||
if (hdr->lpData == NULL ||
|
||||
waveOutPrepareHeader(_waveout, hdr, sizeof(WAVEHDR)) != MMSYSERR_NOERROR)
|
||||
error("waveOutPrepareHeader failed");
|
||||
usererror("waveOutPrepareHeader failed");
|
||||
}
|
||||
|
||||
static void FillHeaders()
|
||||
@@ -35,7 +35,7 @@ static void FillHeaders()
|
||||
if (!(hdr->dwFlags & WHDR_INQUEUE)) {
|
||||
MxMixSamples(hdr->lpData, hdr->dwBufferLength / 4);
|
||||
if (waveOutWrite(_waveout, hdr, sizeof(WAVEHDR)) != MMSYSERR_NOERROR)
|
||||
error("waveOutWrite failed");
|
||||
usererror("waveOutWrite failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user