Fixed bug where switching from fullscreen to windowed mode while in the

debugger would reset the UI zoom level.

Fixed issue with 'make install' not completing.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1349 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2007-08-16 16:42:46 +00:00
parent 3b628e534d
commit 16de3d6b3c
2 changed files with 26 additions and 20 deletions

View File

@ -13,7 +13,7 @@
## See the file "license" for information on usage and redistribution of ## See the file "license" for information on usage and redistribution of
## this file, and for a DISCLAIMER OF ALL WARRANTIES. ## this file, and for a DISCLAIMER OF ALL WARRANTIES.
## ##
## $Id: Makefile,v 1.31 2007-07-25 13:07:15 stephena Exp $ ## $Id: Makefile,v 1.32 2007-08-16 16:42:46 stephena Exp $
## ##
## Based on code from ScummVM - Scumm Interpreter ## Based on code from ScummVM - Scumm Interpreter
## Copyright (C) 2002-2004 The ScummVM project ## Copyright (C) 2002-2004 The ScummVM project
@ -173,7 +173,7 @@ install: all
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)" $(INSTALL) -d "$(DESTDIR)$(DOCDIR)"
$(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/index.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/" $(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/index.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/"
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics" $(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics"
$(INSTALL) -c -m 644 "$(srcdir)/docs/graphics/chucky_cheese.png" "$(srcdir)/docs/graphics/circuit.png" "$(srcdir)/docs/graphics/console.png" "$(srcdir)/docs/graphics/eventmapping.png" "$(srcdir)/docs/graphics/eventmapping_remap.png" "$(srcdir)/docs/graphics/jr_pacman.png" "$(srcdir)/docs/graphics/launcher_options_rom.png" "$(srcdir)/docs/graphics/launcher_options_snap.png" "$(srcdir)/docs/graphics/launcher.png" "$(srcdir)/docs/graphics/options_about.png" "$(srcdir)/docs/graphics/options_audio.png" "$(srcdir)/docs/graphics/options_gameinfo.png" "$(srcdir)/docs/graphics/options_help.png" "$(srcdir)/docs/graphics/options_video.png" "$(srcdir)/docs/graphics/pacman.png" "$(srcdir)/docs/graphics/rom_browser.png" "$(srcdir)/docs/graphics/secret_quest.png" "$(srcdir)/docs/graphics/space_invaders.png" "$(DESTDIR)$(DOCDIR)/graphics" $(INSTALL) -c -m 644 $(wildcard $(srcdir)/docs/graphics/*.png) "$(DESTDIR)$(DOCDIR)/graphics"
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/applications" $(INSTALL) -d "$(DESTDIR)$(DATADIR)/applications"
$(INSTALL) -c -m 644 "$(srcdir)/src/unix/stella.desktop" "$(DESTDIR)$(DATADIR)/applications" $(INSTALL) -c -m 644 "$(srcdir)/src/unix/stella.desktop" "$(DESTDIR)$(DATADIR)/applications"
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons" $(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons"

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: FrameBuffer.cxx,v 1.122 2007-08-10 18:27:11 stephena Exp $ // $Id: FrameBuffer.cxx,v 1.123 2007-08-16 16:42:46 stephena Exp $
//============================================================================ //============================================================================
#include <sstream> #include <sstream>
@ -276,7 +276,7 @@ inline void FrameBuffer::drawMessage()
{ {
// Draw the bounded box and text // Draw the bounded box and text
fillRect(myMessage.x+1, myMessage.y+2, myMessage.w-2, myMessage.h-4, kBGColor); fillRect(myMessage.x+1, myMessage.y+2, myMessage.w-2, myMessage.h-4, kBGColor);
box(myMessage.x, myMessage.y+1, myMessage.w, myMessage.h-2, kColor, kColor); box(myMessage.x, myMessage.y+1, myMessage.w, myMessage.h-2, kColor, kShadowColor);
drawString(&myOSystem->font(), myMessage.text, myMessage.x+1, myMessage.y+4, drawString(&myOSystem->font(), myMessage.text, myMessage.x+1, myMessage.y+4,
myMessage.w, myMessage.color, kTextAlignCenter); myMessage.w, myMessage.color, kTextAlignCenter);
myMessage.counter--; myMessage.counter--;
@ -376,11 +376,15 @@ void FrameBuffer::setFullscreen(bool enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FrameBuffer::changeVidMode(int direction) bool FrameBuffer::changeVidMode(int direction)
{ {
bool saveModeChange = true;
VideoMode oldmode = myCurrentModeList->current(); VideoMode oldmode = myCurrentModeList->current();
if(direction == +1) if(direction == +1)
myCurrentModeList->next(); myCurrentModeList->next();
else if(direction == -1) else if(direction == -1)
myCurrentModeList->previous(); myCurrentModeList->previous();
else
saveModeChange = false; // no resolution or zoom level actually changed
VideoMode newmode = myCurrentModeList->current(); VideoMode newmode = myCurrentModeList->current();
if(!setVidMode(newmode)) if(!setVidMode(newmode))
@ -390,6 +394,8 @@ bool FrameBuffer::changeVidMode(int direction)
setCursorState(); setCursorState();
showMessage(newmode.name); showMessage(newmode.name);
if(saveModeChange)
{
// Determine which mode we're in, and save to the appropriate setting // Determine which mode we're in, and save to the appropriate setting
if(fullScreen()) if(fullScreen())
{ {
@ -408,7 +414,7 @@ bool FrameBuffer::changeVidMode(int direction)
else else
myOSystem->settings().setInt("zoom_ui", newmode.zoom); myOSystem->settings().setInt("zoom_ui", newmode.zoom);
} }
}
return true; return true;
/* /*
cerr << "New mode:" << endl cerr << "New mode:" << endl