Several fixes across the board for better functionality in 'small'

window mode.  Using modes smaller that 640x480 should now work in
all cases when using the 'maxres' commandline argument.  Also, the
lower limit of 320x240 is now strictly enforced in all cases.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2075 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-07-22 15:41:46 +00:00
parent 2977801ffa
commit 6faa9b4b69
15 changed files with 108 additions and 81 deletions

View File

@ -437,18 +437,13 @@ cerr << "dimensions: " << (fullScreen() ? "(full)" : "") << endl
myTiaSurface->setFilter(myOSystem->settings().getString("gl_filter")); myTiaSurface->setFilter(myOSystem->settings().getString("gl_filter"));
} }
// Make sure any old parts of the screen are erased
p_glClear(GL_COLOR_BUFFER_BIT);
SDL_GL_SwapBuffers();
p_glClear(GL_COLOR_BUFFER_BIT);
return true; return true;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferGL::invalidate() void FrameBufferGL::invalidate()
{ {
// TODO - add code for this p_glClear(GL_COLOR_BUFFER_BIT);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -187,7 +187,7 @@ void Debugger::initialize()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Debugger::initializeVideo() FBInitStatus Debugger::initializeVideo()
{ {
const GUI::Rect& r = getDialogBounds(); const GUI::Rect& r = getDialogBounds();

View File

@ -99,7 +99,7 @@ class Debugger : public DialogContainer
/** /**
Initialize the video subsystem wrt this class. Initialize the video subsystem wrt this class.
*/ */
bool initializeVideo(); FBInitStatus initializeVideo();
/** /**
Inform this object of a console change. Inform this object of a console change.

View File

@ -415,19 +415,20 @@ void Console::setProperties(const Properties& props)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Console::initializeVideo(bool full) FBInitStatus Console::initializeVideo(bool full)
{ {
FBInitStatus fbstatus = kSuccess;
if(full) if(full)
{ {
string title = string("Stella ") + STELLA_VERSION + string title = string("Stella ") + STELLA_VERSION +
": \"" + myProperties.get(Cartridge_Name) + "\""; ": \"" + myProperties.get(Cartridge_Name) + "\"";
if(!myOSystem->frameBuffer().initialize(title, fbstatus = myOSystem->frameBuffer().initialize(title,
myTIA->width() << 1, myTIA->height())) myTIA->width() << 1, myTIA->height());
return false; if(fbstatus != kSuccess)
return fbstatus;
myOSystem->frameBuffer().showFrameStats(
myOSystem->settings().getBool("stats"));
myOSystem->frameBuffer().showFrameStats(myOSystem->settings().getBool("stats"));
setColorLossPalette(); setColorLossPalette();
} }
@ -447,7 +448,7 @@ bool Console::initializeVideo(bool full)
// Make sure auto-frame calculation is only enabled when necessary // Make sure auto-frame calculation is only enabled when necessary
myTIA->enableAutoFrame(framerate <= 0); myTIA->enableAutoFrame(framerate <= 0);
return true; return fbstatus;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -31,6 +31,7 @@ class TIA;
#include "Props.hxx" #include "Props.hxx"
#include "TIA.hxx" #include "TIA.hxx"
#include "Cart.hxx" #include "Cart.hxx"
#include "FrameBuffer.hxx"
#include "M6532.hxx" #include "M6532.hxx"
#include "AtariVox.hxx" #include "AtariVox.hxx"
#include "Serializable.hxx" #include "Serializable.hxx"
@ -212,9 +213,9 @@ class Console : public Serializable
@param full Whether we want a full initialization, @param full Whether we want a full initialization,
or only reset certain attributes. or only reset certain attributes.
@return False on any errors, else true @return The results from FrameBuffer::initialize()
*/ */
bool initializeVideo(bool full = true); FBInitStatus initializeVideo(bool full = true);
/** /**
Initialize the audio subsystem wrt this class. Initialize the audio subsystem wrt this class.

View File

@ -2024,19 +2024,22 @@ bool EventHandler::enterDebugMode()
// probably be modified below // probably be modified below
myOSystem->debugger().setStartState(); myOSystem->debugger().setStartState();
setEventState(S_DEBUGGER); setEventState(S_DEBUGGER);
if(!myOSystem->createFrameBuffer())
FBInitStatus fbstatus = myOSystem->createFrameBuffer();
if(fbstatus != kSuccess)
{ {
myOSystem->debugger().setQuitState(); myOSystem->debugger().setQuitState();
setEventState(S_EMULATE); setEventState(S_EMULATE);
myOSystem->frameBuffer().showMessage("Debugger window too large", if(fbstatus == kFailTooLarge)
kBottomCenter, true); myOSystem->frameBuffer().showMessage("Debugger window too large for screen",
kBottomCenter, true);
return false; return false;
} }
myOverlay->reStack(); myOverlay->reStack();
myOSystem->frameBuffer().setCursorState(); myOSystem->frameBuffer().setCursorState();
myOSystem->sound().mute(true); myOSystem->sound().mute(true);
#else #else
myOSystem->frameBuffer().showMessage("Debugger unsupported", myOSystem->frameBuffer().showMessage("Debugger support not included",
kBottomCenter, true); kBottomCenter, true);
#endif #endif

View File

@ -66,7 +66,7 @@ FrameBuffer::~FrameBuffer(void)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height) FBInitStatus FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height)
{ {
ostringstream buf; ostringstream buf;
@ -78,24 +78,42 @@ bool FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height)
{ {
buf << "ERROR: Couldn't initialize SDL: " << SDL_GetError() << endl; buf << "ERROR: Couldn't initialize SDL: " << SDL_GetError() << endl;
myOSystem->logMessage(buf.str(), 0); myOSystem->logMessage(buf.str(), 0);
return false; return kFailComplete;
} }
} }
myInitializedCount++; myInitializedCount++;
// Make sure this mode is even possible // A 'windowed' system is defined as one where the window size can be
// We only really need to worry about it in non-windowed environments, // larger than the screen size, as there's some sort of window manager
// where requesting a window that's too large will probably cause a crash // that takes care of it (all current desktop systems fall in this category)
#ifndef WINDOWED_SUPPORT // However, some systems have no concept of windowing, and have hard limits
if(myOSystem->desktopWidth() < width || myOSystem->desktopHeight() < height) // on how large a window can be (ie, the size of the 'desktop' is the
return false; // absolute upper limit on window size)
#endif //
// If the WINDOWED_SUPPORT macro is defined, we treat the system as the
// former type; if not, as the latter type
// Initialize SDL flags and set fullscreen flag // Initialize SDL flags and set fullscreen flag
// This must be done before any modes are initialized // This must be done before any modes are initialized
mySDLFlags = 0; mySDLFlags = 0;
#ifdef WINDOWED_SUPPORT #ifdef WINDOWED_SUPPORT
if(myOSystem->settings().getString("fullscreen") == "1") mySDLFlags = SDL_FULLSCREEN; if(myOSystem->settings().getString("fullscreen") == "1")
mySDLFlags = SDL_FULLSCREEN;
// We assume that a desktop size of at least 640x480 means that we're
// running on a 'large' system, and the window size requirements can
// be relaxed
// Otherwise, we treat the system as if WINDOWED_SUPPORT is not defined
if(myOSystem->desktopWidth() < 640 && myOSystem->desktopHeight() < 480 &&
(myOSystem->desktopWidth() < width || myOSystem->desktopHeight() < height))
return kFailTooLarge;
#else
// Make sure this mode is even possible
// We only really need to worry about it in non-windowed environments,
// where requesting a window that's too large will probably cause a crash
if(myOSystem->desktopWidth() < width || myOSystem->desktopHeight() < height)
return kFailTooLarge;
#endif #endif
// Set the available video modes for this framebuffer // Set the available video modes for this framebuffer
@ -112,7 +130,7 @@ bool FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height)
if(!initSubsystem(mode)) if(!initSubsystem(mode))
{ {
myOSystem->logMessage("ERROR: Couldn't initialize video subsystem\n", 0); myOSystem->logMessage("ERROR: Couldn't initialize video subsystem\n", 0);
return false; return kFailNotSupported;
} }
else else
{ {
@ -131,7 +149,7 @@ bool FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height)
} }
} }
else else
return false; return kFailTooLarge;
// Enable unicode so we can see translated key events // Enable unicode so we can see translated key events
// (lowercase vs. uppercase characters) // (lowercase vs. uppercase characters)
@ -161,7 +179,7 @@ bool FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height)
if(myInitializedCount == 1) if(myInitializedCount == 1)
myOSystem->logMessage(about() + "\n", 1); myOSystem->logMessage(about() + "\n", 1);
return true; return kSuccess;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -420,54 +438,65 @@ void FrameBuffer::refresh()
// This method is in essence a FULL refresh, putting all rendering // This method is in essence a FULL refresh, putting all rendering
// buffers in a known, fully redrawn state // buffers in a known, fully redrawn state
invalidate();
bool doubleBuffered = (type() == kGLBuffer); bool doubleBuffered = (type() == kGLBuffer);
switch(myOSystem->eventHandler().state()) switch(myOSystem->eventHandler().state())
{ {
case EventHandler::S_EMULATE: case EventHandler::S_EMULATE:
case EventHandler::S_PAUSE: case EventHandler::S_PAUSE:
invalidate();
drawTIA(true); drawTIA(true);
if(doubleBuffered) if(doubleBuffered)
{
invalidate();
drawTIA(true); drawTIA(true);
}
break; break;
case EventHandler::S_MENU: case EventHandler::S_MENU:
invalidate();
drawTIA(true); drawTIA(true);
myOSystem->menu().draw(true); myOSystem->menu().draw(true);
if(doubleBuffered) if(doubleBuffered)
{ {
postFrameUpdate(); postFrameUpdate();
invalidate();
drawTIA(true); drawTIA(true);
myOSystem->menu().draw(true); myOSystem->menu().draw(true);
} }
break; break;
case EventHandler::S_CMDMENU: case EventHandler::S_CMDMENU:
invalidate();
drawTIA(true); drawTIA(true);
myOSystem->commandMenu().draw(true); myOSystem->commandMenu().draw(true);
if(doubleBuffered) if(doubleBuffered)
{ {
postFrameUpdate(); postFrameUpdate();
invalidate();
drawTIA(true); drawTIA(true);
myOSystem->commandMenu().draw(true); myOSystem->commandMenu().draw(true);
} }
break; break;
case EventHandler::S_LAUNCHER: case EventHandler::S_LAUNCHER:
invalidate();
myOSystem->launcher().draw(true); myOSystem->launcher().draw(true);
if(doubleBuffered) if(doubleBuffered)
{ {
postFrameUpdate(); postFrameUpdate();
invalidate();
myOSystem->launcher().draw(true); myOSystem->launcher().draw(true);
} }
break; break;
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
case EventHandler::S_DEBUGGER: case EventHandler::S_DEBUGGER:
invalidate();
myOSystem->debugger().draw(true); myOSystem->debugger().draw(true);
if(doubleBuffered) if(doubleBuffered)
{ {
postFrameUpdate(); postFrameUpdate();
invalidate();
myOSystem->debugger().draw(true); myOSystem->debugger().draw(true);
} }
break; break;

View File

@ -43,6 +43,14 @@ enum BufferType {
kGLBuffer kGLBuffer
}; };
// Return values for initialization of framebuffer window
enum FBInitStatus {
kSuccess,
kFailComplete,
kFailTooLarge,
kFailNotSupported,
};
// Positions for onscreen/overlaid messages // Positions for onscreen/overlaid messages
enum MessagePosition { enum MessagePosition {
kTopLeft, kTopLeft,
@ -114,8 +122,10 @@ class FrameBuffer
@param title The title of the window @param title The title of the window
@param width The width of the framebuffer @param width The width of the framebuffer
@param height The height of the framebuffer @param height The height of the framebuffer
@return Status of initialization (see FBInitStatus 'enum')
*/ */
bool initialize(const string& title, uInt32 width, uInt32 height); FBInitStatus initialize(const string& title, uInt32 width, uInt32 height);
/** /**
Updates the display, which depending on the current mode could mean Updates the display, which depending on the current mode could mean

View File

@ -385,7 +385,7 @@ void OSystem::setFramerate(float framerate)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool OSystem::createFrameBuffer() FBInitStatus OSystem::createFrameBuffer()
{ {
// There is only ever one FrameBuffer created per run of Stella // There is only ever one FrameBuffer created per run of Stella
// Due to the multi-surface nature of the FrameBuffer, repeatedly // Due to the multi-surface nature of the FrameBuffer, repeatedly
@ -400,24 +400,28 @@ bool OSystem::createFrameBuffer()
myFrameBuffer = MediaFactory::createVideo(this); myFrameBuffer = MediaFactory::createVideo(this);
// Re-initialize the framebuffer to current settings // Re-initialize the framebuffer to current settings
FBInitStatus fbstatus = kFailComplete;
switch(myEventHandler->state()) switch(myEventHandler->state())
{ {
case EventHandler::S_EMULATE: case EventHandler::S_EMULATE:
case EventHandler::S_PAUSE: case EventHandler::S_PAUSE:
case EventHandler::S_MENU: case EventHandler::S_MENU:
case EventHandler::S_CMDMENU: case EventHandler::S_CMDMENU:
if(!myConsole->initializeVideo()) fbstatus = myConsole->initializeVideo();
if(fbstatus != kSuccess)
goto fallback; goto fallback;
break; // S_EMULATE, S_PAUSE, S_MENU, S_CMDMENU break; // S_EMULATE, S_PAUSE, S_MENU, S_CMDMENU
case EventHandler::S_LAUNCHER: case EventHandler::S_LAUNCHER:
if(!myLauncher->initializeVideo()) fbstatus = myLauncher->initializeVideo();
if(fbstatus != kSuccess)
goto fallback; goto fallback;
break; // S_LAUNCHER break; // S_LAUNCHER
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
case EventHandler::S_DEBUGGER: case EventHandler::S_DEBUGGER:
if(!myDebugger->initializeVideo()) fbstatus = myDebugger->initializeVideo();
if(fbstatus != kSuccess)
goto fallback; goto fallback;
break; // S_DEBUGGER break; // S_DEBUGGER
#endif #endif
@ -437,28 +441,30 @@ bool OSystem::createFrameBuffer()
setUIPalette(); setUIPalette();
} }
return true; return fbstatus;
// GOTO are normally considered evil, unless well documented :) // GOTO are normally considered evil, unless well documented :)
// If initialization of video system fails while in OpenGL mode, // If initialization of video system fails while in OpenGL mode
// attempt to fallback to software mode // because OpenGL is unavailable, attempt to fallback to software mode
// Otherwise, pass the error to the parent
fallback: fallback:
if(myFrameBuffer && myFrameBuffer->type() == kGLBuffer) if(fbstatus == kFailNotSupported && myFrameBuffer &&
myFrameBuffer->type() == kGLBuffer)
{ {
logMessage("ERROR: OpenGL mode failed, fallback to software\n", 0); logMessage("ERROR: OpenGL mode failed, fallback to software\n", 0);
delete myFrameBuffer; myFrameBuffer = NULL; delete myFrameBuffer; myFrameBuffer = NULL;
mySettings->setString("video", "soft"); mySettings->setString("video", "soft");
bool ret = createFrameBuffer(); FBInitStatus newstatus = createFrameBuffer();
if(ret) if(newstatus == kSuccess)
{ {
setFramerate(60); setFramerate(60);
myFrameBuffer->showMessage("OpenGL mode failed, fallback to software", myFrameBuffer->showMessage("OpenGL mode failed, fallback to software",
kMiddleCenter, true); kMiddleCenter, true);
} }
return ret; return newstatus;
} }
else else
return false; return fbstatus;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -522,7 +528,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
if(audiofirst) myConsole->initializeAudio(); if(audiofirst) myConsole->initializeAudio();
myEventHandler->reset(EventHandler::S_EMULATE); myEventHandler->reset(EventHandler::S_EMULATE);
if(!createFrameBuffer()) // Takes care of initializeVideo() if(createFrameBuffer() != kSuccess) // Takes care of initializeVideo()
{ {
logMessage("ERROR: Couldn't create framebuffer for console\n", 0); logMessage("ERROR: Couldn't create framebuffer for console\n", 0);
myEventHandler->reset(EventHandler::S_LAUNCHER); myEventHandler->reset(EventHandler::S_LAUNCHER);
@ -594,7 +600,7 @@ void OSystem::deleteConsole()
bool OSystem::createLauncher() bool OSystem::createLauncher()
{ {
myEventHandler->reset(EventHandler::S_LAUNCHER); myEventHandler->reset(EventHandler::S_LAUNCHER);
if(!createFrameBuffer()) if(createFrameBuffer() != kSuccess)
{ {
logMessage("ERROR: Couldn't create launcher\n", 0); logMessage("ERROR: Couldn't create launcher\n", 0);
return false; return false;
@ -1020,7 +1026,7 @@ bool OSystem::queryVideoHardware()
// Normally, this wouldn't be set, and we ask SDL directly // Normally, this wouldn't be set, and we ask SDL directly
int w, h; int w, h;
mySettings->getSize("maxres", w, h); mySettings->getSize("maxres", w, h);
if(w == 0 || h == 0) if(w <= 0 || h <= 0)
{ {
const SDL_VideoInfo* info = SDL_GetVideoInfo(); const SDL_VideoInfo* info = SDL_GetVideoInfo();
myDesktopWidth = info->current_w; myDesktopWidth = info->current_w;

View File

@ -559,9 +559,12 @@ class OSystem
(for now, that means either 'software' or 'opengl'). Note that (for now, that means either 'software' or 'opengl'). Note that
it will only create one type per run of Stella. it will only create one type per run of Stella.
@return Success or failure of the framebuffer creation @return Success or failure of the framebuffer creation
Note that if OpenGL mode fails because OpenGL is not
available, rendering will attempt to fall back to
software mode
*/ */
bool createFrameBuffer(); FBInitStatus createFrameBuffer();
/** /**
Creates the various sound devices available in this system Creates the various sound devices available in this system

View File

@ -126,7 +126,7 @@ Settings::Settings(OSystem* osystem)
setInternal("audiofirst", "true"); setInternal("audiofirst", "true");
setInternal("fastscbios", "false"); setInternal("fastscbios", "false");
setExternal("romloadcount", "0"); setExternal("romloadcount", "0");
setExternal("maxres", "0x0"); setExternal("maxres", "");
// Debugger options // Debugger options
setInternal("resolvedata", "auto"); setInternal("resolvedata", "auto");

View File

@ -116,8 +116,8 @@ void DialogContainer::draw(bool full)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DialogContainer::addDialog(Dialog* d) void DialogContainer::addDialog(Dialog* d)
{ {
const GUI::Rect& image = myOSystem->frameBuffer().imageRect(); const GUI::Rect& screen = myOSystem->frameBuffer().screenRect();
assert(d->getWidth() <= image.width() && d->getHeight() <= image.height()); assert(d->getWidth() <= screen.width() && d->getHeight() <= screen.height());
myDialogStack.push(d); myDialogStack.push(d);
d->open(); d->open();

View File

@ -50,7 +50,7 @@ Launcher::~Launcher()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Launcher::initializeVideo() FBInitStatus Launcher::initializeVideo()
{ {
string title = string("Stella ") + STELLA_VERSION; string title = string("Stella ") + STELLA_VERSION;
return myOSystem->frameBuffer().initialize(title, myWidth, myHeight); return myOSystem->frameBuffer().initialize(title, myWidth, myHeight);

View File

@ -24,6 +24,7 @@ class Properties;
class OSystem; class OSystem;
#include "DialogContainer.hxx" #include "DialogContainer.hxx"
#include "FrameBuffer.hxx"
/** /**
The base dialog for the ROM launcher in Stella. The base dialog for the ROM launcher in Stella.
@ -47,7 +48,7 @@ class Launcher : public DialogContainer
/** /**
Initialize the video subsystem wrt this class. Initialize the video subsystem wrt this class.
*/ */
bool initializeVideo(); FBInitStatus initializeVideo();
/** /**
Wrapper for LauncherDialog::selectedRomMD5() method. Wrapper for LauncherDialog::selectedRomMD5() method.

View File

@ -119,18 +119,6 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent,
// Now create all the dialogs attached to each menu button // Now create all the dialogs attached to each menu button
myVideoDialog = new VideoDialog(osystem, parent, font, max_w, max_h); myVideoDialog = new VideoDialog(osystem, parent, font, max_w, max_h);
myAudioDialog = new AudioDialog(osystem, parent, font); myAudioDialog = new AudioDialog(osystem, parent, font);
/* FIXME - may not be needed with small-font functionality
#ifdef _WIN32_WCE
// FIXME - adjust size for WINCE using a smaller font
// we scale the input dialog down a bit in low res devices.
// looks only a little ugly, but the functionality is very welcome
if(instance().desktopWidth() < 320) { w = 220; h = 176; }
else { w = 230; h = 185; }
#else
w = 380; h = 310;
#endif
*/
myInputDialog = new InputDialog(osystem, parent, font); myInputDialog = new InputDialog(osystem, parent, font);
myUIDialog = new UIDialog(osystem, parent, font); myUIDialog = new UIDialog(osystem, parent, font);
myFileSnapDialog = new FileSnapDialog(osystem, parent, font, boss, max_w, max_h); myFileSnapDialog = new FileSnapDialog(osystem, parent, font, boss, max_w, max_h);
@ -156,16 +144,6 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent,
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
myAudioSettingsButton->clearFlags(WIDGET_ENABLED); // not honored in wince port myAudioSettingsButton->clearFlags(WIDGET_ENABLED); // not honored in wince port
#endif #endif
//FIXME - this may no longer be true (with the new small font functionality)
if(instance().desktopWidth() < 320)
{
// These cannot be displayed in low res devices
myVideoSettingsButton->clearFlags(WIDGET_ENABLED);
myFileSnapButton->clearFlags(WIDGET_ENABLED);
myGameInfoButton->clearFlags(WIDGET_ENABLED);
myHelpButton->clearFlags(WIDGET_ENABLED);
myAboutButton->clearFlags(WIDGET_ENABLED);
}
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -