From 3b60f13c433eb6b837d65c28c876e9ba79b2e3ab Mon Sep 17 00:00:00 2001 From: Johannes Schultz Date: Fri, 1 Nov 2024 23:26:39 +0000 Subject: [PATCH] [Ref] Use UL_ instead of U_ in TrackerSettings and CAboutDialog places to reduce binary size by about ~12KB. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22059 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- mptrack/AboutDialog.cpp | 107 ++++--- mptrack/TrackerSettings.cpp | 554 ++++++++++++++++++------------------ 2 files changed, 330 insertions(+), 331 deletions(-) diff --git a/mptrack/AboutDialog.cpp b/mptrack/AboutDialog.cpp index 66fe5376b5b..3008bb3ef6d 100644 --- a/mptrack/AboutDialog.cpp +++ b/mptrack/AboutDialog.cpp @@ -250,14 +250,13 @@ BOOL CAboutDlg::OnInitDialog() DialogBase::OnInitDialog(); mpt::ustring app; - app += MPT_UFORMAT("OpenMPT{} ({} ({} bit))")( + app += MPT_UFORMAT("OpenMPT{} ({}, {} bit)\r\n")( mpt::ToUnicode(mpt::Charset::ASCII, OPENMPT_BUILD_VARIANT_MONIKER), mpt::OS::Windows::Name(mpt::OS::Windows::GetProcessArchitecture()), mpt::arch_bits) - + U_("\n"); - app += U_("Version ") + Build::GetVersionStringSimple() + U_("\n\n"); - app += Build::GetURL(Build::Url::Website) + U_("\n"); - SetDlgItemText(IDC_EDIT3, mpt::ToCString(mpt::replace(app, U_("\n"), U_("\r\n")))); + + UL_("Version ") + Build::GetVersionStringSimple() + UL_("\r\n\r\n") + + Build::GetURL(Build::Url::Website) + UL_("\r\n"); + SetDlgItemText(IDC_EDIT3, mpt::ToCString(app)); m_bmp.SubclassDlgItem(IDC_BITMAP1, this); @@ -303,10 +302,10 @@ static mpt::ustring CPUFeaturesToString(mpt::arch::current::feature_flags procSu std::vector features; #if MPT_COMPILER_MSVC #if defined(MPT_ENABLE_ARCH_X86) - features.push_back(U_("x86")); + features.push_back(UL_("x86")); #endif #if defined(MPT_ENABLE_ARCH_AMD64) - features.push_back(U_("amd64")); + features.push_back(UL_("amd64")); #endif struct ProcFlag { @@ -342,9 +341,9 @@ static mpt::ustring CPUFeaturesToString(mpt::arch::current::feature_flags procSu mpt::ustring CAboutDlg::GetTabText(int tab) { - const mpt::ustring lf = U_("\n"); - const mpt::ustring yes = U_("yes"); - const mpt::ustring no = U_("no"); + const mpt::ustring lf = UL_("\n"); + const mpt::ustring yes = UL_("yes"); + const mpt::ustring no = UL_("no"); #ifdef MPT_ENABLE_ARCH_INTRINSICS const mpt::arch::current::cpu_info CPUInfo = mpt::arch::get_cpu_info(); #endif // MPT_ENABLE_ARCH_INTRINSICS @@ -352,7 +351,7 @@ mpt::ustring CAboutDlg::GetTabText(int tab) switch(tab) { case 0: - text = U_("OpenMPT - Open ModPlug Tracker\n\n") + text = UL_("OpenMPT - Open ModPlug Tracker\n\n") + MPT_UFORMAT("Version: {}\n")(Build::GetVersionStringExtended()) + MPT_UFORMAT("Source Code: {}\n")(SourceInfo::Current().GetUrlWithRevision() + UL_(" ") + SourceInfo::Current().GetStateString()) + MPT_UFORMAT("Build Date: {}\n")(Build::GetBuildDateString()) @@ -361,18 +360,18 @@ mpt::ustring CAboutDlg::GetTabText(int tab) + MPT_UFORMAT("Required Windows Kernel Level: {}\n")(mpt::OS::Windows::Version::GetName(mpt::OS::Windows::Version::GetMinimumKernelLevel())) + MPT_UFORMAT("Required Windows API Level: {}\n")(mpt::OS::Windows::Version::GetName(mpt::OS::Windows::Version::GetMinimumAPILevel())); { - text += U_("Required CPU features: "); + text += UL_("Required CPU features: "); std::vector features; #ifdef MPT_ENABLE_ARCH_INTRINSICS #if MPT_ARCH_AMD64 - features.push_back(U_("x86-64")); - if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx) features.push_back(U_("avx")); - if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx2) features.push_back(U_("avx2")); + features.push_back(UL_("x86-64")); + if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx) features.push_back(UL_("avx")); + if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx2) features.push_back(UL_("avx2")); #elif MPT_ARCH_X86 - if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::sse) features.push_back(U_("sse")); - if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::sse2) features.push_back(U_("sse2")); - if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx) features.push_back(U_("avx")); - if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx2) features.push_back(U_("avx2")); + if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::sse) features.push_back(UL_("sse")); + if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::sse2) features.push_back(UL_("sse2")); + if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx) features.push_back(UL_("avx")); + if(mpt::arch::current::assumed_features() & mpt::arch::current::feature::avx2) features.push_back(UL_("avx2")); #endif #endif text += mpt::join_format(features, U_(" ")); @@ -398,16 +397,16 @@ mpt::ustring CAboutDlg::GetTabText(int tab) text += MPT_UFORMAT("Available CPU features: {}\n")(CPUFeaturesToString(CPUInfo.get_features())); #endif // MPT_ENABLE_ARCH_INTRINSICS text += MPT_UFORMAT("Operating System: {}\n\n")(mpt::OS::Windows::Version::GetCurrentName()); - text += MPT_UFORMAT("OpenMPT Install Path{1}: {0}\n")(theApp.GetInstallPath(), theApp.IsPortableMode() ? U_(" (portable)") : U_("")); - text += MPT_UFORMAT("OpenMPT Executable Path{1}: {0}\n")(theApp.GetInstallBinArchPath(), theApp.IsPortableMode() ? U_(" (portable)") : U_("")); - text += MPT_UFORMAT("Settings{1}: {0}\n")(theApp.GetConfigFileName(), theApp.IsPortableMode() ? U_(" (portable)") : U_("")); + text += MPT_UFORMAT("OpenMPT Install Path{1}: {0}\n")(theApp.GetInstallPath(), theApp.IsPortableMode() ? UL_(" (portable)") : UL_("")); + text += MPT_UFORMAT("OpenMPT Executable Path{1}: {0}\n")(theApp.GetInstallBinArchPath(), theApp.IsPortableMode() ? UL_(" (portable)") : UL_("")); + text += MPT_UFORMAT("Settings{1}: {0}\n")(theApp.GetConfigFileName(), theApp.IsPortableMode() ? UL_(" (portable)") : UL_("")); break; case 1: { std::vector components = ComponentManager::Instance()->GetRegisteredComponents(); if(!TrackerSettings::Instance().ComponentsKeepLoaded) { - text += U_("Components are loaded and unloaded as needed.\n\n"); + text += UL_("Components are loaded and unloaded as needed.\n\n"); for(const auto &component : components) { ComponentInfo info = ComponentManager::Instance()->GetComponentInfo(component); @@ -424,10 +423,10 @@ mpt::ustring CAboutDlg::GetTabText(int tab) { if(available) { - text += U_("Loaded Components:\n"); + text += UL_("Loaded Components:\n"); } else { - text += U_("\nUnloaded Components:\n"); + text += UL_("\nUnloaded Components:\n"); } for(const auto &component : components) { @@ -441,22 +440,22 @@ mpt::ustring CAboutDlg::GetTabText(int tab) } text += MPT_UFORMAT("{}: {}") ( name - , info.state == ComponentStateAvailable ? U_("ok") : - info.state == ComponentStateUnavailable? U_("missing") : - info.state == ComponentStateUnintialized ? U_("not loaded") : - info.state == ComponentStateBlocked ? U_("blocked") : - info.state == ComponentStateUnregistered ? U_("unregistered") : - U_("unknown") + , info.state == ComponentStateAvailable ? UL_("ok") : + info.state == ComponentStateUnavailable? UL_("missing") : + info.state == ComponentStateUnintialized ? UL_("not loaded") : + info.state == ComponentStateBlocked ? UL_("blocked") : + info.state == ComponentStateUnregistered ? UL_("unregistered") : + UL_("unknown") ); if(info.type != ComponentTypeUnknown) { text += MPT_UFORMAT(" ({})") - ( info.type == ComponentTypeBuiltin ? U_("builtin") : - info.type == ComponentTypeSystem ? U_("system") : - info.type == ComponentTypeSystemInstallable ? U_("system, optional") : - info.type == ComponentTypeBundled ? U_("bundled") : - info.type == ComponentTypeForeign ? U_("foreign") : - U_("unknown") + ( info.type == ComponentTypeBuiltin ? UL_("builtin") : + info.type == ComponentTypeSystem ? UL_("system") : + info.type == ComponentTypeSystemInstallable ? UL_("system, optional") : + info.type == ComponentTypeBundled ? UL_("bundled") : + info.type == ComponentTypeForeign ? UL_("foreign") : + UL_("unknown") ); } text += lf; @@ -472,17 +471,17 @@ mpt::ustring CAboutDlg::GetTabText(int tab) text += Build::GetLicenseString(); break; case 4: - text += U_("Website:\n") + Build::GetURL(Build::Url::Website); - text += U_("\n\nForum:\n") + Build::GetURL(Build::Url::Forum); - text += U_("\n\nBug Tracker:\n") + Build::GetURL(Build::Url::Bugtracker); - text += U_("\n\nUpdates:\n") + Build::GetURL(Build::Url::Updates); + text += UL_("Website:\n") + Build::GetURL(Build::Url::Website); + text += UL_("\n\nForum:\n") + Build::GetURL(Build::Url::Forum); + text += UL_("\n\nBug Tracker:\n") + Build::GetURL(Build::Url::Bugtracker); + text += UL_("\n\nUpdates:\n") + Build::GetURL(Build::Url::Updates); break; case 5: try { if(!theApp.GetWine()) { - text += U_("Wine integration not available.\n"); + text += UL_("Wine integration not available.\n"); } else { @@ -493,20 +492,20 @@ mpt::ustring CAboutDlg::GetTabText(int tab) ); text += MPT_UFORMAT("Windows version: {}\n") ( - mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win81) ? U_("Windows 8.1") : - mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win8) ? U_("Windows 8") : - mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win7) ? U_("Windows 7") : - mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? U_("Windows Vista") : - mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::WinXP) ? U_("Windows XP") : - mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win2000) ? U_("Windows 2000") : - mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::WinNT4) ? U_("Windows NT4") : - U_("unknown") + mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win81) ? UL_("Windows 8.1") : + mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win8) ? UL_("Windows 8") : + mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win7) ? UL_("Windows 7") : + mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::WinVista) ? UL_("Windows Vista") : + mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::WinXP) ? UL_("Windows XP") : + mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::Win2000) ? UL_("Windows 2000") : + mpt::osinfo::windows::Version::Current().IsAtLeast(mpt::osinfo::windows::Version::WinNT4) ? UL_("Windows NT4") : + UL_("unknown") ); text += MPT_UFORMAT("Windows original: {}\n") ( mpt::OS::Windows::IsOriginal() ? yes : no ); - text += U_("\n"); + text += UL_("\n"); text += MPT_UFORMAT("Wine: {}\n") ( mpt::OS::Windows::IsWine() ? yes : no @@ -524,7 +523,7 @@ mpt::ustring CAboutDlg::GetTabText(int tab) ( mpt::ToUnicode(mpt::Charset::UTF8, wine.VersionContext().RawHostRelease()) ); - text += U_("\n"); + text += UL_("\n"); text += MPT_UFORMAT("uname -m: {}\n") ( mpt::ToUnicode(mpt::Charset::UTF8, wine.Uname_m()) @@ -542,7 +541,7 @@ mpt::ustring CAboutDlg::GetTabText(int tab) ( mpt::ToUnicode(mpt::Charset::UTF8, wine.XDG_CONFIG_HOME()) ); - text += U_("\n"); + text += UL_("\n"); text += MPT_UFORMAT("OpenMPT folder: {}\n") ( theApp.GetInstallPath().ToUnicode() @@ -563,7 +562,7 @@ mpt::ustring CAboutDlg::GetTabText(int tab) } } catch(const mpt::Wine::Exception & e) { - text += U_("Exception: ") + mpt::get_exception_text(e) + U_("\n"); + text += UL_("Exception: ") + mpt::get_exception_text(e) + UL_("\n"); } break; } diff --git a/mptrack/TrackerSettings.cpp b/mptrack/TrackerSettings.cpp index 7f8b00607d3..8149c9da506 100644 --- a/mptrack/TrackerSettings.cpp +++ b/mptrack/TrackerSettings.cpp @@ -119,19 +119,19 @@ DebugSettings::DebugSettings(SettingsContainer &conf_) : conf(conf_) // Debug #if !defined(MPT_LOG_IS_DISABLED) - , DebugLogLevel(conf, U_("Debug"), U_("LogLevel"), static_cast(mpt::log::GlobalLogLevel)) - , DebugLogFacilitySolo(conf, U_("Debug"), U_("LogFacilitySolo"), std::string()) - , DebugLogFacilityBlocked(conf, U_("Debug"), U_("LogFacilityBlocked"), std::string()) - , DebugLogFileEnable(conf, U_("Debug"), U_("LogFileEnable"), mpt::log::FileEnabled) - , DebugLogDebuggerEnable(conf, U_("Debug"), U_("LogDebuggerEnable"), mpt::log::DebuggerEnabled) - , DebugLogConsoleEnable(conf, U_("Debug"), U_("LogConsoleEnable"), mpt::log::ConsoleEnabled) + , DebugLogLevel(conf, UL_("Debug"), UL_("LogLevel"), static_cast(mpt::log::GlobalLogLevel)) + , DebugLogFacilitySolo(conf, UL_("Debug"), UL_("LogFacilitySolo"), std::string()) + , DebugLogFacilityBlocked(conf, UL_("Debug"), UL_("LogFacilityBlocked"), std::string()) + , DebugLogFileEnable(conf, UL_("Debug"), UL_("LogFileEnable"), mpt::log::FileEnabled) + , DebugLogDebuggerEnable(conf, UL_("Debug"), UL_("LogDebuggerEnable"), mpt::log::DebuggerEnabled) + , DebugLogConsoleEnable(conf, UL_("Debug"), UL_("LogConsoleEnable"), mpt::log::ConsoleEnabled) #endif - , DebugTraceEnable(conf, U_("Debug"), U_("TraceEnable"), false) - , DebugTraceSize(conf, U_("Debug"), U_("TraceSize"), 1000000) - , DebugTraceAlwaysDump(conf, U_("Debug"), U_("TraceAlwaysDump"), false) - , DebugStopSoundDeviceOnCrash(conf, U_("Debug"), U_("StopSoundDeviceOnCrash"), true) - , DebugStopSoundDeviceBeforeDump(conf, U_("Debug"), U_("StopSoundDeviceBeforeDump"), false) - , DebugDelegateToWindowsHandler(conf, U_("Debug"), U_("DelegateToWindowsHandler"), false) + , DebugTraceEnable(conf, UL_("Debug"), UL_("TraceEnable"), false) + , DebugTraceSize(conf, UL_("Debug"), UL_("TraceSize"), 1000000) + , DebugTraceAlwaysDump(conf, UL_("Debug"), UL_("TraceAlwaysDump"), false) + , DebugStopSoundDeviceOnCrash(conf, UL_("Debug"), UL_("StopSoundDeviceOnCrash"), true) + , DebugStopSoundDeviceBeforeDump(conf, UL_("Debug"), UL_("StopSoundDeviceBeforeDump"), false) + , DebugDelegateToWindowsHandler(conf, UL_("Debug"), UL_("DelegateToWindowsHandler"), false) { // Duplicate state for debug stuff in order to avoid calling into settings framework from crash context. @@ -168,216 +168,216 @@ DebugSettings::~DebugSettings() TrackerSettings::TrackerSettings(SettingsContainer &conf) : conf(conf) // Version - , IniVersion(conf, U_("Version"), U_("Version"), mpt::ustring()) + , IniVersion(conf, UL_("Version"), UL_("Version"), mpt::ustring()) , FirstRun(IniVersion.Get() == mpt::ustring()) , PreviousSettingsVersion(GetPreviousSettingsVersion(IniVersion)) - , VersionInstallGUID(conf, U_("Version"), U_("InstallGUID"), mpt::UUID()) + , VersionInstallGUID(conf, UL_("Version"), UL_("InstallGUID"), mpt::UUID()) // Display - , m_ShowSplashScreen(conf, U_("Display"), U_("ShowSplashScreen"), true) - , gbMdiMaximize(conf, U_("Display"), U_("MDIMaximize"), true) - , highResUI(conf, U_("Display"), U_("HighResUI"), false) - , glTreeSplitRatio(conf, U_("Display"), U_("MDITreeRatio"), 128) - , glTreeWindowWidth(conf, U_("Display"), U_("MDITreeWidth"), 160) - , glGeneralWindowHeight(conf, U_("Display"), U_("MDIGeneralHeight"), 222) - , glPatternWindowHeight(conf, U_("Display"), U_("MDIPatternHeight"), 152) - , glSampleWindowHeight(conf, U_("Display"), U_("MDISampleHeight"), 190) - , glInstrumentWindowHeight(conf, U_("Display"), U_("MDIInstrumentHeight"), 300) - , glCommentsWindowHeight(conf, U_("Display"), U_("MDICommentsHeight"), 288) - , glGraphWindowHeight(conf, U_("Display"), U_("MDIGraphHeight"), 288) - , gnPlugWindowX(conf, U_("Display"), U_("PlugSelectWindowX"), 243) - , gnPlugWindowY(conf, U_("Display"), U_("PlugSelectWindowY"), 273) - , gnPlugWindowWidth(conf, U_("Display"), U_("PlugSelectWindowWidth"), 450) - , gnPlugWindowHeight(conf, U_("Display"), U_("PlugSelectWindowHeight"), 540) - , lastSelectedPlugin(conf, U_("Display"), U_("PlugSelectWindowLast"), {}) - , gnMsgBoxVisiblityFlags(conf, U_("Display"), U_("MsgBoxVisibilityFlags"), uint32_max) - , GUIUpdateInterval(conf, U_("Display"), U_("GUIUpdateInterval"), 0) - , FSUpdateInterval(conf, U_("Display"), U_("FSUpdateInterval"), 500) - , VuMeterUpdateInterval(conf, U_("Display"), U_("VuMeterUpdateInterval"), 15) - , VuMeterDecaySpeedDecibelPerSecond(conf, U_("Display"), U_("VuMeterDecaySpeedDecibelPerSecond"), 88.0f) - , accidentalFlats(conf, U_("Display"), U_("AccidentalFlats"), false) - , rememberSongWindows(conf, U_("Display"), U_("RememberSongWindows"), true) - , showDirsInSampleBrowser(conf, U_("Display"), U_("ShowDirsInSampleBrowser"), false) - , useOldStyleFolderBrowser(conf, U_("Display"), U_("UseOldStyleFolderBrowser"), false) - , defaultRainbowChannelColors(conf, U_("Display"), U_("DefaultChannelColors"), DefaultChannelColors::Random) - , commentsFont(conf, U_("Display"), U_("Comments Font"), FontSetting(U_("Courier New"), 120)) + , m_ShowSplashScreen(conf, UL_("Display"), UL_("ShowSplashScreen"), true) + , gbMdiMaximize(conf, UL_("Display"), UL_("MDIMaximize"), true) + , highResUI(conf, UL_("Display"), UL_("HighResUI"), false) + , glTreeSplitRatio(conf, UL_("Display"), UL_("MDITreeRatio"), 128) + , glTreeWindowWidth(conf, UL_("Display"), UL_("MDITreeWidth"), 160) + , glGeneralWindowHeight(conf, UL_("Display"), UL_("MDIGeneralHeight"), 222) + , glPatternWindowHeight(conf, UL_("Display"), UL_("MDIPatternHeight"), 152) + , glSampleWindowHeight(conf, UL_("Display"), UL_("MDISampleHeight"), 190) + , glInstrumentWindowHeight(conf, UL_("Display"), UL_("MDIInstrumentHeight"), 300) + , glCommentsWindowHeight(conf, UL_("Display"), UL_("MDICommentsHeight"), 288) + , glGraphWindowHeight(conf, UL_("Display"), UL_("MDIGraphHeight"), 288) + , gnPlugWindowX(conf, UL_("Display"), UL_("PlugSelectWindowX"), 243) + , gnPlugWindowY(conf, UL_("Display"), UL_("PlugSelectWindowY"), 273) + , gnPlugWindowWidth(conf, UL_("Display"), UL_("PlugSelectWindowWidth"), 450) + , gnPlugWindowHeight(conf, UL_("Display"), UL_("PlugSelectWindowHeight"), 540) + , lastSelectedPlugin(conf, UL_("Display"), UL_("PlugSelectWindowLast"), {}) + , gnMsgBoxVisiblityFlags(conf, UL_("Display"), UL_("MsgBoxVisibilityFlags"), uint32_max) + , GUIUpdateInterval(conf, UL_("Display"), UL_("GUIUpdateInterval"), 0) + , FSUpdateInterval(conf, UL_("Display"), UL_("FSUpdateInterval"), 500) + , VuMeterUpdateInterval(conf, UL_("Display"), UL_("VuMeterUpdateInterval"), 15) + , VuMeterDecaySpeedDecibelPerSecond(conf, UL_("Display"), UL_("VuMeterDecaySpeedDecibelPerSecond"), 88.0f) + , accidentalFlats(conf, UL_("Display"), UL_("AccidentalFlats"), false) + , rememberSongWindows(conf, UL_("Display"), UL_("RememberSongWindows"), true) + , showDirsInSampleBrowser(conf, UL_("Display"), UL_("ShowDirsInSampleBrowser"), false) + , useOldStyleFolderBrowser(conf, UL_("Display"), UL_("UseOldStyleFolderBrowser"), false) + , defaultRainbowChannelColors(conf, UL_("Display"), UL_("DefaultChannelColors"), DefaultChannelColors::Random) + , commentsFont(conf, UL_("Display"), UL_("Comments Font"), FontSetting(UL_("Courier New"), 120)) // Misc - , defaultModType(conf, U_("Misc"), U_("DefaultModType"), MOD_TYPE_IT) - , defaultNewFileAction(conf, U_("Misc"), U_("DefaultNewFileAction"), nfDefaultFormat) - , DefaultPlugVolumeHandling(conf, U_("Misc"), U_("DefaultPlugVolumeHandling"), PLUGIN_VOLUMEHANDLING_IGNORE) - , autoApplySmoothFT2Ramping(conf, U_("Misc"), U_("SmoothFT2Ramping"), false) - , MiscITCompressionStereo(conf, U_("Misc"), U_("ITCompressionStereo"), 4) - , MiscITCompressionMono(conf, U_("Misc"), U_("ITCompressionMono"), 7) - , MiscSaveChannelMuteStatus(conf, U_("Misc"), U_("SaveChannelMuteStatus"), true) - , MiscAllowMultipleCommandsPerKey(conf, U_("Misc"), U_("AllowMultipleCommandsPerKey"), false) - , MiscDistinguishModifiers(conf, U_("Misc"), U_("DistinguishModifiers"), false) - , MiscProcessPriorityClass(conf, U_("Misc"), U_("ProcessPriorityClass"), ProcessPriorityClassNORMAL) - , MiscFlushFileBuffersOnSave(conf, U_("Misc"), U_("FlushFileBuffersOnSave"), true) - , MiscCacheCompleteFileBeforeLoading(conf, U_("Misc"), U_("CacheCompleteFileBeforeLoading"), false) - , MiscUseSingleInstance(conf, U_("Misc"), U_("UseSingleInstance"), false) + , defaultModType(conf, UL_("Misc"), UL_("DefaultModType"), MOD_TYPE_IT) + , defaultNewFileAction(conf, UL_("Misc"), UL_("DefaultNewFileAction"), nfDefaultFormat) + , DefaultPlugVolumeHandling(conf, UL_("Misc"), UL_("DefaultPlugVolumeHandling"), PLUGIN_VOLUMEHANDLING_IGNORE) + , autoApplySmoothFT2Ramping(conf, UL_("Misc"), UL_("SmoothFT2Ramping"), false) + , MiscITCompressionStereo(conf, UL_("Misc"), UL_("ITCompressionStereo"), 4) + , MiscITCompressionMono(conf, UL_("Misc"), UL_("ITCompressionMono"), 7) + , MiscSaveChannelMuteStatus(conf, UL_("Misc"), UL_("SaveChannelMuteStatus"), true) + , MiscAllowMultipleCommandsPerKey(conf, UL_("Misc"), UL_("AllowMultipleCommandsPerKey"), false) + , MiscDistinguishModifiers(conf, UL_("Misc"), UL_("DistinguishModifiers"), false) + , MiscProcessPriorityClass(conf, UL_("Misc"), UL_("ProcessPriorityClass"), ProcessPriorityClassNORMAL) + , MiscFlushFileBuffersOnSave(conf, UL_("Misc"), UL_("FlushFileBuffersOnSave"), true) + , MiscCacheCompleteFileBeforeLoading(conf, UL_("Misc"), UL_("CacheCompleteFileBeforeLoading"), false) + , MiscUseSingleInstance(conf, UL_("Misc"), UL_("UseSingleInstance"), false) // Sound Settings , m_SoundShowRecordingSettings(false) - , m_SoundShowDeprecatedDevices(conf, U_("Sound Settings"), U_("ShowDeprecatedDevices"), false) - , m_SoundDeprecatedDeviceWarningShown(conf, U_("Sound Settings"), U_("DeprecatedDeviceWarningShown"), false) - , m_SoundSampleRates(conf, U_("Sound Settings"), U_("SampleRates"), GetDefaultSampleRates()) - , m_SoundSettingsOpenDeviceAtStartup(conf, U_("Sound Settings"), U_("OpenDeviceAtStartup"), false) - , m_SoundSettingsStopMode(conf, U_("Sound Settings"), U_("StopMode"), SoundDeviceStopModeClosed) + , m_SoundShowDeprecatedDevices(conf, UL_("Sound Settings"), UL_("ShowDeprecatedDevices"), false) + , m_SoundDeprecatedDeviceWarningShown(conf, UL_("Sound Settings"), UL_("DeprecatedDeviceWarningShown"), false) + , m_SoundSampleRates(conf, UL_("Sound Settings"), UL_("SampleRates"), GetDefaultSampleRates()) + , m_SoundSettingsOpenDeviceAtStartup(conf, UL_("Sound Settings"), UL_("OpenDeviceAtStartup"), false) + , m_SoundSettingsStopMode(conf, UL_("Sound Settings"), UL_("StopMode"), SoundDeviceStopModeClosed) , m_SoundDeviceSettingsUseOldDefaults(false) , m_SoundDeviceID_DEPRECATED(SoundDevice::Legacy::ID()) - , m_SoundDeviceIdentifier(conf, U_("Sound Settings"), U_("Device"), SoundDevice::Identifier()) - , MixerMaxChannels(conf, U_("Sound Settings"), U_("MixChannels"), MixerSettings().m_nMaxMixChannels) - , MixerDSPMask(conf, U_("Sound Settings"), U_("Quality"), MixerSettings().DSPMask) - , MixerFlags(conf, U_("Sound Settings"), U_("SoundSetup"), MixerSettings().MixerFlags) - , MixerSamplerate(conf, U_("Sound Settings"), U_("Mixing_Rate"), MixerSettings().gdwMixingFreq) - , MixerOutputChannels(conf, U_("Sound Settings"), U_("ChannelMode"), MixerSettings().gnChannels) - , MixerPreAmp(conf, U_("Sound Settings"), U_("PreAmp"), MixerSettings().m_nPreAmp) - , MixerStereoSeparation(conf, U_("Sound Settings"), U_("StereoSeparation"), MixerSettings().m_nStereoSeparation) - , MixerVolumeRampUpMicroseconds(conf, U_("Sound Settings"), U_("VolumeRampUpMicroseconds"), MixerSettings().GetVolumeRampUpMicroseconds()) - , MixerVolumeRampDownMicroseconds(conf, U_("Sound Settings"), U_("VolumeRampDownMicroseconds"), MixerSettings().GetVolumeRampDownMicroseconds()) - , MixerNumInputChannels(conf, U_("Sound Settings"), U_("NumInputChannels"), static_cast(MixerSettings().NumInputChannels)) - , ResamplerMode(conf, U_("Sound Settings"), U_("SrcMode"), CResamplerSettings().SrcMode) - , ResamplerSubMode(conf, U_("Sound Settings"), U_("XMMSModplugResamplerWFIRType"), CResamplerSettings().gbWFIRType) - , ResamplerCutoffPercent(conf, U_("Sound Settings"), U_("ResamplerWFIRCutoff"), mpt::saturate_round(CResamplerSettings().gdWFIRCutoff * 100.0)) - , ResamplerEmulateAmiga(conf, U_("Sound Settings"), U_("ResamplerEmulateAmiga"), Resampling::AmigaFilter::A1200) - , SoundBoostedThreadPriority(conf, U_("Sound Settings"), U_("BoostedThreadPriority"), SoundDevice::AppInfo().BoostedThreadPriorityXP) - , SoundBoostedThreadMMCSSClass(conf, U_("Sound Settings"), U_("BoostedThreadMMCSSClass"), SoundDevice::AppInfo().BoostedThreadMMCSSClassVista) - , SoundBoostedThreadRealtimePosix(conf, U_("Sound Settings"), U_("BoostedThreadRealtimeLinux"), SoundDevice::AppInfo().BoostedThreadRealtimePosix) - , SoundBoostedThreadNicenessPosix(conf, U_("Sound Settings"), U_("BoostedThreadNicenessPosix"), SoundDevice::AppInfo().BoostedThreadNicenessPosix) - , SoundBoostedThreadRtprioPosix(conf, U_("Sound Settings"), U_("BoostedThreadRtprioLinux"), SoundDevice::AppInfo().BoostedThreadRtprioPosix) - , SoundMaskDriverCrashes(conf, U_("Sound Settings"), U_("MaskDriverCrashes"), SoundDevice::AppInfo().MaskDriverCrashes) - , SoundAllowDeferredProcessing(conf, U_("Sound Settings"), U_("AllowDeferredProcessing"), SoundDevice::AppInfo().AllowDeferredProcessing) + , m_SoundDeviceIdentifier(conf, UL_("Sound Settings"), UL_("Device"), SoundDevice::Identifier()) + , MixerMaxChannels(conf, UL_("Sound Settings"), UL_("MixChannels"), MixerSettings().m_nMaxMixChannels) + , MixerDSPMask(conf, UL_("Sound Settings"), UL_("Quality"), MixerSettings().DSPMask) + , MixerFlags(conf, UL_("Sound Settings"), UL_("SoundSetup"), MixerSettings().MixerFlags) + , MixerSamplerate(conf, UL_("Sound Settings"), UL_("Mixing_Rate"), MixerSettings().gdwMixingFreq) + , MixerOutputChannels(conf, UL_("Sound Settings"), UL_("ChannelMode"), MixerSettings().gnChannels) + , MixerPreAmp(conf, UL_("Sound Settings"), UL_("PreAmp"), MixerSettings().m_nPreAmp) + , MixerStereoSeparation(conf, UL_("Sound Settings"), UL_("StereoSeparation"), MixerSettings().m_nStereoSeparation) + , MixerVolumeRampUpMicroseconds(conf, UL_("Sound Settings"), UL_("VolumeRampUpMicroseconds"), MixerSettings().GetVolumeRampUpMicroseconds()) + , MixerVolumeRampDownMicroseconds(conf, UL_("Sound Settings"), UL_("VolumeRampDownMicroseconds"), MixerSettings().GetVolumeRampDownMicroseconds()) + , MixerNumInputChannels(conf, UL_("Sound Settings"), UL_("NumInputChannels"), static_cast(MixerSettings().NumInputChannels)) + , ResamplerMode(conf, UL_("Sound Settings"), UL_("SrcMode"), CResamplerSettings().SrcMode) + , ResamplerSubMode(conf, UL_("Sound Settings"), UL_("XMMSModplugResamplerWFIRType"), CResamplerSettings().gbWFIRType) + , ResamplerCutoffPercent(conf, UL_("Sound Settings"), UL_("ResamplerWFIRCutoff"), mpt::saturate_round(CResamplerSettings().gdWFIRCutoff * 100.0)) + , ResamplerEmulateAmiga(conf, UL_("Sound Settings"), UL_("ResamplerEmulateAmiga"), Resampling::AmigaFilter::A1200) + , SoundBoostedThreadPriority(conf, UL_("Sound Settings"), UL_("BoostedThreadPriority"), SoundDevice::AppInfo().BoostedThreadPriorityXP) + , SoundBoostedThreadMMCSSClass(conf, UL_("Sound Settings"), UL_("BoostedThreadMMCSSClass"), SoundDevice::AppInfo().BoostedThreadMMCSSClassVista) + , SoundBoostedThreadRealtimePosix(conf, UL_("Sound Settings"), UL_("BoostedThreadRealtimeLinux"), SoundDevice::AppInfo().BoostedThreadRealtimePosix) + , SoundBoostedThreadNicenessPosix(conf, UL_("Sound Settings"), UL_("BoostedThreadNicenessPosix"), SoundDevice::AppInfo().BoostedThreadNicenessPosix) + , SoundBoostedThreadRtprioPosix(conf, UL_("Sound Settings"), UL_("BoostedThreadRtprioLinux"), SoundDevice::AppInfo().BoostedThreadRtprioPosix) + , SoundMaskDriverCrashes(conf, UL_("Sound Settings"), UL_("MaskDriverCrashes"), SoundDevice::AppInfo().MaskDriverCrashes) + , SoundAllowDeferredProcessing(conf, UL_("Sound Settings"), UL_("AllowDeferredProcessing"), SoundDevice::AppInfo().AllowDeferredProcessing) // MIDI Settings - , m_nMidiDevice(conf, U_("MIDI Settings"), U_("MidiDevice"), 0) - , midiDeviceName(conf, U_("MIDI Settings"), U_("MidiDeviceName"), _T("")) - , m_dwMidiSetup(conf, U_("MIDI Settings"), U_("MidiSetup"), MIDISETUP_RECORDVELOCITY | MIDISETUP_RECORDNOTEOFF | MIDISETUP_TRANSPOSEKEYBOARD | MIDISETUP_MIDITOPLUG) - , aftertouchBehaviour(conf, U_("MIDI Settings"), U_("AftertouchBehaviour"), atDoNotRecord) - , midiVelocityAmp(conf, U_("MIDI Settings"), U_("MidiVelocityAmp"), 100) - , midiIgnoreCCs(conf, U_("MIDI Settings"), U_("IgnoredCCs"), std::bitset<128>()) - , midiImportPatternLen(conf, U_("MIDI Settings"), U_("MidiImportPatLen"), 128) - , midiImportQuantize(conf, U_("MIDI Settings"), U_("MidiImportQuantize"), 32) - , midiImportTicks(conf, U_("MIDI Settings"), U_("MidiImportTicks"), 6) + , m_nMidiDevice(conf, UL_("MIDI Settings"), UL_("MidiDevice"), 0) + , midiDeviceName(conf, UL_("MIDI Settings"), UL_("MidiDeviceName"), _T("")) + , m_dwMidiSetup(conf, UL_("MIDI Settings"), UL_("MidiSetup"), MIDISETUP_RECORDVELOCITY | MIDISETUP_RECORDNOTEOFF | MIDISETUP_TRANSPOSEKEYBOARD | MIDISETUP_MIDITOPLUG) + , aftertouchBehaviour(conf, UL_("MIDI Settings"), UL_("AftertouchBehaviour"), atDoNotRecord) + , midiVelocityAmp(conf, UL_("MIDI Settings"), UL_("MidiVelocityAmp"), 100) + , midiIgnoreCCs(conf, UL_("MIDI Settings"), UL_("IgnoredCCs"), std::bitset<128>()) + , midiImportPatternLen(conf, UL_("MIDI Settings"), UL_("MidiImportPatLen"), 128) + , midiImportQuantize(conf, UL_("MIDI Settings"), UL_("MidiImportQuantize"), 32) + , midiImportTicks(conf, UL_("MIDI Settings"), UL_("MidiImportTicks"), 6) // Pattern Editor - , gbLoopSong(conf, U_("Pattern Editor"), U_("LoopSong"), true) - , gnPatternSpacing(conf, U_("Pattern Editor"), U_("Spacing"), 0) - , gbPatternVUMeters(conf, U_("Pattern Editor"), U_("VU-Meters"), true) - , gbPatternPluginNames(conf, U_("Pattern Editor"), U_("Plugin-Names"), true) - , gbPatternRecord(conf, U_("Pattern Editor"), U_("Record"), true) - , patternNoEditPopup(conf, U_("Pattern Editor"), U_("NoEditPopup"), false) - , patternStepCommands(conf, U_("Pattern Editor"), U_("EditStepAppliesToCommands"), false) - , m_dwPatternSetup(conf, U_("Pattern Editor"), U_("PatternSetup"), GetDefaultPatternSetup()) - , m_nRowHighlightMeasures(conf, U_("Pattern Editor"), U_("RowSpacing"), 16) - , m_nRowHighlightBeats(conf, U_("Pattern Editor"), U_("RowSpacing2"), 4) - , patternIgnoreSongTimeSignature(conf, U_("Pattern Editor"), U_("IgnoreSongTimeSignature"), false) - , recordQuantizeRows(conf, U_("Pattern Editor"), U_("RecordQuantize"), 0) - , gnAutoChordWaitTime(conf, U_("Pattern Editor"), U_("AutoChordWaitTime"), 60) - , orderlistMargins(conf, U_("Pattern Editor"), U_("DefaultSequenceMargins"), 0) - , rowDisplayOffset(conf, U_("Pattern Editor"), U_("RowDisplayOffset"), 0) - , patternFont(conf, U_("Pattern Editor"), U_("Font"), FontSetting(PATTERNFONT_SMALL, 0)) - , patternFontDot(conf, U_("Pattern Editor"), U_("FontDot"), U_(".")) - , effectVisWidth(conf, U_("Pattern Editor"), U_("EffectVisWidth"), -1) - , effectVisHeight(conf, U_("Pattern Editor"), U_("EffectVisHeight"), -1) - , effectVisX(conf, U_("Pattern Editor"), U_("EffectVisX"), int32_min) - , effectVisY(conf, U_("Pattern Editor"), U_("EffectVisY"), int32_min) - , patternAccessibilityFormat(conf, U_("Pattern Editor"), U_("AccessibilityFormat"), _T("Row %row%, Channel %channel%, %column_type%: %column_description%")) - , patternAlwaysDrawWholePatternOnScrollSlow(conf, U_("Pattern Editor"), U_("AlwaysDrawWholePatternOnScrollSlow"), false) - , orderListOldDropBehaviour(conf, U_("Pattern Editor"), U_("OrderListOldDropBehaviour"), false) + , gbLoopSong(conf, UL_("Pattern Editor"), UL_("LoopSong"), true) + , gnPatternSpacing(conf, UL_("Pattern Editor"), UL_("Spacing"), 0) + , gbPatternVUMeters(conf, UL_("Pattern Editor"), UL_("VU-Meters"), true) + , gbPatternPluginNames(conf, UL_("Pattern Editor"), UL_("Plugin-Names"), true) + , gbPatternRecord(conf, UL_("Pattern Editor"), UL_("Record"), true) + , patternNoEditPopup(conf, UL_("Pattern Editor"), UL_("NoEditPopup"), false) + , patternStepCommands(conf, UL_("Pattern Editor"), UL_("EditStepAppliesToCommands"), false) + , m_dwPatternSetup(conf, UL_("Pattern Editor"), UL_("PatternSetup"), GetDefaultPatternSetup()) + , m_nRowHighlightMeasures(conf, UL_("Pattern Editor"), UL_("RowSpacing"), 16) + , m_nRowHighlightBeats(conf, UL_("Pattern Editor"), UL_("RowSpacing2"), 4) + , patternIgnoreSongTimeSignature(conf, UL_("Pattern Editor"), UL_("IgnoreSongTimeSignature"), false) + , recordQuantizeRows(conf, UL_("Pattern Editor"), UL_("RecordQuantize"), 0) + , gnAutoChordWaitTime(conf, UL_("Pattern Editor"), UL_("AutoChordWaitTime"), 60) + , orderlistMargins(conf, UL_("Pattern Editor"), UL_("DefaultSequenceMargins"), 0) + , rowDisplayOffset(conf, UL_("Pattern Editor"), UL_("RowDisplayOffset"), 0) + , patternFont(conf, UL_("Pattern Editor"), UL_("Font"), FontSetting(PATTERNFONT_SMALL, 0)) + , patternFontDot(conf, UL_("Pattern Editor"), UL_("FontDot"), UL_(".")) + , effectVisWidth(conf, UL_("Pattern Editor"), UL_("EffectVisWidth"), -1) + , effectVisHeight(conf, UL_("Pattern Editor"), UL_("EffectVisHeight"), -1) + , effectVisX(conf, UL_("Pattern Editor"), UL_("EffectVisX"), int32_min) + , effectVisY(conf, UL_("Pattern Editor"), UL_("EffectVisY"), int32_min) + , patternAccessibilityFormat(conf, UL_("Pattern Editor"), UL_("AccessibilityFormat"), _T("Row %row%, Channel %channel%, %column_type%: %column_description%")) + , patternAlwaysDrawWholePatternOnScrollSlow(conf, UL_("Pattern Editor"), UL_("AlwaysDrawWholePatternOnScrollSlow"), false) + , orderListOldDropBehaviour(conf, UL_("Pattern Editor"), UL_("OrderListOldDropBehaviour"), false) // Sample Editor - , m_SampleUndoBufferSize(conf, U_("Sample Editor"), U_("UndoBufferSize"), SampleUndoBufferSize()) - , sampleEditorKeyBehaviour(conf, U_("Sample Editor"), U_("KeyBehaviour"), seNoteOffOnNewKey) - , m_defaultSampleFormat(conf, U_("Sample Editor"), U_("DefaultFormat"), dfFLAC) - , m_followSamplePlayCursor(conf, U_("Sample Editor"), U_("FollowSamplePlayCursor"), FollowSamplePlayCursor::DoNotFollow) - , sampleEditorTimelineFormat(conf, U_("Sample Editor"), U_("TimelineFormat"), TimelineFormat::Seconds) - , sampleEditorDefaultResampler(conf, U_("Sample Editor"), U_("DefaultResampler"), SRCMODE_DEFAULT) - , m_nFinetuneStep(conf, U_("Sample Editor"), U_("FinetuneStep"), 10) - , m_FLACCompressionLevel(conf, U_("Sample Editor"), U_("FLACCompressionLevel"), 5) - , compressITI(conf, U_("Sample Editor"), U_("CompressITI"), true) - , m_MayNormalizeSamplesOnLoad(conf, U_("Sample Editor"), U_("MayNormalizeSamplesOnLoad"), true) - , previewInFileDialogs(conf, U_("Sample Editor"), U_("PreviewInFileDialogs"), false) - , cursorPositionInHex(conf, U_("Sample Editor"), U_("CursorPositionInHex"), false) + , m_SampleUndoBufferSize(conf, UL_("Sample Editor"), UL_("UndoBufferSize"), SampleUndoBufferSize()) + , sampleEditorKeyBehaviour(conf, UL_("Sample Editor"), UL_("KeyBehaviour"), seNoteOffOnNewKey) + , m_defaultSampleFormat(conf, UL_("Sample Editor"), UL_("DefaultFormat"), dfFLAC) + , m_followSamplePlayCursor(conf, UL_("Sample Editor"), UL_("FollowSamplePlayCursor"), FollowSamplePlayCursor::DoNotFollow) + , sampleEditorTimelineFormat(conf, UL_("Sample Editor"), UL_("TimelineFormat"), TimelineFormat::Seconds) + , sampleEditorDefaultResampler(conf, UL_("Sample Editor"), UL_("DefaultResampler"), SRCMODE_DEFAULT) + , m_nFinetuneStep(conf, UL_("Sample Editor"), UL_("FinetuneStep"), 10) + , m_FLACCompressionLevel(conf, UL_("Sample Editor"), UL_("FLACCompressionLevel"), 5) + , compressITI(conf, UL_("Sample Editor"), UL_("CompressITI"), true) + , m_MayNormalizeSamplesOnLoad(conf, UL_("Sample Editor"), UL_("MayNormalizeSamplesOnLoad"), true) + , previewInFileDialogs(conf, UL_("Sample Editor"), UL_("PreviewInFileDialogs"), false) + , cursorPositionInHex(conf, UL_("Sample Editor"), UL_("CursorPositionInHex"), false) // Export - , ExportDefaultToSoundcardSamplerate(conf, U_("Export"), U_("DefaultToSoundcardSamplerate"), true) - , ExportStreamEncoderSettings(conf, U_("Export")) - , ExportNormalize(conf, U_("Export"), U_("Normalize"), false) - , ExportClearPluginBuffers(conf, U_("Export"), U_("ClearPluginBuffers"), true) + , ExportDefaultToSoundcardSamplerate(conf, UL_("Export"), UL_("DefaultToSoundcardSamplerate"), true) + , ExportStreamEncoderSettings(conf, UL_("Export")) + , ExportNormalize(conf, UL_("Export"), UL_("Normalize"), false) + , ExportClearPluginBuffers(conf, UL_("Export"), UL_("ClearPluginBuffers"), true) // Components - , ComponentsLoadOnStartup(conf, U_("Components"), U_("LoadOnStartup"), ComponentManagerSettingsDefault().LoadOnStartup()) - , ComponentsKeepLoaded(conf, U_("Components"), U_("KeepLoaded"), ComponentManagerSettingsDefault().KeepLoaded()) + , ComponentsLoadOnStartup(conf, UL_("Components"), UL_("LoadOnStartup"), ComponentManagerSettingsDefault().LoadOnStartup()) + , ComponentsKeepLoaded(conf, UL_("Components"), UL_("KeepLoaded"), ComponentManagerSettingsDefault().KeepLoaded()) // AutoSave - , CreateBackupFiles(conf, U_("AutoSave"), U_("CreateBackupFiles"), true) - , AutosaveEnabled(conf, U_("AutoSave"), U_("Enabled"), true) - , AutosaveIntervalMinutes(conf, U_("AutoSave"), U_("IntervalMinutes"), 10) - , AutosaveHistoryDepth(conf, U_("AutoSave"), U_("BackupHistory"), 3) - , AutosaveUseOriginalPath(conf, U_("AutoSave"), U_("UseOriginalPath"), true) - , AutosavePath(conf, U_("AutoSave"), U_("Path"), mpt::common_directories::get_temp_directory()) + , CreateBackupFiles(conf, UL_("AutoSave"), UL_("CreateBackupFiles"), true) + , AutosaveEnabled(conf, UL_("AutoSave"), UL_("Enabled"), true) + , AutosaveIntervalMinutes(conf, UL_("AutoSave"), UL_("IntervalMinutes"), 10) + , AutosaveHistoryDepth(conf, UL_("AutoSave"), UL_("BackupHistory"), 3) + , AutosaveUseOriginalPath(conf, UL_("AutoSave"), UL_("UseOriginalPath"), true) + , AutosavePath(conf, UL_("AutoSave"), UL_("Path"), mpt::common_directories::get_temp_directory()) // Paths - , PathSongs(conf, U_("Paths"), U_("Songs_Directory"), mpt::PathString()) - , PathSamples(conf, U_("Paths"), U_("Samples_Directory"), mpt::PathString()) - , PathInstruments(conf, U_("Paths"), U_("Instruments_Directory"), mpt::PathString()) - , PathPlugins(conf, U_("Paths"), U_("Plugins_Directory"), mpt::PathString()) - , PathPluginPresets(conf, U_("Paths"), U_("Plugin_Presets_Directory"), mpt::PathString()) - , PathExport(conf, U_("Paths"), U_("Export_Directory"), mpt::PathString()) + , PathSongs(conf, UL_("Paths"), UL_("Songs_Directory"), mpt::PathString()) + , PathSamples(conf, UL_("Paths"), UL_("Samples_Directory"), mpt::PathString()) + , PathInstruments(conf, UL_("Paths"), UL_("Instruments_Directory"), mpt::PathString()) + , PathPlugins(conf, UL_("Paths"), UL_("Plugins_Directory"), mpt::PathString()) + , PathPluginPresets(conf, UL_("Paths"), UL_("Plugin_Presets_Directory"), mpt::PathString()) + , PathExport(conf, UL_("Paths"), UL_("Export_Directory"), mpt::PathString()) , PathTunings(theApp.GetConfigPath() + P_("tunings\\")) , PathUserTemplates(theApp.GetConfigPath() + P_("TemplateModules\\")) // Default template - , defaultTemplateFile(conf, U_("Paths"), U_("DefaultTemplate"), mpt::PathString()) - , defaultArtist(conf, U_("Misc"), U_("DefaultArtist"), mpt::getenv(U_("USERNAME")).value_or(U_(""))) + , defaultTemplateFile(conf, UL_("Paths"), UL_("DefaultTemplate"), mpt::PathString()) + , defaultArtist(conf, UL_("Misc"), UL_("DefaultArtist"), mpt::getenv(UL_("USERNAME")).value_or(UL_(""))) // MRU List - , mruListLength(conf, U_("Misc"), U_("MRUListLength"), 10) + , mruListLength(conf, UL_("Misc"), UL_("MRUListLength"), 10) // Plugins - , bridgeAllPlugins(conf, U_("VST Plugins"), U_("BridgeAllPlugins"), false) - , enableAutoSuspend(conf, U_("VST Plugins"), U_("EnableAutoSuspend"), false) - , midiMappingInPluginEditor(conf, U_("VST Plugins"), U_("EnableMidiMappingInEditor"), true) - , pluginProjectPath(conf, U_("VST Plugins"), U_("ProjectPath"), mpt::ustring()) - , vstHostProductString(conf, U_("VST Plugins"), U_("HostProductString"), "OpenMPT") - , vstHostVendorString(conf, U_("VST Plugins"), U_("HostVendorString"), "OpenMPT project") - , vstHostVendorVersion(conf, U_("VST Plugins"), U_("HostVendorVersion"), Version::Current().GetRawVersion()) + , bridgeAllPlugins(conf, UL_("VST Plugins"), UL_("BridgeAllPlugins"), false) + , enableAutoSuspend(conf, UL_("VST Plugins"), UL_("EnableAutoSuspend"), false) + , midiMappingInPluginEditor(conf, UL_("VST Plugins"), UL_("EnableMidiMappingInEditor"), true) + , pluginProjectPath(conf, UL_("VST Plugins"), UL_("ProjectPath"), mpt::ustring()) + , vstHostProductString(conf, UL_("VST Plugins"), UL_("HostProductString"), "OpenMPT") + , vstHostVendorString(conf, UL_("VST Plugins"), UL_("HostVendorString"), "OpenMPT project") + , vstHostVendorVersion(conf, UL_("VST Plugins"), UL_("HostVendorVersion"), Version::Current().GetRawVersion()) // Broken Plugins Workarounds - , BrokenPluginsWorkaroundVSTMaskAllCrashes(conf, U_("Broken Plugins Workarounds"), U_("VSTMaskAllCrashes"), true) // TODO: really should be false - , BrokenPluginsWorkaroundVSTNeverUnloadAnyPlugin(conf, U_("Broken Plugins Workarounds"), U_("VSTNeverUnloadAnyPlugin"), false) + , BrokenPluginsWorkaroundVSTMaskAllCrashes(conf, UL_("Broken Plugins Workarounds"), UL_("VSTMaskAllCrashes"), true) // TODO: really should be false + , BrokenPluginsWorkaroundVSTNeverUnloadAnyPlugin(conf, UL_("Broken Plugins Workarounds"), UL_("VSTNeverUnloadAnyPlugin"), false) #if defined(MPT_ENABLE_UPDATE) // Update - , UpdateEnabled(conf, U_("Update"), U_("Enabled"), true) - , UpdateInstallAutomatically(conf, U_("Update"), U_("InstallAutomatically"), false) - , UpdateLastUpdateCheck(conf, U_("Update"), U_("LastUpdateCheck"), mpt::Date::Unix{}) - , UpdateUpdateCheckPeriod_DEPRECATED(conf, U_("Update"), U_("UpdateCheckPeriod"), 7) - , UpdateIntervalDays(conf, U_("Update"), U_("UpdateCheckIntervalDays"), 7) - , UpdateChannel(conf, U_("Update"), U_("Channel"), UpdateChannelRelease) - , UpdateUpdateURL_DEPRECATED(conf, U_("Update"), U_("UpdateURL"), U_("https://update.openmpt.org/check/$VERSION/$GUID")) - , UpdateAPIURL(conf, U_("Update"), U_("APIURL"), CUpdateCheck::GetDefaultAPIURL()) - , UpdateStatisticsConsentAsked(conf, U_("Update"), U_("StatistisConsentAsked"), false) - , UpdateStatistics(conf, U_("Update"), U_("Statistis"), false) - , UpdateSendGUID_DEPRECATED(conf, U_("Update"), U_("SendGUID"), false) - , UpdateShowUpdateHint(conf, U_("Update"), U_("ShowUpdateHint"), true) - , UpdateIgnoreVersion(conf, U_("Update"), U_("IgnoreVersion"), _T("")) - , UpdateSkipSignatureVerificationUNSECURE(conf, U_("Update"), U_("SkipSignatureVerification"), false) - , UpdateSigningKeysRootAnchors(conf, U_("Update"), U_("SigningKeysRootAnchors"), CUpdateCheck::GetDefaultUpdateSigningKeysRootAnchors()) + , UpdateEnabled(conf, UL_("Update"), UL_("Enabled"), true) + , UpdateInstallAutomatically(conf, UL_("Update"), UL_("InstallAutomatically"), false) + , UpdateLastUpdateCheck(conf, UL_("Update"), UL_("LastUpdateCheck"), mpt::Date::Unix{}) + , UpdateUpdateCheckPeriod_DEPRECATED(conf, UL_("Update"), UL_("UpdateCheckPeriod"), 7) + , UpdateIntervalDays(conf, UL_("Update"), UL_("UpdateCheckIntervalDays"), 7) + , UpdateChannel(conf, UL_("Update"), UL_("Channel"), UpdateChannelRelease) + , UpdateUpdateURL_DEPRECATED(conf, UL_("Update"), UL_("UpdateURL"), UL_("https://update.openmpt.org/check/$VERSION/$GUID")) + , UpdateAPIURL(conf, UL_("Update"), UL_("APIURL"), CUpdateCheck::GetDefaultAPIURL()) + , UpdateStatisticsConsentAsked(conf, UL_("Update"), UL_("StatistisConsentAsked"), false) + , UpdateStatistics(conf, UL_("Update"), UL_("Statistis"), false) + , UpdateSendGUID_DEPRECATED(conf, UL_("Update"), UL_("SendGUID"), false) + , UpdateShowUpdateHint(conf, UL_("Update"), UL_("ShowUpdateHint"), true) + , UpdateIgnoreVersion(conf, UL_("Update"), UL_("IgnoreVersion"), _T("")) + , UpdateSkipSignatureVerificationUNSECURE(conf, UL_("Update"), UL_("SkipSignatureVerification"), false) + , UpdateSigningKeysRootAnchors(conf, UL_("Update"), UL_("SigningKeysRootAnchors"), CUpdateCheck::GetDefaultUpdateSigningKeysRootAnchors()) #endif // MPT_ENABLE_UPDATE // Wine suppport - , WineSupportEnabled(conf, U_("WineSupport"), U_("Enabled"), false) - , WineSupportAlwaysRecompile(conf, U_("WineSupport"), U_("AlwaysRecompile"), false) - , WineSupportAskCompile(conf, U_("WineSupport"), U_("AskCompile"), false) - , WineSupportCompileVerbosity(conf, U_("WineSupport"), U_("CompileVerbosity"), 2) // 0=silent 1=silentmake 2=progresswindow 3=standard 4=verbosemake 5=veryverbosemake 6=msgboxes - , WineSupportForeignOpenMPT(conf, U_("WineSupport"), U_("ForeignOpenMPT"), false) - , WineSupportAllowUnknownHost(conf, U_("WineSupport"), U_("AllowUnknownHost"), false) - , WineSupportEnablePulseAudio(conf, U_("WineSupport"), U_("EnablePulseAudio"), 1) - , WineSupportEnablePortAudio(conf, U_("WineSupport"), U_("EnablePortAudio"), 1) - , WineSupportEnableRtAudio(conf, U_("WineSupport"), U_("EnableRtAudio"), 1) + , WineSupportEnabled(conf, UL_("WineSupport"), UL_("Enabled"), false) + , WineSupportAlwaysRecompile(conf, UL_("WineSupport"), UL_("AlwaysRecompile"), false) + , WineSupportAskCompile(conf, UL_("WineSupport"), UL_("AskCompile"), false) + , WineSupportCompileVerbosity(conf, UL_("WineSupport"), UL_("CompileVerbosity"), 2) // 0=silent 1=silentmake 2=progresswindow 3=standard 4=verbosemake 5=veryverbosemake 6=msgboxes + , WineSupportForeignOpenMPT(conf, UL_("WineSupport"), UL_("ForeignOpenMPT"), false) + , WineSupportAllowUnknownHost(conf, UL_("WineSupport"), UL_("AllowUnknownHost"), false) + , WineSupportEnablePulseAudio(conf, UL_("WineSupport"), UL_("EnablePulseAudio"), 1) + , WineSupportEnablePortAudio(conf, UL_("WineSupport"), UL_("EnablePortAudio"), 1) + , WineSupportEnableRtAudio(conf, UL_("WineSupport"), UL_("EnableRtAudio"), 1) { // Effects #ifndef NO_DSP - m_MegaBassSettings.m_nXBassDepth = conf.Read(U_("Effects"), U_("XBassDepth"), m_MegaBassSettings.m_nXBassDepth); - m_MegaBassSettings.m_nXBassRange = conf.Read(U_("Effects"), U_("XBassRange"), m_MegaBassSettings.m_nXBassRange); + m_MegaBassSettings.m_nXBassDepth = conf.Read(UL_("Effects"), UL_("XBassDepth"), m_MegaBassSettings.m_nXBassDepth); + m_MegaBassSettings.m_nXBassRange = conf.Read(UL_("Effects"), UL_("XBassRange"), m_MegaBassSettings.m_nXBassRange); #endif #ifndef NO_REVERB - m_ReverbSettings.m_nReverbDepth = conf.Read(U_("Effects"), U_("ReverbDepth"), m_ReverbSettings.m_nReverbDepth); - m_ReverbSettings.m_nReverbType = conf.Read(U_("Effects"), U_("ReverbType"), m_ReverbSettings.m_nReverbType); + m_ReverbSettings.m_nReverbDepth = conf.Read(UL_("Effects"), UL_("ReverbDepth"), m_ReverbSettings.m_nReverbDepth); + m_ReverbSettings.m_nReverbType = conf.Read(UL_("Effects"), UL_("ReverbType"), m_ReverbSettings.m_nReverbType); #endif #ifndef NO_DSP - m_SurroundSettings.m_nProLogicDepth = conf.Read(U_("Effects"), U_("ProLogicDepth"), m_SurroundSettings.m_nProLogicDepth); - m_SurroundSettings.m_nProLogicDelay = conf.Read(U_("Effects"), U_("ProLogicDelay"), m_SurroundSettings.m_nProLogicDelay); + m_SurroundSettings.m_nProLogicDepth = conf.Read(UL_("Effects"), UL_("ProLogicDepth"), m_SurroundSettings.m_nProLogicDepth); + m_SurroundSettings.m_nProLogicDelay = conf.Read(UL_("Effects"), UL_("ProLogicDelay"), m_SurroundSettings.m_nProLogicDelay); #endif #ifndef NO_EQ - m_EqSettings = conf.Read(U_("Effects"), U_("EQ_Settings"), FlatEQPreset); + m_EqSettings = conf.Read(UL_("Effects"), UL_("EQ_Settings"), FlatEQPreset); const EQPreset userPresets[] = { FlatEQPreset, @@ -386,24 +386,24 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) { "User 3", {16,16,16,16,16,16}, { 250, 450, 900, 2000, 5000, 10000 } } }; - m_EqUserPresets[0] = conf.Read(U_("Effects"), U_("EQ_User1"), userPresets[0]); - m_EqUserPresets[1] = conf.Read(U_("Effects"), U_("EQ_User2"), userPresets[1]); - m_EqUserPresets[2] = conf.Read(U_("Effects"), U_("EQ_User3"), userPresets[2]); - m_EqUserPresets[3] = conf.Read(U_("Effects"), U_("EQ_User4"), userPresets[3]); + m_EqUserPresets[0] = conf.Read(UL_("Effects"), UL_("EQ_User1"), userPresets[0]); + m_EqUserPresets[1] = conf.Read(UL_("Effects"), UL_("EQ_User2"), userPresets[1]); + m_EqUserPresets[2] = conf.Read(UL_("Effects"), UL_("EQ_User3"), userPresets[2]); + m_EqUserPresets[3] = conf.Read(UL_("Effects"), UL_("EQ_User4"), userPresets[3]); #endif #ifndef NO_DSP - m_BitCrushSettings.m_Bits = conf.Read(U_("Effects"), U_("BitCrushBits"), m_BitCrushSettings.m_Bits); + m_BitCrushSettings.m_Bits = conf.Read(UL_("Effects"), UL_("BitCrushBits"), m_BitCrushSettings.m_Bits); #endif // Display (Colors) GetDefaultColourScheme(rgbCustomColors); for(int ncol = 0; ncol < MAX_MODCOLORS; ncol++) { const mpt::ustring colorName = MPT_UFORMAT("Color{}")(mpt::ufmt::dec0<2>(ncol)); - rgbCustomColors[ncol] = conf.Read(U_("Display"), colorName, rgbCustomColors[ncol]); + rgbCustomColors[ncol] = conf.Read(UL_("Display"), colorName, rgbCustomColors[ncol]); } // Paths - m_szKbdFile = conf.Read(U_("Paths"), U_("Key_Config_File"), mpt::PathString()); - conf.Forget(U_("Paths"), U_("Key_Config_File")); + m_szKbdFile = conf.Read(UL_("Paths"), UL_("Key_Config_File"), mpt::PathString()); + conf.Forget(UL_("Paths"), UL_("Key_Config_File")); // init old and messy stuff: @@ -434,7 +434,7 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) // load old and messy stuff: - PatternClipboard::SetClipboardSize(conf.Read(U_("Pattern Editor"), U_("NumClipboards"), mpt::saturate_cast(PatternClipboard::GetClipboardSize()))); + PatternClipboard::SetClipboardSize(conf.Read(UL_("Pattern Editor"), UL_("NumClipboards"), mpt::saturate_cast(PatternClipboard::GetClipboardSize()))); // Chords LoadChords(Chords); @@ -444,11 +444,11 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) theApp.GetDefaultMidiMacro(macros); for(int i = 0; i < kSFxMacros; i++) { - macros.SFx[i] = conf.Read(U_("Zxx Macros"), MPT_UFORMAT("SF{}")(mpt::ufmt::HEX(i)), macros.SFx[i]); + macros.SFx[i] = conf.Read(UL_("Zxx Macros"), MPT_UFORMAT("SF{}")(mpt::ufmt::HEX(i)), macros.SFx[i]); } for(int i = 0; i < kZxxMacros; i++) { - macros.Zxx[i] = conf.Read(U_("Zxx Macros"), MPT_UFORMAT("Z{}")(mpt::ufmt::HEX0<2>(i | 0x80)), macros.Zxx[i]); + macros.Zxx[i] = conf.Read(UL_("Zxx Macros"), MPT_UFORMAT("Z{}")(mpt::ufmt::HEX0<2>(i | 0x80)), macros.Zxx[i]); } @@ -459,7 +459,7 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) { mpt::ustring key = MPT_UFORMAT("File{}")(i); - mpt::PathString path = theApp.PathInstallRelativeToAbsolute(conf.Read(U_("Recent File List"), key, mpt::PathString())); + mpt::PathString path = theApp.PathInstallRelativeToAbsolute(conf.Read(UL_("Recent File List"), key, mpt::PathString())); if(!path.empty()) { mruFiles.push_back(path); @@ -485,14 +485,14 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) } if(storedVersion < MPT_V("1.30.00.24")) { - BrokenPluginsWorkaroundVSTNeverUnloadAnyPlugin = !conf.Read(U_("VST Plugins"), U_("FullyUnloadPlugins"), true); - conf.Remove(U_("VST Plugins"), U_("FullyUnloadPlugins")); + BrokenPluginsWorkaroundVSTNeverUnloadAnyPlugin = !conf.Read(UL_("VST Plugins"), UL_("FullyUnloadPlugins"), true); + conf.Remove(UL_("VST Plugins"), UL_("FullyUnloadPlugins")); } // Sound Settings if(storedVersion < MPT_V("1.22.07.30")) { - if(conf.Read(U_("Sound Settings"), U_("KeepDeviceOpen"), false)) + if(conf.Read(UL_("Sound Settings"), UL_("KeepDeviceOpen"), false)) { m_SoundSettingsStopMode = SoundDeviceStopModePlaying; } else @@ -513,15 +513,15 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) } if(storedVersion < MPT_V("1.22.07.04")) { - m_SoundDeviceID_DEPRECATED = conf.Read(U_("Sound Settings"), U_("WaveDevice"), SoundDevice::Legacy::ID()); - Setting m_BufferLength_DEPRECATED(conf, U_("Sound Settings"), U_("BufferLength"), 50); - Setting m_LatencyMS(conf, U_("Sound Settings"), U_("Latency"), mpt::saturate_round(SoundDevice::Settings().Latency * 1000.0)); - Setting m_UpdateIntervalMS(conf, U_("Sound Settings"), U_("UpdateInterval"), mpt::saturate_round(SoundDevice::Settings().UpdateInterval * 1000.0)); - Setting m_SampleFormat(conf, U_("Sound Settings"), U_("BitsPerSample"), SoundDevice::Settings().sampleFormat); - Setting m_SoundDeviceExclusiveMode(conf, U_("Sound Settings"), U_("ExclusiveMode"), SoundDevice::Settings().ExclusiveMode); - Setting m_SoundDeviceBoostThreadPriority(conf, U_("Sound Settings"), U_("BoostThreadPriority"), SoundDevice::Settings().BoostThreadPriority); - Setting m_SoundDeviceUseHardwareTiming(conf, U_("Sound Settings"), U_("UseHardwareTiming"), SoundDevice::Settings().UseHardwareTiming); - Setting m_SoundDeviceChannelMapping(conf, U_("Sound Settings"), U_("ChannelMapping"), SoundDevice::Settings().Channels); + m_SoundDeviceID_DEPRECATED = conf.Read(UL_("Sound Settings"), UL_("WaveDevice"), SoundDevice::Legacy::ID()); + Setting m_BufferLength_DEPRECATED(conf, UL_("Sound Settings"), UL_("BufferLength"), 50); + Setting m_LatencyMS(conf, UL_("Sound Settings"), UL_("Latency"), mpt::saturate_round(SoundDevice::Settings().Latency * 1000.0)); + Setting m_UpdateIntervalMS(conf, UL_("Sound Settings"), UL_("UpdateInterval"), mpt::saturate_round(SoundDevice::Settings().UpdateInterval * 1000.0)); + Setting m_SampleFormat(conf, UL_("Sound Settings"), UL_("BitsPerSample"), SoundDevice::Settings().sampleFormat); + Setting m_SoundDeviceExclusiveMode(conf, UL_("Sound Settings"), UL_("ExclusiveMode"), SoundDevice::Settings().ExclusiveMode); + Setting m_SoundDeviceBoostThreadPriority(conf, UL_("Sound Settings"), UL_("BoostThreadPriority"), SoundDevice::Settings().BoostThreadPriority); + Setting m_SoundDeviceUseHardwareTiming(conf, UL_("Sound Settings"), UL_("UseHardwareTiming"), SoundDevice::Settings().UseHardwareTiming); + Setting m_SoundDeviceChannelMapping(conf, UL_("Sound Settings"), UL_("ChannelMapping"), SoundDevice::Settings().Channels); if(storedVersion < MPT_V("1.21.01.26")) { if(m_BufferLength_DEPRECATED != 0) @@ -551,7 +551,7 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) } if(storedVersion < MPT_V("1.22.07.03")) { - m_SoundDeviceChannelMapping = SoundDevice::ChannelMapping::BaseChannel(MixerOutputChannels, conf.Read(U_("Sound Settings"), U_("ASIOBaseChannel"), 0)); + m_SoundDeviceChannelMapping = SoundDevice::ChannelMapping::BaseChannel(MixerOutputChannels, conf.Read(UL_("Sound Settings"), UL_("ASIOBaseChannel"), 0)); } m_SoundDeviceSettingsDefaults.Latency = m_LatencyMS / 1000.0; m_SoundDeviceSettingsDefaults.UpdateInterval = m_UpdateIntervalMS / 1000.0; @@ -595,15 +595,15 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) if(storedVersion < MPT_V("1.20.00.22")) { MixerSettings settings = GetMixerSettings(); - settings.SetVolumeRampUpSamples(conf.Read(U_("Sound Settings"), U_("VolumeRampSamples"), 42)); - settings.SetVolumeRampDownSamples(conf.Read(U_("Sound Settings"), U_("VolumeRampSamples"), 42)); + settings.SetVolumeRampUpSamples(conf.Read(UL_("Sound Settings"), UL_("VolumeRampSamples"), 42)); + settings.SetVolumeRampDownSamples(conf.Read(UL_("Sound Settings"), UL_("VolumeRampSamples"), 42)); SetMixerSettings(settings); - conf.Remove(U_("Sound Settings"), U_("VolumeRampSamples")); + conf.Remove(UL_("Sound Settings"), UL_("VolumeRampSamples")); } else if(storedVersion < MPT_V("1.22.07.18")) { MixerSettings settings = GetMixerSettings(); - settings.SetVolumeRampUpSamples(conf.Read(U_("Sound Settings"), U_("VolumeRampUpSamples"), MixerSettings().GetVolumeRampUpSamples())); - settings.SetVolumeRampDownSamples(conf.Read(U_("Sound Settings"), U_("VolumeRampDownSamples"), MixerSettings().GetVolumeRampDownSamples())); + settings.SetVolumeRampUpSamples(conf.Read(UL_("Sound Settings"), UL_("VolumeRampUpSamples"), MixerSettings().GetVolumeRampUpSamples())); + settings.SetVolumeRampDownSamples(conf.Read(UL_("Sound Settings"), UL_("VolumeRampDownSamples"), MixerSettings().GetVolumeRampDownSamples())); SetMixerSettings(settings); } Limit(ResamplerCutoffPercent, 0, 100); @@ -657,7 +657,7 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) } if(storedVersion < MPT_V("1.24.01.04")) { - commentsFont = FontSetting(U_("Courier New"), (m_dwPatternSetup & 0x02) ? 120 : 90); + commentsFont = FontSetting(UL_("Courier New"), (m_dwPatternSetup & 0x02) ? 120 : 90); patternFont = FontSetting((m_dwPatternSetup & 0x08) ? PATTERNFONT_SMALL : PATTERNFONT_LARGE, 0); m_dwPatternSetup &= ~(0x08 | 0x02); } @@ -682,8 +682,8 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) if(storedVersion < MPT_V("1.30.00.38")) { { - conf.Write(U_("Export"), U_("FLAC_Mode"), Encoder::ModeLossless); - const int oldformat = conf.Read(U_("Export"), U_("FLAC_Format"), 1); + conf.Write(UL_("Export"), UL_("FLAC_Mode"), Encoder::ModeLossless); + const int oldformat = conf.Read(UL_("Export"), UL_("FLAC_Format"), 1); Encoder::Format newformat = { Encoder::Format::Encoding::Integer, 24, mpt::get_endian() }; if (oldformat >= 0) { @@ -700,12 +700,12 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) break; } } - conf.Write(U_("Export"), U_("FLAC_Format2"), newformat); - conf.Forget(U_("Export"), U_("FLAC_Format")); + conf.Write(UL_("Export"), UL_("FLAC_Format2"), newformat); + conf.Forget(UL_("Export"), UL_("FLAC_Format")); } { - conf.Write(U_("Export"), U_("Wave_Mode"), Encoder::ModeLossless); - const int oldformat = conf.Read(U_("Export"), U_("Wave_Format"), 1); + conf.Write(UL_("Export"), UL_("Wave_Mode"), Encoder::ModeLossless); + const int oldformat = conf.Read(UL_("Export"), UL_("Wave_Format"), 1); Encoder::Format newformat = { Encoder::Format::Encoding::Float, 32, mpt::endian::little }; if (oldformat >= 0) { @@ -731,12 +731,12 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) break; } } - conf.Write(U_("Export"), U_("Wave_Format2"), newformat); - conf.Forget(U_("Export"), U_("Wave_Format")); + conf.Write(UL_("Export"), UL_("Wave_Format2"), newformat); + conf.Forget(UL_("Export"), UL_("Wave_Format")); } { - conf.Write(U_("Export"), U_("AU_Mode"), Encoder::ModeLossless); - const int oldformat = conf.Read(U_("Export"), U_("AU_Format"), 1); + conf.Write(UL_("Export"), UL_("AU_Mode"), Encoder::ModeLossless); + const int oldformat = conf.Read(UL_("Export"), UL_("AU_Format"), 1); Encoder::Format newformat = { Encoder::Format::Encoding::Float, 32, mpt::endian::big }; if(oldformat >= 0) { @@ -762,12 +762,12 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) break; } } - conf.Write(U_("Export"), U_("AU_Format2"), newformat); - conf.Forget(U_("Export"), U_("AU_Format")); + conf.Write(UL_("Export"), UL_("AU_Format2"), newformat); + conf.Forget(UL_("Export"), UL_("AU_Format")); } { - conf.Write(U_("Export"), U_("RAW_Mode"), Encoder::ModeLossless); - const int oldformat = conf.Read(U_("Export"), U_("RAW_Format"), 1); + conf.Write(UL_("Export"), UL_("RAW_Mode"), Encoder::ModeLossless); + const int oldformat = conf.Read(UL_("Export"), UL_("RAW_Format"), 1); Encoder::Format newformat = { Encoder::Format::Encoding::Float, 32, mpt::get_endian() }; if(oldformat >= 0) { @@ -796,8 +796,8 @@ TrackerSettings::TrackerSettings(SettingsContainer &conf) break; } } - conf.Write(U_("Export"), U_("RAW_Format2"), newformat); - conf.Forget(U_("Export"), U_("RAW_Format")); + conf.Write(UL_("Export"), UL_("RAW_Format2"), newformat); + conf.Forget(UL_("Export"), UL_("RAW_Format")); } } @@ -1011,7 +1011,7 @@ void TrackerSettings::MigrateTunings(const Version storedVersion) mpt::PathString fn = PathTunings.GetDefaultDir() + P_("Built-in\\12TET.tun"); if(!mpt::native_fs{}.exists(fn)) { - std::unique_ptr pT = CSoundFile::CreateTuning12TET(U_("12TET")); + std::unique_ptr pT = CSoundFile::CreateTuning12TET(UL_("12TET")); mpt::IO::SafeOutputFile sf(fn, std::ios::binary, mpt::IO::FlushMode::Full); pT->Serialize(sf); } @@ -1020,7 +1020,7 @@ void TrackerSettings::MigrateTunings(const Version storedVersion) mpt::PathString fn = PathTunings.GetDefaultDir() + P_("Built-in\\12TET [[fs15 1.17.02.49]].tun"); if(!mpt::native_fs{}.exists(fn)) { - std::unique_ptr pT = CSoundFile::CreateTuning12TET(U_("12TET [[fs15 1.17.02.49]]")); + std::unique_ptr pT = CSoundFile::CreateTuning12TET(UL_("12TET [[fs15 1.17.02.49]]")); mpt::IO::SafeOutputFile sf(fn, std::ios::binary, mpt::IO::FlushMode::Full); pT->Serialize(sf); } @@ -1077,19 +1077,19 @@ struct StoredSoundDeviceSettings StoredSoundDeviceSettings(SettingsContainer &conf_, const SoundDevice::Info & deviceInfo, const SoundDevice::Settings & defaults) : conf(conf_) , deviceInfo(deviceInfo) - , LatencyUS(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("Latency"), mpt::saturate_round(defaults.Latency * 1000000.0)) - , UpdateIntervalUS(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("UpdateInterval"), mpt::saturate_round(defaults.UpdateInterval * 1000000.0)) - , Samplerate(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("SampleRate"), defaults.Samplerate) - , ChannelsOld(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("Channels"), mpt::saturate_cast((int)defaults.Channels)) - , ChannelMapping(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("ChannelMapping"), defaults.Channels) - , InputChannels(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("InputChannels"), defaults.InputChannels) - , sampleFormat(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("SampleFormat"), defaults.sampleFormat) - , ExclusiveMode(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("ExclusiveMode"), defaults.ExclusiveMode) - , BoostThreadPriority(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("BoostThreadPriority"), defaults.BoostThreadPriority) - , KeepDeviceRunning(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("KeepDeviceRunning"), defaults.KeepDeviceRunning) - , UseHardwareTiming(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("UseHardwareTiming"), defaults.UseHardwareTiming) - , DitherType(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("DitherType"), static_cast(defaults.DitherType)) - , InputSourceID(conf, U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("InputSourceID"), defaults.InputSourceID) + , LatencyUS(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("Latency"), mpt::saturate_round(defaults.Latency * 1000000.0)) + , UpdateIntervalUS(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("UpdateInterval"), mpt::saturate_round(defaults.UpdateInterval * 1000000.0)) + , Samplerate(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("SampleRate"), defaults.Samplerate) + , ChannelsOld(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("Channels"), mpt::saturate_cast((int)defaults.Channels)) + , ChannelMapping(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("ChannelMapping"), defaults.Channels) + , InputChannels(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("InputChannels"), defaults.InputChannels) + , sampleFormat(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("SampleFormat"), defaults.sampleFormat) + , ExclusiveMode(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("ExclusiveMode"), defaults.ExclusiveMode) + , BoostThreadPriority(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("BoostThreadPriority"), defaults.BoostThreadPriority) + , KeepDeviceRunning(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("KeepDeviceRunning"), defaults.KeepDeviceRunning) + , UseHardwareTiming(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("UseHardwareTiming"), defaults.UseHardwareTiming) + , DitherType(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("DitherType"), static_cast(defaults.DitherType)) + , InputSourceID(conf, UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("InputSourceID"), defaults.InputSourceID) { if(ChannelMapping.Get().GetNumHostChannels() != ChannelsOld) { @@ -1098,10 +1098,10 @@ struct StoredSoundDeviceSettings ChannelMapping = SoundDevice::ChannelMapping(ChannelsOld); } // store informational data (not read back, just to allow the user to mock with the raw ini file) - conf.Write(U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("Type"), deviceInfo.type); - conf.Write(U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("InternalID"), deviceInfo.internalID); - conf.Write(U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("API"), deviceInfo.apiName); - conf.Write(U_("Sound Settings"), deviceInfo.GetIdentifier() + U_("_") + U_("Name"), deviceInfo.name); + conf.Write(UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("Type"), deviceInfo.type); + conf.Write(UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("InternalID"), deviceInfo.internalID); + conf.Write(UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("API"), deviceInfo.apiName); + conf.Write(UL_("Sound Settings"), deviceInfo.GetIdentifier() + UL_("_") + UL_("Name"), deviceInfo.name); } StoredSoundDeviceSettings & operator = (const SoundDevice::Settings &settings) @@ -1299,44 +1299,44 @@ void TrackerSettings::SaveSettings() WINDOWPLACEMENT wpl; wpl.length = sizeof(WINDOWPLACEMENT); CMainFrame::GetMainFrame()->GetWindowPlacement(&wpl); - conf.Write(U_("Display"), U_("WindowPlacement"), wpl); + conf.Write(UL_("Display"), UL_("WindowPlacement"), wpl); - conf.Write(U_("Pattern Editor"), U_("NumClipboards"), mpt::saturate_cast(PatternClipboard::GetClipboardSize())); + conf.Write(UL_("Pattern Editor"), UL_("NumClipboards"), mpt::saturate_cast(PatternClipboard::GetClipboardSize())); // Effects #ifndef NO_DSP - conf.Write(U_("Effects"), U_("XBassDepth"), m_MegaBassSettings.m_nXBassDepth); - conf.Write(U_("Effects"), U_("XBassRange"), m_MegaBassSettings.m_nXBassRange); + conf.Write(UL_("Effects"), UL_("XBassDepth"), m_MegaBassSettings.m_nXBassDepth); + conf.Write(UL_("Effects"), UL_("XBassRange"), m_MegaBassSettings.m_nXBassRange); #endif #ifndef NO_REVERB - conf.Write(U_("Effects"), U_("ReverbDepth"), m_ReverbSettings.m_nReverbDepth); - conf.Write(U_("Effects"), U_("ReverbType"), m_ReverbSettings.m_nReverbType); + conf.Write(UL_("Effects"), UL_("ReverbDepth"), m_ReverbSettings.m_nReverbDepth); + conf.Write(UL_("Effects"), UL_("ReverbType"), m_ReverbSettings.m_nReverbType); #endif #ifndef NO_DSP - conf.Write(U_("Effects"), U_("ProLogicDepth"), m_SurroundSettings.m_nProLogicDepth); - conf.Write(U_("Effects"), U_("ProLogicDelay"), m_SurroundSettings.m_nProLogicDelay); + conf.Write(UL_("Effects"), UL_("ProLogicDepth"), m_SurroundSettings.m_nProLogicDepth); + conf.Write(UL_("Effects"), UL_("ProLogicDelay"), m_SurroundSettings.m_nProLogicDelay); #endif #ifndef NO_EQ - conf.Write(U_("Effects"), U_("EQ_Settings"), m_EqSettings); - conf.Write(U_("Effects"), U_("EQ_User1"), m_EqUserPresets[0]); - conf.Write(U_("Effects"), U_("EQ_User2"), m_EqUserPresets[1]); - conf.Write(U_("Effects"), U_("EQ_User3"), m_EqUserPresets[2]); - conf.Write(U_("Effects"), U_("EQ_User4"), m_EqUserPresets[3]); + conf.Write(UL_("Effects"), UL_("EQ_Settings"), m_EqSettings); + conf.Write(UL_("Effects"), UL_("EQ_User1"), m_EqUserPresets[0]); + conf.Write(UL_("Effects"), UL_("EQ_User2"), m_EqUserPresets[1]); + conf.Write(UL_("Effects"), UL_("EQ_User3"), m_EqUserPresets[2]); + conf.Write(UL_("Effects"), UL_("EQ_User4"), m_EqUserPresets[3]); #endif #ifndef NO_DSP - conf.Write(U_("Effects"), U_("BitCrushBits"), m_BitCrushSettings.m_Bits); + conf.Write(UL_("Effects"), UL_("BitCrushBits"), m_BitCrushSettings.m_Bits); #endif // Display (Colors) for(int ncol = 0; ncol < MAX_MODCOLORS; ncol++) { - conf.Write(U_("Display"), MPT_UFORMAT("Color{}")(mpt::ufmt::dec0<2>(ncol)), rgbCustomColors[ncol]); + conf.Write(UL_("Display"), MPT_UFORMAT("Color{}")(mpt::ufmt::dec0<2>(ncol)), rgbCustomColors[ncol]); } // Paths // Obsolete, since we always write to Keybindings.mkb now. // Older versions of OpenMPT 1.18+ will look for this file if this entry is missing, so removing this entry after having read it is kind of backwards compatible. - conf.Remove(U_("Paths"), U_("Key_Config_File")); + conf.Remove(UL_("Paths"), UL_("Key_Config_File")); // Chords SaveChords(Chords); @@ -1346,11 +1346,11 @@ void TrackerSettings::SaveSettings() theApp.GetDefaultMidiMacro(macros); for(int isfx = 0; isfx < kSFxMacros; isfx++) { - conf.Write(U_("Zxx Macros"), MPT_UFORMAT("SF{}")(mpt::ufmt::HEX(isfx)), macros.SFx[isfx]); + conf.Write(UL_("Zxx Macros"), MPT_UFORMAT("SF{}")(mpt::ufmt::HEX(isfx)), macros.SFx[isfx]); } for(int izxx = 0; izxx < kZxxMacros; izxx++) { - conf.Write(U_("Zxx Macros"), MPT_UFORMAT("Z{}")(mpt::ufmt::HEX0<2>(izxx | 0x80)), macros.Zxx[izxx]); + conf.Write(UL_("Zxx Macros"), MPT_UFORMAT("Z{}")(mpt::ufmt::HEX0<2>(izxx | 0x80)), macros.Zxx[izxx]); } // MRU list @@ -1365,10 +1365,10 @@ void TrackerSettings::SaveSettings() { path = theApp.PathAbsoluteToInstallRelative(path); } - conf.Write(U_("Recent File List"), key, path); + conf.Write(UL_("Recent File List"), key, path); } else { - conf.Remove(U_("Recent File List"), key); + conf.Remove(UL_("Recent File List"), key); } } } @@ -1376,7 +1376,7 @@ void TrackerSettings::SaveSettings() bool TrackerSettings::IsComponentBlocked(const std::string &key) { - return Setting(conf, U_("Components"), U_("Block") + mpt::ToUnicode(mpt::Charset::ASCII, key), ComponentManagerSettingsDefault().IsBlocked(key)); + return Setting(conf, UL_("Components"), UL_("Block") + mpt::ToUnicode(mpt::Charset::ASCII, key), ComponentManagerSettingsDefault().IsBlocked(key)); } @@ -1414,7 +1414,7 @@ void TrackerSettings::LoadChords(MPTChords &chords) { uint32 chord; mpt::ustring noteName = MPT_UFORMAT("{}{}")(mpt::ustring(NoteNamesSharp[i % 12]), i / 12); - if((chord = conf.Read(U_("Chords"), noteName, -1)) != uint32(-1)) + if((chord = conf.Read(UL_("Chords"), noteName, -1)) != uint32(-1)) { if((chord & 0xFFFFFFC0) || chords[i].notes[0] == MPTChord::noNote) { @@ -1452,7 +1452,7 @@ void TrackerSettings::SaveChords(MPTChords &chords) } int32 s = (chords[i].key) | (notes[0] << 6) | (notes[1] << 12) | (notes[2] << 18); mpt::ustring noteName = MPT_UFORMAT("{}{}")(mpt::ustring(NoteNamesSharp[i % 12]), i / 12); - conf.Write(U_("Chords"), noteName, s); + conf.Write(UL_("Chords"), noteName, s); } } @@ -1520,7 +1520,7 @@ mpt::ustring IgnoredCCsToString(const std::bitset<128> &midiIgnoreCCs) { if(!first) { - cc += U_(","); + cc += UL_(","); } cc += mpt::ufmt::val(i); first = false;