summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/slider.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/slider.h')
-rw-r--r--src/osd/modules/render/bgfx/slider.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osd/modules/render/bgfx/slider.h b/src/osd/modules/render/bgfx/slider.h
index 62929bd5fe1..5ba8427a54d 100644
--- a/src/osd/modules/render/bgfx/slider.h
+++ b/src/osd/modules/render/bgfx/slider.h
@@ -51,8 +51,8 @@ public:
// Getters
std::string name() const { return m_name; }
slider_type type() const { return m_type; }
- int32_t value() const { return m_value; }
- float uniform_value() const { return *(reinterpret_cast<const float*>(&m_value)); }
+ float value() const { return m_value; }
+ float uniform_value() const { return float(m_value); }
slider_state* core_slider() const { return m_slider_state; }
size_t size() const { return get_size_for_type(m_type); }
@@ -60,6 +60,7 @@ public:
protected:
slider_state* create_core_slider(running_machine &machine);
+ int32_t as_int() const { return int32_t(floor(m_value + 0.5f)); }
std::string m_name;
int32_t m_min;
@@ -72,7 +73,7 @@ protected:
std::string m_format;
std::string m_description;
std::vector<std::string> m_strings;
- int32_t m_value;
+ float m_value;
slider_state* m_slider_state;
};