trunk/src/emu/emuopts.cpp
r253636 | r253637 | |
183 | 183 | { OPTION_DRC_LOG_NATIVE, "0", OPTION_BOOLEAN, "write DRC native disassembly log" }, |
184 | 184 | { OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" }, |
185 | 185 | { OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" }, |
| 186 | { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, |
| 187 | { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, |
186 | 188 | { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" }, |
187 | 189 | { OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" }, |
| 190 | { OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, |
| 191 | { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" }, |
188 | 192 | { OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" }, |
189 | 193 | { OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" }, |
190 | 194 | { OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" }, |
trunk/src/emu/emuopts.h
r253636 | r253637 | |
176 | 176 | #define OPTION_DRC_LOG_NATIVE "drc_log_native" |
177 | 177 | #define OPTION_BIOS "bios" |
178 | 178 | #define OPTION_CHEAT "cheat" |
| 179 | #define OPTION_SKIP_GAMEINFO "skip_gameinfo" |
| 180 | #define OPTION_UI_FONT "uifont" |
179 | 181 | #define OPTION_UI "ui" |
180 | 182 | #define OPTION_RAMSIZE "ramsize" |
181 | 183 | |
r253636 | r253637 | |
185 | 187 | #define OPTION_COMM_REMOTE_HOST "comm_remotehost" |
186 | 188 | #define OPTION_COMM_REMOTE_PORT "comm_remoteport" |
187 | 189 | |
| 190 | #define OPTION_CONFIRM_QUIT "confirm_quit" |
| 191 | #define OPTION_UI_MOUSE "ui_mouse" |
| 192 | |
188 | 193 | #define OPTION_AUTOBOOT_COMMAND "autoboot_command" |
189 | 194 | #define OPTION_AUTOBOOT_DELAY "autoboot_delay" |
190 | 195 | #define OPTION_AUTOBOOT_SCRIPT "autoboot_script" |
r253636 | r253637 | |
353 | 358 | bool drc_log_native() const { return bool_value(OPTION_DRC_LOG_NATIVE); } |
354 | 359 | const char *bios() const { return value(OPTION_BIOS); } |
355 | 360 | bool cheat() const { return bool_value(OPTION_CHEAT); } |
| 361 | bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); } |
| 362 | const char *ui_font() const { return value(OPTION_UI_FONT); } |
356 | 363 | const char *ui() const { return value(OPTION_UI); } |
357 | 364 | const char *ram_size() const { return value(OPTION_RAMSIZE); } |
358 | 365 | |
r253636 | r253637 | |
362 | 369 | const char *comm_remotehost() const { return value(OPTION_COMM_REMOTE_HOST); } |
363 | 370 | const char *comm_remoteport() const { return value(OPTION_COMM_REMOTE_PORT); } |
364 | 371 | |
| 372 | |
| 373 | bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); } |
| 374 | bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); } |
| 375 | |
365 | 376 | const char *autoboot_command() const { return value(OPTION_AUTOBOOT_COMMAND); } |
366 | 377 | int autoboot_delay() const { return int_value(OPTION_AUTOBOOT_DELAY); } |
367 | 378 | const char *autoboot_script() const { return value(OPTION_AUTOBOOT_SCRIPT); } |
trunk/src/emu/ui/custui.cpp
r253636 | r253637 | |
192 | 192 | ui_options &moptions = machine.ui().options(); |
193 | 193 | #ifdef UI_WINDOWS |
194 | 194 | |
195 | | std::string name(machine.ui().options().ui_font()); |
| 195 | std::string name(machine.options().ui_font()); |
196 | 196 | list(); |
197 | 197 | |
198 | 198 | m_bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0); |
r253636 | r253637 | |
285 | 285 | if (m_bold) |
286 | 286 | name.insert(0, "[B]"); |
287 | 287 | } |
288 | | moptions.set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string); |
| 288 | machine().options().set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string); |
| 289 | machine().options().mark_changed(OPTION_UI_FONT); |
289 | 290 | #endif |
290 | 291 | |
291 | 292 | moptions.set_value(OPTION_INFOS_SIZE, m_info_size, OPTION_PRIORITY_CMDLINE, error_string); |
trunk/src/emu/ui/miscmenu.cpp
r253636 | r253637 | |
564 | 564 | { 0, __("DATs info"), OPTION_DATS_ENABLED }, |
565 | 565 | { 0, __("Cheats"), OPTION_CHEAT }, |
566 | 566 | { 0, __("Show mouse pointer"), OPTION_UI_MOUSE }, |
567 | | { 0, __("Confirm quit from machines"), OPTION_UI_CONFIRM_QUIT }, |
568 | | { 0, __("Skip displaying information's screen at startup"), OPTION_UI_SKIP_GAMEINFO }, |
| 567 | { 0, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT }, |
| 568 | { 0, __("Skip displaying information's screen at startup"), OPTION_SKIP_GAMEINFO }, |
569 | 569 | { 0, __("Force 4:3 appearance for software snapshot"), OPTION_FORCED4X3 }, |
570 | 570 | { 0, __("Use image as background"), OPTION_USE_BACKGROUND }, |
571 | 571 | { 0, __("Skip bios selection menu"), OPTION_SKIP_BIOS_MENU }, |
trunk/src/emu/ui/moptions.cpp
r253636 | r253637 | |
52 | 52 | { OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" }, |
53 | 53 | { OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" }, |
54 | 54 | { OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" }, |
55 | | { OPTION_UI_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, |
56 | | { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, |
57 | | { OPTION_UI_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, |
58 | | { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" }, |
59 | 55 | |
60 | 56 | // UI options |
61 | 57 | { nullptr, nullptr, OPTION_HEADER, "UI OPTIONS" }, |
trunk/src/emu/ui/moptions.h
r253636 | r253637 | |
70 | 70 | #define OPTION_UI_DIPSW_COLOR "ui_dipsw_color" |
71 | 71 | #define OPTION_UI_SLIDER_COLOR "ui_slider_color" |
72 | 72 | |
73 | | #define OPTION_UI_FONT "uifont" |
74 | | #define OPTION_UI_CONFIRM_QUIT "confirm_quit" |
75 | | #define OPTION_UI_MOUSE "ui_mouse" |
76 | | #define OPTION_UI_SKIP_GAMEINFO "skip_gameinfo" |
77 | | |
78 | | |
79 | 73 | class ui_options : public core_options |
80 | 74 | { |
81 | 75 | public: |
r253636 | r253637 | |
136 | 130 | const char *ui_mousedown_bg_color() const { return value(OPTION_UI_MOUSEDOWN_BG_COLOR); } |
137 | 131 | const char *ui_dipsw_color() const { return value(OPTION_UI_DIPSW_COLOR); } |
138 | 132 | const char *ui_slider_color() const { return value(OPTION_UI_SLIDER_COLOR); } |
139 | | |
140 | | bool skip_gameinfo() const { return bool_value(OPTION_UI_SKIP_GAMEINFO); } |
141 | | const char *ui_font() const { return value(OPTION_UI_FONT); } |
142 | | bool confirm_quit() const { return bool_value(OPTION_UI_CONFIRM_QUIT); } |
143 | | bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); } |
144 | 133 | private: |
145 | 134 | static const options_entry s_option_entries[]; |
146 | 135 | }; |
trunk/src/emu/ui/ui.cpp
r253636 | r253637 | |
363 | 363 | { |
364 | 364 | const int maxstate = 4; |
365 | 365 | int str = machine().options().seconds_to_run(); |
366 | | bool show_gameinfo = !machine().ui().options().skip_gameinfo(); |
| 366 | bool show_gameinfo = !machine().options().skip_gameinfo(); |
367 | 367 | bool show_warnings = true, show_mandatory_fileman = true; |
368 | 368 | int state; |
369 | 369 | |
r253636 | r253637 | |
499 | 499 | m_popup_text_end = 0; |
500 | 500 | |
501 | 501 | // display the internal mouse cursor |
502 | | if (m_mouse_show || (is_menu_active() && machine().ui().options().ui_mouse())) |
| 502 | if (m_mouse_show || (is_menu_active() && machine().options().ui_mouse())) |
503 | 503 | { |
504 | 504 | INT32 mouse_target_x, mouse_target_y; |
505 | 505 | bool mouse_button; |
r253636 | r253637 | |
530 | 530 | { |
531 | 531 | // allocate the font and messagebox string |
532 | 532 | if (m_font == nullptr) |
533 | | m_font = machine().render().font_alloc(machine().ui().options().ui_font()); |
| 533 | m_font = machine().render().font_alloc(machine().options().ui_font()); |
534 | 534 | return m_font; |
535 | 535 | } |
536 | 536 | |
r253636 | r253637 | |
1880 | 1880 | |
1881 | 1881 | void ui_manager::request_quit() |
1882 | 1882 | { |
1883 | | if (!machine().ui().options().confirm_quit()) |
| 1883 | if (!machine().options().confirm_quit()) |
1884 | 1884 | machine().schedule_exit(); |
1885 | 1885 | else |
1886 | 1886 | set_handler(handler_confirm_quit, 0); |