summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine.h')
-rw-r--r--src/emu/machine.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/emu/machine.h b/src/emu/machine.h
index f3aef08d265..7b4efec70da 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -128,7 +128,7 @@ public:
sound_manager &sound() const { assert(m_sound != nullptr); return *m_sound; }
video_manager &video() const { assert(m_video != nullptr); return *m_video; }
network_manager &network() const { assert(m_network != nullptr); return *m_network; }
- bookkeeping_manager &bookkeeping() const { assert(m_network != nullptr); return *m_bookkeeping; }
+ bookkeeping_manager &bookkeeping() const { assert(m_bookkeeping != nullptr); return *m_bookkeeping; }
configuration_manager &configuration() const { assert(m_configuration != nullptr); return *m_configuration; }
output_manager &output() const { assert(m_output != nullptr); return *m_output; }
ui_manager &ui() const { assert(m_ui != nullptr); return *m_ui; }
@@ -145,7 +145,6 @@ public:
bool paused() const { return m_paused || (m_current_phase != machine_phase::RUNNING); }
bool exit_pending() const { return m_exit_pending; }
bool hard_reset_pending() const { return m_hard_reset_pending; }
- bool ui_active() const { return m_ui_active; }
const std::string &basename() const { return m_basename; }
int sample_rate() const { return m_sample_rate; }
bool save_or_load_pending() const { return !m_saveload_pending_file.empty(); }
@@ -172,13 +171,12 @@ public:
void add_notifier(machine_notification event, machine_notify_delegate callback, bool first = false);
void call_notifiers(machine_notification which);
void add_logerror_callback(logerror_callback callback);
- void set_ui_active(bool active) { m_ui_active = active; }
void debug_break();
void export_http_api();
// TODO: Do saves and loads still require scheduling?
- void immediate_save(const char *filename);
- void immediate_load(const char *filename);
+ void immediate_save(std::string_view filename);
+ void immediate_load(std::string_view filename);
// rewind operations
bool rewind_capture();
@@ -217,7 +215,7 @@ public:
bool debug_enabled() { return (debug_flags & DEBUG_FLAG_ENABLED) != 0; }
// used by debug_console to take ownership of the debug.log file
- std::unique_ptr<emu_file> steal_debuglogfile() { return std::move(m_debuglogfile); }
+ std::unique_ptr<emu_file> steal_debuglogfile();
private:
class side_effects_disabler {
@@ -248,12 +246,12 @@ private:
void start();
void set_saveload_filename(std::string &&filename);
void handle_saveload();
- void soft_reset(void *ptr = nullptr, s32 param = 0);
+ void soft_reset(s32 param = 0);
std::string nvram_filename(device_t &device) const;
void nvram_load();
void nvram_save();
void popup_clear() const;
- void popup_message(util::format_argument_pack<std::ostream> const &args) const;
+ void popup_message(util::format_argument_pack<char> const &args) const;
// internal callbacks
void logfile_callback(const char *buffer);
@@ -297,7 +295,6 @@ private:
// misc state
u32 m_rand_seed; // current random number seed
- bool m_ui_active; // ui active or not (useful for games / systems with keyboard inputs)
time_t m_base_time; // real time at initial emulation time
std::string m_basename; // basename used for game-related paths
int m_sample_rate; // the digital audio sample rate
@@ -400,7 +397,7 @@ inline void running_machine::logerror(Format &&fmt, Params &&... args) const
// process only if there is a target
if (allow_logging())
{
- g_profiler.start(PROFILER_LOGERROR);
+ auto profile = g_profiler.start(PROFILER_LOGERROR);
// dump to the buffer
m_string_buffer.clear();
@@ -409,9 +406,7 @@ inline void running_machine::logerror(Format &&fmt, Params &&... args) const
m_string_buffer.put('\0');
strlog(&m_string_buffer.vec()[0]);
-
- g_profiler.stop();
}
}
-#endif /* MAME_EMU_MACHINE_H */
+#endif // MAME_EMU_MACHINE_H