synced with scummvm svn rev 47951

This commit is contained in:
Pawel Kolodziejski 2011-04-10 15:33:20 +02:00
parent 55415ee174
commit 41be88f8b7
40 changed files with 3940 additions and 1089 deletions

View file

@ -386,16 +386,36 @@ bool OSystem_SDL::hasFeature(Feature f) {
}
void OSystem_SDL::setFeatureState(Feature f, bool enable) {
/* switch (f) {
switch (f) {
case kFeatureFullscreenMode:
//setFullscreenMode(enable);
break;
/* case kFeatureAspectRatioCorrection:
//setAspectRatioCorrection(enable);
break;
case kFeatureAutoComputeDirtyRects:
if (enable)
_modeFlags |= DF_WANT_RECT_OPTIM;
else
_modeFlags &= ~DF_WANT_RECT_OPTIM;
break;
case kFeatureIconifyWindow:
if (enable)
SDL_WM_IconifyWindow();*/
break;
default:
break;
}*/
}
}
bool OSystem_SDL::getFeatureState(Feature f) {
switch (f) {
case kFeatureFullscreenMode:
return _fullscreen;
/* case kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection;
case kFeatureAutoComputeDirtyRects:
return _modeFlags & DF_WANT_RECT_OPTIM;*/
default:
return false;
}
@ -616,12 +636,12 @@ void OSystem_SDL::setupMixer() {
_samplesPerSec = SAMPLES_PER_SEC;
// Determine the sample buffer size. We want it to store enough data for
// about 1/16th of a second. Note that it must be a power of two.
// So e.g. at 22050 Hz, we request a sample buffer size of 2048.
// at least 1/16th of a second (though at maximum 8192 samples). Note
// that it must be a power of two. So e.g. at 22050 Hz, we request a
// sample buffer size of 2048.
int samples = 8192;
while (16 * samples >= _samplesPerSec) {
while (samples * 16 > _samplesPerSec * 2)
samples >>= 1;
}
memset(&desired, 0, sizeof(desired));
desired.freq = _samplesPerSec;