Fix Wizardry crash when open Config dialog on Wizardry's Start Page:

- Needed to init the Serial Port menu choices
- Added extra NULL check too
Cleaned-up PropertySheetPage.cpp code.
This commit is contained in:
tomch 2009-12-12 11:04:22 +00:00
parent 8238547a1c
commit 0aec4c7f63
3 changed files with 695 additions and 680 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1245,12 +1245,13 @@ char* CSuperSerialCard::GetSerialPortChoices()
return m_aySerialPortChoices;
}
// Called by LoadConfiguration()
void CSuperSerialCard::SetSerialPortName(const char* pSerialPortName)
{
strncpy(m_ayCurrentSerialPortName, pSerialPortName, SIZEOF_SERIALCHOICE_ITEM);
if (m_vecSerialPortsItems.empty())
ScanCOMPorts();
// Init m_aySerialPortChoices, so that we have choices to show if serial is active when we 1st open Config dialog
GetSerialPortChoices();
if (strncmp(TEXT_SERIAL_COM, pSerialPortName, sizeof(TEXT_SERIAL_COM)-1) == 0)
{

View File

@ -455,8 +455,8 @@ void SoundCore_SetFade(eFADE FadeType)
//-----------------------------------------------------------------------------
// If AppleWin started by double-clicking a .dsk, the our window won't have focus when volumes are set (so gets ignored).
// Subsequent setting (to the same volume) will get ignores, as DirectSound thinks that volume is already set.
// If AppleWin started by double-clicking a .dsk, then our window won't have focus when volumes are set (so gets ignored).
// Subsequent setting (to the same volume) will get ignored, as DirectSound thinks that volume is already set.
void SoundCore_TweakVolumes()
{