From 54a95da82b46c5de31a025160ba94c03f49c17df Mon Sep 17 00:00:00 2001 From: jdgleaver Date: Sat, 17 Oct 2020 15:07:44 +0100 Subject: Add optional automatic frame skipping --- libretro_core_options.h | 813 +++++------------------------------------------- 1 file changed, 75 insertions(+), 738 deletions(-) (limited to 'libretro_core_options.h') diff --git a/libretro_core_options.h b/libretro_core_options.h index c1f2490..3f92b3b 100644 --- a/libretro_core_options.h +++ b/libretro_core_options.h @@ -7,6 +7,28 @@ #include #include +#ifndef HAVE_NO_LANGEXTRA +#include "libretro_core_options_intl.h" +#endif + +/* + ******************************** + * VERSION: 1.3 + ******************************** + * + * - 1.3: Move translations to libretro_core_options_intl.h + * - libretro_core_options_intl.h includes BOM and utf-8 + * fix for MSVC 2010-2013 + * - Added HAVE_NO_LANGEXTRA flag to disable translations + * on platforms/compilers without BOM support + * - 1.2: Use core options v1 interface when + * RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION is >= 1 + * (previously required RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION == 1) + * - 1.1: Support generation of core options v0 retro_core_option_value + * arrays containing options with a single value + * - 1.0: First commit +*/ + #ifdef __cplusplus extern "C" { #endif @@ -34,733 +56,52 @@ struct retro_core_option_definition option_defs_us[] = { { "catsfc_VideoMode", - "Video Mode", - "Awaiting description.", + "Console Region", + "Specify which region the system is from. 'PAL' is 50hz, 'NTSC' is 60hz. Games will run faster or slower than normal if the incorrect region is selected.", { - { "auto", NULL }, + { "auto", "Auto" }, { "NTSC", NULL }, { "PAL", NULL }, - { NULL, NULL}, - }, - "auto" - }, - { - "catsfc_overclock_cycles", - "Reduce Slowdown (Hack, Unsafe, Restart)", - "Many games for the SNES suffered from slowdown due to the weak main CPU. This option helps allievate that at the cost of possible bugs. COMPATIBLE: Reduce slowdown but keep as much game compatibility as much as possible. MAX: Reduce slowdown as much as possible but will break more games.", - { - { "disabled", NULL }, - { "compatible", NULL }, - { "max", NULL }, - { NULL, NULL}, - }, - "disabled" - }, - { - "catsfc_next_reduce_sprite_flicker", - "Reduce Flickering (Hack, Unsafe)", - "Raises sprite limit to reduce flickering in games.", - { - { "disabled", NULL }, - { "enabled", NULL }, - { NULL, NULL}, - }, - "disabled" - }, - { NULL, NULL, NULL, {{0}}, NULL }, -}; - -/* RETRO_LANGUAGE_JAPANESE */ - -/* RETRO_LANGUAGE_FRENCH */ - -/* RETRO_LANGUAGE_SPANISH */ - -/* RETRO_LANGUAGE_GERMAN */ - -/* RETRO_LANGUAGE_ITALIAN */ - -/* RETRO_LANGUAGE_DUTCH */ - -/* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */ - -/* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */ - -/* RETRO_LANGUAGE_RUSSIAN */ - -/* RETRO_LANGUAGE_KOREAN */ - -/* RETRO_LANGUAGE_CHINESE_TRADITIONAL */ - -/* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */ - -/* RETRO_LANGUAGE_ESPERANTO */ - -/* RETRO_LANGUAGE_POLISH */ - -/* RETRO_LANGUAGE_VIETNAMESE */ - -/* RETRO_LANGUAGE_ARABIC */ - -/* RETRO_LANGUAGE_GREEK */ - -/* RETRO_LANGUAGE_TURKISH */ - -struct retro_core_option_definition option_defs_tr[] = { - - /* These variable names and possible values constitute an ABI with ZMZ (ZSNES Libretro player). - * Changing "Show layer 1" is fine, but don't change "layer_1"/etc or the possible values ("Yes|No"). - * Adding more variables and rearranging them is safe. */ - { - "snes9x_region", - "Konsol Bölgesi (Core Yenilenir)", - "Sistemin hangi bölgeden olduğunu belirtir.. 'PAL' 50hz'dir, 'NTSC' ise 60hz. Yanlış bölge seçiliyse, oyunlar normalden daha hızlı veya daha yavaş çalışacaktır.", - { - { "auto", "Otomatik" }, - { "ntsc", "NTSC" }, - { "pal", "PAL" }, - { NULL, NULL}, + { NULL, NULL }, }, "auto" }, { - "snes9x_aspect", - "Tercih Edilen En Boy Oranı", - "Tercih edilen içerik en boy oranını seçin. Bu, yalnızca RetroArch’ın en boy oranı Video ayarlarında 'Core tarafından' olarak ayarlandığında uygulanacaktır.", - { - { "4:3", NULL }, - { "uncorrected", "Düzeltilmemiş" }, - { "auto", "Otomatik" }, - { "ntsc", "NTSC" }, - { "pal", "PAL" }, - { NULL, NULL}, - }, - "4:3" - }, - { - "snes9x_overscan", - "Aşırı Taramayı Kırp", - "Ekranın üst ve alt kısmındaki ~8 piksel sınırlarını, tipik olarak standart çözünürlüklü bir televizyondakini kaldırır. 'Otomatik' ise geçerli içeriğe bağlı olarak aşırı taramayı algılamaya ve kırpmaya çalışacaktır.", - { - { "enabled", NULL }, - { "disabled", NULL }, - { "auto", "Otomatik" }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_gfx_hires", - "Hi-Res Modunu Etkinleştir", - "Oyunların hi-res moduna (512x448) geçmesine izin verir veya tüm içeriği 256x224'te (ezilmiş piksellerle) çıkmaya zorlar.", - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_hires_blend", - "Hi-Res Karışımı", - "Oyun hi-res moduna geçtiğinde pikselleri karıştırır (512x448). Şeffaflık efektleri üretmek için hi-res modunu kullanan bazı oyunlar için gereklidir (Kirby's Dream Land, Jurassic Park ...).", - { - { "disabled", NULL }, - { "merge", "Birlşetir" }, - { "blur", "Bulanıklaştır" }, - { NULL, NULL}, - }, - "disabled" - }, - { - "snes9x_blargg", - "Blargg NTSC Filtresi", - "Çeşitli NTSC TV sinyallerini taklit etmek için bir video filtresi uygular.", + "catsfc_frameskip", + "Frameskip", + "Automatically skip frames to avoid audio buffer under-run (crackling). 'Aggressive' and 'Max' increase the buffer threshold at which frames are skipped. Improves performance at the expense of visual smoothness. NOTE: For best results, frontend 'Audio Latency' should be set to at least 128 ms.", { { "disabled", NULL }, - { "monochrome", "Monochrome" }, - { "rf", "RF" }, - { "composite", "Composite" }, - { "s-video", "S-Video" }, - { "rgb", "RGB" }, - { NULL, NULL}, - }, - "disabled" - }, - { - "snes9x_audio_interpolation", - "Ses Enterpolasyonu", - "Belirtilen ses filtresini uygular. 'Gaussian', orijinal donanımın bas ağırlıklı sesini üretir. 'Cubic' ve 'Sinc' daha az doğrudur ve daha fazla aralığı korur.", - { - { "gaussian", "Gaussian" }, - { "cubic", "Cubic" }, - { "sinc", "Sinc" }, - { "none", "Hiçbiri" }, - { "linear", "Linear" }, - { NULL, NULL}, - }, - "gaussian" - }, - { - "snes9x_up_down_allowed", - "Karşı Yönlere İzin Ver", - "Bunu etkinleştirmek aynı anda hem sola hem de sağa (veya yukarı ve aşağı) yönlere basma / hızlı değiştirme / tutma imkanı sağlar. Bu harekete dayalı hatalara neden olabilir.", - { - { "disabled", NULL }, - { "enabled", NULL }, + { "auto", "Auto" }, + { "aggressive", "Aggressive" }, + { "max", "Max" }, { NULL, NULL }, }, "disabled" }, { - "snes9x_overclock_superfx", - "SuperFX Hız Aşırtma", - "SuperFX işlemcisi frekans çarpanıdır. Kare hızını artırabilir veya zamanlama hatalarına neden olabilir. % 100'ün altındaki değerler yavaş cihazlarda oyun performansını artırabilir.", - { - { "50%", NULL }, - { "60%", NULL }, - { "70%", NULL }, - { "80%", NULL }, - { "90%", NULL }, - { "100%", NULL }, - { "150%", NULL }, - { "200%", NULL }, - { "250%", NULL }, - { "300%", NULL }, - { "350%", NULL }, - { "400%", NULL }, - { "450%", NULL }, - { "500%", NULL }, - { NULL, NULL}, - }, - "100%" - }, - { - "snes9x_overclock_cycles", - "Yavaşlamayı Azalt (Hack, Güvensiz)", - "SNES İşlemcisi için hız aşırtmadır. Oyunların çökmesine neden olabilir! Daha kısa yükleme süreleri için 'Hafif'i, yavaşlama gösteren oyunların çoğunda' Uyumlu 've yalnızca kesinlikle gerekliyse' Maks 'kullanın (Gradius 3, Süper R tipi ...).", + "catsfc_overclock_cycles", + "Reduce Slowdown (Hack, Unsafe, Restart)", + "Many games for the SNES suffered from slowdown due to the weak main CPU. This option helps allievate that at the cost of possible bugs. COMPATIBLE: Reduce slowdown but keep as much game compatibility as much as possible. MAX: Reduce slowdown as much as possible but will break more games.", { { "disabled", NULL }, - { "light", "Hafif" }, - { "compatible", "Uyumlu" }, - { "max", "Maks" }, - { NULL, NULL}, - }, - "disabled" - }, - { - "snes9x_reduce_sprite_flicker", - "Kırılmayı Azalt (Hack, Güvensiz)", - "Ekranda aynı anda çizilebilen sprite sayısını arttırır.", - { - { "disabled", NULL }, - { "enabled", NULL }, - { NULL, NULL}, - }, - "disabled" - }, - { - "snes9x_randomize_memory", - "Belleği Rastgele Kıl (Güvensiz)", - "Başlatıldığında sistem RAM'ını rastgele ayarlar. 'Super Off Road' gibi bazı oyunlar, oyunu daha öngörülemeyen hale getirmek için öğe yerleştirme ve AI davranışı için rastgele sayı üreticisi olarak sistem RAM'ini kullanır.", - { - { "disabled", NULL }, - { "enabled", NULL }, - { NULL, NULL}, - }, - "disabled" - }, - { - "snes9x_block_invalid_vram_access", - "Geçersiz VRAM Erişimini Engelle", - "Bazı Homebrew/ROM'lar, doğru işlem için bu seçeneğin devre dışı bırakılmasını gerektirir.", - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_echo_buffer_hack", - "Eko Tampon Hack (Güvenli değil, yalnızca eski addmusic için etkinleştirin)", - "Bazı Homebrew/ROM'lar, doğru işlem için bu seçeneğin devre dışı bırakılmasını gerektirir.", - { - { "disabled", NULL }, - { "enabled", NULL }, - { NULL, NULL}, - }, - "disabled" - }, - { - "snes9x_show_lightgun_settings", - "Light Gun Ayarlarını Göster", - "Super Scope / Justifier / M.A.C.S. için tüfek girişi yapılandırmasını etkinleştir. NOT: Bu ayarın etkili olabilmesi için Hızlı Menü’nün açılması gerekir.", - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, + { "compatible", "Compatible" }, + { "max", "Max" }, + { NULL, NULL }, }, "disabled" }, { - "snes9x_lightgun_mode", - "Light Gun Modu", - "Fare kontrollü 'Light Gun' veya 'Dokunmatik Ekran' girişini kullanın.", - { - { "Lightgun", "Light Gun" }, - { "Touchscreen", "Dokunmatik Ekran" }, - { NULL, NULL}, - }, - "Lightgun" - }, - { - "snes9x_superscope_reverse_buttons", - "Super Scope Ters Tetik Düğmeleri", - "Süper Scope için 'Ateş' ve 'İmleç' butonlarının pozisyonlarını değiştir.", + "catsfc_reduce_sprite_flicker", + "Reduce Flickering (Hack, Unsafe)", + "Raises sprite limit to reduce flickering in games.", { { "disabled", NULL }, { "enabled", NULL }, - { NULL, NULL}, - }, - "disabled" - }, - { - "snes9x_superscope_crosshair", - "Super Scope İmkeç", - "Ekrandaki imleç işaretini değiştirin.", - { - { "0", NULL }, - { "1", NULL }, - { "2", NULL }, - { "3", NULL }, - { "4", NULL }, - { "5", NULL }, - { "6", NULL }, - { "7", NULL }, - { "8", NULL }, - { "9", NULL }, - { "10", NULL }, - { "11", NULL }, - { "12", NULL }, - { "13", NULL }, - { "14", NULL }, - { "15", NULL }, - { "16", NULL }, - { NULL, NULL}, - }, - "2" - }, - { - "snes9x_superscope_color", - "Super Scope Rengi", - "Ekrandaki imleç işaretinin rengini değiştirin.", - { - { "White", NULL }, - { "White (blend)", NULL }, - { "Red", NULL }, - { "Red (blend)", NULL }, - { "Orange", NULL }, - { "Orange (blend)", NULL }, - { "Yellow", NULL }, - { "Yellow (blend)", NULL }, - { "Green", NULL }, - { "Green (blend)", NULL }, - { "Cyan", NULL }, - { "Cyan (blend)", NULL }, - { "Sky", NULL }, - { "Sky (blend)", NULL }, - { "Blue", NULL }, - { "Blue (blend)", NULL }, - { "Violet", NULL }, - { "Violet (blend)", NULL }, - { "Pink", NULL }, - { "Pink (blend)", NULL }, - { "Purple", NULL }, - { "Purple (blend)", NULL }, - { "Black", NULL }, - { "Black (blend)", NULL }, - { "25% Grey", NULL }, - { "25% Grey (blend)", NULL }, - { "50% Grey", NULL }, - { "50% Grey (blend)", NULL }, - { "75% Grey", NULL }, - { "75% Grey (blend)", NULL }, - { NULL, NULL}, - }, - "White" - }, - { - "snes9x_justifier1_crosshair", - "Justifier 1 İmleci", - "Ekrandaki imleç işaretinin boyutunu değiştirin.", - { - { "0", NULL }, - { "1", NULL }, - { "2", NULL }, - { "3", NULL }, - { "4", NULL }, - { "5", NULL }, - { "6", NULL }, - { "7", NULL }, - { "8", NULL }, - { "9", NULL }, - { "10", NULL }, - { "11", NULL }, - { "12", NULL }, - { "13", NULL }, - { "14", NULL }, - { "15", NULL }, - { "16", NULL }, - { NULL, NULL}, - }, - "4" - }, - { - "snes9x_justifier1_color", - "Justifier 1 Rengi", - "Ekrandaki imleç işaretinin rengini değiştirin.", - { - { "Blue", NULL }, - { "Blue (blend)", NULL }, - { "Violet", NULL }, - { "Violet (blend)", NULL }, - { "Pink", NULL }, - { "Pink (blend)", NULL }, - { "Purple", NULL }, - { "Purple (blend)", NULL }, - { "Black", NULL }, - { "Black (blend)", NULL }, - { "25% Grey", NULL }, - { "25% Grey (blend)", NULL }, - { "50% Grey", NULL }, - { "50% Grey (blend)", NULL }, - { "75% Grey", NULL }, - { "75% Grey (blend)", NULL }, - { "White", NULL }, - { "White (blend)", NULL }, - { "Red", NULL }, - { "Red (blend)", NULL }, - { "Orange", NULL }, - { "Orange (blend)", NULL }, - { "Yellow", NULL }, - { "Yellow (blend)", NULL }, - { "Green", NULL }, - { "Green (blend)", NULL }, - { "Cyan", NULL }, - { "Cyan (blend)", NULL }, - { "Sky", NULL }, - { "Sky (blend)", NULL }, - { NULL, NULL}, - }, - "Blue" - }, - { - "snes9x_justifier2_crosshair", - "Justifier 2 İmleci", - "Ekrandaki imleç işaretinin boyutunu değiştirin.", - { - { "0", NULL }, - { "1", NULL }, - { "2", NULL }, - { "3", NULL }, - { "4", NULL }, - { "5", NULL }, - { "6", NULL }, - { "7", NULL }, - { "8", NULL }, - { "9", NULL }, - { "10", NULL }, - { "11", NULL }, - { "12", NULL }, - { "13", NULL }, - { "14", NULL }, - { "15", NULL }, - { "16", NULL }, - { NULL, NULL}, - }, - "4" - }, - { - "snes9x_justifier2_color", - "Justifier 2 REngi", - "Ekrandaki imleç işaretinin rengini değiştirin.", - { - { "Pink", NULL }, - { "Pink (blend)", NULL }, - { "Purple", NULL }, - { "Purple (blend)", NULL }, - { "Black", NULL }, - { "Black (blend)", NULL }, - { "25% Grey", NULL }, - { "25% Grey (blend)", NULL }, - { "50% Grey", NULL }, - { "50% Grey (blend)", NULL }, - { "75% Grey", NULL }, - { "75% Grey (blend)", NULL }, - { "White", NULL }, - { "White (blend)", NULL }, - { "Red", NULL }, - { "Red (blend)", NULL }, - { "Orange", NULL }, - { "Orange (blend)", NULL }, - { "Yellow", NULL }, - { "Yellow (blend)", NULL }, - { "Green", NULL }, - { "Green (blend)", NULL }, - { "Cyan", NULL }, - { "Cyan (blend)", NULL }, - { "Sky", NULL }, - { "Sky (blend)", NULL }, - { "Blue", NULL }, - { "Blue (blend)", NULL }, - { "Violet", NULL }, - { "Violet (blend)", NULL }, - { NULL, NULL}, - }, - "Pink" - }, - { - "snes9x_rifle_crosshair", - "M.A.C.S. Tüfek ", - "Ekrandaki imleç işaretinin rengini değiştirin..", - { - { "0", NULL }, - { "1", NULL }, - { "2", NULL }, - { "3", NULL }, - { "4", NULL }, - { "5", NULL }, - { "6", NULL }, - { "7", NULL }, - { "8", NULL }, - { "9", NULL }, - { "10", NULL }, - { "11", NULL }, - { "12", NULL }, - { "13", NULL }, - { "14", NULL }, - { "15", NULL }, - { "16", NULL }, - { NULL, NULL}, - }, - "2" - }, - { - "snes9x_rifle_color", - "M.A.C.S. Tüfek Rengi", - "Ekrandaki imleç işaretinin rengini değiştirin.", - { - { "White", NULL }, - { "White (blend)", NULL }, - { "Red", NULL }, - { "Red (blend)", NULL }, - { "Orange", NULL }, - { "Orange (blend)", NULL }, - { "Yellow", NULL }, - { "Yellow (blend)", NULL }, - { "Green", NULL }, - { "Green (blend)", NULL }, - { "Cyan", NULL }, - { "Cyan (blend)", NULL }, - { "Sky", NULL }, - { "Sky (blend)", NULL }, - { "Blue", NULL }, - { "Blue (blend)", NULL }, - { "Violet", NULL }, - { "Violet (blend)", NULL }, - { "Pink", NULL }, - { "Pink (blend)", NULL }, - { "Purple", NULL }, - { "Purple (blend)", NULL }, - { "Black", NULL }, - { "Black (blend)", NULL }, - { "25% Grey", NULL }, - { "25% Grey (blend)", NULL }, - { "50% Grey", NULL }, - { "50% Grey (blend)", NULL }, - { "75% Grey", NULL }, - { "75% Grey (blend)", NULL }, - { NULL, NULL}, - }, - "White" - }, - { - "snes9x_show_advanced_av_settings", - "Gelişmiş Ses/Video Ayarlarını Göster", - "Düşük seviye video katmanı / GFX etkisi / ses kanalı parametrelerinin yapılandırılmasını etkinleştirir. NOT: Bu ayarın etkili olabilmesi için Hızlı Menü’nün açılması gerekir.", - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, + { NULL, NULL }, }, "disabled" }, - { - "snes9x_layer_1", - "1. Katmanı Göster", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_layer_2", - "2. Katmanı Göster", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_layer_3", - "3. Katmanı Göster", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_layer_4", - "4. Katmanı Göster", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_layer_5", - "Sprite Katmanını Göster", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_gfx_clip", - "Grafik Klibi Pencerelerini Etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_gfx_transp", - "Saydamlık Efektlerini Etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_1", - "Ses Kanalı 1'i etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_2", - "Ses Kanalı 2'yi etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_3", - "Ses Kanalı 3'ü etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_4", - "Ses Kanalı 4'ü etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_5", - "Ses Kanalı 5'i etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_6", - "Ses Kanalı 6'yı etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_7", - "Ses Kanalı 7'yi etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, - { - "snes9x_sndchan_8", - "Ses Kanalı 8'i etkinleştir", - NULL, - { - { "enabled", NULL }, - { "disabled", NULL }, - { NULL, NULL}, - }, - "enabled" - }, { NULL, NULL, NULL, {{0}}, NULL }, }; @@ -770,6 +111,7 @@ struct retro_core_option_definition option_defs_tr[] = { ******************************** */ +#ifndef HAVE_NO_LANGEXTRA struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = { option_defs_us, /* RETRO_LANGUAGE_ENGLISH */ NULL, /* RETRO_LANGUAGE_JAPANESE */ @@ -789,8 +131,14 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = { NULL, /* RETRO_LANGUAGE_VIETNAMESE */ NULL, /* RETRO_LANGUAGE_ARABIC */ NULL, /* RETRO_LANGUAGE_GREEK */ - option_defs_tr, /* RETRO_LANGUAGE_TURKISH */ + NULL, /* RETRO_LANGUAGE_TURKISH */ + NULL, /* RETRO_LANGUAGE_SLOVAK */ + NULL, /* RETRO_LANGUAGE_PERSIAN */ + NULL, /* RETRO_LANGUAGE_HEBREW */ + NULL, /* RETRO_LANGUAGE_ASTURIAN */ + }; +#endif /* ******************************** @@ -799,7 +147,8 @@ struct retro_core_option_definition *option_defs_intl[RETRO_LANGUAGE_LAST] = { */ /* Handles configuration/setting of core options. - * Should only be called inside retro_set_environment(). + * Should be called as early as possible - ideally inside + * retro_set_environment(), and no later than retro_load_game() * > We place the function body in the header to avoid the * necessity of adding more .c files (i.e. want this to * be as painless as possible for core devs) @@ -812,8 +161,9 @@ static INLINE void libretro_set_core_options(retro_environment_t environ_cb) if (!environ_cb) return; - if (environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version) && (version == 1)) + if (environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version) && (version >= 1)) { +#ifndef HAVE_NO_LANGEXTRA struct retro_core_options_intl core_options_intl; unsigned language = 0; @@ -825,27 +175,23 @@ static INLINE void libretro_set_core_options(retro_environment_t environ_cb) core_options_intl.local = option_defs_intl[language]; environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_intl); +#else + environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS, &option_defs_us); +#endif } else { size_t i; - size_t option_index = 0; size_t num_options = 0; struct retro_variable *variables = NULL; char **values_buf = NULL; - /* Determine number of options - * > Note: We are going to skip a number of irrelevant - * core options when building the retro_variable array, - * but we'll allocate space for all of them. The difference - * in resource usage is negligible, and this allows us to - * keep the code 'cleaner' */ - while (true) + /* Determine number of options */ + for (;;) { - if (option_defs_us[num_options].key) - num_options++; - else + if (!option_defs_us[num_options].key) break; + num_options++; } /* Allocate arrays */ @@ -867,35 +213,27 @@ static INLINE void libretro_set_core_options(retro_environment_t environ_cb) values_buf[i] = NULL; - /* Skip options that are irrelevant when using the - * old style core options interface */ - if ((strcmp(key, "snes9x_show_lightgun_settings") == 0) || - (strcmp(key, "snes9x_show_advanced_av_settings") == 0)) - continue; - if (desc) { size_t num_values = 0; /* Determine number of values */ - while (true) + for (;;) { - if (values[num_values].value) - { - /* Check if this is the default value */ - if (default_value) - if (strcmp(values[num_values].value, default_value) == 0) - default_index = num_values; - - buf_len += strlen(values[num_values].value); - num_values++; - } - else + if (!values[num_values].value) break; + + /* Check if this is the default value */ + if (default_value) + if (strcmp(values[num_values].value, default_value) == 0) + default_index = num_values; + + buf_len += strlen(values[num_values].value); + num_values++; } /* Build values string */ - if (num_values > 1) + if (num_values > 0) { size_t j; @@ -924,11 +262,10 @@ static INLINE void libretro_set_core_options(retro_environment_t environ_cb) } } - variables[option_index].key = key; - variables[option_index].value = values_buf[i]; - option_index++; + variables[i].key = key; + variables[i].value = values_buf[i]; } - + /* Set variables */ environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables); -- cgit v1.2.3