trunk/src/emu/render.c
| r29654 | r29655 | |
| 1208 | 1208 | for (layout_view::item *curitem = m_curview->first_item(layer); curitem != NULL; curitem = curitem->next()) |
| 1209 | 1209 | if (curitem->screen() != NULL) |
| 1210 | 1210 | { |
| 1211 | // use a hard-coded default visible area for vector screens |
| 1211 | 1212 | 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(); |
| 1212 | 1215 | |
| 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 | | |
| 1228 | 1216 | // apply target orientation to the bounds |
| 1229 | 1217 | render_bounds bounds = curitem->bounds(); |
| 1230 | 1218 | apply_orientation(bounds, m_orientation); |
trunk/src/emu/emuopts.c
| r29654 | r29655 | |
| 105 | 105 | { OPTION_GAMMA "(0.1-3.0)", "1.0", OPTION_FLOAT, "default game screen gamma correction" }, |
| 106 | 106 | { OPTION_PAUSE_BRIGHTNESS "(0.0-1.0)", "0.65", OPTION_FLOAT, "amount to scale the screen brightness when paused" }, |
| 107 | 107 | { 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" }, |
| 110 | 108 | |
| 111 | 109 | // vector options |
| 112 | 110 | { NULL, NULL, OPTION_HEADER, "CORE VECTOR OPTIONS" }, |
trunk/src/emu/emuopts.h
| r29654 | r29655 | |
| 113 | 113 | #define OPTION_GAMMA "gamma" |
| 114 | 114 | #define OPTION_PAUSE_BRIGHTNESS "pause_brightness" |
| 115 | 115 | #define OPTION_EFFECT "effect" |
| 116 | | #define OPTION_MINIMUM_WIDTH "minimum_width" |
| 117 | | #define OPTION_MINIMUM_HEIGHT "minimum_height" |
| 118 | 116 | |
| 119 | 117 | // core vector options |
| 120 | 118 | #define OPTION_ANTIALIAS "antialias" |
| r29654 | r29655 | |
| 281 | 279 | float gamma() const { return float_value(OPTION_GAMMA); } |
| 282 | 280 | float pause_brightness() const { return float_value(OPTION_PAUSE_BRIGHTNESS); } |
| 283 | 281 | 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); } |
| 286 | 282 | |
| 287 | 283 | // core vector options |
| 288 | 284 | bool antialias() const { return bool_value(OPTION_ANTIALIAS); } |