Added Left-Control key for fire button on joystick 0.

Changed the key for entering fullscreen mode on the SDL version
from F11 to Alt-Enter.  Will make the same change in the X11
version when I figure out how :)

Changed '-showfps' to '-showinfo' since it was showing more than the
fps anyway.  Added printing of the romname and md5sum to this option.

Temporarily removed support for fullscreen snapshot support in the
SDL version.  Windowed snapshot mode is still available in X and SDL.

Changed the requirements for snapshot support.  Now requires regular
Imlib instead of Imlib2.  More users have Imlib than Imlib2.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@40 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2002-02-03 16:51:22 +00:00
parent de2df715ea
commit 9fb178961d
4 changed files with 150 additions and 141 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.6 2002-01-18 16:04:46 estolberg Exp $ ## $Id: makefile,v 1.7 2002-02-03 16:51:21 stephena Exp $
##============================================================================ ##============================================================================
##============================================================================ ##============================================================================
@ -50,8 +50,8 @@ OPTIMIZATIONS =
### to include support for saving snapshots in png format ### to include support for saving snapshots in png format
### (X and SDL versions only) ### (X and SDL versions only)
### (requires you to install Imlib2) ### (requires you to install Imlib)
# IMLIB2_SNAPSHOT = 1 # IMLIB_SNAPSHOT = 1
##============================================================================ ##============================================================================
## All done, type make to get a list of frontends ## All done, type make to get a list of frontends
@ -104,13 +104,13 @@ ifdef LINUX_JOYSTICK
OPTS.X11 += -DLINUX_JOYSTICK OPTS.X11 += -DLINUX_JOYSTICK
endif endif
ifdef IMLIB2_SNAPSHOT ifdef IMLIB_SNAPSHOT
OPTS.X11 += -DIMLIB2_SNAPSHOT OPTS.X11 += -DIMLIB_SNAPSHOT
LIBS.X11 += `imlib2-config --libs` LIBS.X11 += `imlib-config --libs`
CFLAGS.X11 += `imlib2-config --cflags` CFLAGS.X11 += `imlib-config --cflags`
OPTS.SDL += -DIMLIB2_SNAPSHOT OPTS.SDL += -DIMLIB_SNAPSHOT
LIBS.SDL += `imlib2-config --libs` LIBS.SDL += `imlib-config --libs`
CFLAGS.SDL += `imlib2-config --cflags` CFLAGS.SDL += `imlib-config --cflags`
endif endif

View File

