@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2019-202 3 Connor McLaughlin <stenzek@gmail.com>
// SPDX-FileCopyrightText: 2019-202 4 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
# define IMGUI_DEFINE_MATH_OPERATORS
@ -1033,7 +1033,7 @@ void FullscreenUI::DoCheatsMenu()
if ( cc . activation = = CheatCode : : Activation : : Manual )
cl - > ApplyCode ( static_cast < u32 > ( index ) ) ;
else
System : : SetCheatCodeState ( static_cast < u32 > ( index ) , checked , true );
System : : SetCheatCodeState ( static_cast < u32 > ( index ) , checked );
} ;
OpenChoiceDialog ( FSUI_ICONSTR ( ICON_FA_FROWN , " Cheat List " ) , true , std : : move ( options ) , std : : move ( callback ) ) ;
}
@ -2709,16 +2709,10 @@ void FullscreenUI::DrawInterfaceSettingsPage()
bsi , FSUI_ICONSTR ( ICON_FA_MAGIC , " Inhibit Screensaver " ) ,
FSUI_CSTR ( " Prevents the screen saver from activating and the host from sleeping while emulation is running. " ) ,
" Main " , " InhibitScreensaver " , true ) ;
DrawToggleSetting (
bsi , FSUI_ICONSTR ( ICON_FA_GAMEPAD , " Load Devices From Save States " ) ,
FSUI_CSTR ( " When enabled, memory cards and controllers will be overwritten when save states are loaded. " ) , " Main " ,
" LoadDevicesFromSaveStates " , false ) ;
DrawToggleSetting (
bsi , FSUI_ICONSTR ( ICON_FA_COGS , " Apply Per-Game Settings " ) ,
FSUI_CSTR ( " When enabled, per-game settings will be applied, and incompatible enhancements will be disabled. " ) ,
" Main " , " ApplyGameSettings " , true ) ;
DrawToggleSetting ( bsi , FSUI_ICONSTR ( ICON_FA_FROWN , " Automatically Load Cheats " ) ,
FSUI_CSTR ( " Automatically loads and applies cheats on game start. " ) , " Main " , " AutoLoadCheats " , true ) ;
if ( DrawToggleSetting ( bsi , FSUI_ICONSTR ( ICON_FA_PAINT_BRUSH , " Use Light Theme " ) ,
FSUI_CSTR ( " Uses a light coloured theme instead of the default dark theme. " ) , " Main " ,
" UseLightFullscreenUITheme " , false ) )
@ -2903,22 +2897,30 @@ void FullscreenUI::DrawConsoleSettingsPage()
MenuHeading ( FSUI_CSTR ( " Console Settings " ) ) ;
DrawEnumSetting ( bsi , FSUI_ CSTR( " Region " ) , FSUI_CSTR ( " Determines the emulated hardware type. " ) , " Console " , " Region " ,
Settings : : DEFAULT_CONSOLE_REGION , & Settings : : ParseConsoleRegionName , & Settings : : GetConsoleRegionName ,
& Settings : : GetConsoleRegion DisplayName, ConsoleRegion : : Count ) ;
DrawEnumSetting ( bsi , FSUI_ I CON STR( ICON_FA_GLOBE , " Region " ) , FSUI_CSTR ( " Determines the emulated hardware type. " ) ,
" Console " , " Region " , Settings : : DEFAULT_CONSOLE_REGION , & Settings : : ParseConsoleRegionName ,
& Settings : : GetConsoleRegion Name, & Settings : : GetConsoleRegion DisplayName, ConsoleRegion : : Count ) ;
DrawToggleSetting (
bsi , FSUI_ CSTR( " Enable 8MB RAM " ) ,
bsi , FSUI_ I CON STR( ICON_FA_MEMORY , " Enable 8MB RAM " ) ,
FSUI_CSTR ( " Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles. " ) ,
" Console " , " Enable8MBRAM " , false ) ;
DrawToggleSetting ( bsi , FSUI_ICONSTR ( ICON_FA_MAGIC , " Disable All Enhancements " ) ,
FSUI_CSTR ( " Temporarily disables all enhancements, useful when testing. " ) , " Main " ,
" DisableAllEnhancements " , false ) ;
DrawToggleSetting (
bsi , FSUI_ICONSTR ( ICON_FA_FROWN , " Enable Cheats " ) ,
FSUI_CSTR ( " Automatically loads and applies cheats on game start. Cheats can break games and saves. " ) , " Console " ,
" EnableCheats " , false ) ;
MenuHeading ( FSUI_CSTR ( " CPU Emulation " ) ) ;
DrawEnumSetting ( bsi , FSUI_CSTR ( " Execution Mode " ) , FSUI_CSTR ( " Determines how the emulated CPU executes instructions. " ) ,
" CPU " , " ExecutionMode " , Settings : : DEFAULT_CPU_EXECUTION_MODE , & Settings : : ParseCPUExecutionMode ,
DrawEnumSetting ( bsi , FSUI_ICONSTR ( ICON_FA_BOLT , " Execution Mode " ) ,
FSUI_CSTR ( " Determines how the emulated CPU executes instructions. " ) , " CPU " , " ExecutionMode " ,
Settings : : DEFAULT_CPU_EXECUTION_MODE , & Settings : : ParseCPUExecutionMode ,
& Settings : : GetCPUExecutionModeName , & Settings : : GetCPUExecutionModeDisplayName ,
CPUExecutionMode : : Count ) ;
DrawToggleSetting ( bsi , FSUI_ CSTR( " Enable Overclocking " ) ,
DrawToggleSetting ( bsi , FSUI_ I CON STR( ICON_FA_TACHOMETER_ALT , " Enable Overclocking " ) ,
FSUI_CSTR ( " When this option is chosen, the clock speed set below will be used. " ) , " CPU " ,
" OverclockEnable " , false ) ;
@ -2939,37 +2941,34 @@ void FullscreenUI::DrawConsoleSettingsPage()
}
}
DrawToggleSetting ( bsi , FSUI_ CSTR( " Enable Recompiler ICache " ) ,
DrawToggleSetting ( bsi , FSUI_ I CON STR( ICON_FA_MICROCHIP , " Enable Recompiler ICache " ) ,
FSUI_CSTR ( " Makes games run closer to their console framerate, at a small cost to performance. " ) ,
" CPU " , " RecompilerICache " , false ) ;
MenuHeading ( FSUI_CSTR ( " CD-ROM Emulation " ) ) ;
DrawIntListSetting (
bsi , FSUI_ CSTR( " Read Speedup " ) ,
bsi , FSUI_ I CON STR( ICON_FA_COMPACT_DISC , " Read Speedup " ) ,
FSUI_CSTR (
" Speeds up CD-ROM reads by the specified factor. May improve loading speeds in some games, and break others. " ) ,
" CDROM " , " ReadSpeedup " , 1 , cdrom_read_speeds . data ( ) , cdrom_read_speeds . size ( ) , true , 1 ) ;
DrawIntListSetting (
bsi , FSUI_ CSTR( " Seek Speedup " ) ,
bsi , FSUI_ I CON STR( ICON_FA_SEARCH , " Seek Speedup " ) ,
FSUI_CSTR (
" Speeds up CD-ROM seeks by the specified factor. May improve loading speeds in some games, and break others. " ) ,
" CDROM " , " SeekSpeedup " , 1 , cdrom_seek_speeds . data ( ) , cdrom_seek_speeds . size ( ) , true ) ;
DrawIntRangeSetting (
bsi , FSUI_ CSTR( " Readahead Sectors " ) ,
bsi , FSUI_ I CON STR( ICON_FA_FAST_FORWARD , " Readahead Sectors " ) ,
FSUI_CSTR ( " Reduces hitches in emulation by reading/decompressing CD data asynchronously on a worker thread. " ) ,
" CDROM " , " ReadaheadSectors " , Settings : : DEFAULT_CDROM_READAHEAD_SECTORS , 0 , 32 , " %d sectors " ) ;
DrawToggleSetting ( bsi , FSUI_CSTR ( " Enable Region Check " ) ,
FSUI_CSTR ( " Simulates the region check present in original, unmodified consoles. " ) , " CDROM " ,
" RegionCheck " , false ) ;
DrawToggleSetting (
bsi , FSUI_ CSTR( " Preload Images to RAM " ) ,
bsi , FSUI_ICONSTR ( ICON_FA_DOWNLOAD , " Preload Images to RAM " ) ,
FSUI_CSTR ( " Loads the game image into RAM. Useful for network paths that may become unreliable during gameplay. " ) ,
" CDROM " , " LoadImageToRAM " , false ) ;
DrawToggleSetting (
bsi , FSUI_ CSTR( " Apply Image Patches " ) ,
bsi , FSUI_ I CON STR( ICON_FA_VEST_PATCHES , " Apply Image Patches " ) ,
FSUI_CSTR ( " Automatically applies patches to disc images when they are present, currently only PPF is supported. " ) ,
" CDROM " , " LoadImagePatches " , false ) ;
@ -4654,10 +4653,6 @@ void FullscreenUI::DrawAdvancedSettingsPage()
MenuHeading ( FSUI_CSTR ( " Debugging Settings " ) ) ;
DrawToggleSetting ( bsi , FSUI_CSTR ( " Disable All Enhancements " ) ,
FSUI_CSTR ( " Temporarily disables all enhancements, useful when testing. " ) , " Main " ,
" DisableAllEnhancements " , false ) ;
DrawToggleSetting ( bsi , FSUI_CSTR ( " Use Debug GPU Device " ) ,
FSUI_CSTR ( " Enable debugging when supported by the host's renderer API. Only for developer use. " ) ,
" GPU " , " UseDebugDevice " , false ) ;
@ -4675,6 +4670,10 @@ void FullscreenUI::DrawAdvancedSettingsPage()
DrawToggleSetting ( bsi , FSUI_CSTR ( " Create Save State Backups " ) ,
FSUI_CSTR ( " Renames existing save states when saving to a backup file. " ) , " Main " ,
" CreateSaveStateBackups " , false ) ;
DrawToggleSetting (
bsi , FSUI_ICONSTR ( ICON_FA_GAMEPAD , " Load Devices From Save States " ) ,
FSUI_CSTR ( " When enabled, memory cards and controllers will be overwritten when save states are loaded. " ) , " Main " ,
" LoadDevicesFromSaveStates " , false ) ;
MenuHeading ( FSUI_CSTR ( " Display Settings " ) ) ;
DrawToggleSetting ( bsi , FSUI_CSTR ( " Show Status Indicators " ) ,
@ -4740,6 +4739,12 @@ void FullscreenUI::DrawAdvancedSettingsPage()
" FastmemMode " , Settings : : DEFAULT_CPU_FASTMEM_MODE , & Settings : : ParseCPUFastmemMode ,
& Settings : : GetCPUFastmemModeName , & Settings : : GetCPUFastmemModeDisplayName , CPUFastmemMode : : Count ) ;
MenuHeading ( FSUI_CSTR ( " CD-ROM Emulation " ) ) ;
DrawToggleSetting ( bsi , FSUI_CSTR ( " Enable Region Check " ) ,
FSUI_CSTR ( " Simulates the region check present in original, unmodified consoles. " ) , " CDROM " ,
" RegionCheck " , false ) ;
EndMenuButtons ( ) ;
}
@ -4891,7 +4896,7 @@ void FullscreenUI::DrawPauseMenu()
}
if ( ActiveButton ( FSUI_ICONSTR ( ICON_FA_FROWN_OPEN , " Cheat List " ) , false ,
! System : : GetGameSerial ( ) . empty ( ) & & ! Achievements : : IsHardcoreModeActive ( ) ) )
! System : : GetGameSerial ( ) . empty ( ) & & g_settings . enable_cheats ) )
{
s_current_main_window = MainWindowType : : None ;
DoCheatsMenu ( ) ;
@ -6575,9 +6580,8 @@ TRANSLATE_NOOP("FullscreenUI", "Automatic based on window size");
TRANSLATE_NOOP ( " FullscreenUI " , " Automatic mapping completed for {}. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatic mapping failed for {}. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatic mapping failed, no devices are available. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatically Load Cheats " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatically applies patches to disc images when they are present, currently only PPF is supported. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatically loads and applies cheats on game start. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatically loads and applies cheats on game start. Cheats can break games and saves. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatically saves the emulator state when powering down or exiting. You can then resume directly from where you left off next time. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Automatically switches to fullscreen mode when the program is started. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Avoids calls to C++ code, significantly speeding up the recompiler. " ) ;
@ -6691,6 +6695,7 @@ TRANSLATE_NOOP("FullscreenUI", "Emulation Settings");
TRANSLATE_NOOP ( " FullscreenUI " , " Emulation Speed " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable 8MB RAM " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable Achievements " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable Cheats " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable Discord Presence " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable Fast Boot " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable In-Game Overlays " ) ;
@ -6706,7 +6711,6 @@ TRANSLATE_NOOP("FullscreenUI", "Enable SDL Input Source");
TRANSLATE_NOOP ( " FullscreenUI " , " Enable Subdirectory Scanning " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable TTY Logging " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable VRAM Write Texture Replacement " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable VSync " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable XInput Input Source " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enable debugging when supported by the host's renderer API. Only for developer use. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Enables alignment and bus exceptions. Not needed for any known games. " ) ;
@ -7075,6 +7079,7 @@ TRANSLATE_NOOP("FullscreenUI", "Uses game-specific settings for controllers for
TRANSLATE_NOOP ( " FullscreenUI " , " Uses perspective-correct interpolation for colors, which can improve visuals in some games. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Uses perspective-correct interpolation for texture coordinates, straightening out warped textures. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Uses screen positions to resolve PGXP data. May improve visuals in some games. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " VSync " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " Value: {} | Default: {} | Minimum: {} | Maximum: {} " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " When enabled and logged in, DuckStation will scan for achievements on startup. " ) ;
TRANSLATE_NOOP ( " FullscreenUI " , " When enabled, DuckStation will assume all achievements are locked and not send any unlock notifications to the server. " ) ;