Fixed DirectSound initialization issues.
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@878 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
3b58c9b506
commit
ba9d1aafeb
|
@ -494,19 +494,21 @@ BOOL VBA::InitInstance()
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
|
if(!initDisplay()) {
|
||||||
|
if(videoOption >= VIDEO_320x240) {
|
||||||
|
regSetDwordValue("video", VIDEO_2X);
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!openLinkLog())
|
if(!openLinkLog())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if(!initInput())
|
if(!initInput())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if(!initDisplay()) {
|
|
||||||
if(videoOption >= VIDEO_320x240) {
|
|
||||||
regSetDwordValue("video", VIDEO_1X);
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
hAccel = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR));
|
hAccel = LoadAccelerators(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR));
|
||||||
|
|
||||||
winAccelMgr.Connect((MainWnd *)m_pMainWnd);
|
winAccelMgr.Connect((MainWnd *)m_pMainWnd);
|
||||||
|
@ -1182,6 +1184,7 @@ SoundDriver * systemSoundInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
if( drv ) {
|
if( drv ) {
|
||||||
|
if (theApp.throttle)
|
||||||
drv->setThrottle( theApp.throttle );
|
drv->setThrottle( theApp.throttle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2444,7 +2447,7 @@ void VBA::saveSettings()
|
||||||
|
|
||||||
regSetDwordValue("soundEnable", soundGetEnable() & 0x30f);
|
regSetDwordValue("soundEnable", soundGetEnable() & 0x30f);
|
||||||
|
|
||||||
regSetDwordValue("soundQuality", soundGetSampleRate() / 44100);
|
regSetDwordValue("soundQuality", 44100 / soundGetSampleRate() );
|
||||||
|
|
||||||
regSetDwordValue("soundVolume", (DWORD)(soundGetVolume() * 100.0f));
|
regSetDwordValue("soundVolume", (DWORD)(soundGetVolume() * 100.0f));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue