mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
ui: save/restore images/info selection in right panel
This commit is contained in:
parent
71c7cfe525
commit
c179a4e0e9
@ -51,6 +51,7 @@ const options_entry ui_options::s_option_entries[] =
|
|||||||
{ OPTION_SKIP_BIOS_MENU, "0", OPTION_BOOLEAN, "skip bios submenu, start with configured or default" },
|
{ OPTION_SKIP_BIOS_MENU, "0", OPTION_BOOLEAN, "skip bios submenu, start with configured or default" },
|
||||||
{ OPTION_SKIP_PARTS_MENU, "0", OPTION_BOOLEAN, "skip parts submenu, start with first part" },
|
{ OPTION_SKIP_PARTS_MENU, "0", OPTION_BOOLEAN, "skip parts submenu, start with first part" },
|
||||||
{ OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" },
|
{ OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" },
|
||||||
|
{ OPTION_LAST_RIGHT_PANEL "(0-1)", "0", OPTION_INTEGER, "latest right panel focus" },
|
||||||
{ OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" },
|
{ OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" },
|
||||||
{ OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" },
|
{ OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" },
|
||||||
{ OPTION_HIDE_ROMLESS, "1", OPTION_BOOLEAN, "hide romless machine from available list" },
|
{ OPTION_HIDE_ROMLESS, "1", OPTION_BOOLEAN, "hide romless machine from available list" },
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#pragma once
|
#ifndef MAME_FRONTEND_UI_MOPTIONS_H
|
||||||
|
#define MAME_FRONTEND_UI_MOPTIONS_H
|
||||||
|
|
||||||
#ifndef __UI_OPTS_H__
|
#pragma once
|
||||||
#define __UI_OPTS_H__
|
|
||||||
|
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
|
||||||
@ -45,6 +45,7 @@
|
|||||||
#define OPTION_SKIP_BIOS_MENU "skip_biosmenu"
|
#define OPTION_SKIP_BIOS_MENU "skip_biosmenu"
|
||||||
#define OPTION_SKIP_PARTS_MENU "skip_partsmenu"
|
#define OPTION_SKIP_PARTS_MENU "skip_partsmenu"
|
||||||
#define OPTION_LAST_USED_FILTER "last_used_filter"
|
#define OPTION_LAST_USED_FILTER "last_used_filter"
|
||||||
|
#define OPTION_LAST_RIGHT_PANEL "last_right_panel"
|
||||||
#define OPTION_LAST_USED_MACHINE "last_used_machine"
|
#define OPTION_LAST_USED_MACHINE "last_used_machine"
|
||||||
#define OPTION_INFO_AUTO_AUDIT "info_audit_enabled"
|
#define OPTION_INFO_AUTO_AUDIT "info_audit_enabled"
|
||||||
#define OPTION_HIDE_ROMLESS "hide_romless"
|
#define OPTION_HIDE_ROMLESS "hide_romless"
|
||||||
@ -109,6 +110,7 @@ public:
|
|||||||
bool skip_parts_menu() const { return bool_value(OPTION_SKIP_PARTS_MENU); }
|
bool skip_parts_menu() const { return bool_value(OPTION_SKIP_PARTS_MENU); }
|
||||||
const char *last_used_machine() const { return value(OPTION_LAST_USED_MACHINE); }
|
const char *last_used_machine() const { return value(OPTION_LAST_USED_MACHINE); }
|
||||||
const char *last_used_filter() const { return value(OPTION_LAST_USED_FILTER); }
|
const char *last_used_filter() const { return value(OPTION_LAST_USED_FILTER); }
|
||||||
|
int last_right_panel() const { return int_value(OPTION_LAST_RIGHT_PANEL); }
|
||||||
bool info_audit() const { return bool_value(OPTION_INFO_AUTO_AUDIT); }
|
bool info_audit() const { return bool_value(OPTION_INFO_AUTO_AUDIT); }
|
||||||
bool hide_romless() const { return bool_value(OPTION_HIDE_ROMLESS); }
|
bool hide_romless() const { return bool_value(OPTION_HIDE_ROMLESS); }
|
||||||
|
|
||||||
@ -137,4 +139,4 @@ private:
|
|||||||
static const options_entry s_option_entries[];
|
static const options_entry s_option_entries[];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __UI_OPTS_H__ */
|
#endif // MAME_FRONTEND_UI_MOPTIONS_H
|
||||||
|
@ -74,6 +74,7 @@ menu_select_game::menu_select_game(mame_ui_manager &mui, render_container &conta
|
|||||||
if (first_start)
|
if (first_start)
|
||||||
{
|
{
|
||||||
reselect_last::set_driver(moptions.last_used_machine());
|
reselect_last::set_driver(moptions.last_used_machine());
|
||||||
|
ui_globals::rpanel = std::min<int>(std::max<int>(moptions.last_right_panel(), RP_FIRST), RP_LAST);
|
||||||
|
|
||||||
std::string tmp(moptions.last_used_filter());
|
std::string tmp(moptions.last_used_filter());
|
||||||
std::size_t const found = tmp.find_first_of(",");
|
std::size_t const found = tmp.find_first_of(",");
|
||||||
@ -153,6 +154,7 @@ menu_select_game::~menu_select_game()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui_options &mopt = ui().options();
|
ui_options &mopt = ui().options();
|
||||||
|
mopt.set_value(OPTION_LAST_RIGHT_PANEL, ui_globals::rpanel, OPTION_PRIORITY_CMDLINE);
|
||||||
mopt.set_value(OPTION_LAST_USED_FILTER, filter.c_str(), OPTION_PRIORITY_CMDLINE);
|
mopt.set_value(OPTION_LAST_USED_FILTER, filter.c_str(), OPTION_PRIORITY_CMDLINE);
|
||||||
mopt.set_value(OPTION_LAST_USED_MACHINE, last_driver.c_str(), OPTION_PRIORITY_CMDLINE);
|
mopt.set_value(OPTION_LAST_USED_MACHINE, last_driver.c_str(), OPTION_PRIORITY_CMDLINE);
|
||||||
mopt.set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE);
|
mopt.set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE);
|
||||||
|
@ -250,6 +250,8 @@ public:
|
|||||||
return PNGERR_UNSUPPORTED_FORMAT; // unknown colour sample format
|
return PNGERR_UNSUPPORTED_FORMAT; // unknown colour sample format
|
||||||
if ((0 != pnginfo.interlace_method) && (1 != pnginfo.interlace_method))
|
if ((0 != pnginfo.interlace_method) && (1 != pnginfo.interlace_method))
|
||||||
return PNGERR_UNSUPPORTED_FORMAT; // unknown interlace method
|
return PNGERR_UNSUPPORTED_FORMAT; // unknown interlace method
|
||||||
|
if (!pnginfo.bit_depth || (8 % pnginfo.bit_depth))
|
||||||
|
return PNGERR_UNSUPPORTED_FORMAT; // bit depth must be a factor of eight
|
||||||
|
|
||||||
// calculate the offset for each pass of the interlace on the input and output
|
// calculate the offset for each pass of the interlace on the input and output
|
||||||
unsigned const pass_count(get_pass_count());
|
unsigned const pass_count(get_pass_count());
|
||||||
|
Loading…
Reference in New Issue
Block a user