diff --git a/configure b/configure index e8329bc13..22d384eb6 100755 --- a/configure +++ b/configure @@ -15,6 +15,7 @@ CXXFLAGS="$CXXFLAGS $CPPFLAGS" # default lib behaviour yes/no/auto _opengl=auto +_libpng=auto _zlib=auto # default option behaviour yes/no @@ -199,6 +200,7 @@ Optional Features: Optional Libraries: --with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional) + --with-libpng-prefix=DIR Prefix where libpng is installed (optional) --with-zlib-prefix=DIR Prefix where zlib is installed (optional) --x-libraries Path to X11 libraries [${X_LIBS}] @@ -238,6 +240,11 @@ for ac_option in $@; do arg=`echo $ac_option | cut -d '=' -f 2` _sdlpath="$arg:$arg/bin" ;; + --with-libpng-prefix=*) + _prefix=`echo $ac_option | cut -d '=' -f 2` + LIBPNG_CFLAGS="-I$_prefix/include" + LIBPNG_LIBS="-L$_prefix/lib" + ;; --with-zlib-prefix=*) _prefix=`echo $ac_option | cut -d '=' -f 2` ZLIB_CFLAGS="-I$_prefix/include" @@ -497,6 +504,25 @@ if test -n "$_host_prefix"; then _windres="$_host_prefix-$_windres" fi +# +# Check for libpng +# +echocheck "libpng" +if test "$_libpng" = auto ; then + _libpng=no + cat > $TMPC << EOF +#include +#include +int main(void) { return printf("%s\n", PNG_HEADER_VERSION_STRING); } +EOF + cc_check $LDFLAGS $CXXFLAGS $LIBPNG_CFLAGS $LIBPNG_LIBS -lpng && _libpng=yes +fi +if test "$_libpng" = yes ; then + echo "$_libpng" +else + echo "none found, using built-in version" +fi + # # Check for ZLib # @@ -636,6 +662,7 @@ DBG="$SRC/debugger" DBGGUI="$SRC/debugger/gui" YACC="$SRC/yacc" CHEAT="$SRC/cheat" +LIBPNG="$SRC/libpng" ZLIB="$SRC/zlib" INCLUDES="-I$CORE -I$COMMON -I$GUI" @@ -678,6 +705,13 @@ case $_host_os in ;; esac +if test "$_libpng" = yes ; then + LIBS="$LIBS -lpng" +else + MODULES="$MODULES $LIBPNG" + INCLUDES="$INCLUDES -I$LIBPNG" +fi + if test "$_zlib" = yes ; then LIBS="$LIBS -lz" else diff --git a/src/common/module.mk b/src/common/module.mk index 3924534bf..b1cc236b3 100644 --- a/src/common/module.mk +++ b/src/common/module.mk @@ -6,6 +6,7 @@ MODULE_OBJS := \ src/common/SoundSDL.o \ src/common/FrameBufferSoft.o \ src/common/FrameBufferGL.o \ + src/common/PNGLibrary.o \ src/common/RectList.o \ src/common/Snapshot.o diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index ea99cb040..585fb4c83 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -127,15 +127,6 @@ Debugger::Debugger(OSystem* osystem) myHeight(620), myRewindManager(NULL) { - // Get the dialog size - int w, h; - myOSystem->settings().getSize("debuggerres", w, h); - myWidth = BSPF_max(w, 0); - myHeight = BSPF_max(h, 0); - myWidth = BSPF_max(myWidth, 1050u); - myHeight = BSPF_max(myHeight, 620u); - myOSystem->settings().setSize("debuggerres", myWidth, myHeight); - // Init parser myParser = new DebuggerParser(this); myBreakPoints = new PackedBitArray(0x10000); @@ -169,6 +160,15 @@ Debugger::~Debugger() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Debugger::initialize() { + // Get the dialog size + int w, h; + myOSystem->settings().getSize("debuggerres", w, h); + myWidth = BSPF_max(w, 0); + myHeight = BSPF_max(h, 0); + myWidth = BSPF_max(myWidth, 1050u); + myHeight = BSPF_max(myHeight, 620u); + myOSystem->settings().setSize("debuggerres", myWidth, myHeight); + const GUI::Rect& r = getDialogBounds(); delete myBaseDialog; diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx index af2973fd8..866ce00d5 100644 --- a/src/gui/UIDialog.cxx +++ b/src/gui/UIDialog.cxx @@ -168,10 +168,9 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent, // Add message concerning usage xpos = vBorder; ypos += 2*(lineHeight + 4); - lwidth = font.getStringWidth("(*) Changes require application restart"); + lwidth = font.getStringWidth("(*) Changes require ROM reload"); new StaticTextWidget(myTab, font, xpos, ypos, lwidth, fontHeight, - "(*) Changes require application restart", - kTextAlignLeft); + "(*) Changes require ROM reload", kTextAlignLeft); // Add items for tab 1 addToFocusList(wid, tabID);