mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Merge pull request #5320 from npwoods/fix_mc6847_artifacting
Fixing MC6847 to be responsive to live changes of artifacting config
This commit is contained in:
commit
3c0391dc97
@ -854,7 +854,7 @@ uint32_t mc6847_base_device::screen_update(screen_device &screen, bitmap_rgb32 &
|
||||
const pixel_t *palette = m_palette;
|
||||
|
||||
/* if the video didn't change, indicate as much */
|
||||
if (!has_video_changed())
|
||||
if (!m_artifacter.poll_config() && !has_video_changed())
|
||||
return UPDATE_HAS_NOT_CHANGED;
|
||||
|
||||
/* top border */
|
||||
@ -1701,13 +1701,26 @@ mc6847_base_device::artifacter::artifacter()
|
||||
|
||||
void mc6847_base_device::artifacter::setup_config(device_t *device)
|
||||
{
|
||||
char port_name[32];
|
||||
snprintf(port_name, ARRAY_LENGTH(port_name), "%s:%s", device->tag(), ARTIFACTING_TAG);
|
||||
std::string port_name = util::string_format("%s:%s", device->tag(), ARTIFACTING_TAG);
|
||||
m_config = device->ioport(port_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// artifacter::poll_config
|
||||
//-------------------------------------------------
|
||||
|
||||
bool mc6847_base_device::artifacter::poll_config()
|
||||
{
|
||||
ioport_value new_artifacting = m_config ? m_config->read() : 0;
|
||||
bool changed = new_artifacting != m_artifacting;
|
||||
m_artifacting = new_artifacting;
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// artifacter::update_colors
|
||||
//-------------------------------------------------
|
||||
|
@ -178,7 +178,7 @@ protected:
|
||||
|
||||
// artifacting config
|
||||
void setup_config(device_t *device);
|
||||
void poll_config() { m_artifacting = (m_config!=nullptr) ? m_config->read() : 0; }
|
||||
bool poll_config();
|
||||
void set_pal_artifacting( bool palartifacting ) { m_palartifacting = palartifacting; }
|
||||
bool get_pal_artifacting() { return m_palartifacting; }
|
||||
void create_color_blend_table( const pixel_t *palette );
|
||||
|
Loading…
Reference in New Issue
Block a user