From cd0a682c44694f95463c16ce2c9a5a4083d345db Mon Sep 17 00:00:00 2001 From: DarthMew Date: Sat, 12 Nov 2022 18:53:37 +0100 Subject: [PATCH] Reorder core option categories & reword the first memcard to be exclusively LibRetro to prevent potential save corruption --- src/core/settings.cpp | 5 +- src/libretro/libretro_core_options.h | 1078 +++++++++++----------- src/libretro/libretro_host_interface.cpp | 14 +- 3 files changed, 543 insertions(+), 554 deletions(-) diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 94bb53d8..2584fd7e 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -252,10 +252,7 @@ void Settings::Load(SettingsInterface& si) controller_analog_combo = si.GetIntValue("Controller", "AnalogCombo", 1); - memory_card_types[0] = - ParseMemoryCardTypeName( - si.GetStringValue("MemoryCards", "Card1Type", GetMemoryCardTypeName(DEFAULT_MEMORY_CARD_1_TYPE)).c_str()) - .value_or(DEFAULT_MEMORY_CARD_1_TYPE); + memory_card_types[0] = MemoryCardType::Libretro; memory_card_types[1] = ParseMemoryCardTypeName( si.GetStringValue("MemoryCards", "Card2Type", GetMemoryCardTypeName(DEFAULT_MEMORY_CARD_2_TYPE)).c_str()) diff --git a/src/libretro/libretro_core_options.h b/src/libretro/libretro_core_options.h index b7b0cd5e..0f291cfe 100644 --- a/src/libretro/libretro_core_options.h +++ b/src/libretro/libretro_core_options.h @@ -55,11 +55,6 @@ struct retro_core_option_v2_category option_cats_us[] = { "Console Settings", "Settings which control behavior of the various elements of the console." }, - { - "advanced", - "Advanced Settings", - "Settings which control internal emulator behavior. Use with care." - }, { "enhancement", "Enhancement Settings", @@ -75,6 +70,11 @@ struct retro_core_option_v2_category option_cats_us[] = { "Port Settings", "Settings which control controller and memory card behavior." }, + { + "advanced", + "Advanced Settings", + "Settings which control internal emulator behavior. Use with care." + }, { NULL, NULL, NULL }, }; @@ -304,184 +304,6 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, "Recompiler" }, - { - "duckstation_CDROM.ReadaheadSectors", - "CD-ROM Async Readahead", - NULL, - "Determines how far the CD-ROM thread will read ahead. Can reduce hitches on slow storage " - "mediums or with compressed games.", - NULL, - "advanced", - { - { "0", "Disabled (Synchronous)" }, - { "1", "1 Sector (7KB / 2ms)" }, - { "2", "2 Sectors (13KB / 4ms)" }, - { "3", "3 Sectors (20KB / 6ms)" }, - { "4", "4 Sectors (27KB / 8ms)" }, - { "5", "5 Sectors (33KB / 10ms)" }, - { "6", "6 Sectors (40KB / 12ms)" }, - { "7", "7 Sectors (47KB / 14ms)" }, - { "8", "8 Sectors (53KB / 16ms)" }, - { "9", "9 Sectors (60KB / 18ms)" }, - { "10", "10 Sectors (67KB / 20ms)" }, - { "11", "11 Sectors (73KB / 22ms)" }, - { "12", "12 Sectors (80KB / 24ms)" }, - { "13", "13 Sectors (87KB / 26ms)" }, - { "14", "14 Sectors (93KB / 28ms)" }, - { "15", "15 Sectors (100KB / 30ms)" }, - { "16", "16 Sectors (107KB / 32ms)" }, - { "17", "17 Sectors (113KB / 34ms)" }, - { "18", "18 Sectors (120KB / 36ms)" }, - { "19", "19 Sectors (127KB / 38ms)" }, - { "20", "20 Sectors (133KB / 40ms)" }, - { "21", "21 Sectors (140KB / 42ms)" }, - { "22", "22 Sectors (147KB / 44ms)" }, - { "23", "23 Sectors (153KB / 46ms)" }, - { "24", "24 Sectors (160KB / 48ms)" }, - { "25", "25 Sectors (167KB / 50ms)" }, - { "26", "26 Sectors (173KB / 52ms)" }, - { "27", "27 Sectors (180KB / 54ms)" }, - { "28", "28 Sectors (187KB / 56ms)" }, - { "29", "29 Sectors (193KB / 58ms)" }, - { "30", "30 Sectors (200KB / 60ms)" }, - { "31", "31 Sectors (207KB / 62ms)" }, - { "32", "32 Sectors (213KB / 64ms)" }, - { NULL, NULL }, - }, - "8" - }, - { - "duckstation_CPU.Overclock", - "CPU Overclocking", - NULL, - "Runs the emulated CPU faster or slower than native speed, which can improve framerates in some games. Will break " - "other games and increase system requirements, use with caution.", - NULL, - "advanced", - { - { "10", "10%" }, - { "15", "15%" }, - { "20", "20%" }, - { "25", "25%" }, - { "30", "30%" }, - { "35", "35%" }, - { "40", "40%" }, - { "45", "45%" }, - { "50", "50%" }, - { "55", "55%" }, - { "60", "60%" }, - { "65", "65%" }, - { "70", "70%" }, - { "75", "75%" }, - { "80", "80%" }, - { "85", "85%" }, - { "90", "90%" }, - { "95", "95%" }, - { "100", "100% (Default)" }, - { "105", "105%" }, - { "110", "110%" }, - { "115", "115%" }, - { "120", "120%" }, - { "125", "125%" }, - { "130", "130%" }, - { "135", "135%" }, - { "140", "140%" }, - { "145", "145%" }, - { "150", "150%" }, - { "155", "155%" }, - { "160", "160%" }, - { "165", "165%" }, - { "170", "170%" }, - { "175", "175%" }, - { "180", "180%" }, - { "185", "185%" }, - { "190", "190%" }, - { "195", "195%" }, - { "200", "200%" }, - { "210", "210%" }, - { "220", "220%" }, - { "230", "230%" }, - { "240", "240%" }, - { "250", "250%" }, - { "260", "260%" }, - { "270", "270%" }, - { "280", "280%" }, - { "290", "290%" }, - { "300", "300%" }, - { "310", "310%" }, - { "320", "320%" }, - { "330", "330%" }, - { "340", "340%" }, - { "350", "350%" }, - { "360", "360%" }, - { "370", "370%" }, - { "380", "380%" }, - { "390", "390%" }, - { "400", "400%" }, - { "410", "410%" }, - { "420", "420%" }, - { "430", "430%" }, - { "440", "440%" }, - { "450", "450%" }, - { "460", "460%" }, - { "470", "470%" }, - { "480", "480%" }, - { "490", "490%" }, - { "500", "500%" }, - { "510", "510%" }, - { "520", "520%" }, - { "530", "530%" }, - { "540", "540%" }, - { "550", "550%" }, - { "560", "560%" }, - { "570", "570%" }, - { "580", "580%" }, - { "590", "590%" }, - { "600", "600%" }, - { "610", "610%" }, - { "620", "620%" }, - { "630", "630%" }, - { "640", "640%" }, - { "650", "650%" }, - { "660", "660%" }, - { "670", "670%" }, - { "680", "680%" }, - { "690", "690%" }, - { "700", "700%" }, - { "710", "710%" }, - { "720", "720%" }, - { "730", "730%" }, - { "740", "740%" }, - { "750", "750%" }, - { "760", "760%" }, - { "770", "770%" }, - { "780", "780%" }, - { "790", "790%" }, - { "800", "800%" }, - { "810", "810%" }, - { "820", "820%" }, - { "830", "830%" }, - { "840", "840%" }, - { "850", "850%" }, - { "860", "860%" }, - { "870", "870%" }, - { "880", "880%" }, - { "890", "880%" }, - { "900", "900%" }, - { "910", "910%" }, - { "920", "920%" }, - { "930", "930%" }, - { "940", "940%" }, - { "950", "950%" }, - { "960", "960%" }, - { "970", "970%" }, - { "980", "980%" }, - { "990", "990%" }, - { "1000", "1000%" }, - { NULL, NULL }, - }, - "100" - }, { "duckstation_GPU.Renderer", "GPU Renderer", @@ -792,6 +614,53 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, "false" }, + { + "duckstation_GPU.PGXPPreserveProjFP", + "PGXP Preserve Projection Precision", + NULL, + "Enables additional precision for PGXP. May improve visuals in some games but break others.", + NULL, + "enhancement", + { + { "true", "Enabled" }, + { "false", "Disabled" }, + { NULL, NULL }, + }, + "false" + }, + { + "duckstation_GPU.PGXPTolerance", + "PGXP Geometry Tolerance", + NULL, + "Ignores precise positions if the difference exceeds this threshold.", + NULL, + "enhancement", + { + {"-1.0", "None"}, + {"0.5", "0.5 pixels"}, + {"1.0", "1.0 pixels"}, + {"1.5", "1.5 pixels"}, + {"2.0", "2.0 pixels"}, + {"2.5", "2.5 pixels"}, + {"3.0", "3.0 pixels"}, + {"3.5", "3.5 pixels"}, + {"4.0", "4.0 pixels"}, + {"4.5", "4.5 pixels"}, + {"5.0", "5.0 pixels"}, + {"5.5", "5.5 pixels"}, + {"6.0", "6.0 pixels"}, + {"6.5", "6.5 pixels"}, + {"7.0", "7.0 pixels"}, + {"7.5", "7.5 pixels"}, + {"8.0", "8.0 pixels"}, + {"8.5", "8.5 pixels"}, + {"9.0", "9.0 pixels"}, + {"9.5", "9.0 pixels"}, + {"10.0", "10.0 pixels"}, + { NULL, NULL }, + }, + "-1.0" + }, { "duckstation_Display.AspectRatio", "Core Provided Aspect Ratio", @@ -966,13 +835,12 @@ struct retro_core_option_v2_definition option_defs_us[] = { "Disabled" }, { - "duckstation_Main.LoadDevicesFromSaveStates", - "Load Devices From Save States", + "duckstation_Display.ShowOSDMessages", + "Display OSD Messages", NULL, - "Sets whether the contents of devices and memory cards will be loaded when a save state is loaded. " - "Disabling this will simulate a replug of devices and memory cards.", + "Shows on-screen messages generated by the core.", NULL, - "port", + "display", { { "true", "Enabled" }, { "false", "Disabled" }, @@ -981,28 +849,300 @@ struct retro_core_option_v2_definition option_defs_us[] = { "true" }, { - "duckstation_MemoryCards.Card1Type", - "Memory Card 1 Type", + "duckstation_Display.ActiveStartOffset", + "Display Active Start Offset", NULL, - "Sets the type of memory card for Slot 1. Restart the core when switching formats. " - "'Shared Between All Games' and both 'Separate Card Per Game' options may be used for legacy purposes, " - "and are unsupported. 'Libretro' (.srm) and 'Separate Card Per Game (Game Title)' (.mcd) saves " - "have internally identical formats and can be converted between one another via renaming the extension " - "and removing/adding the slot number (_1)", + "Pads or crops off lines from the left of the displayed image.", NULL, - "port", + "display", { - { "Libretro", "Libretro (Default)" }, - { "Shared", "Shared Between All Games" }, - { "PerGame", "Separate Card Per Game (Game Code)" }, - { "PerGameTitle", "Separate Card Per Game (Game Title)" }, - { NULL, NULL }, + { "-30", NULL }, + { "-29", NULL }, + { "-28", NULL }, + { "-27", NULL }, + { "-26", NULL }, + { "-25", NULL }, + { "-24", NULL }, + { "-23", NULL }, + { "-22", NULL }, + { "-21", NULL }, + { "-20", NULL }, + { "-19", NULL }, + { "-18", NULL }, + { "-17", NULL }, + { "-16", NULL }, + { "-15", NULL }, + { "-14", NULL }, + { "-13", NULL }, + { "-12", NULL }, + { "-11", NULL }, + { "-10", NULL }, + { "-9", NULL }, + { "-8", NULL }, + { "-7", NULL }, + { "-6", NULL }, + { "-5", NULL }, + { "-4", NULL }, + { "-3", NULL }, + { "-2", NULL }, + { "-1", NULL }, + { "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 }, + { "17", NULL }, + { "18", NULL }, + { "19", NULL }, + { "20", NULL }, + { "21", NULL }, + { "22", NULL }, + { "23", NULL }, + { "24", NULL }, + { "25", NULL }, + { "26", NULL }, + { "27", NULL }, + { "28", NULL }, + { "29", NULL }, + { "30", NULL }, + { NULL, NULL }, }, - "Libretro" + "0" + }, + { + "duckstation_Display.ActiveEndOffset", + "Display Active End Offset", + NULL, + "Pads or crops off lines from the right of the displayed image.", + NULL, + "display", + { + { "-30", NULL }, + { "-29", NULL }, + { "-28", NULL }, + { "-27", NULL }, + { "-26", NULL }, + { "-25", NULL }, + { "-24", NULL }, + { "-23", NULL }, + { "-22", NULL }, + { "-21", NULL }, + { "-20", NULL }, + { "-19", NULL }, + { "-18", NULL }, + { "-17", NULL }, + { "-16", NULL }, + { "-15", NULL }, + { "-14", NULL }, + { "-13", NULL }, + { "-12", NULL }, + { "-11", NULL }, + { "-10", NULL }, + { "-9", NULL }, + { "-8", NULL }, + { "-7", NULL }, + { "-6", NULL }, + { "-5", NULL }, + { "-4", NULL }, + { "-3", NULL }, + { "-2", NULL }, + { "-1", NULL }, + { "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 }, + { "17", NULL }, + { "18", NULL }, + { "19", NULL }, + { "20", NULL }, + { "21", NULL }, + { "22", NULL }, + { "23", NULL }, + { "24", NULL }, + { "25", NULL }, + { "26", NULL }, + { "27", NULL }, + { "28", NULL }, + { "29", NULL }, + { "30", NULL }, + { NULL, NULL }, + }, + "0" + }, + { + "duckstation_Display.LineStartOffset", + "Display Line Start Offset", + NULL, + "Pads or crops off lines from the top of the displayed image.", + NULL, + "display", + { + { "-30", NULL }, + { "-29", NULL }, + { "-28", NULL }, + { "-27", NULL }, + { "-26", NULL }, + { "-25", NULL }, + { "-24", NULL }, + { "-23", NULL }, + { "-22", NULL }, + { "-21", NULL }, + { "-20", NULL }, + { "-19", NULL }, + { "-18", NULL }, + { "-17", NULL }, + { "-16", NULL }, + { "-15", NULL }, + { "-14", NULL }, + { "-13", NULL }, + { "-12", NULL }, + { "-11", NULL }, + { "-10", NULL }, + { "-9", NULL }, + { "-8", NULL }, + { "-7", NULL }, + { "-6", NULL }, + { "-5", NULL }, + { "-4", NULL }, + { "-3", NULL }, + { "-2", NULL }, + { "-1", NULL }, + { "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 }, + { "17", NULL }, + { "18", NULL }, + { "19", NULL }, + { "20", NULL }, + { "21", NULL }, + { "22", NULL }, + { "23", NULL }, + { "24", NULL }, + { "25", NULL }, + { "26", NULL }, + { "27", NULL }, + { "28", NULL }, + { "29", NULL }, + { "30", NULL }, + { NULL, NULL }, + }, + "0" + }, + { + "duckstation_Display.LineEndOffset", + "Display Line End Offset", + NULL, + "Pads or crops off lines from the bottom of the displayed image.", + NULL, + "display", + { + { "-30", NULL }, + { "-29", NULL }, + { "-28", NULL }, + { "-27", NULL }, + { "-26", NULL }, + { "-25", NULL }, + { "-24", NULL }, + { "-23", NULL }, + { "-22", NULL }, + { "-21", NULL }, + { "-20", NULL }, + { "-19", NULL }, + { "-18", NULL }, + { "-17", NULL }, + { "-16", NULL }, + { "-15", NULL }, + { "-14", NULL }, + { "-13", NULL }, + { "-12", NULL }, + { "-11", NULL }, + { "-10", NULL }, + { "-9", NULL }, + { "-8", NULL }, + { "-7", NULL }, + { "-6", NULL }, + { "-5", NULL }, + { "-4", NULL }, + { "-3", NULL }, + { "-2", NULL }, + { "-1", NULL }, + { "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 }, + { "17", NULL }, + { "18", NULL }, + { "19", NULL }, + { "20", NULL }, + { "21", NULL }, + { "22", NULL }, + { "23", NULL }, + { "24", NULL }, + { "25", NULL }, + { "26", NULL }, + { "27", NULL }, + { "28", NULL }, + { "29", NULL }, + { "30", NULL }, + { NULL, NULL }, + }, + "0" }, { "duckstation_MemoryCards.Card2Type", - "Memory Card 2 Type", + "Second Memory Card Type", NULL, "Sets the type of memory card for Slot 2.", NULL, @@ -3469,12 +3609,190 @@ struct retro_core_option_v2_definition option_defs_us[] = { "8" }, { - "duckstation_Display.ShowOSDMessages", - "Display OSD Messages", + "duckstation_CDROM.ReadaheadSectors", + "CD-ROM Async Readahead", NULL, - "Shows on-screen messages generated by the core.", + "Determines how far the CD-ROM thread will read ahead. Can reduce hitches on slow storage " + "mediums or with compressed games.", NULL, - "display", + "advanced", + { + { "0", "Disabled (Synchronous)" }, + { "1", "1 Sector (7KB / 2ms)" }, + { "2", "2 Sectors (13KB / 4ms)" }, + { "3", "3 Sectors (20KB / 6ms)" }, + { "4", "4 Sectors (27KB / 8ms)" }, + { "5", "5 Sectors (33KB / 10ms)" }, + { "6", "6 Sectors (40KB / 12ms)" }, + { "7", "7 Sectors (47KB / 14ms)" }, + { "8", "8 Sectors (53KB / 16ms)" }, + { "9", "9 Sectors (60KB / 18ms)" }, + { "10", "10 Sectors (67KB / 20ms)" }, + { "11", "11 Sectors (73KB / 22ms)" }, + { "12", "12 Sectors (80KB / 24ms)" }, + { "13", "13 Sectors (87KB / 26ms)" }, + { "14", "14 Sectors (93KB / 28ms)" }, + { "15", "15 Sectors (100KB / 30ms)" }, + { "16", "16 Sectors (107KB / 32ms)" }, + { "17", "17 Sectors (113KB / 34ms)" }, + { "18", "18 Sectors (120KB / 36ms)" }, + { "19", "19 Sectors (127KB / 38ms)" }, + { "20", "20 Sectors (133KB / 40ms)" }, + { "21", "21 Sectors (140KB / 42ms)" }, + { "22", "22 Sectors (147KB / 44ms)" }, + { "23", "23 Sectors (153KB / 46ms)" }, + { "24", "24 Sectors (160KB / 48ms)" }, + { "25", "25 Sectors (167KB / 50ms)" }, + { "26", "26 Sectors (173KB / 52ms)" }, + { "27", "27 Sectors (180KB / 54ms)" }, + { "28", "28 Sectors (187KB / 56ms)" }, + { "29", "29 Sectors (193KB / 58ms)" }, + { "30", "30 Sectors (200KB / 60ms)" }, + { "31", "31 Sectors (207KB / 62ms)" }, + { "32", "32 Sectors (213KB / 64ms)" }, + { NULL, NULL }, + }, + "8" + }, + { + "duckstation_CPU.Overclock", + "CPU Overclocking", + NULL, + "Runs the emulated CPU faster or slower than native speed, which can improve framerates in some games. Will break " + "other games and increase system requirements, use with caution.", + NULL, + "advanced", + { + { "10", "10%" }, + { "15", "15%" }, + { "20", "20%" }, + { "25", "25%" }, + { "30", "30%" }, + { "35", "35%" }, + { "40", "40%" }, + { "45", "45%" }, + { "50", "50%" }, + { "55", "55%" }, + { "60", "60%" }, + { "65", "65%" }, + { "70", "70%" }, + { "75", "75%" }, + { "80", "80%" }, + { "85", "85%" }, + { "90", "90%" }, + { "95", "95%" }, + { "100", "100% (Default)" }, + { "105", "105%" }, + { "110", "110%" }, + { "115", "115%" }, + { "120", "120%" }, + { "125", "125%" }, + { "130", "130%" }, + { "135", "135%" }, + { "140", "140%" }, + { "145", "145%" }, + { "150", "150%" }, + { "155", "155%" }, + { "160", "160%" }, + { "165", "165%" }, + { "170", "170%" }, + { "175", "175%" }, + { "180", "180%" }, + { "185", "185%" }, + { "190", "190%" }, + { "195", "195%" }, + { "200", "200%" }, + { "210", "210%" }, + { "220", "220%" }, + { "230", "230%" }, + { "240", "240%" }, + { "250", "250%" }, + { "260", "260%" }, + { "270", "270%" }, + { "280", "280%" }, + { "290", "290%" }, + { "300", "300%" }, + { "310", "310%" }, + { "320", "320%" }, + { "330", "330%" }, + { "340", "340%" }, + { "350", "350%" }, + { "360", "360%" }, + { "370", "370%" }, + { "380", "380%" }, + { "390", "390%" }, + { "400", "400%" }, + { "410", "410%" }, + { "420", "420%" }, + { "430", "430%" }, + { "440", "440%" }, + { "450", "450%" }, + { "460", "460%" }, + { "470", "470%" }, + { "480", "480%" }, + { "490", "490%" }, + { "500", "500%" }, + { "510", "510%" }, + { "520", "520%" }, + { "530", "530%" }, + { "540", "540%" }, + { "550", "550%" }, + { "560", "560%" }, + { "570", "570%" }, + { "580", "580%" }, + { "590", "590%" }, + { "600", "600%" }, + { "610", "610%" }, + { "620", "620%" }, + { "630", "630%" }, + { "640", "640%" }, + { "650", "650%" }, + { "660", "660%" }, + { "670", "670%" }, + { "680", "680%" }, + { "690", "690%" }, + { "700", "700%" }, + { "710", "710%" }, + { "720", "720%" }, + { "730", "730%" }, + { "740", "740%" }, + { "750", "750%" }, + { "760", "760%" }, + { "770", "770%" }, + { "780", "780%" }, + { "790", "790%" }, + { "800", "800%" }, + { "810", "810%" }, + { "820", "820%" }, + { "830", "830%" }, + { "840", "840%" }, + { "850", "850%" }, + { "860", "860%" }, + { "870", "870%" }, + { "880", "880%" }, + { "890", "880%" }, + { "900", "900%" }, + { "910", "910%" }, + { "920", "920%" }, + { "930", "930%" }, + { "940", "940%" }, + { "950", "950%" }, + { "960", "960%" }, + { "970", "970%" }, + { "980", "980%" }, + { "990", "990%" }, + { "1000", "1000%" }, + { NULL, NULL }, + }, + "100" + }, + { + "duckstation_Main.ApplyGameSettings", + "Apply Compatibility Settings", + NULL, + "Automatically disables enhancements on games which are incompatible.", + NULL, + "advanced", { { "true", "Enabled" }, { "false", "Disabled" }, @@ -3483,10 +3801,11 @@ struct retro_core_option_v2_definition option_defs_us[] = { "true" }, { - "duckstation_Main.ApplyGameSettings", - "Apply Compatibility Settings", + "duckstation_Main.LoadDevicesFromSaveStates", + "Load Devices From Save States", NULL, - "Automatically disables enhancements on games which are incompatible.", + "Sets whether the contents of devices and memory cards will be loaded when a save state is loaded. " + "Disabling this will simulate a replug of devices and memory cards.", NULL, "advanced", { @@ -3614,345 +3933,6 @@ struct retro_core_option_v2_definition option_defs_us[] = { }, "false" }, - { - "duckstation_Display.ActiveStartOffset", - "Display Active Start Offset", - NULL, - "Pads or crops off lines from the left of the displayed image.", - NULL, - "display", - { - { "-30", NULL }, - { "-29", NULL }, - { "-28", NULL }, - { "-27", NULL }, - { "-26", NULL }, - { "-25", NULL }, - { "-24", NULL }, - { "-23", NULL }, - { "-22", NULL }, - { "-21", NULL }, - { "-20", NULL }, - { "-19", NULL }, - { "-18", NULL }, - { "-17", NULL }, - { "-16", NULL }, - { "-15", NULL }, - { "-14", NULL }, - { "-13", NULL }, - { "-12", NULL }, - { "-11", NULL }, - { "-10", NULL }, - { "-9", NULL }, - { "-8", NULL }, - { "-7", NULL }, - { "-6", NULL }, - { "-5", NULL }, - { "-4", NULL }, - { "-3", NULL }, - { "-2", NULL }, - { "-1", NULL }, - { "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 }, - { "17", NULL }, - { "18", NULL }, - { "19", NULL }, - { "20", NULL }, - { "21", NULL }, - { "22", NULL }, - { "23", NULL }, - { "24", NULL }, - { "25", NULL }, - { "26", NULL }, - { "27", NULL }, - { "28", NULL }, - { "29", NULL }, - { "30", NULL }, - { NULL, NULL }, - }, - "0" - }, - { - "duckstation_Display.ActiveEndOffset", - "Display Active End Offset", - NULL, - "Pads or crops off lines from the right of the displayed image.", - NULL, - "display", - { - { "-30", NULL }, - { "-29", NULL }, - { "-28", NULL }, - { "-27", NULL }, - { "-26", NULL }, - { "-25", NULL }, - { "-24", NULL }, - { "-23", NULL }, - { "-22", NULL }, - { "-21", NULL }, - { "-20", NULL }, - { "-19", NULL }, - { "-18", NULL }, - { "-17", NULL }, - { "-16", NULL }, - { "-15", NULL }, - { "-14", NULL }, - { "-13", NULL }, - { "-12", NULL }, - { "-11", NULL }, - { "-10", NULL }, - { "-9", NULL }, - { "-8", NULL }, - { "-7", NULL }, - { "-6", NULL }, - { "-5", NULL }, - { "-4", NULL }, - { "-3", NULL }, - { "-2", NULL }, - { "-1", NULL }, - { "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 }, - { "17", NULL }, - { "18", NULL }, - { "19", NULL }, - { "20", NULL }, - { "21", NULL }, - { "22", NULL }, - { "23", NULL }, - { "24", NULL }, - { "25", NULL }, - { "26", NULL }, - { "27", NULL }, - { "28", NULL }, - { "29", NULL }, - { "30", NULL }, - { NULL, NULL }, - }, - "0" - }, - { - "duckstation_Display.LineStartOffset", - "Display Line Start Offset", - NULL, - "Pads or crops off lines from the top of the displayed image.", - NULL, - "display", - { - { "-30", NULL }, - { "-29", NULL }, - { "-28", NULL }, - { "-27", NULL }, - { "-26", NULL }, - { "-25", NULL }, - { "-24", NULL }, - { "-23", NULL }, - { "-22", NULL }, - { "-21", NULL }, - { "-20", NULL }, - { "-19", NULL }, - { "-18", NULL }, - { "-17", NULL }, - { "-16", NULL }, - { "-15", NULL }, - { "-14", NULL }, - { "-13", NULL }, - { "-12", NULL }, - { "-11", NULL }, - { "-10", NULL }, - { "-9", NULL }, - { "-8", NULL }, - { "-7", NULL }, - { "-6", NULL }, - { "-5", NULL }, - { "-4", NULL }, - { "-3", NULL }, - { "-2", NULL }, - { "-1", NULL }, - { "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 }, - { "17", NULL }, - { "18", NULL }, - { "19", NULL }, - { "20", NULL }, - { "21", NULL }, - { "22", NULL }, - { "23", NULL }, - { "24", NULL }, - { "25", NULL }, - { "26", NULL }, - { "27", NULL }, - { "28", NULL }, - { "29", NULL }, - { "30", NULL }, - { NULL, NULL }, - }, - "0" - }, - { - "duckstation_Display.LineEndOffset", - "Display Line End Offset", - NULL, - "Pads or crops off lines from the bottom of the displayed image.", - NULL, - "display", - { - { "-30", NULL }, - { "-29", NULL }, - { "-28", NULL }, - { "-27", NULL }, - { "-26", NULL }, - { "-25", NULL }, - { "-24", NULL }, - { "-23", NULL }, - { "-22", NULL }, - { "-21", NULL }, - { "-20", NULL }, - { "-19", NULL }, - { "-18", NULL }, - { "-17", NULL }, - { "-16", NULL }, - { "-15", NULL }, - { "-14", NULL }, - { "-13", NULL }, - { "-12", NULL }, - { "-11", NULL }, - { "-10", NULL }, - { "-9", NULL }, - { "-8", NULL }, - { "-7", NULL }, - { "-6", NULL }, - { "-5", NULL }, - { "-4", NULL }, - { "-3", NULL }, - { "-2", NULL }, - { "-1", NULL }, - { "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 }, - { "17", NULL }, - { "18", NULL }, - { "19", NULL }, - { "20", NULL }, - { "21", NULL }, - { "22", NULL }, - { "23", NULL }, - { "24", NULL }, - { "25", NULL }, - { "26", NULL }, - { "27", NULL }, - { "28", NULL }, - { "29", NULL }, - { "30", NULL }, - { NULL, NULL }, - }, - "0" - }, - { - "duckstation_GPU.PGXPPreserveProjFP", - "PGXP Preserve Projection Precision", - NULL, - "Enables additional precision for PGXP. May improve visuals in some games but break others.", - NULL, - "enhancement", - { - { "true", "Enabled" }, - { "false", "Disabled" }, - { NULL, NULL }, - }, - "false" - }, - { - "duckstation_GPU.PGXPTolerance", - "PGXP Geometry Tolerance", - NULL, - "Ignores precise positions if the difference exceeds this threshold.", - NULL, - "enhancement", - { - {"-1.0", "None"}, - {"0.5", "0.5 pixels"}, - {"1.0", "1.0 pixels"}, - {"1.5", "1.5 pixels"}, - {"2.0", "2.0 pixels"}, - {"2.5", "2.5 pixels"}, - {"3.0", "3.0 pixels"}, - {"3.5", "3.5 pixels"}, - {"4.0", "4.0 pixels"}, - {"4.5", "4.5 pixels"}, - {"5.0", "5.0 pixels"}, - {"5.5", "5.5 pixels"}, - {"6.0", "6.0 pixels"}, - {"6.5", "6.5 pixels"}, - {"7.0", "7.0 pixels"}, - {"7.5", "7.5 pixels"}, - {"8.0", "8.0 pixels"}, - {"8.5", "8.5 pixels"}, - {"9.0", "9.0 pixels"}, - {"9.5", "9.0 pixels"}, - {"10.0", "10.0 pixels"}, - { NULL, NULL }, - }, - "-1.0" - }, { "duckstation_Main.RunaheadFrameCount", "Internal Run-Ahead", diff --git a/src/libretro/libretro_host_interface.cpp b/src/libretro/libretro_host_interface.cpp index c7417f7e..2b4f8d5a 100644 --- a/src/libretro/libretro_host_interface.cpp +++ b/src/libretro/libretro_host_interface.cpp @@ -836,6 +836,7 @@ bool LibretroHostInterface::UpdateCoreOptionsDisplay(bool controller) static bool vram_rewrite_replacements_prev; static bool cdrom_preload_enable_prev; static DisplayAspectRatio aspect_ratio_prev; + static MemoryCardType second_memcard_prev; const CPUExecutionMode cpu_execution_mode = Settings::ParseCPUExecutionMode( @@ -868,12 +869,18 @@ bool LibretroHostInterface::UpdateCoreOptionsDisplay(bool controller) .value_or(Settings::DEFAULT_DISPLAY_ASPECT_RATIO); const bool custom_aspect_ratio = (aspect_ratio == DisplayAspectRatio::Custom); + const MemoryCardType second_memcard = + Settings::ParseMemoryCardTypeName( + si.GetStringValue("MemoryCards", "Card2Type", Settings::GetMemoryCardTypeName(Settings::DEFAULT_MEMORY_CARD_2_TYPE)).c_str()) + .value_or(Settings::DEFAULT_MEMORY_CARD_2_TYPE); + const bool per_game_titles = (second_memcard == MemoryCardType::PerGameTitle); + if (!controller) { if (cpu_execution_mode == cpu_execution_mode_prev && cpu_fastmem_mode == cpu_fastmem_mode_prev && pgxp_enable == pgxp_enable_prev && multitap_mode == multitap_mode_prev && vram_rewrite_replacements == vram_rewrite_replacements_prev && cdrom_preload_enable == cdrom_preload_enable_prev && aspect_ratio == aspect_ratio_prev && - hardware_renderer == hardware_renderer_prev) + hardware_renderer == hardware_renderer_prev && second_memcard == second_memcard_prev) { return false; } @@ -887,6 +894,7 @@ bool LibretroHostInterface::UpdateCoreOptionsDisplay(bool controller) vram_rewrite_replacements_prev = vram_rewrite_replacements; cdrom_preload_enable_prev = cdrom_preload_enable; aspect_ratio_prev = aspect_ratio; + second_memcard_prev = second_memcard; struct retro_core_option_display option_display; @@ -958,6 +966,10 @@ bool LibretroHostInterface::UpdateCoreOptionsDisplay(bool controller) option_display.key = "duckstation_Display.CustomAspectRatioDenominator"; g_retro_environment_callback(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display); + option_display.visible = per_game_titles; + option_display.key = "duckstation_MemoryCards.UsePlaylistTitle"; + g_retro_environment_callback(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display); + for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++) {