mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
In case there is driver init available, we update palettes after it (nw)
This commit is contained in:
parent
bc57e5824a
commit
bb07cb9a41
@ -226,8 +226,17 @@ void driver_device::device_start()
|
|||||||
|
|
||||||
// call the game-specific init
|
// call the game-specific init
|
||||||
if (m_system->driver_init != NULL)
|
if (m_system->driver_init != NULL)
|
||||||
|
{
|
||||||
(*m_system->driver_init)(machine());
|
(*m_system->driver_init)(machine());
|
||||||
|
|
||||||
|
// update palettes to allow changes in driver_init
|
||||||
|
palette_device_iterator pal_deviter(*this);
|
||||||
|
for (palette_device *palette = pal_deviter.first(); palette != NULL; palette = pal_deviter.next())
|
||||||
|
{
|
||||||
|
palette->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// finish image devices init process
|
// finish image devices init process
|
||||||
image_postdevice_init(machine());
|
image_postdevice_init(machine());
|
||||||
|
|
||||||
|
@ -388,6 +388,8 @@ public:
|
|||||||
void palette_init_BBBBBGGGGGRRRRR(palette_device &palette);
|
void palette_init_BBBBBGGGGGRRRRR(palette_device &palette);
|
||||||
void palette_init_RRRRRGGGGGGBBBBB(palette_device &palette);
|
void palette_init_RRRRRGGGGGGBBBBB(palette_device &palette);
|
||||||
|
|
||||||
|
// helper to update palette when data changed
|
||||||
|
void update() { if (!m_init.isnull()) m_init(*this); }
|
||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_validity_check(validity_checker &valid) const;
|
virtual void device_validity_check(validity_checker &valid) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user