Previous 199869 Revisions Next

r29655 Tuesday 15th April, 2014 at 13:54:20 UTC by Miodrag Milanović
reverting r28187, if menus are unusable at that size user should make window bigger (nw)
[src/emu]emuopts.c emuopts.h render.c

trunk/src/emu/render.c
r29654r29655
12081208      for (layout_view::item *curitem = m_curview->first_item(layer); curitem != NULL; curitem = curitem->next())
12091209         if (curitem->screen() != NULL)
12101210         {
1211            // use a hard-coded default visible area for vector screens
12111212            screen_device *screen = curitem->screen();
1213            const rectangle vectorvis(0, 639, 0, 479);
1214            const rectangle &visarea = (screen->screen_type() == SCREEN_TYPE_VECTOR) ? vectorvis : screen->visible_area();
12121215
1213            // get visible area
1214            rectangle visarea = (screen->screen_type() == SCREEN_TYPE_VECTOR)
1215               ? rectangle(0, 639, 0, 479) // use a hard-coded default visible area for vector screens
1216               : screen->visible_area();
1217
1218            // is our visible area too small?  if so, we need to bump up the size
1219            float minimum_width = m_manager.machine().options().minimum_width();
1220            float minimum_height = m_manager.machine().options().minimum_height();
1221            INT32 factor = (INT32) ceil(MAX(minimum_width / visarea.width(), minimum_height / visarea.height()));
1222            factor = MAX(factor, 1);
1223            visarea.min_x *= factor;
1224            visarea.min_y *= factor;
1225            visarea.max_x *= factor;
1226            visarea.max_y *= factor;
1227
12281216            // apply target orientation to the bounds
12291217            render_bounds bounds = curitem->bounds();
12301218            apply_orientation(bounds, m_orientation);
trunk/src/emu/emuopts.c
r29654r29655
105105   { OPTION_GAMMA "(0.1-3.0)",                          "1.0",       OPTION_FLOAT,      "default game screen gamma correction" },
106106   { OPTION_PAUSE_BRIGHTNESS "(0.0-1.0)",               "0.65",      OPTION_FLOAT,      "amount to scale the screen brightness when paused" },
107107   { OPTION_EFFECT,                                     "none",      OPTION_STRING,     "name of a PNG file to use for visual effects, or 'none'" },
108   { OPTION_MINIMUM_WIDTH,                              "320",       OPTION_INTEGER,    "minimum screen width" },
109   { OPTION_MINIMUM_HEIGHT,                             "240",       OPTION_INTEGER,    "minimum screen height" },
110108
111109   // vector options
112110   { NULL,                                              NULL,        OPTION_HEADER,     "CORE VECTOR OPTIONS" },
trunk/src/emu/emuopts.h
r29654r29655
113113#define OPTION_GAMMA                "gamma"
114114#define OPTION_PAUSE_BRIGHTNESS     "pause_brightness"
115115#define OPTION_EFFECT               "effect"
116#define OPTION_MINIMUM_WIDTH        "minimum_width"
117#define OPTION_MINIMUM_HEIGHT       "minimum_height"
118116
119117// core vector options
120118#define OPTION_ANTIALIAS            "antialias"
r29654r29655
281279   float gamma() const { return float_value(OPTION_GAMMA); }
282280   float pause_brightness() const { return float_value(OPTION_PAUSE_BRIGHTNESS); }
283281   const char *effect() const { return value(OPTION_EFFECT); }
284   int minimum_width() const { return int_value(OPTION_MINIMUM_WIDTH); }
285   int minimum_height() const { return int_value(OPTION_MINIMUM_HEIGHT); }
286282
287283   // core vector options
288284   bool antialias() const { return bool_value(OPTION_ANTIALIAS); }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team