summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/laserdsc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/laserdsc.h')
-rw-r--r--src/devices/machine/laserdsc.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index 78f4ad2702a..e2877a4a216 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -18,6 +18,9 @@
#include "vbiparse.h"
#include "avhuff.h"
+#include <type_traits>
+#include <utility>
+
//**************************************************************************
// CONSTANTS
@@ -122,25 +125,15 @@ public:
void set_overlay_config(const laserdisc_overlay_config &config) { static_cast<laserdisc_overlay_config &>(*this) = config; }
// configuration helpers
- template <typename... T> void set_get_disc(T &&... args) { m_getdisc_callback = get_disc_delegate(std::forward<T>(args)...); }
- template <typename... T> void set_audio(T &&... args) { m_audio_callback = audio_delegate(std::forward<T>(args)...); }
- // FIXME: these should be aware of current device for resolving the tag
- template <class FunctionClass>
- void set_overlay(uint32_t width, uint32_t height, u32 (FunctionClass::*callback)(screen_device &, bitmap_rgb32 &, const rectangle &), const char *name)
- {
- set_overlay(width, height, screen_update_rgb32_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
- }
- template <class FunctionClass>
- void set_overlay(uint32_t width, uint32_t height, const char *devname, u32 (FunctionClass::*callback)(screen_device &, bitmap_rgb32 &, const rectangle &), const char *name)
- {
- set_overlay(width, height, screen_update_rgb32_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
- }
- void set_overlay(uint32_t width, uint32_t height, screen_update_rgb32_delegate &&update)
+ template <typename... T> void set_get_disc(T &&... args) { m_getdisc_callback.set(std::forward<T>(args)...); }
+ template <typename... T> void set_audio(T &&... args) { m_audio_callback.set(std::forward<T>(args)...); }
+ template <typename... T>
+ void set_overlay(uint32_t width, uint32_t height, T &&... args)
{
m_overwidth = width;
m_overheight = height;
m_overclip.set(0, width - 1, 0, height - 1);
- m_overupdate_rgb32 = std::move(update);
+ m_overupdate_rgb32.set(std::forward<T>(args)...);
}
void set_overlay_clip(int32_t minx, int32_t maxx, int32_t miny, int32_t maxy) { m_overclip.set(minx, maxx, miny, maxy); }
void set_overlay_position(float posx, float posy)