Updated configure script to test for an external PNG library, and if

not found fall back to using the internal version (for Linux, and all
systems that use the configure script).

The debugger can now be resized in between ROM launches (ie, before
a ROM is actually started).  Previously, the entire program had to
be restarted for resizing to take effect.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2045 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-06-11 19:09:20 +00:00
parent ec1d3c6e10
commit ec096dca6f
4 changed files with 46 additions and 12 deletions

34
configure vendored
View File

@ -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 <stdio.h>
#include <png.h>
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

View File

@ -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

View File

@ -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;

View File

@ -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);