#pragma once

#include <deque>
#include <map>
#include <string>

// Node location
using cfg_location = std::deque<std::string>;

enum class emu_settings_type
{
	// Core
	PPUDecoder,
	SPUDecoder,
	HookStaticFuncs,
	ThreadSchedulerMode,
	SPULoopDetection,
	PreferredSPUThreads,
	PPUDebug,
	SPUDebug,
	MFCDebug,
	MaxLLVMThreads,
	LLVMPrecompilation,
	AccurateSpuDMA,
	AccurateClineStores,
	AccurateRSXAccess,
	FIFOAccuracy,
	XFloatAccuracy,
	AccuratePPU128Loop,
	MFCCommandsShuffling,
	NumPPUThreads,
	SetDAZandFTZ,
	SPUBlockSize,
	SPUCache,
	DebugConsoleMode,
	SilenceAllLogs,
	SuspendEmulationSavestateMode,
	CompatibleEmulationSavestateMode,
	StartSavestatePaused,
	MaxSPURSThreads,
	SleepTimersAccuracy,
	ClocksScale,
	PerformanceReport,
	PPUNJFixup,
	PPUVNANFixup,
	AccurateDFMA,
	AccuratePPUSAT,
	AccuratePPUNJ,
	AccuratePPUVNAN,
	AccuratePPUFPCC,
	MaxPreemptCount,
	SPUProfiler,
	DisableSpinOptimization,
	EnabledSPUEventsBusyLoop,

	// Graphics
	Renderer,
	Resolution,
	AspectRatio,
	FrameLimit,
	MSAA,
	LogShaderPrograms,
	WriteDepthBuffer,
	WriteColorBuffers,
	ReadColorBuffers,
	ReadDepthBuffer,
	HandleRSXTiledMemory,
	VSync,
	DebugOutput,
	DebugOverlay,
	RenderdocCompatibility,
	GPUTextureScaling,
	StretchToDisplayArea,
	VulkanAdapter,
	ForceHighpZ,
	StrictRenderingMode,
	FramebufferAliasingBias,
	DisableVertexCache,
	DisableOcclusionQueries,
	DisableVideoOutput,
	DisableFIFOReordering,
	EmulateDepthCompare,
	StrictTextureFlushing,
	ShaderPrecisionQuality,
	StereoRenderEnabled,
	StereoRenderMode,
	ScreenSize,
	AnisotropicFilterOverride,
	TextureLodBias,
	ResolutionScale,
	MinimumScalableDimension,
	FsrSharpeningStrength,
	ExclusiveFullscreenMode,
	ForceCPUBlitEmulation,
	DisableOnDiskShaderCache,
	DisableVulkanMemAllocator,
	ShaderMode,
	ShaderCompilerNumThreads,
	MultithreadedRSX,
	VBlankRate,
	VBlankNTSCFixup,
	RelaxedZCULL,
	PreciseZCULL,
	DriverWakeUpDelay,
	VulkanAsyncTextureUploads,
	VulkanAsyncSchedulerDriver,
	AllowHostGPULabels,
	DisableMSLFastMath,
	OutputScalingMode,
	ForceHwMSAAResolve,
	DisableAsyncHostMM,
	UseReBAR,
	RecordWithOverlays,
	DisableHWTexelRemapping,

	// Anaglyph Matrix
	CustomAnaglyphMatrixLeft,
	CustomAnaglyphMatrixRight,

	// Performance Overlay
	PerfOverlayEnabled,
	PerfOverlayFramerateGraphEnabled,
	PerfOverlayFrametimeGraphEnabled,
	PerfOverlayFramerateDatapoints,
	PerfOverlayFrametimeDatapoints,
	PerfOverlayDetailLevel,
	PerfOverlayFramerateDetailLevel,
	PerfOverlayFrametimeDetailLevel,
	PerfOverlayPosition,
	PerfOverlayUpdateInterval,
	PerfOverlayFontSize,
	PerfOverlayOpacity,
	PerfOverlayMarginX,
	PerfOverlayMarginY,
	PerfOverlayCenterX,
	PerfOverlayCenterY,
	PerfOverlayUseWindowSpace,

	// Shader Loading Dialog
	ShaderLoadBgEnabled,
	ShaderLoadBgDarkening,
	ShaderLoadBgBlur,

	// Audio
	AudioRenderer,
	DumpToFile,
	ConvertTo16Bit,
	AudioFormat,
	AudioFormats,
	AudioProvider,
	AudioAvport,
	AudioDevice,
	AudioChannelLayout,
	MasterVolume,
	EnableBuffering,
	AudioBufferDuration,
	EnableTimeStretching,
	TimeStretchingThreshold,
	MicrophoneType,
	MicrophoneDevices,
	MusicHandler,

	// Input / Output
	BackgroundInput,
	ShowMoveCursor,
	LockOvlIptToP1,
	PadHandlerMode,
	PadConnection,
	KeyboardHandler,
	MouseHandler,
	Camera,
	CameraType,
	CameraFlip,
	CameraID,
	Move,
	Buzz,
	Turntable,
	GHLtar,
	MidiDevices,
	SDLMappings,
	IoDebugOverlay,
	MouseDebugOverlay,

	// Misc
	ExitRPCS3OnFinish,
	StartOnBoot,
	PauseOnFocusLoss,
	StartGameFullscreen,
	PreventDisplaySleep,
	ShowTrophyPopups,
	ShowRpcnPopups,
	UseNativeInterface,
	UseRecursiveScan,
	ShowShaderCompilationHint,
	ShowPPUCompilationHint,
	ShowAutosaveAutoloadHint,
	ShowPressureIntensityToggleHint,
	ShowAnalogLimiterToggleHint,
	ShowMouseAndKeyboardToggleHint,
	ShowFatalErrorHints,
	ShowCaptureHints,
	WindowTitleFormat,
	PauseDuringHomeMenu,
	PlayMusicDuringBoot,
	EnableGamemode,

	// Network
	InternetStatus,
	DNSAddress,
	IpSwapList,
	PSNStatus,
	BindAddress,
	EnableUpnp,
	DeriveMacFromPsid,
	PSNCountry,
	EnableClans,

	// System
	LicenseArea,
	Language,
	KeyboardType,
	EnterButtonAssignment,
	DateFormat,
	TimeFormat,
	ConsoleTimeOffset,

	// VFS
	EnableHostRoot,
	EmptyHdd0Tmp,
	LimitCacheSize,
	MaximumCacheSize,

	// Log
	Log,
};

/** A helper map that keeps track of where a given setting type is located*/
extern const std::map<emu_settings_type, cfg_location> settings_location;
