diff options
Diffstat (limited to 'src/emu/main.h')
-rw-r--r-- | src/emu/main.h | 73 |
1 files changed, 36 insertions, 37 deletions
diff --git a/src/emu/main.h b/src/emu/main.h index a62457a1c75..a62ccb46211 100644 --- a/src/emu/main.h +++ b/src/emu/main.h @@ -6,36 +6,34 @@ Controls execution of the core emulator system. ***************************************************************************/ +#ifndef MAME_EMU_MAIN_H +#define MAME_EMU_MAIN_H #pragma once -#ifndef __EMU_H__ -#error Dont include this file directly; include emu.h instead. -#endif +#include "emufwd.h" -#ifndef MAME_EMU_MAIN_H -#define MAME_EMU_MAIN_H +#include <map> +#include <memory> +#include <string> +#include <vector> -#include <thread> -#include <time.h> //************************************************************************** // CONSTANTS //************************************************************************** -enum -{ - EMU_ERR_NONE = 0, /* no error */ - EMU_ERR_FAILED_VALIDITY = 1, /* failed validity checks */ - EMU_ERR_MISSING_FILES = 2, /* missing files */ - EMU_ERR_FATALERROR = 3, /* some other fatal error */ - EMU_ERR_DEVICE = 4, /* device initialization error (MESS-specific) */ - EMU_ERR_NO_SUCH_GAME = 5, /* game was specified but doesn't exist */ - EMU_ERR_INVALID_CONFIG = 6, /* some sort of error in configuration */ - EMU_ERR_IDENT_NONROMS = 7, /* identified all non-ROM files */ - EMU_ERR_IDENT_PARTIAL = 8, /* identified some files but not all */ - EMU_ERR_IDENT_NONE = 9 /* identified no files */ -}; +constexpr int EMU_ERR_NONE = 0; // no error +constexpr int EMU_ERR_FAILED_VALIDITY = 1; // failed validity checks +constexpr int EMU_ERR_MISSING_FILES = 2; // missing files +constexpr int EMU_ERR_FATALERROR = 3; // some other fatal error +constexpr int EMU_ERR_DEVICE = 4; // device initialization error +constexpr int EMU_ERR_NO_SUCH_SYSTEM = 5; // system was specified but doesn't exist +constexpr int EMU_ERR_INVALID_CONFIG = 6; // some sort of error in configuration +constexpr int EMU_ERR_IDENT_NONROMS = 7; // identified all non-ROM files +constexpr int EMU_ERR_IDENT_PARTIAL = 8; // identified some files but not all +constexpr int EMU_ERR_IDENT_NONE = 9; // identified no files + //************************************************************************** // TYPE DEFINITIONS @@ -45,35 +43,36 @@ class emulator_info { public: // construction/destruction - emulator_info() {}; - - static const char * get_appname(); - static const char * get_appname_lower(); - static const char * get_configname(); - static const char * get_copyright(); - static const char * get_copyright_info(); - static const char * get_bare_build_version(); - static const char * get_build_version(); - static void display_ui_chooser(running_machine& machine); + emulator_info() = default; + + static const char *get_appname(); + static const char *get_appname_lower(); + static const char *get_configname(); + static const char *get_copyright(); + static const char *get_copyright_info(); + static const char *get_bare_build_version(); + static const char *get_build_version(); + static void display_ui_chooser(running_machine &machine); static int start_frontend(emu_options &options, osd_interface &osd, std::vector<std::string> &args); static int start_frontend(emu_options &options, osd_interface &osd, int argc, char *argv[]); - static void draw_user_interface(running_machine& machine); + static bool draw_user_interface(running_machine& machine); static void periodic_check(); static bool frame_hook(); - static void sound_hook(); - static void layout_file_cb(util::xml::data_node const &layout); + static void sound_hook(const std::map<std::string, std::vector<std::pair<const float *, int>>> &sound); // Can't use sound_stream::sample_t sadly + static void layout_script_cb(layout_file &file, const char *script); static bool standalone(); }; class machine_manager { - DISABLE_COPYING(machine_manager); protected: // construction/destruction - machine_manager(emu_options& options, osd_interface& osd); + machine_manager(emu_options &options, osd_interface &osd); + machine_manager(machine_manager const &) = delete; + public: - virtual ~machine_manager() { } + virtual ~machine_manager(); osd_interface &osd() const { return m_osd; } emu_options &options() const { return m_options; } @@ -90,7 +89,7 @@ public: virtual void update_machine() { } - http_manager *http() { return m_http.get(); } + http_manager *http(); void start_http_server(); protected: |