Show error message when a dialog box can't be opened.

Rework defaults for ROM launcher and TIA zoom level.

Both of these are basically defined around having only a 640x480
screen, which hasn't been the case on hardware (even phones) for
about 10 years.
This commit is contained in:
Stephen Anthony 2017-05-05 16:50:02 -02:30
parent 847e910d26
commit 6ba627e059
3 changed files with 10 additions and 6 deletions

View File

@ -46,7 +46,7 @@ Settings::Settings(OSystem& osystem)
setInternal("uimessages", "true");
// TIA specific options
setInternal("tia.zoom", "2");
setInternal("tia.zoom", "3");
setInternal("tia.inter", "false");
setInternal("tia.aspectn", "90");
setInternal("tia.aspectp", "100");
@ -109,10 +109,10 @@ Settings::Settings(OSystem& osystem)
// ROM browser options
setInternal("exitlauncher", "false");
setInternal("launcherres", GUI::Size(640, 480));
setInternal("launcherres", GUI::Size(900, 600));
setInternal("launcherfont", "medium");
setInternal("launcherexts", "allroms");
setInternal("romviewer", "0");
setInternal("romviewer", "1");
setInternal("lastrom", "");
// UI-related options

View File

@ -19,6 +19,7 @@
#include "Dialog.hxx"
#include "Stack.hxx"
#include "EventHandler.hxx"
#include "FrameBuffer.hxx"
#include "Joystick.hxx"
#include "bspf.hxx"
#include "DialogContainer.hxx"
@ -114,6 +115,11 @@ void DialogContainer::draw(bool full)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DialogContainer::addDialog(Dialog* d)
{
GUI::Rect r = myOSystem.frameBuffer().imageRect();
if(uInt32(d->getWidth()) > r.width() || uInt32(d->getHeight()) > r.height())
myOSystem.frameBuffer().showMessage(
"Unable to show dialog box; resize current window");
else
myDialogStack.push(d);
}

View File

@ -21,8 +21,6 @@
#include "bspf.hxx"
#include "Menu.hxx"
class Properties;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Menu::Menu(OSystem& osystem)
: DialogContainer(osystem)