mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
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
This commit is contained in:
parent
6a48055e44
commit
4f9db1e734
@ -65,6 +65,7 @@ const options_entry emu_options::s_option_entries[] =
|
||||
{ OPTION_SNAPNAME, "%g/%i", OPTION_STRING, "override of the default snapshot/movie naming; %g == gamename, %i == index" },
|
||||
{ OPTION_SNAPSIZE, "auto", OPTION_STRING, "specify snapshot/movie resolution (<width>x<height>) or 'auto' to use minimal size " },
|
||||
{ OPTION_SNAPVIEW, "internal", OPTION_STRING, "specify snapshot/movie view or 'internal' to use internal pixel-aspect views" },
|
||||
{ OPTION_SNAPBILINEAR, "1", OPTION_BOOLEAN, "specify if the snapshot should have bilinear filtering applied" },
|
||||
{ OPTION_STATENAME, "%g", OPTION_STRING, "override of the default state subfolder naming; %g == gamename" },
|
||||
{ OPTION_BURNIN, "0", OPTION_BOOLEAN, "create burn-in snapshots for each screen" },
|
||||
|
||||
|
@ -78,6 +78,7 @@ enum
|
||||
#define OPTION_SNAPNAME "snapname"
|
||||
#define OPTION_SNAPSIZE "snapsize"
|
||||
#define OPTION_SNAPVIEW "snapview"
|
||||
#define OPTION_SNAPBILINEAR "snapbilinear"
|
||||
#define OPTION_STATENAME "statename"
|
||||
#define OPTION_BURNIN "burnin"
|
||||
|
||||
@ -239,6 +240,7 @@ public:
|
||||
const char *snap_name() const { return value(OPTION_SNAPNAME); }
|
||||
const char *snap_size() const { return value(OPTION_SNAPSIZE); }
|
||||
const char *snap_view() const { return value(OPTION_SNAPVIEW); }
|
||||
bool snap_bilinear() const { return bool_value(OPTION_SNAPBILINEAR); }
|
||||
const char *state_name() const { return value(OPTION_STATENAME); }
|
||||
bool burnin() const { return bool_value(OPTION_BURNIN); }
|
||||
|
||||
|
@ -1058,6 +1058,9 @@ void video_manager::recompute_speed(const attotime &emutime)
|
||||
// given screen
|
||||
//-------------------------------------------------
|
||||
|
||||
typedef software_renderer<UINT32, 0,0,0, 16,8,0, false, true> snap_renderer_bilinear;
|
||||
typedef software_renderer<UINT32, 0,0,0, 16,8,0, false, false> snap_renderer;
|
||||
|
||||
void video_manager::create_snapshot_bitmap(screen_device *screen)
|
||||
{
|
||||
// select the appropriate view in our dummy target
|
||||
@ -1083,7 +1086,10 @@ void video_manager::create_snapshot_bitmap(screen_device *screen)
|
||||
// render the screen there
|
||||
render_primitive_list &primlist = m_snap_target->get_primitives();
|
||||
primlist.acquire_lock();
|
||||
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());
|
||||
if (machine().options().snap_bilinear())
|
||||
snap_renderer_bilinear::draw_primitives(primlist, &m_snap_bitmap.pix32(0), width, height, m_snap_bitmap.rowpixels());
|
||||
else
|
||||
snap_renderer::draw_primitives(primlist, &m_snap_bitmap.pix32(0), width, height, m_snap_bitmap.rowpixels());
|
||||
primlist.release_lock();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user