Skip to content

Commit

Permalink
DINGUX: hopefully fix the cursor palette problem
Browse files Browse the repository at this point in the history
The port wasn't keeping track of the CursorPalette feature
correctly. This should fix it for good.
  • Loading branch information
hkzlab committed Aug 9, 2011
1 parent 521dfaa commit 3fe8119
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
Expand Up @@ -427,6 +427,7 @@ void DINGUXSdlGraphicsManager::hideOverlay() {
}

bool DINGUXSdlGraphicsManager::loadGFXMode() {
debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight);

// Forcefully disable aspect ratio correction for games
// which starts with a native 240px height resolution.
Expand All @@ -435,7 +436,6 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() {
_videoMode.aspectRatioCorrection = false;
}

debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight);
if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) {
_videoMode.aspectRatioCorrection = false;
setGraphicsMode(GFX_HALF);
Expand Down Expand Up @@ -473,9 +473,13 @@ bool DINGUXSdlGraphicsManager::hasFeature(OSystem::Feature f) {

void DINGUXSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
switch (f) {
case OSystem::kFeatureAspectRatioCorrection:
case OSystem::kFeatureAspectRatioCorrection:
setAspectRatioCorrection(enable);
break;
case OSystem::kFeatureCursorPalette:
_cursorPaletteDisabled = !enable;
blitCursor();
break;
default:
break;
}
Expand All @@ -485,8 +489,10 @@ bool DINGUXSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
assert(_transactionMode == kTransactionNone);

switch (f) {
case OSystem::kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection;
case OSystem::kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection;
case OSystem::kFeatureCursorPalette:
return !_cursorPaletteDisabled;
default:
return false;
}
Expand Down

0 comments on commit 3fe8119

Please sign in to comment.