aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heider2010-05-09 11:00:17 +0000
committerAndre Heider2010-05-09 11:00:17 +0000
commita3e428f6dbfd39c14495909b5e748d8581e3ad2b (patch)
treea8385d0bdfc21d8a3a279a12e85aab920e266ef1
parentcff786341f22352066da235a288b876c3c2b1612 (diff)
downloadscummvm-rg350-a3e428f6dbfd39c14495909b5e748d8581e3ad2b.tar.gz
scummvm-rg350-a3e428f6dbfd39c14495909b5e748d8581e3ad2b.tar.bz2
scummvm-rg350-a3e428f6dbfd39c14495909b5e748d8581e3ad2b.zip
Rename DISABLE_*SCALERS to USE_*SCALERS, and move the mk/cpp defines to configure.
svn-id: r48977
-rw-r--r--Makefile.common9
-rw-r--r--backends/platform/PalmOS/Src/prefixes/compile.h2
-rw-r--r--backends/platform/dc/Makefile1
-rw-r--r--backends/platform/ds/arm9/makefile1
-rw-r--r--backends/platform/gp2x/gp2x-common.h1
-rw-r--r--backends/platform/gp2x/graphics.cpp2
-rw-r--r--backends/platform/gp2xwiz/gp2xwiz-graphics.cpp2
-rw-r--r--backends/platform/linuxmoto/linuxmoto-graphics.cpp2
-rw-r--r--backends/platform/n64/Makefile2
-rw-r--r--backends/platform/ps2/Makefile.gdb4
-rw-r--r--backends/platform/ps2/Makefile.ps24
-rw-r--r--backends/platform/psp/Makefile4
-rw-r--r--backends/platform/sdl/graphics.cpp32
-rw-r--r--backends/platform/sdl/sdl.cpp5
-rw-r--r--backends/platform/symbian/BuildPackageUpload_AllVersions.pl2
-rw-r--r--backends/platform/wince/Makefile11
-rw-r--r--backends/platform/wince/wince-sdl.cpp2
-rwxr-xr-xconfigure27
-rw-r--r--graphics/module.mk4
-rw-r--r--graphics/scaler.cpp10
-rw-r--r--graphics/scaler.h6
21 files changed, 67 insertions, 66 deletions
diff --git a/Makefile.common b/Makefile.common
index 92073ae2cf..1aa61b1709 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -33,15 +33,6 @@ ifdef USE_MT32EMU
MODULES += sound/softsynth/mt32
endif
-ifdef DISABLE_SCALERS
-DEFINES += -DDISABLE_SCALERS
-endif
-
-ifdef DISABLE_HQ_SCALERS
-DEFINES += -DDISABLE_HQ_SCALERS
-endif
-
-
######################################################################
# The build rules follow - normally you should have no need to
# touch whatever comes after here.
diff --git a/backends/platform/PalmOS/Src/prefixes/compile.h b/backends/platform/PalmOS/Src/prefixes/compile.h
index cb91957104..bb7230187a 100644
--- a/backends/platform/PalmOS/Src/prefixes/compile.h
+++ b/backends/platform/PalmOS/Src/prefixes/compile.h
@@ -48,7 +48,7 @@
#undef ENABLE_DRASCULA
// ScummVM
-#define DISABLE_HQ_SCALERS
+#define USE_SCALERS
#define DISABLE_FANCY_THEMES
//#define CT_NO_TRANSPARENCY
//#define REDUCE_MEMORY_USAGE
diff --git a/backends/platform/dc/Makefile b/backends/platform/dc/Makefile
index a19e119c76..2dcf9b7a7c 100644
--- a/backends/platform/dc/Makefile
+++ b/backends/platform/dc/Makefile
@@ -29,7 +29,6 @@ RM_REC = rm -rf
AR = sh-elf-ar cru
RANLIB = sh-elf-ranlib
HAVE_GCC3 = true
-DISABLE_SCALERS = true
USE_RGB_COLOR = true
ifdef DYNAMIC_MODULES
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile
index 86e40c7e2f..eca170ef96 100644
--- a/backends/platform/ds/arm9/makefile
+++ b/backends/platform/ds/arm9/makefile
@@ -286,7 +286,6 @@ RANLIB = arm-eabi-ranlib
OBJCOPY = arm-eabi-objcopy
AS = arm-eabi-as
HAVE_GCC3 = true
-DISABLE_SCALERS = true
ifdef DYNAMIC_MODULES
DEFINES += -DDYNAMIC_MODULES
diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h
index 4199a5d032..79eb3f65cf 100644
--- a/backends/platform/gp2x/gp2x-common.h
+++ b/backends/platform/gp2x/gp2x-common.h
@@ -34,7 +34,6 @@
#define __GP2X__
#define USE_OSD
-/* #define DISABLE_SCALERS */
#define MIXER_DOUBLE_BUFFERING 1
namespace Audio {
diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp
index 8f6f67c5d6..243c37dcb1 100644
--- a/backends/platform/gp2x/graphics.cpp
+++ b/backends/platform/gp2x/graphics.cpp
@@ -1114,7 +1114,7 @@ void OSystem_GP2X::clearOverlay() {
_scalerProc((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2, _tmpscreen->pitch,
(byte *)_overlayscreen->pixels, _overlayscreen->pitch, _videoMode.screenWidth, _videoMode.screenHeight);
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection)
stretch200To240((uint8 *)_overlayscreen->pixels, _overlayscreen->pitch,
_videoMode.overlayWidth, _videoMode.screenHeight * _videoMode.scaleFactor, 0, 0, 0);
diff --git a/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp b/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
index b23c3388e1..b20087e6d9 100644
--- a/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
+++ b/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
@@ -398,7 +398,7 @@ void OSystem_GP2XWIZ::internUpdateScreen() {
r->y = dst_y;
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
#endif
diff --git a/backends/platform/linuxmoto/linuxmoto-graphics.cpp b/backends/platform/linuxmoto/linuxmoto-graphics.cpp
index 01d954f9b9..8f718c82f6 100644
--- a/backends/platform/linuxmoto/linuxmoto-graphics.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-graphics.cpp
@@ -422,7 +422,7 @@ void OSystem_LINUXMOTO::internUpdateScreen() {
r->x = dst_x;
r->y = dst_y;
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
#endif
diff --git a/backends/platform/n64/Makefile b/backends/platform/n64/Makefile
index fa2b4ae9b5..914e6e9c9e 100644
--- a/backends/platform/n64/Makefile
+++ b/backends/platform/n64/Makefile
@@ -45,8 +45,6 @@ RM_REC = rm -rf
VERBOSE_BUILD=1
HAVE_GCC3=1
-DISABLE_SCALERS=1
-DISABLE_HQ_SCALER=1
USE_RGB_COLOR=0
ENABLED=STATIC_PLUGIN
diff --git a/backends/platform/ps2/Makefile.gdb b/backends/platform/ps2/Makefile.gdb
index 25fee65e30..41ac58d629 100644
--- a/backends/platform/ps2/Makefile.gdb
+++ b/backends/platform/ps2/Makefile.gdb
@@ -7,10 +7,6 @@ PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /tremor/tremor
ENABLED=STATIC_PLUGIN
-#control build
-DISABLE_SCALERS = true
-DISABLE_HQ_SCALERS = true
-
ENABLE_SCUMM = $(ENABLED)
ENABLE_SCUMM_7_8 = $(ENABLED)
#ENABLE_HE = $(ENABLED)
diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2
index 8c1d8f81fe..bf7ac0aca0 100644
--- a/backends/platform/ps2/Makefile.ps2
+++ b/backends/platform/ps2/Makefile.ps2
@@ -7,10 +7,6 @@ PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /tremor/tremor
ENABLED=STATIC_PLUGIN
-#control build
-DISABLE_SCALERS = true
-DISABLE_HQ_SCALERS = true
-
ENABLE_SCUMM = $(ENABLED)
ENABLE_SCUMM_7_8 = $(ENABLED)
ENABLE_HE = $(ENABLED)
diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile
index 6f76f6d805..8e83563d10 100644
--- a/backends/platform/psp/Makefile
+++ b/backends/platform/psp/Makefile
@@ -91,10 +91,6 @@ PLUGIN_SUFFIX = .plg
PLUGIN_EXTRA_DEPS = plugin.syms scummvm-psp.elf
PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols=scummvm-psp.org.elf,-Tplugin.ld,--retain-symbols-file,plugin.syms -lstdc++ -lc
-# Remove unneeded scalers
-DISABLE_SCALERS = true
-DISABLE_HQ_SCALERS = true
-
# PSP-specific variables
STRIP = psp-strip
MKSFO = mksfoex -d MEMSIZE=1
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index 290f531278..b3ef101e9e 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -37,7 +37,7 @@
static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{"1x", "Normal (no scaling)", GFX_NORMAL},
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
{"2x", "2x", GFX_DOUBLESIZE},
{"3x", "3x", GFX_TRIPLESIZE},
{"2xsai", "2xSAI", GFX_2XSAI},
@@ -45,7 +45,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{"supereagle", "SuperEagle", GFX_SUPEREAGLE},
{"advmame2x", "AdvMAME2x", GFX_ADVMAME2X},
{"advmame3x", "AdvMAME3x", GFX_ADVMAME3X},
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
{"hq2x", "HQ2x", GFX_HQ2X},
{"hq3x", "HQ3x", GFX_HQ3X},
#endif
@@ -58,7 +58,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
// Table of relative scalers magnitudes
// [definedScale - 1][scaleFactor - 1]
static ScalerProc *scalersMagn[3][3] = {
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
{ Normal1x, AdvMame2x, AdvMame3x },
{ Normal1x, Normal1x, Normal1o5x },
{ Normal1x, Normal1x, Normal1x }
@@ -80,7 +80,7 @@ static const int s_gfxModeSwitchTable[][4] = {
{ GFX_NORMAL, GFX_DOTMATRIX, -1, -1 }
};
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY);
#endif
@@ -308,7 +308,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
case GFX_NORMAL:
newScaleFactor = 1;
break;
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
case GFX_DOUBLESIZE:
newScaleFactor = 2;
break;
@@ -331,7 +331,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
case GFX_ADVMAME3X:
newScaleFactor = 3;
break;
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
case GFX_HQ2X:
newScaleFactor = 2;
break;
@@ -345,7 +345,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
case GFX_DOTMATRIX:
newScaleFactor = 2;
break;
-#endif // DISABLE_SCALERS
+#endif // USE_SCALERS
default:
warning("unknown gfx mode %d", mode);
@@ -372,7 +372,7 @@ void OSystem_SDL::setGraphicsModeIntern() {
case GFX_NORMAL:
newScalerProc = Normal1x;
break;
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
case GFX_DOUBLESIZE:
newScalerProc = Normal2x;
break;
@@ -395,7 +395,7 @@ void OSystem_SDL::setGraphicsModeIntern() {
case GFX_ADVMAME3X:
newScalerProc = AdvMame3x;
break;
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
case GFX_HQ2X:
newScalerProc = HQ2x;
break;
@@ -409,7 +409,7 @@ void OSystem_SDL::setGraphicsModeIntern() {
case GFX_DOTMATRIX:
newScalerProc = DotMatrix;
break;
-#endif // DISABLE_SCALERS
+#endif // USE_SCALERS
default:
error("Unknown gfx mode %d", _videoMode.mode);
@@ -898,7 +898,7 @@ void OSystem_SDL::internUpdateScreen() {
r->w = r->w * scale1;
r->h = dst_h * scale1;
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
#endif
@@ -1110,7 +1110,7 @@ void OSystem_SDL::addDirtyRect(int x, int y, int w, int h, bool realCoordinates)
h = height - y;
}
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && !_overlayVisible && !realCoordinates) {
makeRectStretchable(x, y, w, h);
}
@@ -1371,7 +1371,7 @@ void OSystem_SDL::clearOverlay() {
_scalerProc((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2, _tmpscreen->pitch,
(byte *)_overlayscreen->pixels, _overlayscreen->pitch, _videoMode.screenWidth, _videoMode.screenHeight);
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection)
stretch200To240((uint8 *)_overlayscreen->pixels, _overlayscreen->pitch,
_videoMode.overlayWidth, _videoMode.screenHeight * _videoMode.scaleFactor, 0, 0, 0);
@@ -1664,7 +1664,7 @@ void OSystem_SDL::blitCursor() {
_mouseCurState.vHotY = _mouseCurState.hotY;
}
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
int rH1 = rH; // store original to pass to aspect-correction function later
#endif
@@ -1712,7 +1712,7 @@ void OSystem_SDL::blitCursor() {
_mouseOrigSurface->pitch, (byte *)_mouseSurface->pixels, _mouseSurface->pitch,
_mouseCurState.w, _mouseCurState.h);
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && _cursorTargetScale == 1)
cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0);
#endif
@@ -1721,7 +1721,7 @@ void OSystem_SDL::blitCursor() {
SDL_UnlockSurface(_mouseOrigSurface);
}
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
// Basically it is kVeryFastAndUglyAspectMode of stretch200To240 from
// common/scale/aspect.cpp
static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 246327786d..6b23acfb8b 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -94,9 +94,11 @@ AspectRatio::AspectRatio(int w, int h) {
_kh = h;
}
+#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS)
static const size_t AR_COUNT = 4;
static const char* desiredAspectRatioAsStrings[AR_COUNT] = { "auto", "4/3", "16/9", "16/10" };
static const AspectRatio desiredAspectRatios[AR_COUNT] = { AspectRatio(0, 0), AspectRatio(4,3), AspectRatio(16,9), AspectRatio(16,10) };
+
static AspectRatio getDesiredAspectRatio() {
//TODO : We could parse an arbitrary string, if we code enough proper validation
Common::String desiredAspectRatio = ConfMan.get("desired_screen_aspect_ratio");
@@ -111,6 +113,7 @@ static AspectRatio getDesiredAspectRatio() {
// TODO : Report a warning
return AspectRatio(0, 0);
}
+#endif
void OSystem_SDL::initBackend() {
assert(!_inited);
@@ -147,7 +150,7 @@ void OSystem_SDL::initBackend() {
memset(&_transactionDetails, 0, sizeof(_transactionDetails));
_cksumValid = false;
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && !defined(DISABLE_SCALERS)
+#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS)
_videoMode.mode = GFX_DOUBLESIZE;
_videoMode.scaleFactor = 2;
_videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio");
diff --git a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
index fbfdaeeeef..3543dc8d19 100644
--- a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
+++ b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
@@ -61,8 +61,6 @@ $ftp_url = "FTP://$FTP_User\@$FTP_Host/$FTP_Dir/";
$ExtraMacros = "MACRO NONSTANDARD_PORT\n";
$ExtraMacros .= "MACRO ENABLE_VKEYBD\n";
$ExtraMacros .= "MACRO DISABLE_FANCY_THEMES\n";
-$ExtraMacros .= "MACRO DISABLE_SCALERS\n";
-$ExtraMacros .= "MACRO DISABLE_HQ_SCALERS\n";
# prep nice list of SDKs
#while( ($SDK, $RootDir) = each(%SDK_RootDirs) )
diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile
index f81d97f075..8ad134648b 100644
--- a/backends/platform/wince/Makefile
+++ b/backends/platform/wince/Makefile
@@ -70,7 +70,8 @@ REMOTE_DIRECTORY = \Storage Card\Program Files\Scummvm
########################################################################
## You're probably not going to want to change these defines...
-#DISABLE_HQ_SCALERS = 1
+USE_SCALERS = 1
+USE_HQ_SCALERS = 1
USE_ARM_SOUND_ASM = 1
USE_ARM_SMUSH_ASM = 1
USE_ARM_GFX_ASM = 1
@@ -155,6 +156,14 @@ DEFINES += -DUSE_FLAC
LIBS += -lFLAC
endif
+ifdef USE_SCALERS
+DEFINES += -DUSE_SCALERS
+endif
+
+ifdef USE_HQ_SCALERS
+DEFINES += -DUSE_HQ_SCALERS
+endif
+
ifdef USE_ARM_SMUSH_ASM
DEFINES += -DUSE_ARM_SMUSH_ASM
endif
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 068935582b..7ce689fb63 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -1305,7 +1305,7 @@ bool OSystem_WINCE3::setGraphicsMode(int mode) {
_videoMode.scaleFactor = 3;
_scalerProc = AdvMame3x;
break;
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
case GFX_HQ2X:
_videoMode.scaleFactor = 2;
_scalerProc = HQ2x;
diff --git a/configure b/configure
index 77be1f3258..a5377dbee6 100755
--- a/configure
+++ b/configure
@@ -129,8 +129,8 @@ _debug_build=auto
_release_build=auto
_text_console=no
_mt32emu=yes
-_build_hq_scalers=yes
_build_scalers=yes
+_build_hq_scalers=yes
_indeo3=auto
_enable_prof=no
# Default vkeybd/keymapper options
@@ -641,8 +641,8 @@ Optional Features:
--default-dynamic make plugins dynamic by default
--disable-mt32emu don't enable the integrated MT-32 emulator
--disable-16bit don't enable 16bit color support
- --disable-hq-scalers exclude HQ2x and HQ3x scalers
--disable-scalers exclude scalers
+ --disable-hq-scalers exclude HQ2x and HQ3x scalers
--enable-text-console use text console instead of graphical console
--enable-verbose-build enable regular echoing of commands during build process
@@ -700,8 +700,8 @@ done # for parm in ...
for ac_option in $@; do
case "$ac_option" in
--disable-16bit) _16bit=no ;;
- --disable-hq-scalers) _build_hq_scalers=no ;;
--disable-scalers) _build_scalers=no ;;
+ --disable-hq-scalers) _build_hq_scalers=no ;;
--enable-alsa) _alsa=yes ;;
--disable-alsa) _alsa=no ;;
--enable-vorbis) _vorbis=yes ;;
@@ -1873,8 +1873,19 @@ add_to_config_mk_if_yes "$_16bit" 'USE_RGB_COLOR = 1'
#
# Check whether to enable the (hq) scalers
#
-add_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS = 1'
-add_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS = 1'
+if test "$_build_scalers" = no ; then
+ _def_scalers='#undef USE_SCALERS'
+else
+ _def_scalers='#define USE_SCALERS'
+fi
+add_to_config_mk_if_yes "$_build_scalers" 'USE_SCALERS = 1'
+
+if test "$_build_hq_scalers" = no ; then
+ _def_hq_scalers='#undef USE_HQ_SCALERS'
+else
+ _def_hq_scalers='#define USE_HQ_SCALERS'
+fi
+add_to_config_mk_if_yes "$_build_hq_scalers" 'USE_HQ_SCALERS = 1'
#
# Check whether to compile the Indeo3 decoder
@@ -2256,6 +2267,10 @@ if test "$_16bit" = yes ; then
echo_n ", 16bit color"
fi
+if test "$_build_scalers" = yes ; then
+ echo_n ", scalers"
+fi
+
if test "$_build_hq_scalers" = yes ; then
echo_n ", HQ scalers"
fi
@@ -2529,6 +2544,8 @@ $_def_text_console
$_def_mt32emu
$_def_indeo3
$_def_16bit
+$_def_scalers
+$_def_hq_scalers
/* Plugin settings */
$_def_plugin
diff --git a/graphics/module.mk b/graphics/module.mk
index fde78b130a..15fbf092b3 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -32,7 +32,7 @@ MODULE_OBJS := \
video/coktelvideo/indeo3.o \
video/coktelvideo/coktelvideo.o
-ifndef DISABLE_SCALERS
+ifdef USE_SCALERS
MODULE_OBJS += \
scaler/2xsai.o \
scaler/aspect.o \
@@ -48,7 +48,7 @@ MODULE_OBJS += \
scaler/Normal2xARM.o
endif
-ifndef DISABLE_HQ_SCALERS
+ifdef USE_HQ_SCALERS
MODULE_OBJS += \
scaler/hq2x.o \
scaler/hq3x.o
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp
index a1439d3165..304d194a1a 100644
--- a/graphics/scaler.cpp
+++ b/graphics/scaler.cpp
@@ -30,7 +30,7 @@
int gBitFormat = 565;
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
// RGB-to-YUV lookup table
extern "C" {
@@ -139,7 +139,7 @@ void InitScalers(uint32 BitFormat) {
format = g_system->getOverlayFormat();
}
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
InitLUT(format);
#endif
@@ -152,7 +152,7 @@ void InitScalers(uint32 BitFormat) {
}
void DestroyScalers(){
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
free(RGBtoYUV);
RGBtoYUV = 0;
#endif
@@ -177,7 +177,7 @@ void Normal1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit
}
}
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
#ifdef USE_ARM_SCALER_ASM
@@ -386,4 +386,4 @@ void DotMatrix(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPi
}
}
-#endif // #ifndef DISABLE_SCALERS
+#endif // #ifdef USE_SCALERS
diff --git a/graphics/scaler.h b/graphics/scaler.h
index f00226cab9..22bda5273a 100644
--- a/graphics/scaler.h
+++ b/graphics/scaler.h
@@ -41,7 +41,7 @@ typedef void ScalerProc(const uint8 *srcPtr, uint32 srcPitch,
DECLARE_SCALER(Normal1x);
-#ifndef DISABLE_SCALERS
+#ifdef USE_SCALERS
DECLARE_SCALER(Normal2x);
DECLARE_SCALER(Normal3x);
@@ -57,12 +57,12 @@ DECLARE_SCALER(AdvMame3x);
DECLARE_SCALER(TV2x);
DECLARE_SCALER(DotMatrix);
-#ifndef DISABLE_HQ_SCALERS
+#ifdef USE_HQ_SCALERS
DECLARE_SCALER(HQ2x);
DECLARE_SCALER(HQ3x);
#endif
-#endif // #ifndef DISABLE_SCALERS
+#endif // #ifdef USE_SCALERS
// creates a 160x100 thumbnail for 320x200 games
// and 160x120 thumbnail for 320x240 and 640x480 games