@ -22,7 +22,7 @@
;center = <0|1> ;center = <0|1>
;volume = <number> ;volume = <number>
;paddle = <0|1|2|3|real> ;paddle = <0|1|2|3|real>
;showfps = <0|1> ;showinfo = <0|1>
;fullscreen = <0|1> ;fullscreen = <0|1>
;ssdir = <pathname> ;ssdir = <pathname>
;ssname = <romname|md5sum> ;ssname = <romname|md5sum>

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: mainSDL.cxx,v 1.6 2002-02-01 02:13:08 stephena Exp $ // $Id: mainSDL.cxx,v 1.7 2002-02-03 16:51:22 stephena Exp $
//============================================================================ //============================================================================
#include <assert.h> #include <assert.h>
@ -40,8 +40,10 @@
#include "System.hxx" #include "System.hxx"
#include "SndUnix.hxx" #include "SndUnix.hxx"
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
#include <Imlib2.h> #include <Imlib.h>
ImlibData* imlibData;
// The path to save snapshot files // The path to save snapshot files
string theSnapShotDir = ""; string theSnapShotDir = "";
@ -84,6 +86,8 @@ static Display* theX11Display;
static Window theX11Window; static Window theX11Window;
static int theX11Screen; static int theX11Screen;
static int mouseX = 0; static int mouseX = 0;
static bool x11Available = false;
static SDL_SysWMinfo info;
// SDL colors palette // SDL colors palette
static Uint32 colors[256]; static Uint32 colors[256];
@ -127,6 +131,7 @@ static Switches list[] = {
{ SDLK_RIGHT, Event::JoystickZeroRight }, { SDLK_RIGHT, Event::JoystickZeroRight },
{ SDLK_SPACE, Event::JoystickZeroFire }, { SDLK_SPACE, Event::JoystickZeroFire },
{ SDLK_RETURN, Event::JoystickZeroFire }, { SDLK_RETURN, Event::JoystickZeroFire },
{ SDLK_LCTRL, Event::JoystickZeroFire },
{ SDLK_z, Event::BoosterGripZeroTrigger }, { SDLK_z, Event::BoosterGripZeroTrigger },
{ SDLK_x, Event::BoosterGripZeroBooster }, { SDLK_x, Event::BoosterGripZeroBooster },
@ -193,7 +198,7 @@ bool theGrabMouseFlag = false;
bool theCenterWindowFlag = false; bool theCenterWindowFlag = false;
// Indicates whether to show some game info on program exit // Indicates whether to show some game info on program exit
bool theShowFpsFlag = false; bool theShowInfoFlag = false;
// Indicates whether to show cursor in the game window // Indicates whether to show cursor in the game window
bool theHideCursorFlag = false; bool theHideCursorFlag = false;
@ -235,6 +240,13 @@ bool setupDisplay()
atexit(doQuit); atexit(doQuit);
// Check which system we are running under
x11Available = false;
SDL_VERSION(&info.version);
if(SDL_GetWMInfo(&info) > 0)
if(info.subsystem == SDL_SYSWM_X11)
x11Available = true;
int sdlflags = SDL_HWSURFACE | SDL_HWPALETTE; int sdlflags = SDL_HWSURFACE | SDL_HWPALETTE;
sdlflags |= theUseFullScreenFlag ? SDL_FULLSCREEN : 0; sdlflags |= theUseFullScreenFlag ? SDL_FULLSCREEN : 0;
@ -340,13 +352,8 @@ bool setupDisplay()
if(theCenterWindowFlag && !theUseFullScreenFlag) if(theCenterWindowFlag && !theUseFullScreenFlag)
centerWindow(); centerWindow();
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
SDL_SysWMinfo info; if(x11Available)
SDL_VERSION(&info.version);
if(SDL_GetWMInfo(&info) > 0)
{
if(info.subsystem == SDL_SYSWM_X11)
{ {
info.info.x11.lock_func(); info.info.x11.lock_func();
theX11Display = info.info.x11.display; theX11Display = info.info.x11.display;
@ -354,10 +361,7 @@ bool setupDisplay()
theX11Screen = DefaultScreen(theX11Display); theX11Screen = DefaultScreen(theX11Display);
info.info.x11.unlock_func(); info.info.x11.unlock_func();
imlib_context_set_display(theX11Display); imlibData = Imlib_init(theX11Display);
imlib_context_set_drawable(theX11Window);
imlib_context_set_visual(DefaultVisual(theX11Display, theX11Screen));
imlib_context_set_colormap(DefaultColormap(theX11Display, theX11Screen));
// By default, snapshot dir is HOME and name is ROMNAME, assuming that // By default, snapshot dir is HOME and name is ROMNAME, assuming that
// they haven't been specified on the commandline // they haven't been specified on the commandline
@ -366,7 +370,6 @@ bool setupDisplay()
if(theSnapShotName == "") if(theSnapShotName == "")
theSnapShotName = "romname"; theSnapShotName = "romname";
} }
}
#endif #endif
return true; return true;
@ -469,15 +472,13 @@ void centerWindow()
if(isFullscreen || isCentered) if(isFullscreen || isCentered)
return; return;
SDL_SysWMinfo info; if(!x11Available)
SDL_VERSION(&info.version);
if(SDL_GetWMInfo(&info) > 0)
{ {
cerr << "Window centering only available under X11.\n";
return;
}
int x, y, w, h; int x, y, w, h;
if(info.subsystem == SDL_SYSWM_X11)
{
info.info.x11.lock_func(); info.info.x11.lock_func();
theX11Display = info.info.x11.display; theX11Display = info.info.x11.display;
theX11Window = info.info.x11.wmwindow; theX11Window = info.info.x11.wmwindow;
@ -493,43 +494,43 @@ void centerWindow()
isCentered = true; isCentered = true;
} }
}
}
/** /**
Toggles between fullscreen and window mode. Grabmouse and hidecursor Toggles between fullscreen and window mode. Grabmouse and hidecursor
activated when in fullscreen mode. Only works in X11 for now. activated when in fullscreen mode.
*/ */
void toggleFullscreen() void toggleFullscreen()
{ {
if(isFullscreen) // changing to windowed mode int width = theWidth * 2 * theWindowSize;
int height = theHeight * theWindowSize;
int sdlflags = SDL_HWSURFACE | SDL_HWPALETTE;
isFullscreen = !isFullscreen;
sdlflags |= isFullscreen ? SDL_FULLSCREEN : 0;
screen = SDL_SetVideoMode(width, height, 0, sdlflags);
if(screen == NULL)
{ {
if(SDL_WM_ToggleFullScreen(screen) == 0) cerr << "Unable to switch screenmode: " << SDL_GetError() << endl;
{
cerr << "Couldn't switch to windowed mode.\n";
return; return;
} }
bpp = screen->format->BitsPerPixel;
if(isFullscreen) // now in fullscreen mode
{
grabMouse(true);
showCursor(false);
}
else // now in windowed mode
{
grabMouse(theGrabMouseFlag); grabMouse(theGrabMouseFlag);
showCursor(!theHideCursorFlag); showCursor(!theHideCursorFlag);
isFullscreen = false;
if(theCenterWindowFlag) if(theCenterWindowFlag)
centerWindow(); centerWindow();
} }
else // changing to fullscreen mode
{
if(SDL_WM_ToggleFullScreen(screen) == 0)
{
cerr << "Couldn't switch to fullscreen mode.\n";
return;
}
grabMouse(true); theRedrawEntireFrameFlag = true;
showCursor(false);
isFullscreen = true;
}
} }
@ -735,6 +736,7 @@ void handleEvents()
Uint8 type; Uint8 type;
Uint8 state; Uint8 state;
SDLKey key; SDLKey key;
SDLMod mod;
// Check for an event // Check for an event
while(SDL_PollEvent(&event)) while(SDL_PollEvent(&event))
@ -743,6 +745,7 @@ void handleEvents()
if(event.type == SDL_KEYDOWN) if(event.type == SDL_KEYDOWN)
{ {
key = event.key.keysym.sym; key = event.key.keysym.sym;
mod = event.key.keysym.mod;
type = event.type; type = event.type;
if(key == SDLK_ESCAPE) if(key == SDLK_ESCAPE)
@ -757,7 +760,7 @@ void handleEvents()
{ {
resizeWindow(0); resizeWindow(0);
} }
else if(key == SDLK_F11) else if(key == SDLK_RETURN && mod & KMOD_ALT)
{ {
toggleFullscreen(); toggleFullscreen();
} }
@ -1031,13 +1034,23 @@ void handleEvents()
*/ */
void takeSnapshot() void takeSnapshot()
{ {
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
// Figure out the actual size of the window if(!x11Available)
int width = theWidth * 2 * theWindowSize; {
int height = theHeight * theWindowSize; cerr << "Snapshot support only available under X11.\n";
return;
}
else if(isFullscreen)
{
cerr << "Snapshot support unavailable in fullscreen (for now).\n";
return;
}
Imlib_Image image = imlib_create_image_from_drawable(0, 0, 0, width, height, 1); int width = screen->w;
int height = screen->h;
ImlibImage* image = Imlib_create_image_from_drawable(imlibData, theX11Window,
0, 0, 0, width, height);
if(image == NULL) if(image == NULL)
{ {
cerr << "Could not create snapshot!!\n"; cerr << "Could not create snapshot!!\n";
@ -1079,11 +1092,9 @@ void takeSnapshot()
else else
filename = extFilename; filename = extFilename;
// Now save the png snapshot file // Now save the snapshot file
imlib_context_set_image(image); Imlib_save_image(imlibData, image, (char*)filename.c_str(), NULL);
imlib_image_set_format("png"); Imlib_kill_image(imlibData, image);
imlib_save_image(filename.c_str());
imlib_free_image();
if(access(filename.c_str(), F_OK) == 0) if(access(filename.c_str(), F_OK) == 0)
cerr << "Snapshot saved as " << filename << endl; cerr << "Snapshot saved as " << filename << endl;
@ -1097,16 +1108,12 @@ void takeSnapshot()
/** /**
Calculate the maximum window size that the current screen can hold. Calculate the maximum window size that the current screen can hold.
Only works in X11 for now. If not running under X11, always return 5. Only works in X11 for now. If not running under X11, always return 3.
*/ */
uInt32 maxWindowSizeForScreen() uInt32 maxWindowSizeForScreen()
{ {
SDL_SysWMinfo info; if(!x11Available)
SDL_VERSION(&info.version); return 3;
if(SDL_GetWMInfo(&info) > 0)
if(info.subsystem != SDL_SYSWM_X11)
return 5;
// Otherwise, lock the screen and get the width and height // Otherwise, lock the screen and get the width and height
info.info.x11.lock_func(); info.info.x11.lock_func();
@ -1164,8 +1171,8 @@ void usage()
" -volume <number> Set the volume from 0 to 100", " -volume <number> Set the volume from 0 to 100",
" -paddle <0|1|2|3|real> Indicates which paddle the mouse should emulate", " -paddle <0|1|2|3|real> Indicates which paddle the mouse should emulate",
" or that real Atari 2600 paddles are being used", " or that real Atari 2600 paddles are being used",
" -showfps Shows some game info on exit", " -showinfo Shows some game info on exit",
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
" -ssdir <path> The directory to save snapshot files to", " -ssdir <path> The directory to save snapshot files to",
" -ssname <name> How to name the snapshot (romname or md5sum)", " -ssname <name> How to name the snapshot (romname or md5sum)",
#endif #endif
@ -1271,9 +1278,9 @@ void handleCommandLineArguments(int argc, char* argv[])
{ {
theCenterWindowFlag = true; theCenterWindowFlag = true;
} }
else if(string(argv[i]) == "-showfps") else if(string(argv[i]) == "-showinfo")
{ {
theShowFpsFlag = true; theShowInfoFlag = true;
} }
else if(string(argv[i]) == "-winsize") else if(string(argv[i]) == "-winsize")
{ {
@ -1291,7 +1298,7 @@ void handleCommandLineArguments(int argc, char* argv[])
theDesiredVolume = volume; theDesiredVolume = volume;
} }
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
else if(string(argv[i]) == "-ssdir") else if(string(argv[i]) == "-ssdir")
{ {
theSnapShotDir = argv[++i]; theSnapShotDir = argv[++i];
@ -1425,13 +1432,13 @@ void parseRCOptions(istream& in)
else if(option == 0) else if(option == 0)
theCenterWindowFlag = false; theCenterWindowFlag = false;
} }
else if(key == "showfps") else if(key == "showinfo")
{ {
uInt32 option = atoi(value.c_str()); uInt32 option = atoi(value.c_str());
if(option == 1) if(option == 1)
theShowFpsFlag = true; theShowInfoFlag = true;
else if(option == 0) else if(option == 0)
theShowFpsFlag = false; theShowInfoFlag = false;
} }
else if(key == "winsize") else if(key == "winsize")
{ {
@ -1451,7 +1458,7 @@ void parseRCOptions(istream& in)
theDesiredVolume = volume; theDesiredVolume = volume;
} }
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
else if(key == "ssdir") else if(key == "ssdir")
{ {
theSnapShotDir = value; theSnapShotDir = value;
@ -1577,7 +1584,7 @@ int main(int argc, char* argv[])
} }
} }
if(theShowFpsFlag) if(theShowInfoFlag)
{ {
timeval endingTime; timeval endingTime;
gettimeofday(&endingTime, 0); gettimeofday(&endingTime, 0);
@ -1590,6 +1597,10 @@ int main(int argc, char* argv[])
cout << framesPerSecond << " frames/second\n"; cout << framesPerSecond << " frames/second\n";
cout << theConsole->mediaSource().scanlines() << " scanlines in last frame\n"; cout << theConsole->mediaSource().scanlines() << " scanlines in last frame\n";
cout << endl; cout << endl;
cout << "Cartridge Name: " << theConsole->properties().get("Cartridge.Name");
cout << endl;
cout << "Cartridge MD5: " << theConsole->properties().get("Cartridge.MD5");
cout << endl << endl;
} }
// Cleanup time ... // Cleanup time ...

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: mainX11.cxx,v 1.6 2002-02-01 02:13:08 stephena Exp $ // $Id: mainX11.cxx,v 1.7 2002-02-03 16:51:22 stephena Exp $
//============================================================================ //============================================================================
#include <assert.h> #include <assert.h>
@ -43,8 +43,10 @@
#include "SndUnix.hxx" #include "SndUnix.hxx"
#include "System.hxx" #include "System.hxx"
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
#include <Imlib2.h> #include <Imlib.h>
ImlibData* imlibData;
// The path to save snapshot files // The path to save snapshot files
string theSnapShotDir = ""; string theSnapShotDir = "";
@ -143,6 +145,7 @@ static Switches list[] = {
{ XK_Right, Event::JoystickZeroRight }, { XK_Right, Event::JoystickZeroRight },
{ XK_space, Event::JoystickZeroFire }, { XK_space, Event::JoystickZeroFire },
{ XK_Return, Event::JoystickZeroFire }, { XK_Return, Event::JoystickZeroFire },
{ XK_Control_L, Event::JoystickZeroFire },
{ XK_z, Event::BoosterGripZeroTrigger }, { XK_z, Event::BoosterGripZeroTrigger },
{ XK_x, Event::BoosterGripZeroBooster }, { XK_x, Event::BoosterGripZeroBooster },
@ -209,7 +212,7 @@ bool theGrabMouseFlag = false;
bool theCenterWindowFlag = false; bool theCenterWindowFlag = false;
// Indicates whether to show some game info on program exit // Indicates whether to show some game info on program exit
bool theShowFpsFlag = false; bool theShowInfoFlag = false;
// Indicates whether to show cursor in the game window // Indicates whether to show cursor in the game window
bool theHideCursorFlag = false; bool theHideCursorFlag = false;
@ -355,7 +358,7 @@ bool setupDisplay()
XMapWindow(theDisplay, theWindow); XMapWindow(theDisplay, theWindow);
// Center the window if centering is selected and not fullscreen // Center the window if centering is selected and not fullscreen
if(theCenterWindowFlag && !theUseFullScreenFlag) if(theCenterWindowFlag)// && !theUseFullScreenFlag)
centerWindow(); centerWindow();
XEvent event; XEvent event;
@ -384,15 +387,8 @@ bool setupDisplay()
XSelectInput(theDisplay, theWindow, eventMask); XSelectInput(theDisplay, theWindow, eventMask);
// If imlib snapshots are enabled, set up some imlib stuff // If imlib snapshots are enabled, set up some imlib stuff
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
imlib_context_set_display(theDisplay); imlibData = Imlib_init(theDisplay);
imlib_context_set_drawable(theWindow);
imlib_context_set_visual(DefaultVisual(theDisplay, theScreen));
if(theUsePrivateColormapFlag)
imlib_context_set_colormap(thePrivateColormap);
else
imlib_context_set_colormap(DefaultColormap(theDisplay, theScreen));
// By default, snapshot dir is HOME and name is ROMNAME, assuming that // By default, snapshot dir is HOME and name is ROMNAME, assuming that
// they haven't been specified on the commandline // they haven't been specified on the commandline
@ -1009,13 +1005,13 @@ bool createCursors()
*/ */
void takeSnapshot() void takeSnapshot()
{ {
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
// Figure out the actual size of the window // Figure out the actual size of the window
int width = theWidth * 2 * theWindowSize; int width = theWidth * 2 * theWindowSize;
int height = theHeight * theWindowSize; int height = theHeight * theWindowSize;
Imlib_Image image = imlib_create_image_from_drawable(0, 0, 0, width, height, 1); ImlibImage* image = Imlib_create_image_from_drawable(imlibData, theWindow,
0, 0, 0, width, height);
if(image == NULL) if(image == NULL)
{ {
cerr << "Could not create snapshot!!\n"; cerr << "Could not create snapshot!!\n";
@ -1057,11 +1053,9 @@ void takeSnapshot()
else else
filename = extFilename; filename = extFilename;
// Now save the png snapshot file // Now save the snapshot file
imlib_context_set_image(image); Imlib_save_image(imlibData, image, (char*)filename.c_str(), NULL);
imlib_image_set_format("png"); Imlib_kill_image(imlibData, image);
imlib_save_image(filename.c_str());
imlib_free_image();
if(access(filename.c_str(), F_OK) == 0) if(access(filename.c_str(), F_OK) == 0)
cerr << "Snapshot saved as " << filename << endl; cerr << "Snapshot saved as " << filename << endl;
@ -1129,8 +1123,8 @@ void usage()
#else #else
" -paddle <0|1|2|3> Indicates which paddle the mouse should emulate", " -paddle <0|1|2|3> Indicates which paddle the mouse should emulate",
#endif #endif
" -showfps Shows some game info on exit", " -showinfo Shows some game info on exit",
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
" -ssdir <path> The directory to save snapshot files to", " -ssdir <path> The directory to save snapshot files to",
" -ssname <name> How to name the snapshot (romname or md5sum)", " -ssname <name> How to name the snapshot (romname or md5sum)",
#endif #endif
@ -1242,9 +1236,9 @@ void handleCommandLineArguments(int argc, char* argv[])
{ {
theCenterWindowFlag = true; theCenterWindowFlag = true;
} }
else if(string(argv[i]) == "-showfps") else if(string(argv[i]) == "-showinfo")
{ {
theShowFpsFlag = true; theShowInfoFlag = true;
} }
else if(string(argv[i]) == "-winsize") else if(string(argv[i]) == "-winsize")
{ {
@ -1262,7 +1256,7 @@ void handleCommandLineArguments(int argc, char* argv[])
theDesiredVolume = volume; theDesiredVolume = volume;
} }
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
else if(string(argv[i]) == "-ssdir") else if(string(argv[i]) == "-ssdir")
{ {
theSnapShotDir = argv[++i]; theSnapShotDir = argv[++i];
@ -1406,13 +1400,13 @@ void parseRCOptions(istream& in)
else if(option == 0) else if(option == 0)
theCenterWindowFlag = false; theCenterWindowFlag = false;
} }
else if(key == "showfps") else if(key == "showinfo")
{ {
uInt32 option = atoi(value.c_str()); uInt32 option = atoi(value.c_str());
if(option == 1) if(option == 1)
theShowFpsFlag = true; theShowInfoFlag = true;
else if(option == 0) else if(option == 0)
theShowFpsFlag = false; theShowInfoFlag = false;
} }
else if(key == "winsize") else if(key == "winsize")
{ {
@ -1432,7 +1426,7 @@ void parseRCOptions(istream& in)
theDesiredVolume = volume; theDesiredVolume = volume;
} }
#ifdef IMLIB2_SNAPSHOT #ifdef IMLIB_SNAPSHOT
else if(key == "ssdir") else if(key == "ssdir")
{ {
theSnapShotDir = value; theSnapShotDir = value;
@ -1576,7 +1570,7 @@ int main(int argc, char* argv[])
} }
} }
if(theShowFpsFlag) if(theShowInfoFlag)
{ {
timeval endingTime; timeval endingTime;
gettimeofday(&endingTime, 0); gettimeofday(&endingTime, 0);
@ -1589,6 +1583,10 @@ int main(int argc, char* argv[])
cout << framesPerSecond << " frames/second\n"; cout << framesPerSecond << " frames/second\n";
cout << theConsole->mediaSource().scanlines() << " scanlines in last frame\n"; cout << theConsole->mediaSource().scanlines() << " scanlines in last frame\n";
cout << endl; cout << endl;
cout << "Cartridge Name: " << theConsole->properties().get("Cartridge.Name");
cout << endl;
cout << "Cartridge MD5: " << theConsole->properties().get("Cartridge.MD5");
cout << endl << endl;
} }
// Cleanup time ... // Cleanup time ...