Fixed DirectSound initialization issues.

This commit is contained in:
mudlord 2009-06-16 12:01:18 +00:00
parent 379349f199
commit 4571763225
1 changed files with 11 additions and 8 deletions

View File

@ -494,19 +494,21 @@ BOOL VBA::InitInstance()
loadSettings();
if(!initDisplay()) {
if(videoOption >= VIDEO_320x240) {
regSetDwordValue("video", VIDEO_2X);
}
return FALSE;
}
if(!openLinkLog())
return FALSE;
if(!initInput())
return FALSE;
if(!initDisplay()) {
if(videoOption >= VIDEO_320x240) {
regSetDwordValue("video", VIDEO_1X);
}
return FALSE;
}
hAccel = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR));
winAccelMgr.Connect((MainWnd *)m_pMainWnd);
@ -1182,6 +1184,7 @@ SoundDriver * systemSoundInit()
}
if( drv ) {
if (theApp.throttle)
drv->setThrottle( theApp.throttle );
}
@ -2444,7 +2447,7 @@ void VBA::saveSettings()
regSetDwordValue("soundEnable", soundGetEnable() & 0x30f);
regSetDwordValue("soundQuality", soundGetSampleRate() / 44100);
regSetDwordValue("soundQuality", 44100 / soundGetSampleRate() );
regSetDwordValue("soundVolume", (DWORD)(soundGetVolume() * 100.0f));