mirror of https://github.com/stella-emu/stella.git
Fixed segfault when using '-type' and the type wasn't supported by
Stella. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1233 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
a87433d557
commit
0f8c5a5046
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBufferGL.cxx,v 1.78 2006-12-19 12:40:29 stephena Exp $
|
||||
// $Id: FrameBufferGL.cxx,v 1.79 2006-12-22 23:14:39 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef DISPLAY_OPENGL
|
||||
|
@ -599,8 +599,8 @@ bool FrameBufferGL::createTextures()
|
|||
myBuffer.texture_width = power_of_two(myBuffer.width);
|
||||
myBuffer.texture_height = power_of_two(myBuffer.height);
|
||||
myBuffer.target = GL_TEXTURE_2D;
|
||||
myBuffer.tex_coord[2] = (GLfloat) myBuffer.width / myBuffer.texture_width;
|
||||
myBuffer.tex_coord[3] = (GLfloat) myBuffer.height / myBuffer.texture_height;
|
||||
myBuffer.tex_coord[2] = (GLfloat) myBuffer.width / myBuffer.texture_width;
|
||||
myBuffer.tex_coord[3] = (GLfloat) myBuffer.height / myBuffer.texture_height;
|
||||
}
|
||||
|
||||
// Create a texture that best suits the current display depth and system
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Console.cxx,v 1.109 2006-12-18 16:44:39 stephena Exp $
|
||||
// $Id: Console.cxx,v 1.110 2006-12-22 23:14:39 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -61,7 +61,7 @@
|
|||
Console::Console(const uInt8* image, uInt32 size, const string& md5,
|
||||
OSystem* osystem)
|
||||
: myOSystem(osystem),
|
||||
myIsInitializedFlag(false),
|
||||
myIsValidFlag(false),
|
||||
myUserPaletteDefined(false),
|
||||
ourUserNTSCPalette(NULL),
|
||||
ourUserPALPalette(NULL)
|
||||
|
@ -216,6 +216,8 @@ Console::Console(const uInt8* image, uInt32 size, const string& md5,
|
|||
|
||||
// Reset, the system to its power-on state
|
||||
mySystem->reset();
|
||||
|
||||
myIsValidFlag = true;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -420,8 +422,6 @@ void Console::initialize()
|
|||
myOSystem->debugger().setConsole(this);
|
||||
myOSystem->debugger().initialize();
|
||||
#endif
|
||||
|
||||
myIsInitializedFlag = true;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Console.hxx,v 1.51 2006-12-18 16:44:39 stephena Exp $
|
||||
// $Id: Console.hxx,v 1.52 2006-12-22 23:14:39 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef CONSOLE_HXX
|
||||
|
@ -38,7 +38,7 @@ class System;
|
|||
This class represents the entire game console.
|
||||
|
||||
@author Bradford W. Mott
|
||||
@version $Id: Console.hxx,v 1.51 2006-12-18 16:44:39 stephena Exp $
|
||||
@version $Id: Console.hxx,v 1.52 2006-12-22 23:14:39 stephena Exp $
|
||||
*/
|
||||
class Console
|
||||
{
|
||||
|
@ -168,9 +168,10 @@ class Console
|
|||
void initialize();
|
||||
|
||||
/**
|
||||
Determine whether the console was successfully initialized
|
||||
Determine whether the console object is valid (no errors occurred
|
||||
when it was created)
|
||||
*/
|
||||
bool isInitialized() { return myIsInitializedFlag; }
|
||||
bool isValid() { return myIsValidFlag; }
|
||||
|
||||
/**
|
||||
Initialize the video subsystem wrt this class.
|
||||
|
@ -274,9 +275,8 @@ class Console
|
|||
AtariVox *vox;
|
||||
#endif
|
||||
|
||||
// Indicates whether the console was correctly initialized
|
||||
// We don't really care why it wasn't initialized ...
|
||||
bool myIsInitializedFlag;
|
||||
// Indicates whether the console was successfully created
|
||||
bool myIsValidFlag;
|
||||
|
||||
// Indicates whether an external palette was found and
|
||||
// successfully loaded
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: OSystem.cxx,v 1.82 2006-12-18 16:44:39 stephena Exp $
|
||||
// $Id: OSystem.cxx,v 1.83 2006-12-22 23:14:39 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -371,7 +371,7 @@ bool OSystem::createConsole(const string& romfile)
|
|||
// Create an instance of the 2600 game console
|
||||
// The Console c'tor takes care of updating the eventhandler state
|
||||
myConsole = new Console(image, size, md5, this);
|
||||
if(myConsole)
|
||||
if(myConsole && myConsole->isValid())
|
||||
{
|
||||
#ifdef CHEATCODE_SUPPORT
|
||||
myCheatManager->loadCheats(md5);
|
||||
|
|
|
@ -10,9 +10,9 @@ The project expects a copy of the SDL.Framework to be present in the macosx
|
|||
directory. It will then link against this framework, and place a copy of the
|
||||
framework in the Application bundle. The current version of the SDL framework
|
||||
may be downloaded from www.libsdl.org. The current release is linked against
|
||||
version 1.2.8 for MacOSX. The SDL framework may be located else where, but
|
||||
version 1.2.11 for MacOSX. The SDL framework may be located else where, but
|
||||
the project include and copy framework settings would need to be changed.
|
||||
|
||||
|
||||
Mark Grebe
|
||||
|
||||
$Id: READMEbuild.txt,v 1.3 2006-11-18 13:34:26 stephena Exp $
|
||||
$Id: READMEbuild.txt,v 1.4 2006-12-22 23:14:39 stephena Exp $
|
||||
|
|
Loading…
Reference in New Issue