From 0bbcdde221c87abb2b85d0a481773454698cedbd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Aug 2021 21:32:58 +0200 Subject: [PATCH] Update core options --- libretro-common/include/libretro.h | 20 ++++++++ libretro_core_options.h | 75 ++++++++++++++++++++---------- 2 files changed, 70 insertions(+), 25 deletions(-) diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h index 076dd25..2c30120 100644 --- a/libretro-common/include/libretro.h +++ b/libretro-common/include/libretro.h @@ -3519,6 +3519,26 @@ struct retro_core_option_v2_definition * in the retro_core_option_value array, otherwise will be * ignored */ const char *default_value; + + /* Specify the type this option represents so the frontend + * can present the user an alternative input method besides + * a limited list of possible values. + * > If set to "int", all values need to be integers + * and a frontend with support for numerical input will + * allow input of any number betwen the lowest and + * highest defined value. + * > If set to "float", all values need to be numbers + * and a frontend with support for numerical input will + * allow input of any number betwen the lowest and + * highest defined value. + * > If set to "bool", there should be only two values + * "true" and "false" (label can be anything) + * The frontend can choose to show a checkbox for it. + * > If NULL or set to "enum", the frontend will show + * the list of values and input will be limited to them. + * Future versions of the specs could allow this for more + * types or to be "TYPE:MORE:OPTIONS" */ + const char *type_info; }; struct retro_core_options_v2 diff --git a/libretro_core_options.h b/libretro_core_options.h index 28d27c6..0009558 100644 --- a/libretro_core_options.h +++ b/libretro_core_options.h @@ -82,7 +82,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "Composite", NULL }, { NULL, NULL}, }, - "RGB" + "RGB", + NULL }, { "pce_nospritelimit", @@ -96,7 +97,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "enabled", NULL }, { NULL, NULL }, }, - "disabled" + "disabled", + "bool" }, { "pce_fast_frameskip", @@ -111,7 +113,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "manual", "Manual" }, { NULL, NULL }, }, - "disabled" + "disabled", + NULL }, { "pce_fast_frameskip_threshold", @@ -139,7 +142,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "60", NULL }, { NULL, NULL }, }, - "33" + "33", + "int" }, { "pce_hoverscan", @@ -178,7 +182,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "352", NULL }, { NULL, NULL }, }, - "352" + "352", + "int" }, { "pce_initial_scanline", @@ -231,7 +236,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "40", NULL }, { NULL, NULL }, }, - "3" + "3", + "int" }, { "pce_last_scanline", @@ -278,7 +284,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "242", NULL }, { NULL, NULL }, }, - "242" + "242", + "int" }, { "pce_mouse_sensitivity", @@ -310,7 +317,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "5.00", NULL }, { NULL, NULL }, }, - "1.25" + "1.25", + "float" }, { "pce_turbo_delay", @@ -337,7 +345,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "15", NULL }, { NULL, NULL }, }, - "3" + "3", + "int" }, { "pce_turbo_toggling", @@ -351,7 +360,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "enabled", NULL }, { NULL, NULL }, }, - "disabled" + "disabled", + "bool" }, { "pce_turbo_toggle_hotkey", @@ -365,7 +375,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "enabled", NULL }, { NULL, NULL }, }, - "disabled" + "disabled", + "bool" }, { "pce_sound_channel_0_volume", @@ -388,7 +399,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "100", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_sound_channel_1_volume", @@ -411,7 +423,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "100", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_sound_channel_2_volume", @@ -434,7 +447,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "100", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_sound_channel_3_volume", @@ -457,7 +471,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "100", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_sound_channel_4_volume", @@ -480,7 +495,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "100", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_sound_channel_5_volume", @@ -503,7 +519,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "100", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_fast_cdimagecache", @@ -517,7 +534,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "enabled", NULL }, { NULL, NULL }, }, - "disabled" + "disabled", + "bool" }, { "pce_fast_cdbios", @@ -535,7 +553,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "System Card 3 US", NULL }, { NULL, NULL }, }, - "System Card 3" + "System Card 3", + NULL }, { "pce_ocmultiplier", @@ -561,7 +580,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "50", NULL }, { NULL, NULL }, }, - "1" + "1", + "int" }, { "pce_disable_softreset", @@ -575,7 +595,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "enabled", NULL }, { NULL, NULL }, }, - "disabled" + "disabled", + "bool" }, { "pce_cdspeed", @@ -591,7 +612,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "8", NULL }, { NULL, NULL }, }, - "1" + "1", + "int" }, { "pce_cddavolume", @@ -624,7 +646,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "200", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_adpcmvolume", @@ -657,7 +680,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "200", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { "pce_cdpsgvolume", @@ -690,7 +714,8 @@ struct retro_core_option_v2_definition option_defs_us[] = { { "200", NULL }, { NULL, NULL }, }, - "100" + "100", + "int" }, { NULL, NULL, NULL, NULL, NULL, NULL, {{0}}, NULL },