Previous 199869 Revisions Next

r32954 Saturday 25th October, 2014 at 16:14:16 UTC by Oliver Stöneberg
added command-line option -[no]snapbilinear to control binlinear filtering for snapshots (enabled by default) [Oliver Stöneberg]

this is mainly for making testruns and debugging faster - could also be
used to speed up -aviwrite usage though
[src/emu]emuopts.c emuopts.h video.c

trunk/src/emu/emuopts.c
r241465r241466
6565   { OPTION_SNAPNAME,                                   "%g/%i",     OPTION_STRING,     "override of the default snapshot/movie naming; %g == gamename, %i == index" },
6666   { OPTION_SNAPSIZE,                                   "auto",      OPTION_STRING,     "specify snapshot/movie resolution (<width>x<height>) or 'auto' to use minimal size " },
6767   { OPTION_SNAPVIEW,                                   "internal",  OPTION_STRING,     "specify snapshot/movie view or 'internal' to use internal pixel-aspect views" },
68   { OPTION_SNAPBILINEAR,                               "1",         OPTION_BOOLEAN,    "specify if the snapshot should have bilinear filtering applied" },
6869   { OPTION_STATENAME,                                  "%g",        OPTION_STRING,     "override of the default state subfolder naming; %g == gamename" },
6970   { OPTION_BURNIN,                                     "0",         OPTION_BOOLEAN,    "create burn-in snapshots for each screen" },
7071
trunk/src/emu/emuopts.h
r241465r241466
7878#define OPTION_SNAPNAME             "snapname"
7979#define OPTION_SNAPSIZE             "snapsize"
8080#define OPTION_SNAPVIEW             "snapview"
81#define OPTION_SNAPBILINEAR         "snapbilinear"
8182#define OPTION_STATENAME            "statename"
8283#define OPTION_BURNIN               "burnin"
8384
r241465r241466
239240   const char *snap_name() const { return value(OPTION_SNAPNAME); }
240241   const char *snap_size() const { return value(OPTION_SNAPSIZE); }
241242   const char *snap_view() const { return value(OPTION_SNAPVIEW); }
243   bool snap_bilinear() const { return bool_value(OPTION_SNAPBILINEAR); }
242244   const char *state_name() const { return value(OPTION_STATENAME); }
243245   bool burnin() const { return bool_value(OPTION_BURNIN); }
244246
trunk/src/emu/video.c
r241465r241466
10581058//  given screen
10591059//-------------------------------------------------
10601060
1061typedef software_renderer<UINT32, 0,0,0, 16,8,0, false, true> snap_renderer_bilinear;
1062typedef software_renderer<UINT32, 0,0,0, 16,8,0, false, false> snap_renderer;
1063
10611064void video_manager::create_snapshot_bitmap(screen_device *screen)
10621065{
10631066   // select the appropriate view in our dummy target
r241465r241466
10831086   // render the screen there
10841087   render_primitive_list &primlist = m_snap_target->get_primitives();
10851088   primlist.acquire_lock();
1086   software_renderer<UINT32, 0,0,0, 16,8,0, false, true>::draw_primitives(primlist, &m_snap_bitmap.pix32(0), width, height, m_snap_bitmap.rowpixels());
1089   if (machine().options().snap_bilinear())
1090      snap_renderer_bilinear::draw_primitives(primlist, &m_snap_bitmap.pix32(0), width, height, m_snap_bitmap.rowpixels());
1091   else
1092      snap_renderer::draw_primitives(primlist, &m_snap_bitmap.pix32(0), width, height, m_snap_bitmap.rowpixels());
10871093   primlist.release_lock();
10881094}
10891095


Previous 199869 Revisions Next


© 1997-2024 The MAME Team