Skip to content

Commit

Permalink
add mode_tile_2x2 for advmenu
Browse files Browse the repository at this point in the history
add none key value for advmame
  • Loading branch information
trngaje committed Aug 4, 2023
1 parent 7efb251 commit 220b048
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 7 deletions.
4 changes: 2 additions & 2 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29.1)
dnl serial 11 (pkg-config-0.29)
dnl
dnl Copyright © 2004 Scott James Remnant <[email protected]>.
dnl Copyright © 2012-2015 Dan Nicholson <[email protected]>
Expand Down Expand Up @@ -55,7 +55,7 @@ dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.1])
[m4_define([PKG_MACROS_VERSION], [0.29])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
Expand Down
3 changes: 2 additions & 1 deletion advance/menu/mconfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ static adv_conf_enum_int OPTION_MODE[] = {
{ "full_mixed", mode_full_mixed },
{ "tile_icon", mode_tile_icon },
{ "tile_marquee", mode_tile_marquee },
{ "text", mode_text }
{ "text", mode_text },
{ "tile_2x2", mode_tile_2x2 }
};

static adv_conf_enum_int OPTION_PREVIEW[] = {
Expand Down
3 changes: 2 additions & 1 deletion advance/menu/mconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ enum listmode_t {
mode_tile_icon = 512,
mode_tile_marquee = 1024,
mode_list_mixed = 2048,
mode_text = 4096
mode_text = 4096,
mode_tile_2x2 = 8192
};

/// Type of image to display.
Expand Down
15 changes: 13 additions & 2 deletions advance/menu/menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,11 @@ static int run_menu_user(config_state& rs, bool flipxy, menu_array& gc, sort_ite
rown = 2;
name_dy = int_font_dy_get(text);
break;
case mode_tile_2x2:
coln = 2;
rown = 2;
name_dy = int_font_dy_get(text);
break;
}
} else {
switch (rs.mode_get()) {
Expand Down Expand Up @@ -1256,6 +1261,11 @@ static int run_menu_user(config_state& rs, bool flipxy, menu_array& gc, sort_ite
rown = 3;
name_dy = int_font_dy_get(text);
break;
case mode_tile_2x2:
coln = 2;
rown = 2;
name_dy = int_font_dy_get(text);
break;
}
}

Expand Down Expand Up @@ -2361,7 +2371,7 @@ int run_menu(config_state& rs, bool flipxy, bool silent)
empty_msg = "";

rs.mode_mask = ~rs.mode_skip_mask & (mode_full | mode_full_mixed
| mode_text | mode_list | mode_list_mixed | mode_tile_tiny | mode_tile_small
| mode_text | mode_list | mode_list_mixed | mode_tile_tiny | mode_tile_2x2 | mode_tile_small
| mode_tile_normal | mode_tile_big | mode_tile_enormous
| mode_tile_giant | mode_tile_icon | mode_tile_marquee);

Expand Down Expand Up @@ -2401,7 +2411,8 @@ int run_menu(config_state& rs, bool flipxy, bool silent)
case mode_full_mixed: rs.mode_set(mode_text); break;
case mode_text: rs.mode_set(mode_list); break;
case mode_list: rs.mode_set(mode_list_mixed); break;
case mode_list_mixed: rs.mode_set(mode_tile_tiny); break;
case mode_list_mixed: rs.mode_set(mode_tile_2x2); break;
case mode_tile_2x2: rs.mode_set(mode_tile_tiny); break;
case mode_tile_tiny: rs.mode_set(mode_tile_small); break;
case mode_tile_small: rs.mode_set(mode_tile_normal); break;
case mode_tile_normal: rs.mode_set(mode_tile_big); break;
Expand Down
2 changes: 1 addition & 1 deletion advance/menu/mm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include <iostream>

#if defined(USE_SDL)
#if defined(USE_VIDEO_SDL) || defined(USE_KEYBOARD_SDL) || defined(USE_MOUSE_SDL) || defined(USE_JOYSTICK_SDL) || defined(USE_SOUND_SDL) || defined(USE_INPUT_SDL)
#include <SDL.h>
#endif

Expand Down
1 change: 1 addition & 0 deletions advance/menu/submenu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ int run_mode(config_state& rs)
ch.insert(ch.end(), choice("Text", mode_text));
ch.insert(ch.end(), choice("List", mode_list));
ch.insert(ch.end(), choice("List Mixed", mode_list_mixed));
ch.insert(ch.end(), choice("Tile 2x2", mode_tile_2x2));
ch.insert(ch.end(), choice("Tile Tiny", mode_tile_tiny));
ch.insert(ch.end(), choice("Tile Small", mode_tile_small));
ch.insert(ch.end(), choice("Tile Normal", mode_tile_normal));
Expand Down
13 changes: 13 additions & 0 deletions advance/osd/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,19 @@ adv_error advance_input_parse_digital(unsigned* seq_map, unsigned seq_max, char*
return 0;
}

if (first && strcmp(t, "none") == 0) {
sskip(&p, s, " \t");

if (s[p] || c == '[') {
error_set("Wrong use of 'none'");
return -1;
}

seq_map[0] = DIGITAL_SPECIAL_NONE;

return 0;
}

if (strcmp(t, "keyboard") == 0) {
int board;
int key;
Expand Down

0 comments on commit 220b048

Please sign in to comment.