CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/libretro/libretro_core_options.h
Views: 1401
#ifndef LIBRETRO_CORE_OPTIONS_H__1#define LIBRETRO_CORE_OPTIONS_H__23#include <stdlib.h>4#include <string.h>56#include "libretro.h"7#include "retro_inline.h"89#ifndef HAVE_NO_LANGEXTRA10#include "libretro_core_options_intl.h"11#endif1213#define BOOL_OPTIONS \14{ \15{ "disabled", NULL }, \16{ "enabled", NULL }, \17{ NULL, NULL }, \18}1920#define MAC_ADDRESS_OPTIONS \21{ \22{ "0", NULL }, \23{ "1", NULL }, \24{ "2", NULL }, \25{ "3", NULL }, \26{ "4", NULL }, \27{ "5", NULL }, \28{ "6", NULL }, \29{ "7", NULL }, \30{ "8", NULL }, \31{ "9", NULL }, \32{ "a", NULL }, \33{ "b", NULL }, \34{ "c", NULL }, \35{ "d", NULL }, \36{ "e", NULL }, \37{ "f", NULL }, \38{ NULL, NULL }, \39}4041#define IP_ADDRESS_OPTIONS \42{ \43{ "0", NULL }, \44{ "1", NULL }, \45{ "2", NULL }, \46{ "3", NULL }, \47{ "4", NULL }, \48{ "5", NULL }, \49{ "6", NULL }, \50{ "7", NULL }, \51{ "8", NULL }, \52{ "9", NULL }, \53{ NULL, NULL }, \54}5556/*57********************************58* VERSION: 2.059********************************60*61* - 2.0: Add support for core options v2 interface62* - 1.3: Move translations to libretro_core_options_intl.h63* - libretro_core_options_intl.h includes BOM and utf-864* fix for MSVC 2010-201365* - Added HAVE_NO_LANGEXTRA flag to disable translations66* on platforms/compilers without BOM support67* - 1.2: Use core options v1 interface when68* RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION is >= 169* (previously required RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION == 1)70* - 1.1: Support generation of core options v0 retro_core_option_value71* arrays containing options with a single value72* - 1.0: First commit73*/7475#ifdef __cplusplus76extern "C" {77#endif7879/*80********************************81* Core Option Definitions82********************************83*/8485/* RETRO_LANGUAGE_ENGLISH */8687/* Default language:88* - All other languages must include the same keys and values89* - Will be used as a fallback in the event that frontend language90* is not available91* - Will be used as a fallback for any missing entries in92* frontend language definition */9394struct retro_core_option_v2_category option_cats_us[] = {95{96"system",97"System",98"Configure system options."99},100{101"video",102"Video",103"Configure video options."104},105{106"input",107"Input",108"Configure input options."109},110{111"hacks",112"Hacks",113"Configure speed and emulation hacks. Can cause rendering errors!"114},115{116"network",117"Network",118"Configure network options."119},120{ NULL, NULL, NULL },121};122123struct retro_core_option_v2_definition option_defs_us[] = {124{125"ppsspp_cpu_core",126"CPU Core",127NULL,128NULL,129NULL,130"system",131{132{ "JIT", "Dynarec (JIT)" },133{ "IR JIT", "IR Interpreter" },134{ "Interpreter", NULL },135{ NULL, NULL },136},137"JIT"138},139{140"ppsspp_fast_memory",141"Fast Memory",142NULL,143"Unstable.",144NULL,145"system",146BOOL_OPTIONS,147"enabled"148},149{150"ppsspp_ignore_bad_memory_access",151"Ignore Bad Memory Accesses",152NULL,153NULL,154NULL,155"system",156BOOL_OPTIONS,157"enabled"158},159{160"ppsspp_io_timing_method",161"I/O Timing Method",162NULL,163NULL,164NULL,165"system",166{167{ "Fast", NULL },168{ "Host", NULL },169{ "Simulate UMD delays", NULL },170{ NULL, NULL },171},172"Fast"173},174{175"ppsspp_force_lag_sync",176"Force Real Clock Sync",177NULL,178"Slower, less lag.",179NULL,180"system",181BOOL_OPTIONS,182"disabled"183},184{185"ppsspp_locked_cpu_speed",186"Locked CPU Speed",187NULL,188NULL,189NULL,190"system",191{192{ "disabled", NULL },193{ "222MHz", NULL },194{ "266MHz", NULL },195{ "333MHz", NULL },196{ "444MHz", NULL },197{ "555MHz", NULL },198{ "666MHz", NULL },199{ "777MHz", NULL },200{ "888MHz", NULL },201{ "999MHz", NULL },202{ NULL, NULL },203},204"disabled"205},206{207"ppsspp_memstick_inserted",208"Memory Stick Inserted",209NULL,210"Some games require ejecting/inserting the Memory Stick.",211NULL,212"system",213BOOL_OPTIONS,214"enabled"215},216{217"ppsspp_cache_iso",218"Cache Full ISO in RAM",219NULL,220NULL,221NULL,222"system",223BOOL_OPTIONS,224"disabled"225},226{227"ppsspp_cheats",228"Internal Cheats Support",229NULL,230NULL,231NULL,232"system",233BOOL_OPTIONS,234"disabled"235},236{237"ppsspp_language",238"Game Language",239NULL,240"'Automatic' will use the frontend language.",241NULL,242"system",243{244{ "Automatic", NULL },245{ "English", NULL },246{ "Japanese", NULL },247{ "French", NULL },248{ "Spanish", NULL },249{ "German", NULL },250{ "Italian", NULL },251{ "Dutch", NULL },252{ "Portuguese", NULL },253{ "Russian", NULL },254{ "Korean", NULL },255{ "Chinese Traditional", NULL },256{ "Chinese Simplified", NULL },257{ NULL, NULL },258},259"Automatic"260},261{262"ppsspp_psp_model",263"PSP Model",264NULL,265NULL,266NULL,267"system",268{269{ "psp_1000", "PSP-1000" },270{ "psp_2000_3000", "PSP-2000/3000" },271{ NULL, NULL },272},273"psp_2000_3000"274},275{276"ppsspp_backend",277"Backend",278NULL,279"'Automatic' will use the frontend video driver. Core restart required.",280NULL,281"video",282{283{ "auto", "Automatic" },284{ "opengl", "OpenGL" },285#ifndef HAVE_LIBNX286{ "vulkan", "Vulkan" },287#endif288#ifdef _WIN32289{ "d3d11", "D3D11" },290#endif291{ "none", "None" },292{ NULL, NULL },293},294"auto"295},296{297"ppsspp_software_rendering",298"Software Rendering",299NULL,300"Slow, accurate. Core restart required.",301NULL,302"video",303BOOL_OPTIONS,304"disabled"305},306{307"ppsspp_internal_resolution",308"Rendering Resolution",309NULL,310"Core restart required with Vulkan.",311NULL,312"video",313{314{ "480x272", "1x (480x272)" },315{ "960x544", "2x (960x544)" },316{ "1440x816", "3x (1440x816)" },317{ "1920x1088", "4x (1920x1088)" },318{ "2400x1360", "5x (2400x1360)" },319{ "2880x1632", "6x (2880x1632)" },320{ "3360x1904", "7x (3360x1904)" },321{ "3840x2176", "8x (3840x2176)" },322{ "4320x2448", "9x (4320x2448)" },323{ "4800x2720", "10x (4800x2720)" },324{ NULL, NULL },325},326"480x272"327},328#if 0 // see issue #16786329{330"ppsspp_mulitsample_level",331"MSAA Antialiasing (Vulkan Only)",332NULL,333NULL,334NULL,335"video",336{337{"Disabled", NULL},338{"x2", NULL},339{"x4", NULL},340{"x8", NULL},341{NULL, NULL}342},343"Disabled"344},345#endif346{347"ppsspp_cropto16x9",348"Crop to 16x9",349NULL,350"Remove one line from top and bottom to get exact 16:9. Core restart required with Vulkan.",351NULL,352"video",353BOOL_OPTIONS,354"enabled"355},356{357"ppsspp_frameskip",358"Frameskip",359NULL,360NULL,361NULL,362"video",363{364{ "disabled", NULL },365{ "1", NULL },366{ "2", NULL },367{ "3", NULL },368{ "4", NULL },369{ "5", NULL },370{ "6", NULL },371{ "7", NULL },372{ "8", NULL },373{ NULL, NULL },374},375"disabled"376},377{378"ppsspp_frameskiptype",379"Frameskip Type",380NULL,381NULL,382NULL,383"video",384{385{ "Number of frames", NULL },386{ "Percent of FPS", NULL },387{ NULL, NULL },388},389"Number of frames"390},391{392"ppsspp_auto_frameskip",393"Auto Frameskip",394NULL,395NULL,396NULL,397"video",398BOOL_OPTIONS,399"disabled"400},401{402"ppsspp_frame_duplication",403"Render Duplicate Frames to 60 Hz",404NULL,405"Can make framerate smoother in games that run at lower framerates.",406NULL,407"video",408BOOL_OPTIONS,409"enabled"410},411{412"ppsspp_detect_vsync_swap_interval",413"Detect Frame Rate Changes",414NULL,415"Notify frontend.",416NULL,417"video",418BOOL_OPTIONS,419"disabled"420},421{422"ppsspp_inflight_frames",423"Buffer Graphics Commands",424NULL,425"GL/Vulkan only, slower, less lag, restart.",426NULL,427"video",428{429{ "No buffer", NULL },430{ "Up to 1", NULL },431{ "Up to 2", NULL },432{ NULL, NULL },433},434"Up to 2"435},436{437"ppsspp_button_preference",438"Confirmation Button",439NULL,440NULL,441NULL,442"input",443{444{ "Cross", NULL },445{ "Circle", NULL },446{ NULL, NULL },447},448"Cross"449},450{451"ppsspp_analog_is_circular",452"Analog Circle vs Square Gate Compensation",453NULL,454NULL,455NULL,456"input",457BOOL_OPTIONS,458"disabled"459},460{461"ppsspp_skip_buffer_effects",462"Skip Buffer Effects",463NULL,464"Faster, but nothing may draw in some games.",465NULL,466"hacks",467BOOL_OPTIONS,468"disabled"469},470{471"ppsspp_disable_range_culling",472"Disable Culling",473NULL,474"",475NULL,476"hacks",477BOOL_OPTIONS,478"disabled"479},480{481"ppsspp_skip_gpu_readbacks",482"Skip GPU Readbacks",483NULL,484"Some games require GPU readbacks, so be careful.",485NULL,486"hacks",487BOOL_OPTIONS,488"disabled"489},490{491"ppsspp_lazy_texture_caching",492"Lazy Texture Caching (Speedup)",493NULL,494"Faster, but can cause text problems in a few games.",495NULL,496"hacks",497BOOL_OPTIONS,498"disabled"499},500{501"ppsspp_spline_quality",502"Spline/Bezier Curves Quality",503NULL,504"Only used by some games, controls smoothness of curves.",505NULL,506"hacks",507{508{ "Low", NULL },509{ "Medium", NULL },510{ "High", NULL },511{ NULL, NULL },512},513"High"514},515{516"ppsspp_lower_resolution_for_effects",517"Lower Resolution for Effects",518NULL,519"Reduces artifacts.",520NULL,521"hacks",522{523{ "disabled", NULL },524{ "Safe", NULL },525{ "Balanced", NULL },526{ "Aggressive", NULL },527{ NULL, NULL },528},529"disabled"530},531{532"ppsspp_gpu_hardware_transform",533"Hardware Transform",534NULL,535NULL,536NULL,537"video",538BOOL_OPTIONS,539"enabled"540},541{542"ppsspp_software_skinning",543"Software Skinning",544NULL,545"Combine skinned model draws on the CPU, faster in most games.",546NULL,547"video",548BOOL_OPTIONS,549"enabled"550},551{552"ppsspp_hardware_tesselation",553"Hardware Tesselation",554NULL,555"Uses hardware to make curves.",556NULL,557"video",558BOOL_OPTIONS,559"disabled"560},561{562"ppsspp_vertex_cache",563"Vertex Cache",564NULL,565"Faster, but may cause temporary flicker.",566NULL,567"video",568BOOL_OPTIONS,569"disabled"570},571{572"ppsspp_texture_scaling_type",573"Texture Upscale Type",574NULL,575NULL,576NULL,577"video",578{579{ "xbrz", "xBRZ" },580{ "hybrid", "Hybrid" },581{ "bicubic", "Bicubic" },582{ "hybrid_bicubic", "Hybrid + Bicubic" },583{ NULL, NULL },584},585"xbrz"586},587{588"ppsspp_texture_scaling_level",589"Texture Upscaling Level",590NULL,591"CPU heavy, some scaling may be delayed to avoid stutter.",592NULL,593"video",594{595{ "disabled", NULL },596{ "2x", NULL },597{ "3x", NULL },598{ "4x", NULL },599{ "5x", NULL },600{ NULL, NULL },601},602"disabled"603},604{605"ppsspp_texture_deposterize",606"Texture Deposterize",607NULL,608"Fixes visual banding glitches in upscaled textures.",609NULL,610"video",611BOOL_OPTIONS,612"disabled"613},614{615"ppsspp_texture_shader",616"Texture Shader",617NULL,618"Vulkan only, overrides 'Texture Scaling Type'.",619NULL,620"video",621{622{ "disabled", NULL },623{ "2xBRZ", "Tex2xBRZ" },624{ "4xBRZ", "Tex4xBRZ" },625{ "MMPX", "TexMMPX" },626{ NULL, NULL },627},628"disabled"629},630{631"ppsspp_texture_anisotropic_filtering",632"Anisotropic Filtering",633NULL,634NULL,635NULL,636"video",637{638{ "disabled", NULL },639{ "2x", NULL },640{ "4x", NULL },641{ "8x", NULL },642{ "16x", NULL },643{ NULL, NULL },644},645"16x"646},647{648"ppsspp_texture_filtering",649"Texture Filtering",650NULL,651NULL,652NULL,653"video",654{655{ "Auto", NULL },656{ "Nearest", NULL },657{ "Linear", NULL },658{ "Auto max quality", NULL },659{ NULL, NULL },660},661"Auto"662},663{664"ppsspp_smart_2d_texture_filtering",665"Smart 2D Texture Filtering",666NULL,667"Gets rid of some visual artifacts caused by unnecessary texture filtering in some 2D games, by switching to nearest filtering.",668NULL,669"video",670BOOL_OPTIONS,671"disabled"672},673{674"ppsspp_texture_replacement",675"Texture Replacement",676NULL,677NULL,678NULL,679"video",680BOOL_OPTIONS,681"disabled"682},683{684"ppsspp_enable_wlan",685"Enable Networking/WLAN (Beta, may break games)",686NULL,687NULL,688NULL,689"network",690BOOL_OPTIONS,691"disabled"692},693{694"ppsspp_change_mac_address01",695"MAC Address Pt 1: X-:--:--:--:--:--",696NULL,697NULL,698NULL,699"network",700MAC_ADDRESS_OPTIONS,701"0"702},703{704"ppsspp_change_mac_address02",705"MAC Address Pt 2: -X:--:--:--:--:--",706NULL,707NULL,708NULL,709"network",710MAC_ADDRESS_OPTIONS,711"0"712},713{714"ppsspp_change_mac_address03",715"MAC Address Pt 3: --:X-:--:--:--:--",716NULL,717NULL,718NULL,719"network",720MAC_ADDRESS_OPTIONS,721"0"722},723{724"ppsspp_change_mac_address04",725"MAC Address Pt 4: --:-X:--:--:--:--",726NULL,727NULL,728NULL,729"network",730MAC_ADDRESS_OPTIONS,731"0"732},733{734"ppsspp_change_mac_address05",735"MAC Address Pt 5: --:--:X-:--:--:--",736NULL,737NULL,738NULL,739"network",740MAC_ADDRESS_OPTIONS,741"0"742},743{744"ppsspp_change_mac_address06",745"MAC Address Pt 6: --:--:-X:--:--:--",746NULL,747NULL,748NULL,749"network",750MAC_ADDRESS_OPTIONS,751"0"752},753{754"ppsspp_change_mac_address07",755"MAC Address Pt 7: --:--:--:X-:--:--",756NULL,757NULL,758NULL,759"network",760MAC_ADDRESS_OPTIONS,761"0"762},763{764"ppsspp_change_mac_address08",765"MAC Address Pt 8: --:--:--:-X:--:--",766NULL,767NULL,768NULL,769"network",770MAC_ADDRESS_OPTIONS,771"0"772},773{774"ppsspp_change_mac_address09",775"MAC Address Pt 9: --:--:--:--:X-:--",776NULL,777NULL,778NULL,779"network",780MAC_ADDRESS_OPTIONS,781"0"782},783{784"ppsspp_change_mac_address10",785"MAC Address Pt 10: --:--:--:--:-X:--",786NULL,787NULL,788NULL,789"network",790MAC_ADDRESS_OPTIONS,791"0"792},793{794"ppsspp_change_mac_address11",795"MAC Address Pt 11: --:--:--:--:--:X-",796NULL,797NULL,798NULL,799"network",800MAC_ADDRESS_OPTIONS,801"0"802},803{804"ppsspp_change_mac_address12",805"MAC Address Pt 12: --:--:--:--:--:-X",806NULL,807NULL,808NULL,809"network",810MAC_ADDRESS_OPTIONS,811"0"812},813{814"ppsspp_wlan_channel",815"WLAN Channel",816NULL,817NULL,818NULL,819"network",820{821{ "Auto", NULL },822{ "1", NULL },823{ "6", NULL },824{ "11", NULL },825{ NULL, NULL },826},827"Auto"828},829{830"ppsspp_enable_builtin_pro_ad_hoc_server",831"Enable Built-in PRO Ad Hoc Server",832NULL,833NULL,834NULL,835"network",836BOOL_OPTIONS,837"disabled"838},839{840"ppsspp_change_pro_ad_hoc_server_address",841"Change PRO Ad Hoc Server IP Address ('localhost' = multiple instances)",842NULL,843NULL,844NULL,845"network",846{847{ "socom.cc", NULL },848{ "psp.gameplayer.club", NULL },849{ "myneighborsushicat.com", NULL },850{ "localhost", NULL },851{ "IP address", NULL },852{ NULL, NULL },853},854"socom.cc"855},856{857"ppsspp_pro_ad_hoc_server_address01",858"PRO Ad Hoc Server IP Address Pt 1: x--.---.---.---",859NULL,860NULL,861NULL,862"network",863IP_ADDRESS_OPTIONS,864"0"865},866{867"ppsspp_pro_ad_hoc_server_address02",868"PRO Ad Hoc Server IP Address Pt 2: -x-.---.---.---",869NULL,870NULL,871NULL,872"network",873IP_ADDRESS_OPTIONS,874"0"875},876{877"ppsspp_pro_ad_hoc_server_address03",878"PRO Ad Hoc Server IP Address Pt 3: --x.---.---.---",879NULL,880NULL,881NULL,882"network",883IP_ADDRESS_OPTIONS,884"0"885},886{887"ppsspp_pro_ad_hoc_server_address04",888"PRO Ad Hoc Server IP Address Pt 4: ---.x--.---.---",889NULL,890NULL,891NULL,892"network",893IP_ADDRESS_OPTIONS,894"0"895},896{897"ppsspp_pro_ad_hoc_server_address05",898"PRO Ad Hoc Server IP Address Pt 5: ---.-x-.---.---",899NULL,900NULL,901NULL,902"network",903IP_ADDRESS_OPTIONS,904"0"905},906{907"ppsspp_pro_ad_hoc_server_address06",908"PRO Ad Hoc Server IP Address Pt 6: ---.--x.---.---",909NULL,910NULL,911NULL,912"network",913IP_ADDRESS_OPTIONS,914"0"915},916{917"ppsspp_pro_ad_hoc_server_address07",918"PRO Ad Hoc Server IP Address Pt 7: ---.---.x--.---",919NULL,920NULL,921NULL,922"network",923IP_ADDRESS_OPTIONS,924"0"925},926{927"ppsspp_pro_ad_hoc_server_address08",928"PRO Ad Hoc Server IP Address Pt 8: ---.---.-x-.---",929NULL,930NULL,931NULL,932"network",933IP_ADDRESS_OPTIONS,934"0"935},936{937"ppsspp_pro_ad_hoc_server_address09",938"PRO Ad Hoc Server IP Address Pt 9: ---.---.--x.---",939NULL,940NULL,941NULL,942"network",943IP_ADDRESS_OPTIONS,944"0"945},946{947"ppsspp_pro_ad_hoc_server_address10",948"PRO Ad Hoc Server IP Address Pt 10: ---.---.---.x--",949NULL,950NULL,951NULL,952"network",953IP_ADDRESS_OPTIONS,954"0"955},956{957"ppsspp_pro_ad_hoc_server_address11",958"PRO Ad Hoc Server IP Address Pt 11: ---.---.---.-x-",959NULL,960NULL,961NULL,962"network",963IP_ADDRESS_OPTIONS,964"0"965},966{967"ppsspp_pro_ad_hoc_server_address12",968"PRO Ad Hoc Server IP Address Pt 12: ---.---.---.--x",969NULL,970NULL,971NULL,972"network",973IP_ADDRESS_OPTIONS,974"0"975},976{977"ppsspp_enable_upnp",978"Enable UPnP (Need a few seconds to detect)",979NULL,980NULL,981NULL,982"network",983BOOL_OPTIONS,984"disabled"985},986{987"ppsspp_upnp_use_original_port",988"UPnP Use Original Port ('ON' = PSP compatibility)",989NULL,990NULL,991NULL,992"network",993BOOL_OPTIONS,994"enabled"995},996{997"ppsspp_port_offset",998"Port Offset ('0' = PSP compatibility)",999NULL,1000NULL,1001NULL,1002"network",1003{1004{ "0", NULL },1005{ "1000", NULL },1006{ "2000", NULL },1007{ "3000", NULL },1008{ "4000", NULL },1009{ "5000", NULL },1010{ "6000", NULL },1011{ "7000", NULL },1012{ "8000", NULL },1013{ "9000", NULL },1014{ "10000", NULL },1015{ "11000", NULL },1016{ "12000", NULL },1017{ "13000", NULL },1018{ "14000", NULL },1019{ "15000", NULL },1020{ "16000", NULL },1021{ "17000", NULL },1022{ "18000", NULL },1023{ "19000", NULL },1024{ "20000", NULL },1025{ "31000", NULL },1026{ "32000", NULL },1027{ "33000", NULL },1028{ "34000", NULL },1029{ "35000", NULL },1030{ "36000", NULL },1031{ "37000", NULL },1032{ "38000", NULL },1033{ "39000", NULL },1034{ "40000", NULL },1035{ "41000", NULL },1036{ "42000", NULL },1037{ "43000", NULL },1038{ "44000", NULL },1039{ "45000", NULL },1040{ "46000", NULL },1041{ "47000", NULL },1042{ "48000", NULL },1043{ "49000", NULL },1044{ "50000", NULL },1045{ "51000", NULL },1046{ "52000", NULL },1047{ "53000", NULL },1048{ "54000", NULL },1049{ "55000", NULL },1050{ "56000", NULL },1051{ "57000", NULL },1052{ "58000", NULL },1053{ "59000", NULL },1054{ "60000", NULL },1055{ "61000", NULL },1056{ "62000", NULL },1057{ "63000", NULL },1058{ "64000", NULL },1059{ "65000", NULL },1060{ NULL, NULL },1061},1062"0"1063},1064{1065"ppsspp_minimum_timeout",1066"Minimum Timeout (Override in ms, '0' = default)",1067NULL,1068NULL,1069NULL,1070"network",1071{1072{ "0", NULL },1073{ "100", NULL },1074{ "200", NULL },1075{ "300", NULL },1076{ "400", NULL },1077{ "500", NULL },1078{ "600", NULL },1079{ "700", NULL },1080{ "800", NULL },1081{ "900", NULL },1082{ "1000", NULL },1083{ "1100", NULL },1084{ "1200", NULL },1085{ "1300", NULL },1086{ "1400", NULL },1087{ "1500", NULL },1088{ "1600", NULL },1089{ "1700", NULL },1090{ "1800", NULL },1091{ "1900", NULL },1092{ "2000", NULL },1093{ "3100", NULL },1094{ "3200", NULL },1095{ "3300", NULL },1096{ "3400", NULL },1097{ "3500", NULL },1098{ "3600", NULL },1099{ "3700", NULL },1100{ "3800", NULL },1101{ "3900", NULL },1102{ "4000", NULL },1103{ "4100", NULL },1104{ "4200", NULL },1105{ "4300", NULL },1106{ "4400", NULL },1107{ "4500", NULL },1108{ "4600", NULL },1109{ "4700", NULL },1110{ "4800", NULL },1111{ "4900", NULL },1112{ "5000", NULL },1113{ NULL, NULL },1114},1115"0"1116},1117{1118"ppsspp_forced_first_connect",1119"Forced First Connect (Faster connect)",1120NULL,1121NULL,1122NULL,1123"network",1124BOOL_OPTIONS,1125"disabled"1126},1127{ NULL, NULL, NULL, NULL, NULL, NULL, {{0}}, NULL },1128};11291130struct retro_core_options_v2 options_us = {1131option_cats_us,1132option_defs_us1133};11341135/*1136********************************1137* Language Mapping1138********************************1139*/11401141#ifndef HAVE_NO_LANGEXTRA1142struct retro_core_options_v2 *options_intl[RETRO_LANGUAGE_LAST] = {1143&options_us, /* RETRO_LANGUAGE_ENGLISH */1144NULL, /* RETRO_LANGUAGE_JAPANESE */1145NULL, /* RETRO_LANGUAGE_FRENCH */1146NULL, /* RETRO_LANGUAGE_SPANISH */1147NULL, /* RETRO_LANGUAGE_GERMAN */1148NULL, /* RETRO_LANGUAGE_ITALIAN */1149NULL, /* RETRO_LANGUAGE_DUTCH */1150NULL, /* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */1151NULL, /* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */1152NULL, /* RETRO_LANGUAGE_RUSSIAN */1153NULL, /* RETRO_LANGUAGE_KOREAN */1154NULL, /* RETRO_LANGUAGE_CHINESE_TRADITIONAL */1155NULL, /* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */1156NULL, /* RETRO_LANGUAGE_ESPERANTO */1157NULL, /* RETRO_LANGUAGE_POLISH */1158NULL, /* RETRO_LANGUAGE_VIETNAMESE */1159NULL, /* RETRO_LANGUAGE_ARABIC */1160NULL, /* RETRO_LANGUAGE_GREEK */1161NULL, /* RETRO_LANGUAGE_TURKISH */1162NULL, /* RETRO_LANGUAGE_SLOVAK */1163NULL, /* RETRO_LANGUAGE_PERSIAN */1164NULL, /* RETRO_LANGUAGE_HEBREW */1165NULL, /* RETRO_LANGUAGE_ASTURIAN */1166NULL, /* RETRO_LANGUAGE_FINNISH */1167NULL, /* RETRO_LANGUAGE_INDONESIAN */1168NULL, /* RETRO_LANGUAGE_SWEDISH */1169NULL, /* RETRO_LANGUAGE_UKRAINIAN */1170NULL, /* RETRO_LANGUAGE_CZECH */1171};1172#endif11731174/*1175********************************1176* Functions1177********************************1178*/11791180/* Handles configuration/setting of core options.1181* Should be called as early as possible - ideally inside1182* retro_set_environment(), and no later than retro_load_game()1183* > We place the function body in the header to avoid the1184* necessity of adding more .c files (i.e. want this to1185* be as painless as possible for core devs)1186*/11871188static INLINE void libretro_set_core_options(retro_environment_t environ_cb,1189bool *categories_supported)1190{1191unsigned version = 0;1192#ifndef HAVE_NO_LANGEXTRA1193unsigned language = 0;1194#endif11951196if (!environ_cb || !categories_supported)1197return;11981199*categories_supported = false;12001201if (!environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version))1202version = 0;12031204if (version >= 2)1205{1206#ifndef HAVE_NO_LANGEXTRA1207struct retro_core_options_v2_intl core_options_intl;12081209core_options_intl.us = &options_us;1210core_options_intl.local = NULL;12111212if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&1213(language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH))1214core_options_intl.local = options_intl[language];12151216*categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL,1217&core_options_intl);1218#else1219*categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2,1220&options_us);1221#endif1222}1223else1224{1225size_t i, j;1226size_t option_index = 0;1227size_t num_options = 0;1228struct retro_core_option_definition1229*option_v1_defs_us = NULL;1230#ifndef HAVE_NO_LANGEXTRA1231size_t num_options_intl = 0;1232struct retro_core_option_v2_definition1233*option_defs_intl = NULL;1234struct retro_core_option_definition1235*option_v1_defs_intl = NULL;1236struct retro_core_options_intl1237core_options_v1_intl;1238#endif1239struct retro_variable *variables = NULL;1240char **values_buf = NULL;12411242/* Determine total number of options */1243while (true)1244{1245if (option_defs_us[num_options].key)1246num_options++;1247else1248break;1249}12501251if (version >= 1)1252{1253/* Allocate US array */1254option_v1_defs_us = (struct retro_core_option_definition *)1255calloc(num_options + 1, sizeof(struct retro_core_option_definition));12561257/* Copy parameters from option_defs_us array */1258for (i = 0; i < num_options; i++)1259{1260struct retro_core_option_v2_definition *option_def_us = &option_defs_us[i];1261struct retro_core_option_value *option_values = option_def_us->values;1262struct retro_core_option_definition *option_v1_def_us = &option_v1_defs_us[i];1263struct retro_core_option_value *option_v1_values = option_v1_def_us->values;12641265option_v1_def_us->key = option_def_us->key;1266option_v1_def_us->desc = option_def_us->desc;1267option_v1_def_us->info = option_def_us->info;1268option_v1_def_us->default_value = option_def_us->default_value;12691270/* Values must be copied individually... */1271while (option_values->value)1272{1273option_v1_values->value = option_values->value;1274option_v1_values->label = option_values->label;12751276option_values++;1277option_v1_values++;1278}1279}12801281#ifndef HAVE_NO_LANGEXTRA1282if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&1283(language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH) &&1284options_intl[language])1285option_defs_intl = options_intl[language]->definitions;12861287if (option_defs_intl)1288{1289/* Determine number of intl options */1290while (true)1291{1292if (option_defs_intl[num_options_intl].key)1293num_options_intl++;1294else1295break;1296}12971298/* Allocate intl array */1299option_v1_defs_intl = (struct retro_core_option_definition *)1300calloc(num_options_intl + 1, sizeof(struct retro_core_option_definition));13011302/* Copy parameters from option_defs_intl array */1303for (i = 0; i < num_options_intl; i++)1304{1305struct retro_core_option_v2_definition *option_def_intl = &option_defs_intl[i];1306struct retro_core_option_value *option_values = option_def_intl->values;1307struct retro_core_option_definition *option_v1_def_intl = &option_v1_defs_intl[i];1308struct retro_core_option_value *option_v1_values = option_v1_def_intl->values;13091310option_v1_def_intl->key = option_def_intl->key;1311option_v1_def_intl->desc = option_def_intl->desc;1312option_v1_def_intl->info = option_def_intl->info;1313option_v1_def_intl->default_value = option_def_intl->default_value;13141315/* Values must be copied individually... */1316while (option_values->value)1317{1318option_v1_values->value = option_values->value;1319option_v1_values->label = option_values->label;13201321option_values++;1322option_v1_values++;1323}1324}1325}13261327core_options_v1_intl.us = option_v1_defs_us;1328core_options_v1_intl.local = option_v1_defs_intl;13291330environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_v1_intl);1331#else1332environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS, option_v1_defs_us);1333#endif1334}1335else1336{1337/* Allocate arrays */1338variables = (struct retro_variable *)calloc(num_options + 1,1339sizeof(struct retro_variable));1340values_buf = (char **)calloc(num_options, sizeof(char *));13411342if (!variables || !values_buf)1343goto error;13441345/* Copy parameters from option_defs_us array */1346for (i = 0; i < num_options; i++)1347{1348const char *key = option_defs_us[i].key;1349const char *desc = option_defs_us[i].desc;1350const char *default_value = option_defs_us[i].default_value;1351struct retro_core_option_value *values = option_defs_us[i].values;1352size_t buf_len = 3;1353size_t default_index = 0;13541355values_buf[i] = NULL;13561357if (desc)1358{1359size_t num_values = 0;13601361/* Determine number of values */1362while (true)1363{1364if (values[num_values].value)1365{1366/* Check if this is the default value */1367if (default_value)1368if (strcmp(values[num_values].value, default_value) == 0)1369default_index = num_values;13701371buf_len += strlen(values[num_values].value);1372num_values++;1373}1374else1375break;1376}13771378/* Build values string */1379if (num_values > 0)1380{1381buf_len += num_values - 1;1382buf_len += strlen(desc);13831384values_buf[i] = (char *)calloc(buf_len, sizeof(char));1385if (!values_buf[i])1386goto error;13871388strcpy(values_buf[i], desc);1389strcat(values_buf[i], "; ");13901391/* Default value goes first */1392strcat(values_buf[i], values[default_index].value);13931394/* Add remaining values */1395for (j = 0; j < num_values; j++)1396{1397if (j != default_index)1398{1399strcat(values_buf[i], "|");1400strcat(values_buf[i], values[j].value);1401}1402}1403}1404}14051406variables[option_index].key = key;1407variables[option_index].value = values_buf[i];1408option_index++;1409}14101411/* Set variables */1412environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables);1413}14141415error:1416/* Clean up */14171418if (option_v1_defs_us)1419{1420free(option_v1_defs_us);1421option_v1_defs_us = NULL;1422}14231424#ifndef HAVE_NO_LANGEXTRA1425if (option_v1_defs_intl)1426{1427free(option_v1_defs_intl);1428option_v1_defs_intl = NULL;1429}1430#endif14311432if (values_buf)1433{1434for (i = 0; i < num_options; i++)1435{1436if (values_buf[i])1437{1438free(values_buf[i]);1439values_buf[i] = NULL;1440}1441}14421443free(values_buf);1444values_buf = NULL;1445}14461447if (variables)1448{1449free(variables);1450variables = NULL;1451}1452}1453}14541455#ifdef __cplusplus1456}1457#endif14581459#endif146014611462