Make behaviour slightly friendlier with hlsl_write option (nw)

This commit is contained in:
Vas Crabb 2016-07-07 21:01:00 +10:00
parent 6e64e3314a
commit ca5cf4982e
2 changed files with 3 additions and 8 deletions

View file

@ -75,7 +75,7 @@ void avi_write::begin_avi_recording(const char *name)
// create a new temporary movie file
emu_file tempfile(m_machine.options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
const osd_file::error filerr = (!name || !std::strcmp(name, OSDOPTVAL_AUTO))
const osd_file::error filerr = (!name || !name[0] || !std::strcmp(name, OSDOPTVAL_AUTO))
? m_machine.video().open_next(tempfile, "avi")
: tempfile.open(name);
@ -100,13 +100,8 @@ void avi_write::begin_avi_recording(const char *name)
void avi_write::end_avi_recording()
{
if (m_output_file)
{
m_output_file.reset();
}
m_recording = false;
m_output_file = nullptr;
m_output_file.reset();
m_frame = 0;
}

View file

@ -160,7 +160,7 @@ const options_entry windows_options::s_option_entries[] =
{ WINOPTION_HLSLPATH, "hlsl", OPTION_STRING, "path to hlsl files" },
{ WINOPTION_HLSL_ENABLE";hlsl", "0", OPTION_BOOLEAN, "enables HLSL post-processing (PS3.0 required)" },
{ WINOPTION_HLSL_OVERSAMPLING, "0", OPTION_BOOLEAN, "enables HLSL oversampling" },
{ WINOPTION_HLSL_WRITE, nullptr, OPTION_STRING, "enables HLSL AVI writing (huge disk bandwidth suggested)" },
{ WINOPTION_HLSL_WRITE, OSDOPTVAL_AUTO, OPTION_STRING, "enables HLSL AVI writing (huge disk bandwidth suggested)" },
{ WINOPTION_HLSL_SNAP_WIDTH, "2048", OPTION_STRING, "HLSL upscaled-snapshot width" },
{ WINOPTION_HLSL_SNAP_HEIGHT, "1536", OPTION_STRING, "HLSL upscaled-snapshot height" },
{ WINOPTION_SHADOW_MASK_TILE_MODE, "0", OPTION_INTEGER, "shadow mask tile mode (0 for screen based, 1 for source based)" },