summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2019-11-21 16:07:04 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2019-11-21 16:07:04 +1100
commiteaf07fffa33296500c4a6d35bf64a9098ca35fc0 (patch)
treef4d699a1de44c4a01d23120512f17debd6afd975 /src/osd
parent0ec88f2ff75fcc65191c0c89ad47f635ebb8c51a (diff)
UI input menu: treat codes containing a postive and negative of the same thing as invalid (e.g. A S not A)
ioport.cpp: * better than 50% reduction in compile time, and better locality for static data * better encapsulation, const correctness and noexcept usage
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/mac/osdmac.h2
-rw-r--r--src/osd/modules/input/input_mac.cpp2
-rw-r--r--src/osd/modules/input/input_sdlcommon.cpp2
-rw-r--r--src/osd/modules/input/input_windows.cpp2
-rw-r--r--src/osd/modules/lib/osdobj_common.cpp2
-rw-r--r--src/osd/modules/lib/osdobj_common.h2
-rw-r--r--src/osd/osdcomm.h8
-rw-r--r--src/osd/osdepend.h2
-rw-r--r--src/osd/sdl/osdsdl.h2
-rw-r--r--src/osd/windows/winmain.h2
10 files changed, 14 insertions, 12 deletions
diff --git a/src/osd/mac/osdmac.h b/src/osd/mac/osdmac.h
index 13b680cf271..3e1dfe9bb4d 100644
--- a/src/osd/mac/osdmac.h
+++ b/src/osd/mac/osdmac.h
@@ -47,7 +47,7 @@ public:
virtual void input_update() override;
// input overridables
- virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
+ virtual void customize_input_type_list(std::vector<input_type_entry> &typelist) override;
virtual void video_register() override;
diff --git a/src/osd/modules/input/input_mac.cpp b/src/osd/modules/input/input_mac.cpp
index 4dd030b331a..0784501573f 100644
--- a/src/osd/modules/input/input_mac.cpp
+++ b/src/osd/modules/input/input_mac.cpp
@@ -33,7 +33,7 @@
extern void MacPollInputs();
-void mac_osd_interface::customize_input_type_list(simple_list<input_type_entry> &typelist)
+void mac_osd_interface::customize_input_type_list(std::vector<input_type_entry> &typelist)
{
}
diff --git a/src/osd/modules/input/input_sdlcommon.cpp b/src/osd/modules/input/input_sdlcommon.cpp
index a5982ea891d..2e6611c74ac 100644
--- a/src/osd/modules/input/input_sdlcommon.cpp
+++ b/src/osd/modules/input/input_sdlcommon.cpp
@@ -142,7 +142,7 @@ void sdl_event_manager::process_window_event(running_machine &machine, SDL_Event
// customize_input_type_list
//============================================================
-void sdl_osd_interface::customize_input_type_list(simple_list<input_type_entry> &typelist)
+void sdl_osd_interface::customize_input_type_list(std::vector<input_type_entry> &typelist)
{
input_item_id mameid_code;
input_code ui_code;
diff --git a/src/osd/modules/input/input_windows.cpp b/src/osd/modules/input/input_windows.cpp
index 164ee0e3c31..371c1aa3c59 100644
--- a/src/osd/modules/input/input_windows.cpp
+++ b/src/osd/modules/input/input_windows.cpp
@@ -73,7 +73,7 @@ void windows_osd_interface::poll_input(running_machine &machine) const
// customize_input_type_list
//============================================================
-void windows_osd_interface::customize_input_type_list(simple_list<input_type_entry> &typelist)
+void windows_osd_interface::customize_input_type_list(std::vector<input_type_entry> &typelist)
{
const char* uimode;
diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp
index 3cba4c81cfb..8e284eba055 100644
--- a/src/osd/modules/lib/osdobj_common.cpp
+++ b/src/osd/modules/lib/osdobj_common.cpp
@@ -564,7 +564,7 @@ void osd_common_t::set_mastervolume(int attenuation)
// additions/modifications to the input list
//-------------------------------------------------
-void osd_common_t::customize_input_type_list(simple_list<input_type_entry> &typelist)
+void osd_common_t::customize_input_type_list(std::vector<input_type_entry> &typelist)
{
//
// inptport.c defines some general purpose defaults for key and joystick bindings.
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index 4a377276855..9fb1b1eef6b 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -204,7 +204,7 @@ public:
virtual bool no_sound() override;
// input overridables
- virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
+ virtual void customize_input_type_list(std::vector<input_type_entry> &typelist) override;
// video overridables
virtual void add_audio_to_recording(const int16_t *buffer, int samples_this_frame) override;
diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h
index eb600e65360..7e7ac805ad2 100644
--- a/src/osd/osdcomm.h
+++ b/src/osd/osdcomm.h
@@ -8,14 +8,15 @@
fundamental integral types as well as compiler-specific tweaks.
***************************************************************************/
-
-#pragma once
-
#ifndef MAME_OSD_OSDCOMM_H
#define MAME_OSD_OSDCOMM_H
+#pragma once
+
#include <stdio.h>
#include <string.h>
+
+#include <array>
#include <cstdint>
#include <type_traits>
@@ -84,6 +85,7 @@ constexpr uint32_t extract_64lo(uint64_t val) { return uint32_t(val); }
// Highly useful template for compile-time knowledge of an array size
template <typename T, size_t N> constexpr size_t ARRAY_LENGTH(T (&)[N]) { return N;}
+template <typename T, size_t N> constexpr size_t ARRAY_LENGTH(std::array<T, N> const &) { return N; }
// For declaring an array of the same dimensions as another array (including multi-dimensional arrays)
template <typename T, typename U> struct equivalent_array_or_type { typedef T type; };
diff --git a/src/osd/osdepend.h b/src/osd/osdepend.h
index 7b3160cb04e..f2c4e36c0e5 100644
--- a/src/osd/osdepend.h
+++ b/src/osd/osdepend.h
@@ -77,7 +77,7 @@ public:
virtual bool no_sound() = 0;
// input overridables
- virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) = 0;
+ virtual void customize_input_type_list(std::vector<input_type_entry> &typelist) = 0;
// video overridables
virtual void add_audio_to_recording(const int16_t *buffer, int samples_this_frame) = 0;
diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
index 8bc4b5556c9..4cbec2d9d14 100644
--- a/src/osd/sdl/osdsdl.h
+++ b/src/osd/sdl/osdsdl.h
@@ -127,7 +127,7 @@ public:
virtual void input_update() override;
// input overridables
- virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
+ virtual void customize_input_type_list(std::vector<input_type_entry> &typelist) override;
virtual void video_register() override;
diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h
index 04e6da31d1d..faca28e5bca 100644
--- a/src/osd/windows/winmain.h
+++ b/src/osd/windows/winmain.h
@@ -283,7 +283,7 @@ public:
virtual void input_update() override;
// input overrideables
- virtual void customize_input_type_list(simple_list<input_type_entry> &typelist) override;
+ virtual void customize_input_type_list(std::vector<input_type_entry> &typelist) override;
// video overridables
virtual void add_audio_to_recording(const int16_t *buffer, int samples_this_frame) override;