|
From: <man...@us...> - 2015-06-01 09:27:06
|
Revision: 5223
http://sourceforge.net/p/modplug/code/5223
Author: manxorist
Date: 2015-06-01 09:27:00 +0000 (Mon, 01 Jun 2015)
Log Message:
-----------
[Ref] Clenaup first-run and previous settings version logic.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/TrackerSettings.cpp
trunk/OpenMPT/mptrack/TrackerSettings.h
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-05-31 21:34:07 UTC (rev 5222)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-01 09:27:00 UTC (rev 5223)
@@ -824,19 +824,7 @@
// chose config directory
mpt::PathString configPath = portableMode ? configPathApp : configPathGlobal;
- // check if this is the first run
- bool firstRun = true;
- {
- WCHAR tempVersion[MAX_PATH];
- MemsetZero(tempVersion);
- GetPrivateProfileStringW(L"Version", L"Version", L"", tempVersion, CountOf(tempVersion), (configPathApp + MPT_PATHSTRING("mptrack.ini")).AsNative().c_str());
- if(!std::wstring(tempVersion).empty())
- {
- firstRun = false;
- }
- }
-
// Update state.
// store exe path
@@ -1083,26 +1071,31 @@
m_dwTimeStarted = timeGetTime();
m_bInitialized = TRUE;
- const bool firstRun = TrackerSettings::Instance().gcsPreviousVersion == 0;
- if(CUpdateCheck::GetUpdateCheckPeriod() != 0 && !firstRun)
- {
- CUpdateCheck::DoUpdateCheck(true);
- }
- // Open settings if the previous execution was with an earlier version.
- if(TrackerSettings::Instance().ShowSettingsOnNewVersion && !firstRun && TrackerSettings::Instance().gcsPreviousVersion < MptVersion::num)
+ if(TrackerSettings::Instance().FirstRun)
{
- StopSplashScreen();
- m_pMainWnd->PostMessage(WM_COMMAND, ID_VIEW_OPTIONS);
- }
-
- if(firstRun)
- {
+
// On high-DPI devices, automatically upscale pattern font
FontSetting font = TrackerSettings::Instance().patternFont;
font.size = Clamp(Util::GetDPIy(m_pMainWnd->m_hWnd) / 96 - 1, 0, 9);
TrackerSettings::Instance().patternFont = font;
new WelcomeDlg(m_pMainWnd);
+
+ } else
+ {
+
+ // Update check
+ if(CUpdateCheck::GetUpdateCheckPeriod() != 0)
+ {
+ CUpdateCheck::DoUpdateCheck(true);
+ }
+
+ // Open settings if the previous execution was with an earlier version.
+ if(TrackerSettings::Instance().ShowSettingsOnNewVersion && (TrackerSettings::Instance().PreviousSettingsVersion < MptVersion::num))
+ {
+ m_pMainWnd->PostMessage(WM_COMMAND, ID_VIEW_OPTIONS);
+ }
+
}
EndWaitCursor();
@@ -1821,7 +1814,7 @@
// Version <= 1.19.03.00 had buggy handling of custom host information. If last open was from
// such OpenMPT version, clear the related settings to get a clean start.
- if(TrackerSettings::Instance().gcsPreviousVersion != 0 && TrackerSettings::Instance().gcsPreviousVersion < MAKE_VERSION_NUMERIC(1, 19, 03, 01) && buffer == "OpenMPT")
+ if(TrackerSettings::Instance().PreviousSettingsVersion < MAKE_VERSION_NUMERIC(1,19,03,01) && buffer == "OpenMPT")
{
theApp.GetSettings().Remove("VST Plugins", "HostProductString");
theApp.GetSettings().Remove("VST Plugins", "HostVendorString");
Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-05-31 21:34:07 UTC (rev 5222)
+++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-01 09:27:00 UTC (rev 5223)
@@ -45,13 +45,19 @@
}
-static MptVersion::VersionNum GetStoredVersion(const std::string &iniVersion)
-//---------------------------------------------------------------------------
+static MptVersion::VersionNum GetPreviousSettingsVersion(const std::string &iniVersion)
+//-------------------------------------------------------------------------------------
{
MptVersion::VersionNum result = 0;
if(!iniVersion.empty())
{
result = MptVersion::ToNum(iniVersion);
+ } else
+ {
+ // No version stored.
+ // This is the first run, thus set the previous version to our current
+ // version which will avoid running all settings upgrade code.
+ result = MptVersion::num;
}
return result;
}
@@ -129,8 +135,9 @@
//-------------------------------------------------------
: conf(conf)
// Version
- , IniVersion(conf, "Version", "Version", "")
- , gcsPreviousVersion(GetStoredVersion(IniVersion))
+ , IniVersion(conf, "Version", "Version", std::string())
+ , FirstRun(IniVersion.Get() == std::string())
+ , PreviousSettingsVersion(GetPreviousSettingsVersion(IniVersion))
, gcsInstallGUID(conf, "Version", "InstallGUID", std::wstring())
// Display
, m_ShowSplashScreen(conf, "Display", "ShowSplashScreen", true)
@@ -384,7 +391,7 @@
// Fixups:
// -------
- const MptVersion::VersionNum storedVersion = gcsPreviousVersion ? gcsPreviousVersion : MptVersion::num;
+ const MptVersion::VersionNum storedVersion = PreviousSettingsVersion;
// Version
if(gcsInstallGUID.Get().empty())
Modified: trunk/OpenMPT/mptrack/TrackerSettings.h
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.h 2015-05-31 21:34:07 UTC (rev 5222)
+++ trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-01 09:27:00 UTC (rev 5223)
@@ -415,7 +415,9 @@
// Version
Setting<std::string> IniVersion;
- const MptVersion::VersionNum gcsPreviousVersion;
+ const bool FirstRun;
+ const MptVersion::VersionNum PreviousSettingsVersion;
+ const bool FirstRun;
Setting<std::wstring> gcsInstallGUID;
// Display
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-01 09:40:46
|
Revision: 5225
http://sourceforge.net/p/modplug/code/5225
Author: manxorist
Date: 2015-06-01 09:40:40 +0000 (Mon, 01 Jun 2015)
Log Message:
-----------
[Ref] Make splash screen functions local to Mptrack.cpp.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-01 09:28:59 UTC (rev 5224)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-01 09:40:40 UTC (rev 5225)
@@ -365,6 +365,12 @@
};
+// Splash Screen
+
+static void StartSplashScreen();
+static void StopSplashScreen();
+
+
/////////////////////////////////////////////////////////////////////////////
// Midi Library
@@ -1428,12 +1434,12 @@
}
-VOID CTrackApp::StartSplashScreen()
-//---------------------------------
+static void StartSplashScreen()
+//-----------------------------
{
if (!gpSplashScreen)
{
- gpSplashScreen = new CSplashScreen(m_pMainWnd);
+ gpSplashScreen = new CSplashScreen(theApp.m_pMainWnd);
gpSplashScreen->ShowWindow(SW_SHOW);
gpSplashScreen->UpdateWindow();
gpSplashScreen->BeginWaitCursor();
@@ -1441,8 +1447,8 @@
}
-VOID CTrackApp::StopSplashScreen()
-//--------------------------------
+static void StopSplashScreen()
+//----------------------------
{
if (gpSplashScreen)
{
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2015-06-01 09:28:59 UTC (rev 5224)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2015-06-01 09:40:40 UTC (rev 5225)
@@ -289,11 +289,6 @@
static void OpenModulesDialog(std::vector<mpt::PathString> &files);
-// Splash Screen
-protected:
- void StartSplashScreen();
- void StopSplashScreen();
-
// Overrides
public:
// ClassWizard generated virtual function overrides
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-01 10:02:41
|
Revision: 5226
http://sourceforge.net/p/modplug/code/5226
Author: manxorist
Date: 2015-06-01 10:02:36 +0000 (Mon, 01 Jun 2015)
Log Message:
-----------
[Mod] Microsoft Windows desktop user interface guidelines recommend against using any splash screen at all. Even when using a splash screen, its primary goal is to make the application feel to start up faster. Keeping the splash screen visible even after all startup and initialization has already been completed has the totally opposite effect: the user thinks the application is still doing initialization work. Avoid the arbitrary 1 second delay after startup has finished and show the splash screen only as long as we are actually doing work. In order to avoid distracting flicker introduced by showing a window for too short time, the splash screen is kept visible for at least 100ms (counted from its own startup), which should be a good compromise between fast experienced application startup and avoiding distraction caused by flashing the splash screen visible for only a few milliseconds.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-01 09:40:40 UTC (rev 5225)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-01 10:02:36 UTC (rev 5226)
@@ -369,6 +369,7 @@
static void StartSplashScreen();
static void StopSplashScreen();
+static void TimeoutSplashScreen();
/////////////////////////////////////////////////////////////////////////////
@@ -1074,7 +1075,6 @@
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
- m_dwTimeStarted = timeGetTime();
m_bInitialized = TRUE;
@@ -1358,6 +1358,9 @@
static CSplashScreen *gpSplashScreen = NULL;
+static DWORD gSplashScreenStartTime = 0;
+
+
CSplashScreen::CSplashScreen(CWnd *parent)
//----------------------------------------
{
@@ -1443,6 +1446,7 @@
gpSplashScreen->ShowWindow(SW_SHOW);
gpSplashScreen->UpdateWindow();
gpSplashScreen->BeginWaitCursor();
+ gSplashScreenStartTime = GetTickCount();
}
}
@@ -1459,6 +1463,19 @@
}
+static void TimeoutSplashScreen()
+//-------------------------------
+{
+ if(gpSplashScreen)
+ {
+ if(GetTickCount() - gSplashScreenStartTime > 100)
+ {
+ StopSplashScreen();
+ }
+ }
+}
+
+
/////////////////////////////////////////////////////////////////////////////
// Idle-time processing
@@ -1467,18 +1484,13 @@
{
BOOL b = CWinApp::OnIdle(lCount);
+ TimeoutSplashScreen();
+
if(CMainFrame::GetMainFrame())
{
CMainFrame::GetMainFrame()->IdleHandlerSounddevice();
}
- if ((gpSplashScreen) && (m_bInitialized))
- {
- if (timeGetTime() - m_dwTimeStarted > 1000) //Set splash screen duration here -rewbs
- {
- StopSplashScreen();
- }
- }
if (CRippleBitmap::instance)
{
if (CRippleBitmap::instance->Animate()) return TRUE;
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2015-06-01 09:40:40 UTC (rev 5225)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2015-06-01 10:02:36 UTC (rev 5226)
@@ -212,7 +212,7 @@
CVstPluginManager *m_pPluginManager;
SoundDevice::Manager *m_pSoundDevicesManager;
BOOL m_bInitialized;
- DWORD m_dwTimeStarted, m_dwLastPluginIdleCall;
+ DWORD m_dwLastPluginIdleCall;
// Default macro configuration
MIDIMacroConfig m_MidiCfg;
mpt::PathString m_szExePath;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-01 22:00:44
|
Revision: 5229
http://sourceforge.net/p/modplug/code/5229
Author: saga-games
Date: 2015-06-01 22:00:39 +0000 (Mon, 01 Jun 2015)
Log Message:
-----------
[Fix] Previous commit was missing a file
[Fix] Since r5217, the pause button was enabled by default in the main toolbar.
Revision Links:
--------------
http://sourceforge.net/p/modplug/code/5217
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mainbar.cpp
trunk/OpenMPT/mptrack/Mod2wave.cpp
Modified: trunk/OpenMPT/mptrack/Mainbar.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mainbar.cpp 2015-06-01 21:56:24 UTC (rev 5228)
+++ trunk/OpenMPT/mptrack/Mainbar.cpp 2015-06-01 22:00:39 UTC (rev 5229)
@@ -263,7 +263,7 @@
SetButtonStyle(CommandToIndex(ID_MIDI_RECORD), GetButtonStyle(CommandToIndex(ID_MIDI_RECORD)) | TBSTYLE_DROPDOWN);
nCurrentSpeed = 6;
- nCurrentTempo.Set(0);
+ nCurrentTempo.Set(125);
nCurrentRowsPerBeat = 4;
nCurrentOctave = -1;
Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mod2wave.cpp 2015-06-01 21:56:24 UTC (rev 5228)
+++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2015-06-01 22:00:39 UTC (rev 5229)
@@ -16,7 +16,6 @@
#include "mpdlgs.h"
#include "vstplug.h"
#include "mod2wave.h"
-#include "Wav.h"
#include "WAVTools.h"
#include "../common/mptString.h"
#include "../common/version.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-02 12:42:34
|
Revision: 5235
http://sourceforge.net/p/modplug/code/5235
Author: manxorist
Date: 2015-06-02 12:42:26 +0000 (Tue, 02 Jun 2015)
Log Message:
-----------
[Reg] build: The old VS2008 OpenMPT solution and project are gone now. They have only been a maintanance burden lately. Documentation as well as the buildbot refer to the premake based ones since some time now.
Removed Paths:
-------------
trunk/OpenMPT/mptrack/MPTRACK_08.sln
trunk/OpenMPT/mptrack/mptrack_08.vcproj
Deleted: trunk/OpenMPT/mptrack/MPTRACK_08.sln
===================================================================
--- trunk/OpenMPT/mptrack/MPTRACK_08.sln 2015-06-02 10:47:07 UTC (rev 5234)
+++ trunk/OpenMPT/mptrack/MPTRACK_08.sln 2015-06-02 12:42:26 UTC (rev 5235)
@@ -1,137 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mptrack", "mptrack_08.vcproj", "{21D95071-FB97-4E69-B3B1-050D0D4A5021}"
- ProjectSection(ProjectDependencies) = postProject
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2} = {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8} = {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7} = {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}
- {BC116B29-9958-4389-B294-7529BB7C7D37} = {BC116B29-9958-4389-B294-7529BB7C7D37}
- {189B867F-FF4B-45A1-B741-A97492EE69AF} = {189B867F-FF4B-45A1-B741-A97492EE69AF}
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F} = {95CC809B-03FC-4EDB-BB20-FD07A698C05F}
- {6B11F6A8-B131-4D2B-80EF-5731A9016436} = {6B11F6A8-B131-4D2B-80EF-5731A9016436}
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5} = {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F} = {89AF16DD-32CC-4A7E-B219-5F117D761F9F}
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD} = {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flac", "..\build\vs2008-ext\flac.vcproj", "{E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lhasa", "..\build\vs2008-ext\lhasa.vcproj", "{6B11F6A8-B131-4D2B-80EF-5731A9016436}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "..\build\vs2008-ext\portaudio.vcproj", "{189B867F-FF4B-45A1-B741-A97492EE69AF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smbPitchShift", "..\build\vs2008-ext\smbPitchShift.vcproj", "{89AF16DD-32CC-4A7E-B219-5F117D761F9F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundtouch", "..\build\vs2008-ext\soundtouch.vcproj", "{F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\build\vs2008-ext\zlib.vcproj", "{1654FB18-FDE6-406F-9D84-BA12BFBD67B2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "..\build\vs2008-ext\minizip.vcproj", "{63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnRAR", "..\build\vs2008-ext\UnRAR.vcproj", "{95CC809B-03FC-4EDB-BB20-FD07A698C05F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "r8brain", "..\build\vs2008-ext\r8brain.vcproj", "{BC116B29-9958-4389-B294-7529BB7C7D37}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ogg", "..\build\vs2008-ext\ogg.vcproj", "{D8D5E11C-F959-49EF-B741-B3F6DE52DED8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.ActiveCfg = Debug|Win32
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.Build.0 = Debug|Win32
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|x64.ActiveCfg = Debug|x64
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|x64.Build.0 = Debug|x64
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|Win32.ActiveCfg = Release|Win32
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|Win32.Build.0 = Release|Win32
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|x64.ActiveCfg = Release|x64
- {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|x64.Build.0 = Release|x64
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|Win32.ActiveCfg = Debug|Win32
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|Win32.Build.0 = Debug|Win32
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|x64.ActiveCfg = Debug|x64
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|x64.Build.0 = Debug|x64
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Release|Win32.ActiveCfg = Release|Win32
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Release|Win32.Build.0 = Release|Win32
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Release|x64.ActiveCfg = Release|x64
- {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Release|x64.Build.0 = Release|x64
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|Win32.ActiveCfg = Debug|Win32
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|Win32.Build.0 = Debug|Win32
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|x64.ActiveCfg = Debug|x64
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|x64.Build.0 = Debug|x64
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Release|Win32.ActiveCfg = Release|Win32
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Release|Win32.Build.0 = Release|Win32
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Release|x64.ActiveCfg = Release|x64
- {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Release|x64.Build.0 = Release|x64
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.ActiveCfg = Debug|Win32
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.Build.0 = Debug|Win32
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|x64.ActiveCfg = Debug|x64
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|x64.Build.0 = Debug|x64
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|Win32.ActiveCfg = Release|Win32
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|Win32.Build.0 = Release|Win32
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|x64.ActiveCfg = Release|x64
- {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|x64.Build.0 = Release|x64
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|Win32.ActiveCfg = Debug|Win32
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|Win32.Build.0 = Debug|Win32
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|x64.ActiveCfg = Debug|x64
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|x64.Build.0 = Debug|x64
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Release|Win32.ActiveCfg = Release|Win32
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Release|Win32.Build.0 = Release|Win32
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Release|x64.ActiveCfg = Release|x64
- {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Release|x64.Build.0 = Release|x64
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|Win32.ActiveCfg = Debug|Win32
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|Win32.Build.0 = Debug|Win32
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|x64.ActiveCfg = Debug|x64
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|x64.Build.0 = Debug|x64
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Release|Win32.ActiveCfg = Release|Win32
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Release|Win32.Build.0 = Release|Win32
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Release|x64.ActiveCfg = Release|x64
- {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Release|x64.Build.0 = Release|x64
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|Win32.ActiveCfg = Debug|Win32
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|Win32.Build.0 = Debug|Win32
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|x64.ActiveCfg = Debug|x64
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|x64.Build.0 = Debug|x64
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Release|Win32.ActiveCfg = Release|Win32
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Release|Win32.Build.0 = Release|Win32
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Release|x64.ActiveCfg = Release|x64
- {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Release|x64.Build.0 = Release|x64
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|Win32.ActiveCfg = Debug|Win32
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|Win32.Build.0 = Debug|Win32
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|x64.ActiveCfg = Debug|x64
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|x64.Build.0 = Debug|x64
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Release|Win32.ActiveCfg = Release|Win32
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Release|Win32.Build.0 = Release|Win32
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Release|x64.ActiveCfg = Release|x64
- {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Release|x64.Build.0 = Release|x64
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|Win32.ActiveCfg = Debug|Win32
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|Win32.Build.0 = Debug|Win32
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|x64.ActiveCfg = Debug|x64
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|x64.Build.0 = Debug|x64
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Release|Win32.ActiveCfg = Release|Win32
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Release|Win32.Build.0 = Release|Win32
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Release|x64.ActiveCfg = Release|x64
- {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Release|x64.Build.0 = Release|x64
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|Win32.ActiveCfg = Debug|Win32
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|Win32.Build.0 = Debug|Win32
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|x64.ActiveCfg = Debug|x64
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|x64.Build.0 = Debug|x64
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|Win32.ActiveCfg = Release|Win32
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|Win32.Build.0 = Release|Win32
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|x64.ActiveCfg = Release|x64
- {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|x64.Build.0 = Release|x64
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Debug|Win32.ActiveCfg = Debug|Win32
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Debug|Win32.Build.0 = Debug|Win32
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Debug|x64.ActiveCfg = Debug|x64
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Debug|x64.Build.0 = Debug|x64
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Release|Win32.ActiveCfg = Release|Win32
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Release|Win32.Build.0 = Release|Win32
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Release|x64.ActiveCfg = Release|x64
- {D8D5E11C-F959-49EF-B741-B3F6DE52DED8}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
Deleted: trunk/OpenMPT/mptrack/mptrack_08.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2015-06-02 10:47:07 UTC (rev 5234)
+++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2015-06-02 12:42:26 UTC (rev 5235)
@@ -1,2056 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="mptrack"
- ProjectGUID="{21D95071-FB97-4E69-B3B1-050D0D4A5021}"
- RootNamespace="mptrack"
- Keyword="MFCProj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="..\bin\$(PlatformName)-Debug\"
- IntermediateDirectory="..\build\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="1"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Debug/mptrack.tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\ogg\include;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version"
- PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER"
- StringPooling="true"
- ExceptionHandling="2"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="false"
- DebugInformationFormat="4"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/MACHINE:I386"
- Version="5.0"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs="uxtheme.dll;OpenMPT_SoundTouch_f32.dll"
- GenerateDebugInformation="true"
- AssemblyDebug="1"
- GenerateMapFile="true"
- SubSystem="2"
- LargeAddressAware="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="$(ProjectDir)res/rt_manif.bin"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="..\bin\$(PlatformName)\"
- IntermediateDirectory="..\build\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="1"
- ATLMinimizesCRunTimeLibraryUsage="false"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Bin/mptrack.tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="2"
- AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\ogg\include;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version"
- PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER"
- StringPooling="true"
- ExceptionHandling="2"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- EnableFunctionLevelLinking="false"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- WarningLevel="3"
- SuppressStartupBanner="false"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/MACHINE:I386"
- Version="5.0"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs="uxtheme.dll;OpenMPT_SoundTouch_f32.dll"
- GenerateDebugInformation="true"
- SubSystem="2"
- LargeAddressAware="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="2"
- DataExecutionPrevention="0"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="$(ProjectDir)res/rt_manif.bin"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="1"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="3"
- TypeLibraryName=".\Debug/mptrack.tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\ogg\include;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version"
- PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER"
- StringPooling="true"
- ExceptionHandling="2"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- BrowseInformation="1"
- WarningLevel="4"
- SuppressStartupBanner="false"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- Version="5.0"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs="uxtheme.dll;OpenMPT_SoundTouch_f32.dll"
- GenerateDebugInformation="true"
- AssemblyDebug="1"
- GenerateMapFile="true"
- SubSystem="2"
- LargeAddressAware="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="$(ProjectDir)res/rt_manif.bin"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="..\bin\$(PlatformName)\"
- IntermediateDirectory="..\build\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="1"
- ATLMinimizesCRunTimeLibraryUsage="false"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="..\build\svn_version\update_svn_version_vs.cmd $(IntDir)\"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="3"
- TypeLibraryName=".\Bin/mptrack.tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="2"
- AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\ogg\include;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version"
- PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER"
- StringPooling="true"
- ExceptionHandling="2"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- EnableFunctionLevelLinking="false"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
- WarningLevel="3"
- SuppressStartupBanner="false"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- Version="5.0"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs="uxtheme.dll;OpenMPT_SoundTouch_f32.dll"
- GenerateDebugInformation="true"
- SubSystem="2"
- LargeAddressAware="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="2"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="$(ProjectDir)res/rt_manif.bin"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath=".\AboutDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\AbstractVstEditor.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddsp\AGC.cpp"
- >
- </File>
- <File
- RelativePath=".\AppendModule.cpp"
- >
- </File>
- <File
- RelativePath="..\common\AudioCriticalSection.cpp"
- >
- </File>
- <File
- RelativePath=".\AutoSaver.cpp"
- >
- </File>
- <File
- RelativePath=".\Autotune.cpp"
- >
- </File>
- <File
- RelativePath="..\pluginBridge\BridgeWrapper.cpp"
- >
- </File>
- <File
- RelativePath=".\ChildFrm.cpp"
- >
- </File>
- <File
- RelativePath=".\CImageListEx.cpp"
- >
- </File>
- <File
- RelativePath=".\CleanupSong.cpp"
- >
- </File>
- <File
- RelativePath=".\ColourEdit.cpp"
- >
- </File>
- <File
- RelativePath=".\CommandSet.cpp"
- >
- </File>
- <File
- RelativePath=".\CreditStatic.cpp"
- >
- </File>
- <File
- RelativePath=".\ctrl_com.cpp"
- >
- </File>
- <File
- RelativePath=".\ctrl_gen.cpp"
- >
- </File>
- <File
- RelativePath=".\ctrl_ins.cpp"
- >
- </File>
- <File
- RelativePath=".\ctrl_pat.cpp"
- >
- </File>
- <File
- RelativePath=".\ctrl_seq.cpp"
- >
- </File>
- <File
- RelativePath=".\ctrl_smp.cpp"
- >
- </File>
- <File
- RelativePath=".\DefaultVstEditor.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Dither.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\dlsbank.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\plugins\DmoToVst.cpp"
- >
- </File>
- <File
- RelativePath=".\draw_pat.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddsp\DSP.cpp"
- >
- </File>
- <File
- RelativePath=".\EffectVis.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddsp\EQ.cpp"
- >
- </File>
- <File
- RelativePath=".\ExceptionHandler.cpp"
- >
- </File>
- <File
- RelativePath=".\ExternalSamples.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Fastmix.cpp"
- >
- </File>
- <File
- RelativePath=".\FileDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\FolderScanner.cpp"
- >
- </File>
- <File
- RelativePath=".\globals.cpp"
- >
- </File>
- <File
- RelativePath="InputHandler.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\InstrumentExtensions.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\ITCompression.cpp"
- >
- </File>
- <File
- RelativePath="..\common\Logging.cpp"
- >
- </File>
- <File
- RelativePath=".\mainbar.cpp"
- >
- </File>
- <File
- RelativePath=".\MainFrm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Message.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\MIDIEvents.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\MIDIMacros.cpp"
- >
- </File>
- <File
- RelativePath=".\MIDIMapping.cpp"
- >
- </File>
- <File
- RelativePath="..\common\misc_util.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\MixerLoops.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\MixerSettings.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\mmcmp.cpp"
- >
- </File>
- <File
- RelativePath=".\mod2midi.cpp"
- >
- </File>
- <File
- RelativePath=".\Mod2wave.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\mod_specifications.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModChannel.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\modcommand.cpp"
- >
- </File>
- <File
- RelativePath=".\ModConvert.cpp"
- >
- </File>
- <File
- RelativePath=".\Moddoc.cpp"
- >
- </File>
- <File
- RelativePath=".\Modedit.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModInstrument.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModSample.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModSequence.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\modsmp_ctrl.cpp"
- >
- </File>
- <File
- RelativePath=".\mpt_midi.cpp"
- >
- </File>
- <File
- RelativePath="..\common\mptFileIO.cpp"
- >
- </File>
- <File
- RelativePath=".\MPTHacks.cpp"
- >
- </File>
- <File
- RelativePath="..\common\mptIO.cpp"
- >
- </File>
- <File
- RelativePath="..\common\mptPathString.cpp"
- >
- </File>
- <File
- RelativePath=".\mptrack.cpp"
- >
- </File>
- <File
- RelativePath=".\mptrack.rc"
- >
- </File>
- <File
- RelativePath=".\MPTrackLink.cpp"
- >
- </File>
- <File
- RelativePath=".\MPTrackUtil.cpp"
- >
- </File>
- <File
- RelativePath="..\common\mptString.cpp"
- >
- </File>
- <File
- RelativePath=".\PathConfigDlg.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\pattern.cpp"
- >
- </File>
- <File
- RelativePath=".\PatternClipboard.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\patternContainer.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\plugins\PluginManager.cpp"
- >
- </File>
- <File
- RelativePath="..\common\Profiler.cpp"
- >
- </File>
- <File
- RelativePath="..\mptrack\Reporting.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddsp\Reverb.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\RowVisitor.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\SampleFormats.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\SampleIO.cpp"
- >
- </File>
- <File
- RelativePath="..\common\serialization_utils.cpp"
- >
- </File>
- <File
- RelativePath=".\Settings.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\snd_flt.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Snd_fx.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Sndfile.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Sndmix.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDevice.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceASIO.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceBase.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceDirectSound.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceManager.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDevicePortAudio.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceUtilities.cpp"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceWaveout.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\SoundFilePlayConfig.cpp"
- >
- </File>
- <File
- RelativePath="..\common\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\StreamEncoder.cpp"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderFLAC.cpp"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderMP3.cpp"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderOpus.cpp"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderVorbis.cpp"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderWAV.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Tables.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Tagging.cpp"
- >
- </File>
- <File
- RelativePath=".\TrackerSettings.cpp"
- >
- </File>
- <File
- RelativePath="..\common\typedefs.cpp"
- >
- </File>
- <File
- RelativePath=".\Undo.cpp"
- >
- </File>
- <File
- RelativePath=".\UpdateCheck.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\UpgradeModule.cpp"
- >
- </File>
- <File
- RelativePath="..\common\version.cpp"
- >
- </File>
- <File
- RelativePath=".\view_com.cpp"
- >
- </File>
- <File
- RelativePath=".\view_gen.cpp"
- >
- </File>
- <File
- RelativePath=".\view_ins.cpp"
- >
- </File>
- <File
- RelativePath=".\view_pat.cpp"
- >
- </File>
- <File
- RelativePath=".\view_smp.cpp"
- >
- </File>
- <File
- RelativePath=".\view_tre.cpp"
- >
- </File>
- <File
- RelativePath=".\VSTEditor.cpp"
- >
- </File>
- <File
- RelativePath=".\vstplug.cpp"
- >
- </File>
- <File
- RelativePath=".\VstPresets.cpp"
- >
- </File>
- <File
- RelativePath=".\WelcomeDialog.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\WindowedFIR.cpp"
- >
- </File>
- <Filter
- Name="Tuning"
- >
- <File
- RelativePath="..\soundlib\tuning.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\tuningbase.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\tuningCollection.cpp"
- >
- </File>
- <File
- RelativePath=".\TuningDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\tuningRatioMapWnd.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Dialogs"
- >
- <File
- RelativePath=".\AdvancedConfigDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\ChannelManagerDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\CloseMainDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\ColorConfigDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\dlg_misc.cpp"
- >
- </File>
- <File
- RelativePath=".\EffectInfo.cpp"
- >
- </File>
- <File
- RelativePath=".\GeneralConfigDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\KeyConfigDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\MIDIMacroDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\MIDIMappingDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\MoveFXSlotDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\Mpdlgs.cpp"
- >
- </File>
- <File
- RelativePath=".\PatternEditorDialogs.cpp"
- >
- </File>
- <File
- RelativePath=".\PatternFont.cpp"
- >
- </File>
- <File
- RelativePath=".\PatternGotoDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\PNG.cpp"
- >
- </File>
- <File
- RelativePath=".\PSRatioCalc.cpp"
- >
- </File>
- <File
- RelativePath=".\SampleConfigDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\SampleEditorDialogs.cpp"
- >
- </File>
- <File
- RelativePath=".\ScaleEnvPointsDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\SelectPluginDialog.cpp"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe;png"
- >
- <File
- RelativePath=".\res\colors.bmp"
- >
- </File>
- <File
- RelativePath=".\res\dragging.cur"
- >
- </File>
- <File
- RelativePath=".\Res\envelope_toolbar.bmp"
- >
- </File>
- <File
- RelativePath=".\res\icons.bmp"
- >
- </File>
- <File
- RelativePath=".\res\main_toolbar.bmp"
- >
- </File>
- <File
- RelativePath=".\res\moddoc.ico"
- >
- </File>
- <File
- RelativePath=".\res\mptrack.ico"
- >
- </File>
- <File
- RelativePath=".\res\mptrack.png"
- >
- </File>
- <File
- RelativePath=".\res\mptrack.rc2"
- >
- </File>
- <File
- RelativePath=".\Res\nodrag.cur"
- >
- </File>
- <File
- RelativePath=".\res\nodrop.cur"
- >
- </File>
- <File
- RelativePath=".\res\pattern_toolbar.bmp"
- >
- </File>
- <File
- RelativePath=".\res\rt_manif.bin"
- >
- </File>
- <File
- RelativePath=".\Res\sample_toolbar.bmp"
- >
- </File>
- <File
- RelativePath=".\res\splashno.png"
- >
- </File>
- <File
- RelativePath=".\res\view_pat.bmp"
- >
- </File>
- <File
- RelativePath=".\res\vumeters.bmp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath=".\AboutDialog.h"
- >
- </File>
- <File
- RelativePath=".\AbstractVstEditor.h"
- >
- </File>
- <File
- RelativePath="..\sounddsp\AGC.h"
- >
- </File>
- <File
- RelativePath="..\common\AudioCriticalSection.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\AudioReadTarget.h"
- >
- </File>
- <File
- RelativePath=".\AutoSaver.h"
- >
- </File>
- <File
- RelativePath=".\Autotune.h"
- >
- </File>
- <File
- RelativePath="..\pluginBridge\BridgeCommon.h"
- >
- </File>
- <File
- RelativePath="..\pluginBridge\BridgeWrapper.h"
- >
- </File>
- <File
- RelativePath="..\common\BuildSettings.h"
- >
- </File>
- <File
- RelativePath=".\CDecimalSupport.h"
- >
- </File>
- <File
- RelativePath=".\ChildFrm.h"
- >
- </File>
- <File
- RelativePath=".\CImageListEx.h"
- >
- </File>
- <File
- RelativePath=".\CleanupSong.h"
- >
- </File>
- <File
- RelativePath=".\CListCtrl.h"
- >
- </File>
- <File
- RelativePath=".\ColourEdit.h"
- >
- </File>
- <File
- RelativePath=".\CommandSet.h"
- >
- </File>
- <File
- RelativePath="..\common\CompilerDetect.h"
- >
- </File>
- <File
- RelativePath="..\common\ComponentManager.cpp"
- >
- </File>
- <File
- RelativePath="..\common\ComponentManager.h"
- >
- </File>
- <File
- RelativePath=".\CreditStatic.h"
- >
- </File>
- <File
- RelativePath=".\CTreeCtrl.h"
- >
- </File>
- <File
- RelativePath=".\ctrl_com.h"
- >
- </File>
- <File
- RelativePath=".\ctrl_gen.h"
- >
- </File>
- <File
- RelativePath=".\ctrl_ins.h"
- >
- </File>
- <File
- RelativePath=".\ctrl_pat.h"
- >
- </File>
- <File
- RelativePath=".\ctrl_smp.h"
- >
- </File>
- <File
- RelativePath=".\DefaultVstEditor.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Dither.h"
- >
- </File>
- <File
- RelativePath="..\Soundlib\Dlsbank.h"
- >
- </File>
- <File
- RelativePath="..\sounddsp\DSP.h"
- >
- </File>
- <File
- RelativePath=".\EffectInfo.h"
- >
- </File>
- <File
- RelativePath="..\common\Endianness.h"
- >
- </File>
- <File
- RelativePath="..\sounddsp\EQ.h"
- >
- </File>
- <File
- RelativePath=".\ExceptionHandler.h"
- >
- </File>
- <File
- RelativePath=".\ExternalSamples.h"
- >
- </File>
- <File
- RelativePath=".\FadeLaws.h"
- >
- </File>
- <File
- RelativePath=".\FileDialog.h"
- >
- </File>
- <File
- RelativePath="..\common\FileReader.h"
- >
- </File>
- <File
- RelativePath="..\common\FlagSet.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\FloatMixer.h"
- >
- </File>
- <File
- RelativePath=".\FolderScanner.h"
- >
- </File>
- <File
- RelativePath=".\globals.h"
- >
- </File>
- <File
- RelativePath="InputHandler.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\IntMixer.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\ITCompression.h"
- >
- </File>
- <File
- RelativePath="..\common\Logging.h"
- >
- </File>
- <File
- RelativePath=".\mainbar.h"
- >
- </File>
- <File
- RelativePath=".\MainFrm.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\MIDIEvents.h"
- >
- </File>
- <File
- RelativePath=".\soundlib\MIDIMacros.h"
- >
- </File>
- <File
- RelativePath=".\MIDIMapping.h"
- >
- </File>
- <File
- RelativePath="..\common\misc_util.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Mixer.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\MixerInterface.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\MixerLoops.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\MixerSettings.h"
- >
- </File>
- <File
- RelativePath=".\mod2midi.h"
- >
- </File>
- <File
- RelativePath=".\mod2wave.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\mod_specifications.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModChannel.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\modcommand.h"
- >
- </File>
- <File
- RelativePath=".\ModConvert.h"
- >
- </File>
- <File
- RelativePath=".\moddoc.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModInstrument.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModSample.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\ModSequence.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\modsmp_ctrl.h"
- >
- </File>
- <File
- RelativePath="..\common\mptAtomic.h"
- >
- </File>
- <File
- RelativePath="..\common\mptFileIO.h"
- >
- </File>
- <File
- RelativePath="..\common\mptIO.h"
- >
- </File>
- <File
- RelativePath="..\common\mptPathString.h"
- >
- </File>
- <File
- RelativePath=".\mptrack.h"
- >
- </File>
- <File
- RelativePath=".\MPTrackUtil.h"
- >
- </File>
- <File
- RelativePath="..\common\mptString.h"
- >
- </File>
- <File
- RelativePath="..\common\mutex.h"
- >
- </File>
- <File
- RelativePath=".\Notification.h"
- >
- </File>
- <File
- RelativePath=".\PathConfigDlg.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\pattern.h"
- >
- </File>
- <File
- RelativePath=".\PatternClipboard.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\patternContainer.h"
- >
- </File>
- <File
- RelativePath=".\PatternCursor.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\plugins\PluginEventQueue.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\plugins\PluginMixBuffer.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\plugins\PlugInterface.h"
- >
- </File>
- <File
- RelativePath=".\PNG.h"
- >
- </File>
- <File
- RelativePath="..\common\Profiler.h"
- >
- </File>
- <File
- RelativePath="..\mptrack\Reporting.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Resampler.h"
- >
- </File>
- <File
- RelativePath=".\Resource.h"
- >
- </File>
- <File
- RelativePath="..\sounddsp\Reverb.h"
- >
- </File>
- <File
- RelativePath=".\soundlib\RowVisitor.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\SampleFormat.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\SampleFormatConverters.h"
- >
- </File>
- <File
- RelativePath=".\SampleGenerator.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\SampleIO.h"
- >
- </File>
- <File
- RelativePath="..\common\serialization_utils.h"
- >
- </File>
- <File
- RelativePath=".\Settings.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Snd_defs.h"
- >
- </File>
- <File
- RelativePath="..\Soundlib\Sndfile.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDevice.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceASIO.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceBase.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceDirectSound.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceManager.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDevicePortAudio.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceUtilities.h"
- >
- </File>
- <File
- RelativePath="..\sounddev\SoundDeviceWaveout.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\SoundFilePlayConfig.h"
- >
- </File>
- <File
- RelativePath="..\common\stdafx.h"
- >
- </File>
- <File
- RelativePath=".\StreamEncoder.h"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderFLAC.h"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderMP3.h"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderOpus.h"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderVorbis.h"
- >
- </File>
- <File
- RelativePath=".\StreamEncoderWAV.h"
- >
- </File>
- <File
- RelativePath="..\common\StringFixer.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Tables.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Tagging.h"
- >
- </File>
- <File
- RelativePath="..\common\thread.h"
- >
- </File>
- <File
- RelativePath=".\TrackerSettings.h"
- >
- </File>
- <File
- RelativePath="..\common\typedefs.h"
- >
- </File>
- <File
- RelativePath=".\Undo.h"
- >
- </File>
- <File
- RelativePath=".\UpdateCheck.h"
- >
- </File>
- <File
- RelativePath=".\UpdateHints.h"
- >
- </File>
- <File
- RelativePath="..\common\version.h"
- >
- </File>
- <File
- RelativePath="..\common\versionNumber.h"
- >
- </File>
- <File
- RelativePath=".\view_com.h"
- >
- </File>
- <File
- RelativePath=".\view_gen.h"
- >
- </File>
- <File
- RelativePath=".\view_ins.h"
- >
- </File>
- <File
- RelativePath=".\view_pat.h"
- >
- </File>
- <File
- RelativePath=".\view_smp.h"
- >
- </File>
- <File
- RelativePath=".\view_tre.h"
- >
- </File>
- <File
- RelativePath=".\VSTEditor.h"
- >
- </File>
- <File
- RelativePath=".\vstplug.h"
- >
- </File>
- <File
- RelativePath=".\VstPresets.h"
- >
- </File>
- <File
- RelativePath=".\WelcomeDialog.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\WindowedFIR.h"
- >
- </File>
- <File
- RelativePath="..\common\WriteMemoryDump.h"
- >
- </File>
- <Filter
- Name="tuning"
- >
- <File
- RelativePath="..\soundlib\tuning.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\tuningbase.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\tuningcollection.h"
- >
- </File>
- <File
- RelativePath=".\TuningDialog.h"
- >
- </File>
- <File
- RelativePath=".\tuningRatioMapWnd.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Dialogs"
- >
- <File
- RelativePath=".\AdvancedConfigDlg.h"
- >
- </File>
- <File
- RelativePath=".\ChannelManagerDlg.h"
- >
- </File>
- <File
- RelativePath=".\CloseMainDialog.h"
- >
- </File>
- <File
- RelativePath=".\ColorConfigDlg.h"
- >
- </File>
- <File
- RelativePath=".\dlg_misc.h"
- >
- </File>
- <File
- RelativePath=".\EffectVis.h"
- >
- </File>
- <File
- RelativePath=".\GeneralConfigDlg.h"
- >
- </File>
- <File
- RelativePath=".\KeyConfigDlg.h"
- >
- </File>
- <File
- RelativePath=".\MIDIMacroDialog.h"
- >
- </File>
- <File
- RelativePath=".\MIDIMappingDialog.h"
- >
- </File>
- <File
- RelativePath=".\MoveFXSlotDialog.h"
- >
- </File>
- <File
- RelativePath=".\Mpdlgs.h"
- >
- </File>
- <File
- RelativePath=".\PatternEditorDialogs.h"
- >
- </File>
- <File
- RelativePath=".\PatternFont.h"
- >
- </File>
- <File
- RelativePath=".\PatternGotoDialog.h"
- >
- </File>
- <File
- RelativePath=".\PSRatioCalc.h"
- >
- </File>
- <File
- RelativePath=".\SampleConfigDlg.h"
- >
- </File>
- <File
- RelativePath=".\SampleEditorDialogs.h"
- >
- </File>
- <File
- RelativePath=".\ScaleEnvPointsDlg.h"
- >
- </File>
- <File
- RelativePath=".\SelectPluginDialog.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="test"
- >
- <File
- RelativePath="..\test\test.cpp"
- >
- </File>
- <File
- RelativePath="..\test\test.h"
- >
- </File>
- <File
- RelativePath="..\test\TestTools.h"
- >
- </File>
- <File
- RelativePath="..\test\TestToolsLib.cpp"
- >
- </File>
- <File
- RelativePath="..\test\TestToolsLib.h"
- >
- </File>
- <File
- RelativePath="..\test\TestToolsTracker.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Module Loaders"
- >
- <File
- RelativePath="..\soundlib\ChunkReader.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\ITTools.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\ITTools.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_669.cpp"
- >
- </File>
- <File
- RelativePath="..\Soundlib\load_amf.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_ams.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\load_dbm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\load_digi.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\load_dmf.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_dsm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_far.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_gdm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_imf.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_it.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_itp.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\load_j2b.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_mdl.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_med.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\load_mid.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_mo3.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_mod.cpp"
- >
- </File>
- <File
- RelativePath="..\Soundlib\load_mt2.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_mtm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_okt.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\load_plm.cpp"
- >
- </File>
- <File
- RelativePath="..\Soundlib\load_psm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\load_ptm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_s3m.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_stm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_ult.cpp"
- >
- </File>
- <File
- RelativePath="..\Soundlib\Load_umx.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_wav.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Load_xm.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\Loaders.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\Message.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\S3MTools.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\S3MTools.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\WAVTools.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\WAVTools.h"
- >
- </File>
- <File
- RelativePath="..\soundlib\XMTools.cpp"
- >
- </File>
- <File
- RelativePath="..\soundlib\XMTools.h"
- >
- </File>
- </Filter>
- <Filter
- Name="unarchiver"
- >
- <File
- RelativePath="..\unarchiver\archive.h"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unarchiver.cpp"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unarchiver.h"
- >
- </File>
- <File
- RelativePath="..\unarchiver\ungzip.cpp"
- >
- </File>
- <File
- RelativePath="..\unarchiver\ungzip.h"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unlha.cpp"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unlha.h"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unrar.cpp"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unrar.h"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unzip.cpp"
- >
- </File>
- <File
- RelativePath="..\unarchiver\unzip.h"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\res\defaultKeybindings.mkb"
- >
- </File>
- </Files>
- <Globals>
- <Global
- Name="RESOURCE_FILE"
- Value="mptrack.rc"
- />
- </Globals>
-</VisualStudioProject>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-02 15:09:23
|
Revision: 5238
http://sourceforge.net/p/modplug/code/5238
Author: saga-games
Date: 2015-06-02 15:09:17 +0000 (Tue, 02 Jun 2015)
Log Message:
-----------
[Fix] Properly handle pasted characters in CDecimalSupport
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CDecimalSupport.cpp
trunk/OpenMPT/mptrack/CDecimalSupport.h
Modified: trunk/OpenMPT/mptrack/CDecimalSupport.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CDecimalSupport.cpp 2015-06-02 14:23:15 UTC (rev 5237)
+++ trunk/OpenMPT/mptrack/CDecimalSupport.cpp 2015-06-02 15:09:17 UTC (rev 5238)
@@ -16,6 +16,7 @@
BEGIN_MESSAGE_MAP(CNumberEdit, CEdit)
ON_WM_CHAR()
+ ON_MESSAGE(WM_PASTE, OnPaste)
END_MESSAGE_MAP()
@@ -43,4 +44,16 @@
if(!bHandled) CEdit::OnChar(nChar , nRepCnt, nFlags);
}
+
+LPARAM CNumberEdit::OnPaste(WPARAM wParam, LPARAM lParam)
+//-------------------------------------------------------
+{
+ bool bHandled = false;
+ CDecimalSupport<CNumberEdit>::OnPaste(0, wParam, lParam, bHandled);
+ if(!bHandled)
+ return CEdit::DefWindowProc(WM_PASTE, wParam, lParam);
+ else
+ return 0;
+}
+
OPENMPT_NAMESPACE_END
\ No newline at end of file
Modified: trunk/OpenMPT/mptrack/CDecimalSupport.h
===================================================================
--- trunk/OpenMPT/mptrack/CDecimalSupport.h 2015-06-02 14:23:15 UTC (rev 5237)
+++ trunk/OpenMPT/mptrack/CDecimalSupport.h 2015-06-02 15:09:17 UTC (rev 5238)
@@ -51,7 +51,7 @@
/// the locale dependant negative sign
TCHAR m_NegativeSign[6];
- bool allowNegative, allowFractions;
+ bool m_allowNegative, m_allowFractions;
public:
@@ -67,8 +67,8 @@
/// \brief Initialize m_DecimalSeparator and m_NegativeSign
/// \remarks calls InitDecimalSeparator and InitNegativeSign
CDecimalSupport()
- : allowNegative(true)
- , allowFractions(true)
+ : m_allowNegative(true)
+ , m_allowFractions(true)
{
InitDecimalSeparator();
InitNegativeSign();
@@ -99,7 +99,7 @@
/// \param lParam
/// \param[out] bHandled true, if the text is a valid number
/// \return 0
- LRESULT OnPaste(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/,BOOL& bHandled)
+ LRESULT OnPaste(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, bool &bHandled)
{
bHandled = false;
int neg_sign = 0;
@@ -108,15 +108,15 @@
T* pT = static_cast<T*>(this);
int nStartChar;
int nEndChar;
- pT->GetSel(nStartChar , nEndChar);
+ pT->GetSel(nStartChar, nEndChar);
TCHAR buffer[limit];
pT->GetWindowText(buffer, limit);
- // Check if the texr already contains a decimal point
+ // Check if the text already contains a decimal point
for (TCHAR* x = buffer; *x; ++x)
{
if (x - buffer == nStartChar) x += nEndChar - nStartChar;
- if (*x == m_DecimalSeparator[0]) ++dec_point;
+ if (*x == m_DecimalSeparator[0] ||*x == _T('.')) ++dec_point;
if (*x == m_NegativeSign[0]) ++neg_sign;
}
@@ -138,6 +138,7 @@
LPTSTR lptstr = reinterpret_cast<TCHAR*>(GlobalLock(hglb));
if (lptstr != NULL)
{
+ bHandled = true;
for (TCHAR* s = lptstr; *s; ++s)
{
if (*s == m_NegativeSign[0])
@@ -150,14 +151,14 @@
if (neg_sign || nStartChar > 0)
{
- bHandled = true;
+ bHandled = false;
break;
}
++neg_sign;
continue;
}
- if (*s == m_DecimalSeparator[0])
+ if (*s == m_DecimalSeparator[0] || *s == _T('.'))
{
for (TCHAR* t = m_DecimalSeparator + 1; *t ; ++t, ++s)
{
@@ -166,7 +167,7 @@
if (dec_point)
{
- bHandled = true;
+ bHandled = false;
break;
}
++dec_point;
@@ -175,11 +176,12 @@
if (*s < _T('0') || *s > _T('9'))
{
- bHandled = true;
+ bHandled = false;
break;
}
}
+ if(bHandled) pT->ReplaceSel(lptstr, true);
GlobalUnlock(hglb);
@@ -200,7 +202,7 @@
LRESULT OnChar(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled)
{
bHandled = false;
- if (static_cast<TCHAR>(wParam) == m_DecimalSeparator[0] || wParam == _T('.') && allowFractions)
+ if (static_cast<TCHAR>(wParam) == m_DecimalSeparator[0] || wParam == _T('.') && m_allowFractions)
{
T* pT = static_cast<T*>(this);
int nStartChar;
@@ -219,7 +221,7 @@
bHandled = true;
}
- if (static_cast<TCHAR>(wParam) == m_NegativeSign[0] && allowNegative)
+ if (static_cast<TCHAR>(wParam) == m_NegativeSign[0] && m_allowNegative)
{
T* pT = static_cast<T*>(this);
int nStartChar;
@@ -357,17 +359,17 @@
szBuff[pos] = digits[i];
if (digits[i] != '0') last_nonzero = pos+1;
}
- szBuff[std::min(buflen - 1,last_nonzero)] = _T('\0');
+ szBuff[std::min(buflen - 1, last_nonzero)] = _T('\0');
}
void AllowNegative(bool allow)
{
- allowNegative = allow;
+ m_allowNegative = allow;
}
void AllowFractions(bool allow)
{
- allowFractions = allow;
+ m_allowFractions = allow;
}
};
@@ -381,6 +383,7 @@
protected:
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
+ afx_msg LPARAM OnPaste(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-03 20:59:44
|
Revision: 5243
http://sourceforge.net/p/modplug/code/5243
Author: saga-games
Date: 2015-06-03 20:59:38 +0000 (Wed, 03 Jun 2015)
Log Message:
-----------
[Imp] Allow more than one shortcut being bound to the same key combination
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2015-06-03 09:55:49 UTC (rev 5242)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2015-06-03 20:59:38 UTC (rev 5243)
@@ -744,12 +744,12 @@
{
if (IsCrossContextConflict(kc, conflictCmd.second))
{
- report += "Warning! the following commands may conflict:\r\n >" + GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + "\r\n >" + GetCommandText(cmd) + " in " + kc.GetContextText() + "\r\n\r\n";
+ report += "The following commands may conflict:\r\n >" + GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + "\r\n >" + GetCommandText(cmd) + " in " + kc.GetContextText() + "\r\n\r\n";
Log("%s", report);
} else
{
- Remove(conflictCmd.second, conflictCmd.first);
- report += "Removed due to conflict in same context:\r\n >" + GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + "\r\n\r\n";
+ //Remove(conflictCmd.second, conflictCmd.first);
+ report += "The following commands in same context share the same key combination:\r\n >" + GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + "\r\n\r\n";
Log("%s", report);
}
}
@@ -1426,22 +1426,21 @@
std::vector<KeyEventType> eventTypes;
std::vector<InputTargetContext> contexts;
- //Clear map
km.clear();
- //Copy commandlist content into map:
+ // Copy commandlist content into map:
for(UINT cmd=0; cmd<kcNumCommands; cmd++)
{
if(IsDummyCommand((CommandID)cmd))
continue;
- for(size_t k=0; k<commands[cmd].kcList.size(); k++)
+ for(size_t k = 0; k < commands[cmd].kcList.size(); k++)
{
std::vector<KeyEventType> eventTypes;
std::vector<InputTargetContext> contexts;
curKc = commands[cmd].kcList[k];
- //Handle keyEventType mask.
+ // Handle keyEventType mask.
if (curKc.EventType() & kKeyEventDown)
eventTypes.push_back(kKeyEventDown);
if (curKc.EventType() & kKeyEventUp)
@@ -1450,7 +1449,7 @@
eventTypes.push_back(kKeyEventRepeat);
//ASSERT(eventTypes.GetSize()>0);
- //Handle super-contexts (contexts that represent a set of sub contexts)
+ // Handle super-contexts (contexts that represent a set of sub contexts)
if (curKc.Context() == kCtxViewPatterns)
{
contexts.push_back(kCtxViewPatternsNote);
@@ -1466,11 +1465,11 @@
contexts.push_back(curKc.Context());
}
- for (size_t cx=0; cx<contexts.size(); cx++)
+ for (size_t cx = 0; cx < contexts.size(); cx++)
{
- for (size_t ke=0; ke<eventTypes.size(); ke++)
+ for (size_t ke = 0; ke < eventTypes.size(); ke++)
{
- km[KeyCombination(contexts[cx], curKc.Modifier(), curKc.KeyCode(), eventTypes[ke])] = (CommandID)cmd;
+ km.insert(std::make_pair(KeyCombination(contexts[cx], curKc.Modifier(), curKc.KeyCode(), eventTypes[ke]), (CommandID)cmd));
}
}
}
@@ -1479,8 +1478,8 @@
}
-void CCommandSet::Copy(CCommandSet *source)
-//-----------------------------------------
+void CCommandSet::Copy(const CCommandSet *source)
+//----------------------------------------------
{
// copy constructors should take care of complexity (I hope)
oldSpecs = nullptr;
Modified: trunk/OpenMPT/mptrack/CommandSet.h
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.h 2015-06-03 09:55:49 UTC (rev 5242)
+++ trunk/OpenMPT/mptrack/CommandSet.h 2015-06-03 20:59:38 UTC (rev 5243)
@@ -1233,10 +1233,11 @@
};
#if MPT_COMPILER_MSVC && MPT_MSVC_BEFORE(2010,0)
-typedef std::tr1::unordered_map<KeyCombination, CommandID, KeyCombination::hash> KeyMap;
+typedef std::tr1::unordered_multimap<KeyCombination, CommandID, KeyCombination::hash> KeyMap;
#else
-typedef std::unordered_map<KeyCombination, CommandID, KeyCombination::hash> KeyMap;
+typedef std::unordered_multimap<KeyCombination, CommandID, KeyCombination::hash> KeyMap;
#endif
+typedef std::pair<KeyMap::const_iterator, KeyMap::const_iterator> KeyMapRange;
//KeyMap
@@ -1327,7 +1328,7 @@
CString GetKeyTextFromCommand(CommandID c, UINT key);
//Pululation ;)
- void Copy(CCommandSet *source); // copy the contents of a commandset into this command set
+ void Copy(const CCommandSet *source); // copy the contents of a commandset into this command set
void GenKeyMap(KeyMap &km); // Generate a keymap from this command set
bool SaveFile(const mpt::PathString &filename);
bool LoadFile(const mpt::PathString &filename);
Modified: trunk/OpenMPT/mptrack/InputHandler.cpp
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.cpp 2015-06-03 09:55:49 UTC (rev 5242)
+++ trunk/OpenMPT/mptrack/InputHandler.cpp 2015-06-03 20:59:38 UTC (rev 5243)
@@ -56,7 +56,7 @@
if (!bSuccess)
{
// Load keybindings from resources.
- Log("Loading keybindings from resources\n");
+ Log(LogDebug, MPT_USTRING("Loading keybindings from resources\n"));
bSuccess = activeCommandSet->LoadDefaultKeymap();
if (bSuccess && bNoExistingKbdFileSetting)
{
@@ -90,7 +90,7 @@
CommandID CInputHandler::GeneralKeyEvent(InputTargetContext context, int code, WPARAM wParam, LPARAM lParam)
//----------------------------------------------------------------------------------------------------------
{
- KeyMap::const_iterator cmd = keyMap.end();
+ KeyMapRange cmd = std::make_pair(keyMap.end(), keyMap.end());
KeyEventType keyEventType;
if(code == HC_ACTION)
@@ -120,22 +120,25 @@
{
// only execute command when the input handler is not locked
// and the input is not a consequence of special key interception.
- cmd = keyMap.find(KeyCombination(context, modifierMask, wParam, keyEventType));
+ cmd = keyMap.equal_range(KeyCombination(context, modifierMask, wParam, keyEventType));
}
}
if(code == HC_MIDI)
{
- cmd = keyMap.find(KeyCombination(context, HOTKEYF_MIDI, wParam, kKeyEventDown));
+ cmd = keyMap.equal_range(KeyCombination(context, HOTKEYF_MIDI, wParam, kKeyEventDown));
}
CommandID executeCommand = kcNull;
- if(m_pMainFrm && cmd != keyMap.end())
+ if(m_pMainFrm)
{
- executeCommand = cmd->second;
- if(!m_pMainFrm->SendMessage(WM_MOD_KEYCOMMAND, executeCommand, wParam))
+ for(KeyMap::const_iterator i = cmd.first; i != cmd.second; i++)
{
- // Command was not handled, so let Windows process it.
- return kcNull;
+ executeCommand = i->second;
+ if(!m_pMainFrm->SendMessage(WM_MOD_KEYCOMMAND, executeCommand, wParam))
+ {
+ // Command was not handled, so let Windows process it.
+ return kcNull;
+ }
}
}
@@ -148,19 +151,22 @@
{
if(InterceptSpecialKeys(nChar, nFlags, false))
return kcNull;
- KeyMap::const_iterator cmd = keyMap.find(KeyCombination(context, modifierMask, nChar, keyEventType));
+ KeyMapRange cmd = keyMap.equal_range(KeyCombination(context, modifierMask, nChar, keyEventType));
CommandID executeCommand = kcNull;
if(pSourceWnd == nullptr)
pSourceWnd = m_pMainFrm; //by default, send command message to main frame.
- if(pSourceWnd && cmd != keyMap.end())
+ if(pSourceWnd != nullptr)
{
- executeCommand = cmd->second;
- if(!pSourceWnd->SendMessage(WM_MOD_KEYCOMMAND, executeCommand, nChar))
+ for(KeyMap::const_iterator i = cmd.first; i != cmd.second; i++)
{
- // Command was not handled, so let Windows process it.
- return kcNull;
+ executeCommand = i->second;
+ if(!pSourceWnd->SendMessage(WM_MOD_KEYCOMMAND, executeCommand, nChar))
+ {
+ // Command was not handled, so let Windows process it.
+ return kcNull;
+ }
}
}
@@ -340,11 +346,11 @@
void CInputHandler::LogModifiers(UINT mask)
//-----------------------------------------
{
- Log("----------------------------------\n");
- if (mask & HOTKEYF_CONTROL) Log("Ctrl On"); else Log("Ctrl --");
- if (mask & HOTKEYF_SHIFT) Log("\tShft On"); else Log("\tShft --");
- if (mask & HOTKEYF_ALT) Log("\tAlt On\n"); else Log("\tAlt --\n");
- if (mask & HOTKEYF_EXT) Log("\tWin On\n"); else Log("\tWin --\n"); // Feature: use Windows keys as modifier keys
+ Log(LogDebug, MPT_USTRING("----------------------------------\n"));
+ if (mask & HOTKEYF_CONTROL) Log(LogDebug, MPT_USTRING("Ctrl On")); else Log(LogDebug, MPT_USTRING("Ctrl --"));
+ if (mask & HOTKEYF_SHIFT) Log(LogDebug, MPT_USTRING("\tShft On")); else Log(LogDebug, MPT_USTRING("\tShft --"));
+ if (mask & HOTKEYF_ALT) Log(LogDebug, MPT_USTRING("\tAlt On\n")); else Log(LogDebug, MPT_USTRING("\tAlt --\n"));
+ if (mask & HOTKEYF_EXT) Log(LogDebug, MPT_USTRING("\tWin On\n")); else Log(LogDebug, MPT_USTRING("\tWin --\n")); // Feature: use Windows keys as modifier keys
}
Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2015-06-03 09:55:49 UTC (rev 5242)
+++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2015-06-03 20:59:38 UTC (rev 5243)
@@ -776,18 +776,24 @@
std::pair<CommandID, KeyCombination> conflictCmd;
if((conflictCmd = plocalCmdSet->IsConflicting(kc, cmd)).first != kcNull
&& conflictCmd.first != cmd
- && !plocalCmdSet->IsCrossContextConflict(kc, conflictCmd.second)
- && Reporting::Confirm("New shortcut (" + kc.GetKeyText() + ") conflicts with " + plocalCmdSet->GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + ".\nDelete the other shortcut and keep the new one?", MPT_USTRING("Shortcut Conflict"), false, false, this) == cnfNo)
+ && !plocalCmdSet->IsCrossContextConflict(kc, conflictCmd.second))
{
- // Restore original choice
- add = false;
- if(m_nCurKeyChoice >= 0 && m_nCurKeyChoice < plocalCmdSet->GetKeyListSize(cmd))
+ ConfirmAnswer delOld = Reporting::Confirm("New shortcut (" + kc.GetKeyText() + ") has the same key combination as " + plocalCmdSet->GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + ".\nDo you want to delete the other shortcut, only keeping the new one?", "Shortcut Conflict", true, false, this);
+ if(delOld == cnfYes)
{
- KeyCombination origKc = plocalCmdSet->GetKey(cmd, m_nCurKeyChoice);
- m_eCustHotKey.SetKey(origKc.Modifier(), origKc.KeyCode());
- } else
+ plocalCmdSet->Remove(conflictCmd.second, conflictCmd.first);
+ } else if(delOld == cnfCancel)
{
- m_eCustHotKey.SetWindowText(_T(""));
+ // Cancel altogther; restore original choice
+ add = false;
+ if(m_nCurKeyChoice >= 0 && m_nCurKeyChoice < plocalCmdSet->GetKeyListSize(cmd))
+ {
+ KeyCombination origKc = plocalCmdSet->GetKey(cmd, m_nCurKeyChoice);
+ m_eCustHotKey.SetKey(origKc.Modifier(), origKc.KeyCode());
+ } else
+ {
+ m_eCustHotKey.SetWindowText(_T(""));
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-05 12:15:13
|
Revision: 5253
http://sourceforge.net/p/modplug/code/5253
Author: manxorist
Date: 2015-06-05 12:15:08 +0000 (Fri, 05 Jun 2015)
Log Message:
-----------
[Ref] Silence 2 rather bogus PathString warnings.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2015-06-04 18:21:22 UTC (rev 5252)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2015-06-05 12:15:08 UTC (rev 5253)
@@ -1807,7 +1807,7 @@
if(strcmp(fileNameAdd, ""))
{
SanitizeFilename(fileNameAdd);
- thisName += mpt::PathString::FromLocale(fileNameAdd);
+ thisName += mpt::PathString::FromUnicode(mpt::ToUnicode(mpt::CharsetLocale, fileNameAdd));
}
thisName += fileExt;
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-04 18:21:22 UTC (rev 5252)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-05 12:15:08 UTC (rev 5253)
@@ -1951,9 +1951,15 @@
bool CTrackApp::OpenURL(const CString &url)
//-----------------------------------------
{
- return OpenURL(mpt::PathString::FromCString(url));
+ return OpenURL(mpt::ToUnicode(url));
}
+bool CTrackApp::OpenURL(const mpt::ustring &url)
+//----------------------------------------------
+{
+ return OpenURL(mpt::PathString::FromUnicode(url));
+}
+
bool CTrackApp::OpenURL(const mpt::PathString &lpszURL)
//-----------------------------------------------------
{
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2015-06-04 18:21:22 UTC (rev 5252)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2015-06-05 12:15:08 UTC (rev 5253)
@@ -238,9 +238,10 @@
static BOOL SaveDefaultDLSBanks();
static BOOL RemoveDLSBank(UINT nBank);
static BOOL AddDLSBank(const mpt::PathString &filename);
- static bool OpenURL(const char *url);
- static bool OpenURL(const std::string &url);
+ static bool OpenURL(const char *url); // UTF8
+ static bool OpenURL(const std::string &url); // UTF8
static bool OpenURL(const CString &url);
+ static bool OpenURL(const mpt::ustring &url);
static bool OpenURL(const mpt::PathString &lpszURL);
static bool OpenFile(const mpt::PathString &file) { return OpenURL(file); };
static bool OpenDirectory(const mpt::PathString &directory) { return OpenURL(directory); };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-07 14:02:14
|
Revision: 5261
http://sourceforge.net/p/modplug/code/5261
Author: saga-games
Date: 2015-06-07 14:02:08 +0000 (Sun, 07 Jun 2015)
Log Message:
-----------
[Imp] Make the advanced settings a bit nicer to look at by using a grouped list and adding more columns
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
trunk/OpenMPT/mptrack/AdvancedConfigDlg.h
trunk/OpenMPT/mptrack/Settings.cpp
trunk/OpenMPT/mptrack/Settings.h
trunk/OpenMPT/mptrack/mptrack.rc
Modified: trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 07:00:20 UTC (rev 5260)
+++ trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 14:02:08 UTC (rev 5261)
@@ -19,8 +19,8 @@
OPENMPT_NAMESPACE_BEGIN
BEGIN_MESSAGE_MAP(COptionsAdvanced, CPropertyPage)
- ON_LBN_DBLCLK(IDC_LIST4, OnOptionDblClick)
- ON_EN_CHANGE(IDC_EDIT1, OnFindStringChanged)
+ ON_NOTIFY(NM_DBLCLK, IDC_LIST1, OnOptionDblClick)
+ ON_EN_CHANGE(IDC_EDIT1, OnFindStringChanged)
END_MESSAGE_MAP()
void COptionsAdvanced::DoDataExchange(CDataExchange* pDX)
@@ -28,24 +28,17 @@
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CModTypeDlg)
- DDX_Control(pDX, IDC_LIST4, m_List);
+ DDX_Control(pDX, IDC_LIST1, m_List);
//}}AFX_DATA_MAP
}
-static CString FormatSetting(const SettingPath &path, const SettingValue &val)
-//----------------------------------------------------------------------------
-{
- return mpt::ToCString(path.FormatAsString() + MPT_USTRING(" = ") + val.FormatAsString());
-}
-
-
BOOL COptionsAdvanced::PreTranslateMessage(MSG *msg)
//--------------------------------------------------
{
if(msg->message == WM_KEYDOWN && msg->wParam == VK_RETURN)
{
- OnOptionDblClick();
+ OnOptionDblClick(nullptr, nullptr);
return TRUE;
}
return FALSE;
@@ -56,6 +49,17 @@
//-----------------------------------
{
CPropertyPage::OnInitDialog();
+
+ const CListCtrlEx::Header headers[] =
+ {
+ { _T("Setting"), 100, LVCFMT_LEFT },
+ { _T("Type"), 40, LVCFMT_LEFT },
+ { _T("Value"), 190, LVCFMT_LEFT },
+ { _T("Default"), 62, LVCFMT_LEFT },
+ };
+ m_List.SetHeaders(headers);
+ m_List.SetExtendedStyle(m_List.GetExtendedStyle() | LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT);
+
ReInit();
return TRUE;
}
@@ -65,26 +69,81 @@
//-----------------------------
{
m_List.SetRedraw(FALSE);
- m_List.ResetContent();
+ m_List.DeleteAllItems();
+ bool useGroups = ((int)ListView_EnableGroupView(m_List.m_hWnd, TRUE)) != -1;
+ m_List.SetItemCount(theApp.GetSettings().size());
+
m_IndexToPath.clear();
+ m_IndexToPath.reserve(theApp.GetSettings().size());
+ m_Groups.clear();
+ int numGroups = 0;
CString findStr;
GetDlgItemText(IDC_EDIT1, findStr);
findStr.MakeLower();
+ int i = 0;
for(SettingsContainer::SettingsMap::const_iterator it = theApp.GetSettings().begin(); it != theApp.GetSettings().end(); ++it)
{
- CString str = FormatSetting(it->first, it->second);
+ const SettingPath &path = it->first;
+ const SettingValue &value = it->second;
+
+ int groupID = 0;
+ const mpt::ustring §ion = path.GetSection();
+ UNORDERED_MAP<mpt::ustring, int>::const_iterator gi = m_Groups.find(section);
+ if(gi == m_Groups.end() && useGroups)
+ {
+ LVGROUP group;
+#if _WIN32_WINNT >= 0x0600
+ group.cbSize = LVGROUP_V5_SIZE;
+#else
+ group.cbSize = sizeof(group);
+#endif
+ group.mask = LVGF_HEADER | LVGF_GROUPID;
+ group.pszHeader = const_cast<wchar_t *>(section.c_str());
+ group.cchHeader = 0;
+ group.pszFooter = nullptr;
+ group.cchFooter = 0;
+ group.iGroupId = groupID = numGroups++;
+ group.stateMask = LVGS_COLLAPSIBLE;
+ group.state = LVGS_COLLAPSIBLE;
+ group.uAlign = LVGA_HEADER_LEFT;
+ ListView_InsertGroup(m_List.m_hWnd, -1, &group);
+ m_Groups.insert(std::make_pair(section, groupID));
+ } else
+ {
+ groupID = gi->second;
+ }
+
bool addString = true;
if(!findStr.IsEmpty())
{
- CString strLower = str;
- addString = strLower.MakeLower().Find(findStr) >= 0;
+ CString str = mpt::ToCString(path.FormatAsString() + MPT_USTRING(" = ") + value.FormatValueAsString());
+ addString = str.MakeLower().Find(findStr) >= 0;
}
if(addString)
{
- int index = m_List.AddString(str);
- m_IndexToPath[index] = it->first;
+ const mpt::ustring str = useGroups ? it->first.GetKey() : it->first.FormatAsString();
+ LVITEMW lvi;
+ lvi.mask = LVIF_TEXT | LVIF_GROUPID;
+ lvi.iItem = i++;
+ lvi.iSubItem = 0;
+ lvi.state = 0;
+ lvi.stateMask = 0;
+ lvi.pszText = const_cast<wchar_t *>(str.c_str());
+ lvi.cchTextMax = 0;
+ lvi.iImage = 0;
+ lvi.lParam = m_IndexToPath.size();
+ lvi.iIndent = 0;
+ lvi.iGroupId = groupID;
+
+ int index = m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi));
+ m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
+ m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
+ m_List.SetItemText(index, 3, it->second.GetDefault().FormatValueAsString().c_str());
+ m_IndexToPath.push_back(it->first);
}
}
+
+ m_List.SetItemCount(i);
m_List.SetRedraw(TRUE);
m_List.Invalidate(FALSE);
}
@@ -106,22 +165,18 @@
}
-void COptionsAdvanced::OnOptionDblClick()
-//---------------------------------------
+void COptionsAdvanced::OnOptionDblClick(NMHDR *, LRESULT *)
+//---------------------------------------------------------
{
- const int index = m_List.GetCurSel();
- if(m_IndexToPath.find(index) == m_IndexToPath.end())
- {
- return;
- }
- const SettingPath path = m_IndexToPath[index];
+ const int index = m_List.GetSelectionMark();
+ const SettingPath path = m_IndexToPath[m_List.GetItemData(index)];
SettingValue val = theApp.GetSettings().GetMap().find(path)->second;
if(val.GetType() == SettingTypeBool)
{
val = !val.as<bool>();
} else
{
- CInputDlg inputDlg(this, mpt::ToCString(path.FormatAsString()), mpt::ToCString(val.FormatValueAsString()));
+ CInputDlg inputDlg(this, _T("Enter new value for ") + mpt::ToCString(path.FormatAsString()), mpt::ToCString(val.FormatValueAsString()));
if(inputDlg.DoModal() != IDOK)
{
return;
@@ -129,9 +184,8 @@
val.SetFromString(inputDlg.resultString);
}
theApp.GetSettings().Write(path, val);
- m_List.DeleteString(index);
- m_List.InsertString(index, FormatSetting(path, val));
- m_List.SetCurSel(index);
+ m_List.SetItemText(index, 2, val.FormatValueAsString().c_str());
+ m_List.SetSelectionMark(index);
OnSettingsChanged();
}
Modified: trunk/OpenMPT/mptrack/AdvancedConfigDlg.h
===================================================================
--- trunk/OpenMPT/mptrack/AdvancedConfigDlg.h 2015-06-07 07:00:20 UTC (rev 5260)
+++ trunk/OpenMPT/mptrack/AdvancedConfigDlg.h 2015-06-07 14:02:08 UTC (rev 5261)
@@ -12,6 +12,14 @@
#if defined(MPT_SETTINGS_CACHE)
+#include "CListCtrl.h"
+#include <unordered_map>
+#if MPT_COMPILER_MSVC && MPT_MSVC_BEFORE(2010,0)
+#define UNORDERED_MAP std::tr1::unordered_map
+#else
+#define UNORDERED_MAP std::unordered_map
+#endif
+
OPENMPT_NAMESPACE_BEGIN
//==========================================
@@ -19,8 +27,9 @@
//==========================================
{
protected:
- CListBox m_List;
- std::map<int, SettingPath> m_IndexToPath;
+ CListCtrlEx m_List;
+ std::vector<SettingPath> m_IndexToPath;
+ UNORDERED_MAP<mpt::ustring, int> m_Groups;
public:
COptionsAdvanced():CPropertyPage(IDD_OPTIONS_ADVANCED) {}
@@ -31,7 +40,7 @@
virtual BOOL OnSetActive();
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL PreTranslateMessage(MSG *msg);
- afx_msg void OnOptionDblClick();
+ afx_msg void OnOptionDblClick(NMHDR *, LRESULT *);
afx_msg void OnSettingsChanged() { SetModified(TRUE); }
afx_msg void OnFindStringChanged() { ReInit(); }
Modified: trunk/OpenMPT/mptrack/Settings.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Settings.cpp 2015-06-07 07:00:20 UTC (rev 5260)
+++ trunk/OpenMPT/mptrack/Settings.cpp 2015-06-07 14:02:08 UTC (rev 5261)
@@ -89,12 +89,6 @@
}
-mpt::ustring SettingValue::FormatAsString() const
-{
- return MPT_USTRING("(") + FormatTypeAsString() + MPT_USTRING(")") + FormatValueAsString();
-}
-
-
void SettingValue::SetFromString(const AnyStringLocale &newVal)
{
switch(GetType())
Modified: trunk/OpenMPT/mptrack/Settings.h
===================================================================
--- trunk/OpenMPT/mptrack/Settings.h 2015-06-07 07:00:20 UTC (rev 5260)
+++ trunk/OpenMPT/mptrack/Settings.h 2015-06-07 14:02:08 UTC (rev 5261)
@@ -276,7 +276,6 @@
}
mpt::ustring FormatTypeAsString() const;
mpt::ustring FormatValueAsString() const;
- mpt::ustring FormatAsString() const;
void SetFromString(const AnyStringLocale &newVal);
};
@@ -395,10 +394,12 @@
assign(val);
return *this;
}
- SettingValue GetDefault() const
+#if defined(MPT_SETTINGS_CACHE_STORE_DEFAULTS)
+ const SettingValue &GetDefault() const
{
return defaultValue;
}
+#endif // MPT_SETTINGS_CACHE_STORE_DEFAULTS
bool IsDirty() const
{
return dirty;
@@ -434,11 +435,11 @@
{
return;
}
- mpt::ustring GetSection() const
+ const mpt::ustring &GetSection() const
{
return section;
}
- mpt::ustring GetKey() const
+ const mpt::ustring &GetKey() const
{
return key;
}
@@ -568,6 +569,7 @@
SettingsMap::const_iterator begin() const { return map.begin(); }
SettingsMap::const_iterator end() const { return map.end(); }
+ SettingsMap::size_type size() const { return map.size(); }
const SettingsMap &GetMap() const { return map; }
#endif // MPT_SETTINGS_CACHE
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2015-06-07 07:00:20 UTC (rev 5260)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2015-06-07 14:02:08 UTC (rev 5261)
@@ -314,7 +314,7 @@
LTEXT "Warning:\nChanging advanced settings might cause stability problems.\nYou should only continue if you know what you are doing.",IDC_STATIC,6,6,258,24
LTEXT "&Find:",IDC_STATIC,6,38,17,8
EDITTEXT IDC_EDIT1,30,36,252,12,ES_AUTOHSCROLL
- LISTBOX IDC_LIST4,6,54,276,222,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SORTASCENDING | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,54,276,222
END
IDD_SCANPLUGINS DIALOGEX 0, 0, 316, 34
@@ -1106,12 +1106,11 @@
CONTROL "Plugin volume command &bug emulation",IDC_CHK_MIDICCBUG,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,167,222,12
LTEXT "&Tempo Mode:",IDC_TEXT_TEMPOMODE,12,204,44,8
- COMBOBOX IDC_COMBO_TEMPOMODE,60,204,78,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Rows per beat",IDC_TEXT_ROWSPERBEAT,174,206,72,8
- EDITTEXT IDC_ROWSPERBEAT,144,204,24,12,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Rows per measure",IDC_TEXT_ROWSPERMEASURE,174,223,72,8
- EDITTEXT IDC_ROWSPERMEASURE,144,222,24,12,ES_AUTOHSCROLL | ES_NUMBER
- PUSHBUTTON "Configure S&huffle",IDC_BUTTON1,60,222,78,12
+ COMBOBOX IDC_COMBO_TEMPOMODE,12,215,108,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Rows per beat",IDC_TEXT_ROWSPERBEAT,162,206,84,8
+ EDITTEXT IDC_ROWSPERBEAT,132,204,24,12,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "Rows per measure",IDC_TEXT_ROWSPERMEASURE,162,223,84,8
+ EDITTEXT IDC_ROWSPERMEASURE,132,222,24,12,ES_AUTOHSCROLL | ES_NUMBER
RTEXT "Created with:",IDC_TEXT_CREATEDWITH,12,260,60,8
EDITTEXT IDC_EDIT_CREATEDWITH,78,258,166,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_STATICEDGE
RTEXT "Last saved with:",IDC_TEXT_SAVEDWITH,12,276,60,8
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-07 16:51:34
|
Revision: 5263
http://sourceforge.net/p/modplug/code/5263
Author: manxorist
Date: 2015-06-07 16:51:28 +0000 (Sun, 07 Jun 2015)
Log Message:
-----------
[Fix] Advanced settings: Setting list view group mode cannot assume actual documented behaviour if the control in fact does not even support grouped mode. Actually verify that successive calls to ListView_EnableGroupView work as documented. Fixes detection on Wine.
[Fix] Advanced settings: LVIF_GROUPID item flag should only be set if the list view is actually supporting and running in group mode. Fixes Wine.
[Mod] Advanced settings: Tune column widths for non-grouped mode.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
trunk/OpenMPT/mptrack/AdvancedConfigDlg.h
Modified: trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 14:04:08 UTC (rev 5262)
+++ trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 16:51:28 UTC (rev 5263)
@@ -50,16 +50,50 @@
{
CPropertyPage::OnInitDialog();
- const CListCtrlEx::Header headers[] =
- {
- { _T("Setting"), 100, LVCFMT_LEFT },
- { _T("Type"), 40, LVCFMT_LEFT },
- { _T("Value"), 190, LVCFMT_LEFT },
- { _T("Default"), 62, LVCFMT_LEFT },
- };
- m_List.SetHeaders(headers);
m_List.SetExtendedStyle(m_List.GetExtendedStyle() | LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT);
+ ListView_EnableGroupView(m_List.m_hWnd, FALSE); // try to set known state
+ int enableGroupsResult1 = static_cast<int>(ListView_EnableGroupView(m_List.m_hWnd, TRUE));
+ int enableGroupsResult2 = static_cast<int>(ListView_EnableGroupView(m_List.m_hWnd, TRUE));
+ // Looks like we have to check enabling and check that a second enabling does
+ // not change anything.
+ // Just checking if enabling fails with -1, does no work for older control
+ // versions because they just do not know the window message at all and return
+ // 0, always. At least Wine does behave this way.
+ if(enableGroupsResult1 == 1 && enableGroupsResult2 == 0)
+ {
+ m_ListGrouped = true;
+ } else
+ {
+ // Did not behave as documented or expected, the actual state of the
+ // control is unknown by now.
+ // Play safe and set and assume the traditional ungrouped mode again.
+ ListView_EnableGroupView(m_List.m_hWnd, FALSE);
+ m_ListGrouped = false;
+ }
+
+ if(m_ListGrouped)
+ {
+ const CListCtrlEx::Header headers[] =
+ {
+ { _T("Setting"), 100, LVCFMT_LEFT },
+ { _T("Type"), 40, LVCFMT_LEFT },
+ { _T("Value"), 190, LVCFMT_LEFT },
+ { _T("Default"), 62, LVCFMT_LEFT },
+ };
+ m_List.SetHeaders(headers);
+ } else
+ {
+ const CListCtrlEx::Header headers[] =
+ {
+ { _T("Setting"), 150, LVCFMT_LEFT },
+ { _T("Type"), 40, LVCFMT_LEFT },
+ { _T("Value"), 150, LVCFMT_LEFT },
+ { _T("Default"), 52, LVCFMT_LEFT },
+ };
+ m_List.SetHeaders(headers);
+ }
+
ReInit();
return TRUE;
}
@@ -70,7 +104,7 @@
{
m_List.SetRedraw(FALSE);
m_List.DeleteAllItems();
- bool useGroups = ((int)ListView_EnableGroupView(m_List.m_hWnd, TRUE)) != -1;
+ const bool useGroups = m_ListGrouped;
m_List.SetItemCount(theApp.GetSettings().size());
m_IndexToPath.clear();
@@ -123,7 +157,7 @@
{
const mpt::ustring str = useGroups ? it->first.GetKey() : it->first.FormatAsString();
LVITEMW lvi;
- lvi.mask = LVIF_TEXT | LVIF_GROUPID | LVIF_PARAM;
+ lvi.mask = LVIF_TEXT | LVIF_PARAM | (useGroups ? LVIF_GROUPID : 0);
lvi.iItem = i++;
lvi.iSubItem = 0;
lvi.state = 0;
@@ -133,9 +167,9 @@
lvi.iImage = 0;
lvi.lParam = m_IndexToPath.size();
lvi.iIndent = 0;
- lvi.iGroupId = groupID;
+ lvi.iGroupId = (useGroups ? groupID : 0);
- int index = m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi));
+ int index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
m_List.SetItemText(index, 3, it->second.GetDefault().FormatValueAsString().c_str());
Modified: trunk/OpenMPT/mptrack/AdvancedConfigDlg.h
===================================================================
--- trunk/OpenMPT/mptrack/AdvancedConfigDlg.h 2015-06-07 14:04:08 UTC (rev 5262)
+++ trunk/OpenMPT/mptrack/AdvancedConfigDlg.h 2015-06-07 16:51:28 UTC (rev 5263)
@@ -28,11 +28,12 @@
{
protected:
CListCtrlEx m_List;
+ bool m_ListGrouped;
std::vector<SettingPath> m_IndexToPath;
UNORDERED_MAP<mpt::ustring, int> m_Groups;
public:
- COptionsAdvanced():CPropertyPage(IDD_OPTIONS_ADVANCED) {}
+ COptionsAdvanced():CPropertyPage(IDD_OPTIONS_ADVANCED), m_ListGrouped(false) {}
protected:
virtual BOOL OnInitDialog();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-07 18:06:46
|
Revision: 5265
http://sourceforge.net/p/modplug/code/5265
Author: manxorist
Date: 2015-06-07 18:06:40 +0000 (Sun, 07 Jun 2015)
Log Message:
-----------
[Ref] Settings: Use explicitely named reference accessor functions.
[Ref] Advanced settings: Reduce object and string copying some more.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
trunk/OpenMPT/mptrack/Settings.h
Modified: trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 16:54:20 UTC (rev 5264)
+++ trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 18:06:40 UTC (rev 5265)
@@ -104,7 +104,6 @@
{
m_List.SetRedraw(FALSE);
m_List.DeleteAllItems();
- const bool useGroups = m_ListGrouped;
m_List.SetItemCount(theApp.GetSettings().size());
m_IndexToPath.clear();
@@ -118,63 +117,96 @@
for(SettingsContainer::SettingsMap::const_iterator it = theApp.GetSettings().begin(); it != theApp.GetSettings().end(); ++it)
{
const SettingPath &path = it->first;
- const SettingValue &value = it->second;
+ const SettingState &state = it->second;
+ const mpt::ustring §ion = path.GetRefSection();
+ const mpt::ustring &key = path.GetRefKey();
+ const SettingValue &value = state.GetRefValue();
+ const SettingValue &defaultValue = state.GetRefDefault();
- int groupID = 0;
- const mpt::ustring §ion = path.GetSection();
- UNORDERED_MAP<mpt::ustring, int>::const_iterator gi = m_Groups.find(section);
- if(gi == m_Groups.end() && useGroups)
- {
- LVGROUP group;
-#if _WIN32_WINNT >= 0x0600
- group.cbSize = LVGROUP_V5_SIZE;
-#else
- group.cbSize = sizeof(group);
-#endif
- group.mask = LVGF_HEADER | LVGF_GROUPID;
- group.pszHeader = const_cast<wchar_t *>(section.c_str());
- group.cchHeader = 0;
- group.pszFooter = nullptr;
- group.cchFooter = 0;
- group.iGroupId = groupID = numGroups++;
- group.stateMask = LVGS_COLLAPSIBLE;
- group.state = LVGS_COLLAPSIBLE;
- group.uAlign = LVGA_HEADER_LEFT;
- ListView_InsertGroup(m_List.m_hWnd, -1, &group);
- m_Groups.insert(std::make_pair(section, groupID));
- } else
- {
- groupID = gi->second;
- }
-
bool addString = true;
if(!findStr.IsEmpty())
{
CString str = mpt::ToCString(path.FormatAsString() + MPT_USTRING(" = ") + value.FormatValueAsString());
- addString = str.MakeLower().Find(findStr) >= 0;
+ addString = (str.MakeLower().Find(findStr) >= 0);
}
- if(addString)
+
+ if(m_ListGrouped)
{
- const mpt::ustring str = useGroups ? it->first.GetKey() : it->first.FormatAsString();
- LVITEMW lvi;
- lvi.mask = LVIF_TEXT | LVIF_PARAM | (useGroups ? LVIF_GROUPID : 0);
- lvi.iItem = i++;
- lvi.iSubItem = 0;
- lvi.state = 0;
- lvi.stateMask = 0;
- lvi.pszText = const_cast<wchar_t *>(str.c_str());
- lvi.cchTextMax = 0;
- lvi.iImage = 0;
- lvi.lParam = m_IndexToPath.size();
- lvi.iIndent = 0;
- lvi.iGroupId = (useGroups ? groupID : 0);
- int index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
- m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
- m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
- m_List.SetItemText(index, 3, it->second.GetDefault().FormatValueAsString().c_str());
- m_IndexToPath.push_back(it->first);
+ int groupID = 0;
+ UNORDERED_MAP<mpt::ustring, int>::const_iterator gi = m_Groups.find(section);
+ if(gi == m_Groups.end())
+ {
+ LVGROUP group;
+ #if _WIN32_WINNT >= 0x0600
+ group.cbSize = LVGROUP_V5_SIZE;
+ #else
+ group.cbSize = sizeof(group);
+ #endif
+ group.mask = LVGF_HEADER | LVGF_GROUPID;
+ group.pszHeader = const_cast<wchar_t *>(section.c_str());
+ group.cchHeader = 0;
+ group.pszFooter = nullptr;
+ group.cchFooter = 0;
+ group.iGroupId = groupID = numGroups++;
+ group.stateMask = LVGS_COLLAPSIBLE;
+ group.state = LVGS_COLLAPSIBLE;
+ group.uAlign = LVGA_HEADER_LEFT;
+ ListView_InsertGroup(m_List.m_hWnd, -1, &group);
+ m_Groups.insert(std::make_pair(section, groupID));
+ } else
+ {
+ groupID = gi->second;
+ }
+
+ if(addString)
+ {
+ LVITEMW lvi;
+ lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_GROUPID;
+ lvi.iItem = i++;
+ lvi.iSubItem = 0;
+ lvi.state = 0;
+ lvi.stateMask = 0;
+ lvi.pszText = const_cast<wchar_t *>(key.c_str());
+ lvi.cchTextMax = 0;
+ lvi.iImage = 0;
+ lvi.lParam = m_IndexToPath.size();
+ lvi.iIndent = 0;
+ lvi.iGroupId = groupID;
+ int index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
+ m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
+ m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
+ m_List.SetItemText(index, 3, defaultValue.FormatValueAsString().c_str());
+ m_IndexToPath.push_back(path);
+ }
+
+ } else
+ {
+
+ if(addString)
+ {
+ const mpt::ustring sectionAndKey = path.FormatAsString();
+ LVITEMW lvi;
+ lvi.mask = LVIF_TEXT | LVIF_PARAM;
+ lvi.iItem = i++;
+ lvi.iSubItem = 0;
+ lvi.state = 0;
+ lvi.stateMask = 0;
+ lvi.pszText = const_cast<wchar_t *>(sectionAndKey.c_str());
+ lvi.cchTextMax = 0;
+ lvi.iImage = 0;
+ lvi.lParam = m_IndexToPath.size();
+ lvi.iIndent = 0;
+ lvi.iGroupId = 0;
+ int index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
+ m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
+ m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
+ m_List.SetItemText(index, 3, defaultValue.FormatValueAsString().c_str());
+ m_IndexToPath.push_back(path);
+ }
+
}
+
}
m_List.SetItemCount(i);
Modified: trunk/OpenMPT/mptrack/Settings.h
===================================================================
--- trunk/OpenMPT/mptrack/Settings.h 2015-06-07 16:54:20 UTC (rev 5264)
+++ trunk/OpenMPT/mptrack/Settings.h 2015-06-07 18:06:40 UTC (rev 5265)
@@ -395,10 +395,14 @@
return *this;
}
#if defined(MPT_SETTINGS_CACHE_STORE_DEFAULTS)
- const SettingValue &GetDefault() const
+ SettingValue GetDefault() const
{
return defaultValue;
}
+ const SettingValue &GetRefDefault() const
+ {
+ return defaultValue;
+ }
#endif // MPT_SETTINGS_CACHE_STORE_DEFAULTS
bool IsDirty() const
{
@@ -408,6 +412,14 @@
{
dirty = false;
}
+ SettingValue GetValue() const
+ {
+ return value;
+ }
+ const SettingValue &GetRefValue() const
+ {
+ return value;
+ }
operator SettingValue () const
{
return value;
@@ -435,14 +447,22 @@
{
return;
}
- const mpt::ustring &GetSection() const
+ mpt::ustring GetSection() const
{
return section;
}
- const mpt::ustring &GetKey() const
+ mpt::ustring GetKey() const
{
return key;
}
+ const mpt::ustring &GetRefSection() const
+ {
+ return section;
+ }
+ const mpt::ustring &GetRefKey() const
+ {
+ return key;
+ }
int compare(const SettingPath &other) const
{
int cmp_section = section.compare(other.section);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-07 19:38:08
|
Revision: 5266
http://sourceforge.net/p/modplug/code/5266
Author: saga-games
Date: 2015-06-07 19:38:01 +0000 (Sun, 07 Jun 2015)
Log Message:
-----------
[Ref] Optimize advanced settings string copy overhead a bit more (no more senseless ustring -> CString conversion) and clean up the code a bit to remove some more redundancy.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
trunk/OpenMPT/mptrack/AdvancedConfigDlg.h
Modified: trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 18:06:40 UTC (rev 5265)
+++ trunk/OpenMPT/mptrack/AdvancedConfigDlg.cpp 2015-06-07 19:38:01 UTC (rev 5266)
@@ -57,29 +57,29 @@
int enableGroupsResult2 = static_cast<int>(ListView_EnableGroupView(m_List.m_hWnd, TRUE));
// Looks like we have to check enabling and check that a second enabling does
// not change anything.
- // Just checking if enabling fails with -1, does no work for older control
+ // Just checking if enabling fails with -1 does no work for older control
// versions because they just do not know the window message at all and return
// 0, always. At least Wine does behave this way.
if(enableGroupsResult1 == 1 && enableGroupsResult2 == 0)
{
- m_ListGrouped = true;
+ m_listGrouped = true;
} else
{
// Did not behave as documented or expected, the actual state of the
// control is unknown by now.
// Play safe and set and assume the traditional ungrouped mode again.
ListView_EnableGroupView(m_List.m_hWnd, FALSE);
- m_ListGrouped = false;
+ m_listGrouped = false;
}
- if(m_ListGrouped)
+ if(m_listGrouped)
{
const CListCtrlEx::Header headers[] =
{
{ _T("Setting"), 100, LVCFMT_LEFT },
- { _T("Type"), 40, LVCFMT_LEFT },
+ { _T("Type"), 40, LVCFMT_LEFT },
{ _T("Value"), 190, LVCFMT_LEFT },
- { _T("Default"), 62, LVCFMT_LEFT },
+ { _T("Default"), 62, LVCFMT_LEFT },
};
m_List.SetHeaders(headers);
} else
@@ -87,9 +87,9 @@
const CListCtrlEx::Header headers[] =
{
{ _T("Setting"), 150, LVCFMT_LEFT },
- { _T("Type"), 40, LVCFMT_LEFT },
+ { _T("Type"), 40, LVCFMT_LEFT },
{ _T("Value"), 150, LVCFMT_LEFT },
- { _T("Default"), 52, LVCFMT_LEFT },
+ { _T("Default"), 52, LVCFMT_LEFT },
};
m_List.SetHeaders(headers);
}
@@ -106,13 +106,28 @@
m_List.DeleteAllItems();
m_List.SetItemCount(theApp.GetSettings().size());
- m_IndexToPath.clear();
- m_IndexToPath.reserve(theApp.GetSettings().size());
- m_Groups.clear();
+ m_indexToPath.clear();
+ m_indexToPath.reserve(theApp.GetSettings().size());
+ m_groups.clear();
int numGroups = 0;
- CString findStr;
- GetDlgItemText(IDC_EDIT1, findStr);
+
+ CStringW findStr;
+ HWND findWnd = ::GetDlgItem(m_hWnd, IDC_EDIT1);
+ int findLen = ::GetWindowTextLengthW(findWnd);
+ ::GetWindowTextW(findWnd, findStr.GetBufferSetLength(findLen), findLen + 1);
+ findStr.ReleaseBuffer();
findStr.MakeLower();
+
+ LVITEMW lvi;
+ lvi.mask = LVIF_TEXT | LVIF_PARAM | (m_listGrouped ? LVIF_GROUPID : 0);
+ lvi.iSubItem = 0;
+ lvi.state = 0;
+ lvi.stateMask = 0;
+ lvi.cchTextMax = 0;
+ lvi.iImage = 0;
+ lvi.iIndent = 0;
+ lvi.iGroupId = 0;
+
int i = 0;
for(SettingsContainer::SettingsMap::const_iterator it = theApp.GetSettings().begin(); it != theApp.GetSettings().end(); ++it)
{
@@ -123,19 +138,25 @@
const SettingValue &value = state.GetRefValue();
const SettingValue &defaultValue = state.GetRefDefault();
- bool addString = true;
if(!findStr.IsEmpty())
{
- CString str = mpt::ToCString(path.FormatAsString() + MPT_USTRING(" = ") + value.FormatValueAsString());
- addString = (str.MakeLower().Find(findStr) >= 0);
+ mpt::ustring str = path.FormatAsString() + MPT_USTRING("=") + value.FormatValueAsString();
+ CStringW::StrTraits::StringLowercase(&str[0], str.size() + 1);
+ if(str.find(findStr) == mpt::ustring::npos)
+ {
+ continue;
+ }
}
- if(m_ListGrouped)
+ int index;
+ lvi.iItem = i++;
+ lvi.lParam = m_indexToPath.size();
+
+ if(m_listGrouped)
{
- int groupID = 0;
- UNORDERED_MAP<mpt::ustring, int>::const_iterator gi = m_Groups.find(section);
- if(gi == m_Groups.end())
+ UNORDERED_MAP<mpt::ustring, int>::const_iterator gi = m_groups.find(section);
+ if(gi == m_groups.end())
{
LVGROUP group;
#if _WIN32_WINNT >= 0x0600
@@ -148,65 +169,33 @@
group.cchHeader = 0;
group.pszFooter = nullptr;
group.cchFooter = 0;
- group.iGroupId = groupID = numGroups++;
+ group.iGroupId = lvi.iGroupId = numGroups++;
group.stateMask = LVGS_COLLAPSIBLE;
group.state = LVGS_COLLAPSIBLE;
group.uAlign = LVGA_HEADER_LEFT;
ListView_InsertGroup(m_List.m_hWnd, -1, &group);
- m_Groups.insert(std::make_pair(section, groupID));
+ m_groups.insert(std::make_pair(section, lvi.iGroupId));
} else
{
- groupID = gi->second;
+ lvi.iGroupId = gi->second;
}
- if(addString)
- {
- LVITEMW lvi;
- lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_GROUPID;
- lvi.iItem = i++;
- lvi.iSubItem = 0;
- lvi.state = 0;
- lvi.stateMask = 0;
- lvi.pszText = const_cast<wchar_t *>(key.c_str());
- lvi.cchTextMax = 0;
- lvi.iImage = 0;
- lvi.lParam = m_IndexToPath.size();
- lvi.iIndent = 0;
- lvi.iGroupId = groupID;
- int index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
- m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
- m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
- m_List.SetItemText(index, 3, defaultValue.FormatValueAsString().c_str());
- m_IndexToPath.push_back(path);
- }
+ lvi.pszText = const_cast<wchar_t *>(key.c_str());
+ index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
} else
{
- if(addString)
- {
- const mpt::ustring sectionAndKey = path.FormatAsString();
- LVITEMW lvi;
- lvi.mask = LVIF_TEXT | LVIF_PARAM;
- lvi.iItem = i++;
- lvi.iSubItem = 0;
- lvi.state = 0;
- lvi.stateMask = 0;
- lvi.pszText = const_cast<wchar_t *>(sectionAndKey.c_str());
- lvi.cchTextMax = 0;
- lvi.iImage = 0;
- lvi.lParam = m_IndexToPath.size();
- lvi.iIndent = 0;
- lvi.iGroupId = 0;
- int index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
- m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
- m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
- m_List.SetItemText(index, 3, defaultValue.FormatValueAsString().c_str());
- m_IndexToPath.push_back(path);
- }
+ const mpt::ustring sectionAndKey = path.FormatAsString();
+ lvi.pszText = const_cast<wchar_t *>(sectionAndKey.c_str());
+ index = static_cast<int>(m_List.SendMessage(LVM_INSERTITEMW, 0, (LPARAM)(&lvi)));
}
+ m_List.SetItemText(index, 1, value.FormatTypeAsString().c_str());
+ m_List.SetItemText(index, 2, value.FormatValueAsString().c_str());
+ m_List.SetItemText(index, 3, defaultValue.FormatValueAsString().c_str());
+ m_indexToPath.push_back(path);
}
m_List.SetItemCount(i);
@@ -235,7 +224,7 @@
//---------------------------------------------------------
{
const int index = m_List.GetSelectionMark();
- const SettingPath path = m_IndexToPath[m_List.GetItemData(index)];
+ const SettingPath path = m_indexToPath[m_List.GetItemData(index)];
SettingValue val = theApp.GetSettings().GetMap().find(path)->second;
if(val.GetType() == SettingTypeBool)
{
Modified: trunk/OpenMPT/mptrack/AdvancedConfigDlg.h
===================================================================
--- trunk/OpenMPT/mptrack/AdvancedConfigDlg.h 2015-06-07 18:06:40 UTC (rev 5265)
+++ trunk/OpenMPT/mptrack/AdvancedConfigDlg.h 2015-06-07 19:38:01 UTC (rev 5266)
@@ -28,12 +28,12 @@
{
protected:
CListCtrlEx m_List;
- bool m_ListGrouped;
- std::vector<SettingPath> m_IndexToPath;
- UNORDERED_MAP<mpt::ustring, int> m_Groups;
+ std::vector<SettingPath> m_indexToPath;
+ UNORDERED_MAP<mpt::ustring, int> m_groups;
+ bool m_listGrouped;
public:
- COptionsAdvanced():CPropertyPage(IDD_OPTIONS_ADVANCED), m_ListGrouped(false) {}
+ COptionsAdvanced():CPropertyPage(IDD_OPTIONS_ADVANCED), m_listGrouped(false) {}
protected:
virtual BOOL OnInitDialog();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-08 14:21:42
|
Revision: 5273
http://sourceforge.net/p/modplug/code/5273
Author: manxorist
Date: 2015-06-08 14:21:37 +0000 (Mon, 08 Jun 2015)
Log Message:
-----------
[Ref] Convert autosave settings from explicit Read/Write to Setting<T>.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/TrackerSettings.cpp
trunk/OpenMPT/mptrack/TrackerSettings.h
Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-08 10:07:26 UTC (rev 5272)
+++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-08 14:21:37 UTC (rev 5273)
@@ -231,6 +231,12 @@
// Components
, ComponentsLoadOnStartup(conf, "Components", "LoadOnStartup", ComponentManagerSettingsDefault().LoadOnStartup())
, ComponentsKeepLoaded(conf, "Components", "KeepLoaded", ComponentManagerSettingsDefault().KeepLoaded())
+ // AutoSave
+ , AutosaveEnabled(conf, "AutoSave", "Enabled", true)
+ , AutosaveIntervalMinutes(conf, "AutoSave", "IntervalMinutes", 10)
+ , AutosaveHistoryDepth(conf, "AutoSave", "BackupHistory", 3)
+ , AutosaveUseOriginalPath(conf, "AutoSave", "UseOriginalPath", true)
+ , AutosavePath(conf, "AutoSave", "Path", mpt::PathString())
// Paths
, PathSongs(conf, "Paths", "Songs_Directory", mpt::PathString())
, PathSamples(conf, "Paths", "Samples_Directory", mpt::PathString())
@@ -296,11 +302,11 @@
rgbCustomColors[ncol] = conf.Read<uint32>("Display", colorName, rgbCustomColors[ncol]);
}
// AutoSave
- CMainFrame::m_pAutoSaver->SetEnabled(conf.Read<bool>("AutoSave", "Enabled", CMainFrame::m_pAutoSaver->IsEnabled()));
- CMainFrame::m_pAutoSaver->SetSaveInterval(conf.Read<int32>("AutoSave", "IntervalMinutes", CMainFrame::m_pAutoSaver->GetSaveInterval()));
- CMainFrame::m_pAutoSaver->SetHistoryDepth(conf.Read<int32>("AutoSave", "BackupHistory", CMainFrame::m_pAutoSaver->GetHistoryDepth()));
- CMainFrame::m_pAutoSaver->SetUseOriginalPath(conf.Read<bool>("AutoSave", "UseOriginalPath", CMainFrame::m_pAutoSaver->GetUseOriginalPath()));
- CMainFrame::m_pAutoSaver->SetPath(theApp.RelativePathToAbsolute(conf.Read<mpt::PathString>("AutoSave", "Path", CMainFrame::m_pAutoSaver->GetPath())));
+ CMainFrame::m_pAutoSaver->SetEnabled(AutosaveEnabled);
+ CMainFrame::m_pAutoSaver->SetSaveInterval(AutosaveIntervalMinutes);
+ CMainFrame::m_pAutoSaver->SetHistoryDepth(AutosaveHistoryDepth);
+ CMainFrame::m_pAutoSaver->SetUseOriginalPath(AutosaveUseOriginalPath);
+ CMainFrame::m_pAutoSaver->SetPath(AutosavePath);
// Paths
m_szKbdFile = conf.Read<mpt::PathString>("Paths", "Key_Config_File", mpt::PathString());
conf.Forget("Paths", "Key_Config_File");
@@ -896,11 +902,11 @@
{
path = theApp.AbsolutePathToRelative(path);
}
- conf.Write<bool>("AutoSave", "Enabled", CMainFrame::m_pAutoSaver->IsEnabled());
- conf.Write<int32>("AutoSave", "IntervalMinutes", CMainFrame::m_pAutoSaver->GetSaveInterval());
- conf.Write<int32>("AutoSave", "BackupHistory", CMainFrame::m_pAutoSaver->GetHistoryDepth());
- conf.Write<bool>("AutoSave", "UseOriginalPath", CMainFrame::m_pAutoSaver->GetUseOriginalPath());
- conf.Write<mpt::PathString>("AutoSave", "Path", path);
+ AutosaveEnabled = CMainFrame::m_pAutoSaver->IsEnabled();
+ AutosaveIntervalMinutes = CMainFrame::m_pAutoSaver->GetSaveInterval();
+ AutosaveHistoryDepth = CMainFrame::m_pAutoSaver->GetHistoryDepth();
+ AutosaveUseOriginalPath = CMainFrame::m_pAutoSaver->GetUseOriginalPath();
+ AutosavePath = path;
// Paths
// Obsolete, since we always write to Keybindings.mkb now.
Modified: trunk/OpenMPT/mptrack/TrackerSettings.h
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-08 10:07:26 UTC (rev 5272)
+++ trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-08 14:21:37 UTC (rev 5273)
@@ -568,6 +568,14 @@
COLORREF rgbCustomColors[MAX_MODCOLORS];
+ // AutoSave
+
+ Setting<bool> AutosaveEnabled;
+ Setting<uint32> AutosaveIntervalMinutes;
+ Setting<uint32> AutosaveHistoryDepth;
+ Setting<bool> AutosaveUseOriginalPath;
+ Setting<mpt::PathString> AutosavePath;
+
// Paths
ConfigurableDirectory PathSongs;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-08 15:04:41
|
Revision: 5274
http://sourceforge.net/p/modplug/code/5274
Author: manxorist
Date: 2015-06-08 15:04:34 +0000 (Mon, 08 Jun 2015)
Log Message:
-----------
[Ref] Autosaver: Avoid duplicate configuration setting state (in CAutoSaver and TrackerSettings) by just querying the global TrackerSettings when a setting value is needed. Breaks up initialization dependency circle caused by the unusual implementation of CAutoSaver in the code base.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AutoSaver.cpp
trunk/OpenMPT/mptrack/AutoSaver.h
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/PathConfigDlg.cpp
trunk/OpenMPT/mptrack/PathConfigDlg.h
trunk/OpenMPT/mptrack/TrackerSettings.cpp
trunk/OpenMPT/mptrack/TrackerSettings.h
Modified: trunk/OpenMPT/mptrack/AutoSaver.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AutoSaver.cpp 2015-06-08 14:21:37 UTC (rev 5273)
+++ trunk/OpenMPT/mptrack/AutoSaver.cpp 2015-06-08 15:04:34 UTC (rev 5274)
@@ -29,19 +29,45 @@
// Construction/Destruction
///////////////////////////
-CAutoSaver::CAutoSaver(bool enabled, uint32_t saveInterval, uint32_t backupHistory, bool useOriginalPath, mpt::PathString path)
-//-----------------------------------------------------------------------------------------------------------------------------
+CAutoSaver::CAutoSaver()
+//----------------------
: m_bSaveInProgress(false)
, m_nLastSave(timeGetTime())
- , m_bEnabled(enabled)
- , m_nSaveInterval(saveInterval * 60 * 1000) //minutes to milliseconds
- , m_nBackupHistory(backupHistory)
- , m_bUseOriginalPath(useOriginalPath)
- , m_csPath(path)
{
}
+bool CAutoSaver::IsEnabled() const
+//--------------------------------
+{
+ return TrackerSettings::Instance().AutosaveEnabled;
+}
+
+bool CAutoSaver::GetUseOriginalPath() const
+//-----------------------------------------
+{
+ return TrackerSettings::Instance().AutosaveUseOriginalPath;
+}
+
+mpt::PathString CAutoSaver::GetPath() const
+//-----------------------------------------
+{
+ return TrackerSettings::Instance().AutosavePath.GetDefaultDir();
+}
+
+uint32 CAutoSaver::GetHistoryDepth() const
+//----------------------------------------
+{
+ return TrackerSettings::Instance().AutosaveHistoryDepth;
+}
+
+uint32 CAutoSaver::GetSaveInterval() const
+//----------------------------------------
+{
+ return TrackerSettings::Instance().AutosaveIntervalMinutes;
+}
+
+
//////////////
// Entry Point
//////////////
@@ -70,7 +96,7 @@
CleanUpBackups(modDoc);
} else
{
- m_bEnabled = false;
+ TrackerSettings::Instance().AutosaveEnabled = false;
Reporting::Warning("Warning: Auto Save failed and has been disabled. Please:\n- Review your Auto Save paths\n- Check available disk space and filesystem access rights");
success = false;
}
@@ -95,7 +121,7 @@
//----------------------------------------
{
DWORD curInterval = curTime - m_nLastSave;
- return (curInterval >= m_nSaveInterval);
+ return (curInterval >= GetSaveIntervalMilliseconds());
}
@@ -104,7 +130,7 @@
{
mpt::PathString name;
- if(m_bUseOriginalPath)
+ if(GetUseOriginalPath())
{
if(modDoc.m_bHasValidPath && !(name = modDoc.GetPathNameMpt()).empty())
{
@@ -121,7 +147,7 @@
}
} else
{
- name = m_csPath + mpt::PathString::FromCStringSilent(modDoc.GetTitle()).SanitizeComponent();
+ name = GetPath() + mpt::PathString::FromCStringSilent(modDoc.GetTitle()).SanitizeComponent();
}
const mpt::ustring timeStamp = mpt::ToUnicode((CTime::GetCurrentTime()).Format(_T(".AutoSave.%Y%m%d.%H%M%S.")));
@@ -178,7 +204,7 @@
{
mpt::PathString path;
- if (m_bUseOriginalPath)
+ if(GetUseOriginalPath())
{
if (modDoc.m_bHasValidPath && !(path = modDoc.GetPathNameMpt()).empty())
{
@@ -191,7 +217,7 @@
}
} else
{
- path = m_csPath;
+ path = GetPath();
}
std::vector<mpt::PathString> foundfiles;
@@ -214,7 +240,7 @@
}
std::sort(foundfiles.begin(), foundfiles.end());
- while(foundfiles.size() > (size_t)m_nBackupHistory)
+ while(foundfiles.size() > static_cast<size_t>(GetHistoryDepth()))
{
DeleteFileW(foundfiles[0].AsNative().c_str());
foundfiles.erase(foundfiles.begin());
Modified: trunk/OpenMPT/mptrack/AutoSaver.h
===================================================================
--- trunk/OpenMPT/mptrack/AutoSaver.h 2015-06-08 14:21:37 UTC (rev 5273)
+++ trunk/OpenMPT/mptrack/AutoSaver.h 2015-06-08 15:04:34 UTC (rev 5274)
@@ -20,26 +20,21 @@
{
public:
//Cons/Destr
- CAutoSaver(bool enabled = true, uint32_t saveInterval = 10, uint32_t backupHistory = 3,
- bool useOriginalPath = true, mpt::PathString path = mpt::PathString());
+ CAutoSaver();
//Work
bool DoSave(DWORD curTime);
//Member access
- void SetEnabled(bool enabled) { m_bEnabled = enabled; }
- bool IsEnabled() const { return m_bEnabled; }
- void SetUseOriginalPath(bool useOrgPath) { m_bUseOriginalPath = useOrgPath; }
- bool GetUseOriginalPath() const { return m_bUseOriginalPath; }
- void SetPath(const mpt::PathString &path) { m_csPath = path; }
- mpt::PathString GetPath() const { return m_csPath; }
- void SetHistoryDepth(uint32_t history) { m_nBackupHistory = Clamp(history, 1u, 1000u); }
- uint32_t GetHistoryDepth() const { return m_nBackupHistory; }
- void SetSaveInterval(uint32_t minutes)
+ bool IsEnabled() const;
+ bool GetUseOriginalPath() const;
+ mpt::PathString GetPath() const;
+ uint32 GetHistoryDepth() const;
+ uint32 GetSaveInterval() const;
+ uint32 GetSaveIntervalMilliseconds() const
{
- m_nSaveInterval = Clamp(minutes, 1u, 10000u) * 60u * 1000u; //minutes to milliseconds
+ return Clamp(GetSaveInterval(), 0u, (1u<<30)/60u/1000u) * 60 * 1000;
}
- uint32_t GetSaveInterval() const { return m_nSaveInterval / 60u / 1000u; }
//internal implementation
private:
@@ -54,12 +49,7 @@
//Flag to prevent autosave from starting new saving if previous is still in progress.
bool m_bSaveInProgress;
- bool m_bEnabled;
DWORD m_nLastSave;
- uint32_t m_nSaveInterval;
- uint32_t m_nBackupHistory;
- bool m_bUseOriginalPath;
- mpt::PathString m_csPath;
};
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2015-06-08 14:21:37 UTC (rev 5273)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2015-06-08 15:04:34 UTC (rev 5274)
@@ -1886,7 +1886,7 @@
COptionsColors colors;
COptionsMixer mixerdlg;
CMidiSetupDlg mididlg(TrackerSettings::Instance().m_dwMidiSetup, TrackerSettings::Instance().m_nMidiDevice);
- PathConfigDlg pathsdlg(*m_pAutoSaver);
+ PathConfigDlg pathsdlg;
CUpdateSetupDlg updatedlg;
#if defined(MPT_SETTINGS_CACHE)
COptionsAdvanced advanced;
Modified: trunk/OpenMPT/mptrack/PathConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/PathConfigDlg.cpp 2015-06-08 14:21:37 UTC (rev 5273)
+++ trunk/OpenMPT/mptrack/PathConfigDlg.cpp 2015-06-08 15:04:34 UTC (rev 5274)
@@ -10,7 +10,6 @@
#include "stdafx.h"
#include "resource.h"
-#include "AutoSaver.h"
#include "PathConfigDlg.h"
#include "FileDialog.h"
#include "Mainfrm.h"
@@ -19,9 +18,8 @@
IMPLEMENT_DYNAMIC(PathConfigDlg, CPropertyPage)
-PathConfigDlg::PathConfigDlg(CAutoSaver &autoSaver)
+PathConfigDlg::PathConfigDlg()
: CPropertyPage(IDD_OPTIONS_AUTOSAVE)
- , m_AutoSaver(autoSaver)
{
}
@@ -68,12 +66,12 @@
::SetDlgItemTextW(m_hWnd, IDC_OPTIONS_DIR_VSTPRESETS, TrackerSettings::Instance().PathPluginPresets.GetDefaultDir().AsNative().c_str());
// Autosave
- CheckDlgButton(IDC_AUTOSAVE_ENABLE, m_AutoSaver.IsEnabled() ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemInt(IDC_AUTOSAVE_HISTORY, m_AutoSaver.GetHistoryDepth());
- ::SetDlgItemTextW(m_hWnd, IDC_AUTOSAVE_PATH, m_AutoSaver.GetPath().AsNative().c_str());
- SetDlgItemInt(IDC_AUTOSAVE_INTERVAL, m_AutoSaver.GetSaveInterval());
- CheckDlgButton(IDC_AUTOSAVE_USEORIGDIR, m_AutoSaver.GetUseOriginalPath() ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(IDC_AUTOSAVE_USECUSTOMDIR, m_AutoSaver.GetUseOriginalPath() ? BST_UNCHECKED : BST_CHECKED);
+ CheckDlgButton(IDC_AUTOSAVE_ENABLE, TrackerSettings::Instance().AutosaveEnabled ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemInt(IDC_AUTOSAVE_HISTORY, TrackerSettings::Instance().AutosaveHistoryDepth);
+ ::SetDlgItemTextW(m_hWnd, IDC_AUTOSAVE_PATH, TrackerSettings::Instance().AutosavePath.GetDefaultDir().AsNative().c_str());
+ SetDlgItemInt(IDC_AUTOSAVE_INTERVAL, TrackerSettings::Instance().AutosaveIntervalMinutes);
+ CheckDlgButton(IDC_AUTOSAVE_USEORIGDIR, TrackerSettings::Instance().AutosaveUseOriginalPath ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_AUTOSAVE_USECUSTOMDIR, TrackerSettings::Instance().AutosaveUseOriginalPath ? BST_UNCHECKED : BST_CHECKED);
//enable/disable stuff as appropriate
OnAutosaveEnable();
OnAutosaveUseOrigDir();
@@ -101,13 +99,13 @@
mpt::PathString::FromNative(szPresetDir));
WCHAR tempPath[MAX_PATH];
- m_AutoSaver.SetEnabled(IsDlgButtonChecked(IDC_AUTOSAVE_ENABLE) != BST_UNCHECKED);
- m_AutoSaver.SetHistoryDepth(GetDlgItemInt(IDC_AUTOSAVE_HISTORY));
- m_AutoSaver.SetSaveInterval(GetDlgItemInt(IDC_AUTOSAVE_INTERVAL));
- m_AutoSaver.SetUseOriginalPath(IsDlgButtonChecked(IDC_AUTOSAVE_USEORIGDIR) == BST_CHECKED);
+ TrackerSettings::Instance().AutosaveEnabled = (IsDlgButtonChecked(IDC_AUTOSAVE_ENABLE) != BST_UNCHECKED);
+ TrackerSettings::Instance().AutosaveHistoryDepth = (GetDlgItemInt(IDC_AUTOSAVE_HISTORY));
+ TrackerSettings::Instance().AutosaveIntervalMinutes = (GetDlgItemInt(IDC_AUTOSAVE_INTERVAL));
+ TrackerSettings::Instance().AutosaveUseOriginalPath = (IsDlgButtonChecked(IDC_AUTOSAVE_USEORIGDIR) == BST_CHECKED);
::GetDlgItemTextW(m_hWnd, IDC_AUTOSAVE_PATH, tempPath, CountOf(tempPath));
mpt::PathString path = mpt::PathString::FromNative(tempPath).EnsureTrailingSlash();
- m_AutoSaver.SetPath(path);
+ TrackerSettings::Instance().AutosavePath.SetDefaultDir(path);
CPropertyPage::OnOK();
}
Modified: trunk/OpenMPT/mptrack/PathConfigDlg.h
===================================================================
--- trunk/OpenMPT/mptrack/PathConfigDlg.h 2015-06-08 14:21:37 UTC (rev 5273)
+++ trunk/OpenMPT/mptrack/PathConfigDlg.h 2015-06-08 15:04:34 UTC (rev 5274)
@@ -12,14 +12,12 @@
OPENMPT_NAMESPACE_BEGIN
-class CAutoSaver;
-
class PathConfigDlg : public CPropertyPage
{
DECLARE_DYNAMIC(PathConfigDlg)
public:
- PathConfigDlg(CAutoSaver &autoSaver);
+ PathConfigDlg();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
@@ -30,9 +28,6 @@
virtual BOOL OnInitDialog();
virtual BOOL OnKillActive();
-private:
- CAutoSaver &m_AutoSaver;
-
protected:
afx_msg void OnAutosaveEnable();
afx_msg void OnAutosaveUseOrigDir();
Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-08 14:21:37 UTC (rev 5273)
+++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-08 15:04:34 UTC (rev 5274)
@@ -301,12 +301,6 @@
const std::string colorName = mpt::String::Print("Color%1", mpt::fmt::dec0<2>(ncol));
rgbCustomColors[ncol] = conf.Read<uint32>("Display", colorName, rgbCustomColors[ncol]);
}
- // AutoSave
- CMainFrame::m_pAutoSaver->SetEnabled(AutosaveEnabled);
- CMainFrame::m_pAutoSaver->SetSaveInterval(AutosaveIntervalMinutes);
- CMainFrame::m_pAutoSaver->SetHistoryDepth(AutosaveHistoryDepth);
- CMainFrame::m_pAutoSaver->SetUseOriginalPath(AutosaveUseOriginalPath);
- CMainFrame::m_pAutoSaver->SetPath(AutosavePath);
// Paths
m_szKbdFile = conf.Read<mpt::PathString>("Paths", "Key_Config_File", mpt::PathString());
conf.Forget("Paths", "Key_Config_File");
@@ -896,18 +890,6 @@
conf.Write<uint32>("Display", mpt::String::Print("Color%1", mpt::fmt::dec0<2>(ncol)), rgbCustomColors[ncol]);
}
- // AutoSave
- mpt::PathString path = CMainFrame::m_pAutoSaver->GetPath();
- if(theApp.IsPortableMode())
- {
- path = theApp.AbsolutePathToRelative(path);
- }
- AutosaveEnabled = CMainFrame::m_pAutoSaver->IsEnabled();
- AutosaveIntervalMinutes = CMainFrame::m_pAutoSaver->GetSaveInterval();
- AutosaveHistoryDepth = CMainFrame::m_pAutoSaver->GetHistoryDepth();
- AutosaveUseOriginalPath = CMainFrame::m_pAutoSaver->GetUseOriginalPath();
- AutosavePath = path;
-
// 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.
Modified: trunk/OpenMPT/mptrack/TrackerSettings.h
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-08 14:21:37 UTC (rev 5273)
+++ trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-08 15:04:34 UTC (rev 5274)
@@ -570,11 +570,11 @@
// AutoSave
- Setting<bool> AutosaveEnabled;
- Setting<uint32> AutosaveIntervalMinutes;
- Setting<uint32> AutosaveHistoryDepth;
- Setting<bool> AutosaveUseOriginalPath;
- Setting<mpt::PathString> AutosavePath;
+ CachedSetting<bool> AutosaveEnabled;
+ CachedSetting<uint32> AutosaveIntervalMinutes;
+ CachedSetting<uint32> AutosaveHistoryDepth;
+ CachedSetting<bool> AutosaveUseOriginalPath;
+ ConfigurableDirectory AutosavePath;
// Paths
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-08 15:14:05
|
Revision: 5275
http://sourceforge.net/p/modplug/code/5275
Author: manxorist
Date: 2015-06-08 15:13:59 +0000 (Mon, 08 Jun 2015)
Log Message:
-----------
[Ref] Autosaver: Autosaver no longer needs to be special-cased during initialization.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AutoSaver.cpp
trunk/OpenMPT/mptrack/AutoSaver.h
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Mptrack.cpp
Modified: trunk/OpenMPT/mptrack/AutoSaver.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AutoSaver.cpp 2015-06-08 15:04:34 UTC (rev 5274)
+++ trunk/OpenMPT/mptrack/AutoSaver.cpp 2015-06-08 15:13:59 UTC (rev 5275)
@@ -14,6 +14,7 @@
#include "Moddoc.h"
#include "AutoSaver.h"
#include "FileDialog.h"
+#include "resource.h"
#include "../soundlib/mod_specifications.h"
#include <algorithm>
Modified: trunk/OpenMPT/mptrack/AutoSaver.h
===================================================================
--- trunk/OpenMPT/mptrack/AutoSaver.h 2015-06-08 15:04:34 UTC (rev 5274)
+++ trunk/OpenMPT/mptrack/AutoSaver.h 2015-06-08 15:13:59 UTC (rev 5275)
@@ -10,8 +10,6 @@
#pragma once
-#include "resource.h"
-
OPENMPT_NAMESPACE_BEGIN
class CModDoc;
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2015-06-08 15:04:34 UTC (rev 5274)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2015-06-08 15:13:59 UTC (rev 5275)
@@ -165,7 +165,6 @@
COLORREF CMainFrame::gcolrefVuMeter[NUM_VUMETER_PENS*2];
CInputHandler *CMainFrame::m_InputHandler = nullptr;
-CAutoSaver *CMainFrame::m_pAutoSaver = nullptr;
static UINT indicators[] =
{
@@ -267,7 +266,6 @@
{
DeleteCriticalSection(&g_csAudio);
delete m_InputHandler;
- delete m_pAutoSaver;
CChannelManagerDlg::DestroySharedInstance();
CSoundFile::DeleteStaticdata();
@@ -2061,9 +2059,9 @@
m_wndToolBar.SetCurrentSong(m_pSndFile);
- if (m_pAutoSaver && m_pAutoSaver->IsEnabled())
+ if(m_AutoSaver.IsEnabled())
{
- bool success = m_pAutoSaver->DoSave(curTime);
+ bool success = m_AutoSaver.DoSave(curTime);
if (!success) // autosave failure; bring up options.
{
CMainFrame::m_nLastOptionsPage = OPTIONS_PAGE_PATHS;
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2015-06-08 15:04:34 UTC (rev 5274)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2015-06-08 15:13:59 UTC (rev 5275)
@@ -11,6 +11,7 @@
#pragma once
#include "Mptrack.h"
+#include "AutoSaver.h"
#include "UpdateHints.h"
#include "../common/AudioCriticalSection.h"
#include "../common/mutex.h"
@@ -394,6 +395,8 @@
CHAR m_szUserText[512], m_szInfoText[512], m_szXInfoText[512]; //rewbs.xinfo
+ CAutoSaver m_AutoSaver;
+
public:
CMainFrame(/*CString regKeyExtension*/);
void Initialize();
@@ -446,7 +449,6 @@
static void UpdateAllViews(UpdateHint hint, CObject *pHint=NULL);
static LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam);
static CInputHandler *m_InputHandler; //rewbs.customKeys
- static CAutoSaver *m_pAutoSaver; //rewbs.customKeys
// Misc functions
public:
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-08 15:04:34 UTC (rev 5274)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-08 15:13:59 UTC (rev 5275)
@@ -930,9 +930,6 @@
// Set up paths to store configuration in
SetupPaths(cmdInfo.m_bPortable);
- // Construct auto saver instance, class TrackerSettings expects it being available.
- CMainFrame::m_pAutoSaver = new CAutoSaver();
-
m_pSettingsIniFile = new IniFileSettingsBackend(m_szConfigFileName);
m_pSettings = new SettingsContainer(m_pSettingsIniFile);
m_pTrackerSettings = new TrackerSettings(*m_pSettings);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-13 14:34:51
|
Revision: 5306
http://sourceforge.net/p/modplug/code/5306
Author: saga-games
Date: 2015-06-13 14:34:46 +0000 (Sat, 13 Jun 2015)
Log Message:
-----------
[Imp] Export: Allow the user to choose a sample slot to render into.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mod2wave.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/mod2wave.h
trunk/OpenMPT/mptrack/mptrack.rc
Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mod2wave.cpp 2015-06-13 14:18:04 UTC (rev 5305)
+++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2015-06-13 14:34:46 UTC (rev 5306)
@@ -79,6 +79,7 @@
ON_CBN_SELCHANGE(IDC_COMBO4, OnChannelsChanged)
ON_CBN_SELCHANGE(IDC_COMBO6, OnDitherChanged)
ON_CBN_SELCHANGE(IDC_COMBO2, OnFormatChanged)
+ ON_CBN_SELCHANGE(IDC_COMBO9, OnSampleSlotChanged)
END_MESSAGE_MAP()
@@ -117,6 +118,7 @@
DDX_Control(pDX, IDC_SPIN3, m_SpinMinOrder);
DDX_Control(pDX, IDC_SPIN4, m_SpinMaxOrder);
DDX_Control(pDX, IDC_SPIN5, m_SpinLoopCount);
+ DDX_Control(pDX, IDC_COMBO9, m_CbnSampleSlot);
DDX_Control(pDX, IDC_COMBO3, m_CbnGenre);
DDX_Control(pDX, IDC_EDIT10, m_EditGenre);
@@ -184,6 +186,17 @@
}
}
+ // Fill list of sample slots to render into
+ m_CbnSampleSlot.AddString(_T("<empty slot>"));
+ CString s;
+ for(SAMPLEINDEX smp = 1; smp <= m_SndFile.GetNumSamples(); smp++)
+ {
+ s.Format(_T("%02u: %s%s"), smp, m_SndFile.GetSample(smp).HasSampleData() ? _T("*") : _T(""), m_SndFile.GetSampleName(smp));
+ m_CbnSampleSlot.AddString(s);
+ }
+ if(m_Settings.sampleSlot > m_SndFile.GetNumChannels()) m_Settings.sampleSlot = 0;
+ m_CbnSampleSlot.SetCurSel(m_Settings.sampleSlot);
+
CheckRadioButton(IDC_RADIO3, IDC_RADIO4, m_Settings.outputToSample ? IDC_RADIO4 : IDC_RADIO3);
UpdateDialog();
@@ -576,6 +589,7 @@
bSel = (IsDlgButtonChecked(IDC_RADIO4) != BST_UNCHECKED) ? FALSE : TRUE;
m_CbnFileType.EnableWindow(bSel);
+ m_CbnSampleSlot.EnableWindow(!bSel);
if(!bSel)
{
// Render to sample: Always use WAV
@@ -588,6 +602,20 @@
}
+void CWaveConvert::OnSampleSlotChanged()
+//--------------------------------------
+{
+ CheckRadioButton(IDC_RADIO3, IDC_RADIO4, IDC_RADIO4);
+ // When choosing a specific sample slot, we cannot use per-channel or per-instrument export
+ if(m_CbnSampleSlot.GetCurSel() > 0)
+ {
+ CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
+ }
+ UpdateDialog();
+}
+
+
void CWaveConvert::OnCheck1()
//---------------------------
{
@@ -638,7 +666,15 @@
void CWaveConvert::OnCheckChannelMode()
//-------------------------------------
{
- CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
+ if(IsDlgButtonChecked(IDC_CHECK4) != BST_UNCHECKED)
+ {
+ CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
+ m_CbnSampleSlot.SetCurSel(0);
+ m_CbnSampleSlot.EnableWindow(FALSE);
+ } else
+ {
+ m_CbnSampleSlot.EnableWindow(IsDlgButtonChecked(IDC_RADIO4));
+ }
}
@@ -646,7 +682,15 @@
void CWaveConvert::OnCheckInstrMode()
//-----------------------------------
{
- CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
+ if(IsDlgButtonChecked(IDC_CHECK6) != BST_UNCHECKED)
+ {
+ CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
+ m_CbnSampleSlot.SetCurSel(0);
+ m_CbnSampleSlot.EnableWindow(FALSE);
+ } else
+ {
+ m_CbnSampleSlot.EnableWindow(IsDlgButtonChecked(IDC_RADIO4));
+ }
}
@@ -688,6 +732,8 @@
m_bChannelMode = IsDlgButtonChecked(IDC_CHECK4) != BST_UNCHECKED;
m_bInstrumentMode= IsDlgButtonChecked(IDC_CHECK6) != BST_UNCHECKED;
+ m_Settings.sampleSlot = static_cast<SAMPLEINDEX>(m_CbnSampleSlot.GetCurSel());
+
SaveEncoderSettings();
Encoder::Settings &encSettings = m_Settings.GetEncoderSettings();
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2015-06-13 14:18:04 UTC (rev 5305)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2015-06-13 14:34:46 UTC (rev 5306)
@@ -1831,21 +1831,29 @@
if(f.IsValid())
{
FileReader file = GetFileReader(f);
- SAMPLEINDEX smp = m_SndFile.GetNextFreeSample();
+ SAMPLEINDEX smp = wsdlg.m_Settings.sampleSlot;
+ if(smp == 0 || smp > GetNumSamples()) smp = m_SndFile.GetNextFreeSample();
if(smp == SAMPLEINDEX_INVALID)
{
Reporting::Error(_T("Too many samples!"));
cancel = true;
}
- if(!cancel && m_SndFile.ReadSampleFromFile(smp, file, false))
+ if(!cancel)
{
- UpdateAllViews(nullptr, SampleHint().Info().Data().Names());
- if(m_SndFile.GetNumInstruments())
+ GetSampleUndo().PrepareUndo(smp, sundo_replace, "Render To Sample");
+ if(m_SndFile.ReadSampleFromFile(smp, file, false))
{
- InsertInstrument(smp);
- UpdateAllViews(nullptr, InstrumentHint().Info().Names());
+ UpdateAllViews(nullptr, SampleHint().Info().Data().Names());
+ if(m_SndFile.GetNumInstruments())
+ {
+ InsertInstrument(smp);
+ UpdateAllViews(nullptr, InstrumentHint().Info().Names());
+ }
+ SetModified();
+ } else
+ {
+ GetSampleUndo().RemoveLastUndoStep(smp);
}
- SetModified();
}
}
}
Modified: trunk/OpenMPT/mptrack/mod2wave.h
===================================================================
--- trunk/OpenMPT/mptrack/mod2wave.h 2015-06-13 14:18:04 UTC (rev 5305)
+++ trunk/OpenMPT/mptrack/mod2wave.h 2015-06-13 14:34:46 UTC (rev 5306)
@@ -51,6 +51,7 @@
int repeatCount;
ORDERINDEX minOrder, maxOrder;
+ SAMPLEINDEX sampleSlot;
bool normalize : 1;
bool silencePlugBuffers : 1;
@@ -76,7 +77,7 @@
uint64 m_dwFileLimit, m_dwSongLimit;
ORDERINDEX m_nNumOrders;
- CComboBox m_CbnFileType, m_CbnSampleRate, m_CbnChannels, m_CbnDither, m_CbnSampleFormat;
+ CComboBox m_CbnFileType, m_CbnSampleRate, m_CbnChannels, m_CbnDither, m_CbnSampleFormat, m_CbnSampleSlot;
CSpinButtonCtrl m_SpinLoopCount, m_SpinMinOrder, m_SpinMaxOrder;
bool m_bGivePlugsIdleTime;
@@ -118,7 +119,8 @@
afx_msg void OnChannelsChanged();
afx_msg void OnDitherChanged();
afx_msg void OnFormatChanged();
- afx_msg void OnPlayerOptions(); //rewbs.resamplerConf
+ afx_msg void OnPlayerOptions();
+ afx_msg void OnSampleSlotChanged();
DECLARE_MESSAGE_MAP()
};
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2015-06-13 14:18:04 UTC (rev 5305)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2015-06-13 14:34:46 UTC (rev 5306)
@@ -705,8 +705,9 @@
RTEXT "Year:",IDC_STATIC,324,194,18,8
EDITTEXT IDC_EDIT9,348,192,30,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Export To:",IDC_STATIC,6,219,48,8
- CONTROL "&File",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | WS_GROUP,54,219,30,8
- CONTROL "S&le Slot",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,96,219,90,8
+ CONTROL "&File",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | WS_GROUP,54,219,38,8
+ CONTROL "S&le Slot",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,96,219,56,8
+ COMBOBOX IDC_COMBO9,156,217,96,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
IDD_PROGRESS DIALOG 0, 0, 186, 55
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-13 14:57:14
|
Revision: 5307
http://sourceforge.net/p/modplug/code/5307
Author: saga-games
Date: 2015-06-13 14:57:08 +0000 (Sat, 13 Jun 2015)
Log Message:
-----------
[New] Add letters 'd' and '+' to drawable letters for custom tunings.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Draw_pat.cpp
trunk/OpenMPT/mptrack/PatternFont.cpp
trunk/OpenMPT/mptrack/res/view_pat.bmp
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2015-06-13 14:34:46 UTC (rev 5306)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2015-06-13 14:57:08 UTC (rev 5307)
@@ -302,15 +302,22 @@
srcx = pfnt->nSpaceX;
srcy = pfnt->nSpaceY;
break;
+ case 'b':
+ srcx = pfnt->nAlphaAM_X;
+ srcy = pfnt->nAlphaAM_Y + 14 * pfnt->spacingY;
+ break;
case '-':
srcx = pfnt->nAlphaAM_X;
srcy = pfnt->nAlphaAM_Y + 15 * pfnt->spacingY;
break;
- case 'b':
+ case '+':
srcx = pfnt->nAlphaAM_X;
- srcy = pfnt->nAlphaAM_Y + 14 * pfnt->spacingY;
+ srcy = pfnt->nAlphaAM_Y + 16 * pfnt->spacingY;
break;
-
+ case 'd':
+ srcx = pfnt->nAlphaAM_X;
+ srcy = pfnt->nAlphaAM_Y + 17 * pfnt->spacingY;
+ break;
}
m_Dib.TextBlt(x, y, sizex, pfnt->spacingY, srcx+ofsx, srcy, pfnt->dib);
}
Modified: trunk/OpenMPT/mptrack/PatternFont.cpp
===================================================================
--- trunk/OpenMPT/mptrack/PatternFont.cpp 2015-06-13 14:34:46 UTC (rev 5306)
+++ trunk/OpenMPT/mptrack/PatternFont.cpp 2015-06-13 14:57:08 UTC (rev 5307)
@@ -382,6 +382,8 @@
DrawChar(hDC, '\\', pf.nAlphaNZ_X, pf.nAlphaNZ_Y + 14 * charHeight, charWidth, charHeight);
DrawChar(hDC, '-', pf.nAlphaAM_X, pf.nAlphaAM_Y + 15 * charHeight, charWidth, charHeight);
DrawChar(hDC, ':', pf.nAlphaNZ_X, pf.nAlphaNZ_Y + 15 * charHeight, charWidth, charHeight);
+ DrawChar(hDC, '+', pf.nAlphaAM_X, pf.nAlphaAM_Y + 16 * charHeight, charWidth, charHeight);
+ DrawChar(hDC, 'd', pf.nAlphaAM_X, pf.nAlphaAM_Y + 17 * charHeight, charWidth, charHeight);
::GdiFlush();
std::memcpy(pf.dib->lpDibBits, data, pf.dib->bmiHeader.biSizeImage);
Modified: trunk/OpenMPT/mptrack/res/view_pat.bmp
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-13 15:41:34
|
Revision: 5308
http://sourceforge.net/p/modplug/code/5308
Author: saga-games
Date: 2015-06-13 15:41:27 +0000 (Sat, 13 Jun 2015)
Log Message:
-----------
[Fix] MF_CHECKED/MF_UNCHECKED are for menu items. Use the correct constants BST_CHECKED/BST_UNCHECKED for checkboxes and radio buttons.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/Mod2wave.cpp
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp
trunk/OpenMPT/mptrack/SampleConfigDlg.cpp
trunk/OpenMPT/mptrack/SampleEditorDialogs.cpp
trunk/OpenMPT/mptrack/TuningDialog.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -963,7 +963,7 @@
BuildTuningComboBox();
- CheckDlgButton(IDC_CHECK_PITCHTEMPOLOCK, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK_PITCHTEMPOLOCK, BST_UNCHECKED);
m_EditPitchTempoLock.SubclassDlgItem(IDC_EDIT_PITCHTEMPOLOCK, this);
m_EditPitchTempoLock.AllowNegative(false);
m_EditPitchTempoLock.SetLimitText(9);
@@ -1341,7 +1341,7 @@
// Only enable Pitch/Tempo Lock for MPTM files or legacy files that have this property enabled.
m_CheckPitchTempoLock.EnableWindow((m_sndFile.GetType() == MOD_TYPE_MPT || pIns->pitchToTempoLock.GetRaw() > 0) ? TRUE : FALSE);
- CheckDlgButton(IDC_CHECK_PITCHTEMPOLOCK, pIns->pitchToTempoLock.GetRaw() > 0 ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK_PITCHTEMPOLOCK, pIns->pitchToTempoLock.GetRaw() > 0 ? BST_CHECKED : BST_UNCHECKED);
m_EditPitchTempoLock.EnableWindow(pIns->pitchToTempoLock.GetRaw() > 0 ? TRUE : FALSE);
if(pIns->pitchToTempoLock.GetRaw() > 0)
{
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -697,7 +697,7 @@
// Global Volume
SetDlgItemInt(IDC_EDIT8, sample.nGlobalVol);
// Panning
- CheckDlgButton(IDC_CHECK1, (sample.uFlags[CHN_PANNING]) ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK1, (sample.uFlags[CHN_PANNING]) ? BST_CHECKED : BST_UNCHECKED);
if (m_sndFile.GetType() == MOD_TYPE_XM)
{
SetDlgItemInt(IDC_EDIT9, sample.nPan); //displayed panning with XM is 0-256, just like MPT's internal engine
Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mod2wave.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -135,11 +135,11 @@
{
CDialog::OnInitDialog();
- CheckDlgButton(IDC_CHECK5, MF_UNCHECKED); // Normalize
- CheckDlgButton(IDC_CHECK3, MF_CHECKED); // Cue points
+ CheckDlgButton(IDC_CHECK5, BST_UNCHECKED); // Normalize
+ CheckDlgButton(IDC_CHECK3, BST_CHECKED); // Cue points
- CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK4, BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK6, BST_UNCHECKED);
const bool selection = (m_Settings.minOrder != ORDERINDEX_INVALID && m_Settings.maxOrder != ORDERINDEX_INVALID);
CheckRadioButton(IDC_RADIO1, IDC_RADIO2, selection ? IDC_RADIO2 : IDC_RADIO1);
@@ -575,8 +575,8 @@
void CWaveConvert::UpdateDialog()
//-------------------------------
{
- CheckDlgButton(IDC_CHECK1, (m_dwFileLimit) ? MF_CHECKED : 0);
- CheckDlgButton(IDC_CHECK2, (m_dwSongLimit) ? MF_CHECKED : 0);
+ CheckDlgButton(IDC_CHECK1, (m_dwFileLimit) ? BST_CHECKED : 0);
+ CheckDlgButton(IDC_CHECK2, (m_dwSongLimit) ? BST_CHECKED : 0);
::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT1), (m_dwFileLimit) ? TRUE : FALSE);
::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2), (m_dwSongLimit) ? TRUE : FALSE);
@@ -609,8 +609,8 @@
// When choosing a specific sample slot, we cannot use per-channel or per-instrument export
if(m_CbnSampleSlot.GetCurSel() > 0)
{
- CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK4, BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK6, BST_UNCHECKED);
}
UpdateDialog();
}
@@ -668,7 +668,7 @@
{
if(IsDlgButtonChecked(IDC_CHECK4) != BST_UNCHECKED)
{
- CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK6, BST_UNCHECKED);
m_CbnSampleSlot.SetCurSel(0);
m_CbnSampleSlot.EnableWindow(FALSE);
} else
@@ -684,7 +684,7 @@
{
if(IsDlgButtonChecked(IDC_CHECK6) != BST_UNCHECKED)
{
- CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK4, BST_UNCHECKED);
m_CbnSampleSlot.SetCurSel(0);
m_CbnSampleSlot.EnableWindow(FALSE);
} else
Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -773,9 +773,9 @@
GetDlgItem(IDC_STATIC_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE);
GetDlgItem(IDC_COMBO_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE);
GetDlgItem(IDC_CHECK4)->SetWindowText(mpt::ToCString(m_CurrentDeviceCaps.ExclusiveModeDescription));
- CheckDlgButton(IDC_CHECK4, m_CurrentDeviceCaps.CanExclusiveMode && m_Settings.ExclusiveMode ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK5, m_CurrentDeviceCaps.CanBoostThreadPriority && m_Settings.BoostThreadPriority ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK9, m_CurrentDeviceCaps.CanUseHardwareTiming && m_Settings.UseHardwareTiming ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK4, m_CurrentDeviceCaps.CanExclusiveMode && m_Settings.ExclusiveMode ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK5, m_CurrentDeviceCaps.CanBoostThreadPriority && m_Settings.BoostThreadPriority ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK9, m_CurrentDeviceCaps.CanUseHardwareTiming && m_Settings.UseHardwareTiming ? BST_CHECKED : BST_UNCHECKED);
if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier()))
{
m_BtnDriverPanel.EnableWindow(FALSE);
@@ -1388,24 +1388,24 @@
UpdateDialog();
- if (dwQuality & SNDDSP_EQ) CheckDlgButton(IDC_CHECK3, MF_CHECKED);
+ if (dwQuality & SNDDSP_EQ) CheckDlgButton(IDC_CHECK3, BST_CHECKED);
#else
GetDlgItem(IDC_CHECK3)->EnableWindow(FALSE);
#endif
// Effects
#ifndef NO_DSP
- if (dwQuality & SNDDSP_MEGABASS) CheckDlgButton(IDC_CHECK1, MF_CHECKED);
+ if (dwQuality & SNDDSP_MEGABASS) CheckDlgButton(IDC_CHECK1, BST_CHECKED);
#else
GetDlgItem(IDC_CHECK1)->EnableWindow(FALSE);
#endif
#ifndef NO_AGC
- if (dwQuality & SNDDSP_AGC) CheckDlgButton(IDC_CHECK2, MF_CHECKED);
+ if (dwQuality & SNDDSP_AGC) CheckDlgButton(IDC_CHECK2, BST_CHECKED);
#else
GetDlgItem(IDC_CHECK2)->EnableWindow(FALSE);
#endif
#ifndef NO_DSP
- if (dwQuality & SNDDSP_SURROUND) CheckDlgButton(IDC_CHECK4, MF_CHECKED);
+ if (dwQuality & SNDDSP_SURROUND) CheckDlgButton(IDC_CHECK4, BST_CHECKED);
#else
GetDlgItem(IDC_CHECK4)->EnableWindow(FALSE);
#endif
@@ -1444,7 +1444,7 @@
m_CbnReverbPreset.EnableWindow(FALSE);
} else
{
- if (dwQuality & SNDDSP_REVERB) CheckDlgButton(IDC_CHECK6, MF_CHECKED);
+ if (dwQuality & SNDDSP_REVERB) CheckDlgButton(IDC_CHECK6, BST_CHECKED);
}
#else
GetDlgItem(IDC_CHECK6)->EnableWindow(FALSE);
@@ -1743,14 +1743,14 @@
CPropertyPage::OnInitDialog();
// Flags
- if (m_dwMidiSetup & MIDISETUP_RECORDVELOCITY) CheckDlgButton(IDC_CHECK1, MF_CHECKED);
- if (m_dwMidiSetup & MIDISETUP_RECORDNOTEOFF) CheckDlgButton(IDC_CHECK2, MF_CHECKED);
- if (m_dwMidiSetup & MIDISETUP_TRANSPOSEKEYBOARD) CheckDlgButton(IDC_CHECK4, MF_CHECKED);
- if (m_dwMidiSetup & MIDISETUP_MIDITOPLUG) CheckDlgButton(IDC_MIDI_TO_PLUGIN, MF_CHECKED);
- if (m_dwMidiSetup & MIDISETUP_MIDIMACROCONTROL) CheckDlgButton(IDC_MIDI_MACRO_CONTROL, MF_CHECKED);
- if (m_dwMidiSetup & MIDISETUP_MIDIVOL_TO_NOTEVOL) CheckDlgButton(IDC_MIDIVOL_TO_NOTEVOL, MF_CHECKED);
- if (m_dwMidiSetup & MIDISETUP_RESPONDTOPLAYCONTROLMSGS) CheckDlgButton(IDC_MIDIPLAYCONTROL, MF_CHECKED);
- if (m_dwMidiSetup & MIDISETUP_PLAYPATTERNONMIDIIN) CheckDlgButton(IDC_MIDIPLAYPATTERNONMIDIIN, MF_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_RECORDVELOCITY) CheckDlgButton(IDC_CHECK1, BST_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_RECORDNOTEOFF) CheckDlgButton(IDC_CHECK2, BST_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_TRANSPOSEKEYBOARD) CheckDlgButton(IDC_CHECK4, BST_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_MIDITOPLUG) CheckDlgButton(IDC_MIDI_TO_PLUGIN, BST_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_MIDIMACROCONTROL) CheckDlgButton(IDC_MIDI_MACRO_CONTROL, BST_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_MIDIVOL_TO_NOTEVOL) CheckDlgButton(IDC_MIDIVOL_TO_NOTEVOL, BST_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_RESPONDTOPLAYCONTROLMSGS) CheckDlgButton(IDC_MIDIPLAYCONTROL, BST_CHECKED);
+ if (m_dwMidiSetup & MIDISETUP_PLAYPATTERNONMIDIIN) CheckDlgButton(IDC_MIDIPLAYPATTERNONMIDIIN, BST_CHECKED);
// Midi In Device
if ((combo = (CComboBox *)GetDlgItem(IDC_COMBO1)) != NULL)
Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -131,19 +131,19 @@
CPropertyPage::OnInitDialog();
// Search flags
- CheckDlgButton(IDC_CHECK1, m_Flags[FindReplace::Note] ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK2, m_Flags[FindReplace::Instr] ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK3, m_Flags[FindReplace::VolCmd] ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK4, m_Flags[FindReplace::Volume] ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK5, m_Flags[FindReplace::Command] ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK6, m_Flags[FindReplace::Param] ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK1, m_Flags[FindReplace::Note] ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK2, m_Flags[FindReplace::Instr] ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK3, m_Flags[FindReplace::VolCmd] ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK4, m_Flags[FindReplace::Volume] ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK5, m_Flags[FindReplace::Command] ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK6, m_Flags[FindReplace::Param] ? BST_CHECKED : BST_UNCHECKED);
if(m_bReplace)
{
- CheckDlgButton(IDC_CHECK7, m_Flags[FindReplace::Replace] ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_CHECK8, m_Flags[FindReplace::ReplaceAll] ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK7, m_Flags[FindReplace::Replace] ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_CHECK8, m_Flags[FindReplace::ReplaceAll] ? BST_CHECKED : BST_UNCHECKED);
} else
{
- CheckDlgButton(IDC_CHECK7, m_Flags[FindReplace::InChannels] ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK7, m_Flags[FindReplace::InChannels] ? BST_CHECKED : BST_UNCHECKED);
int nButton = IDC_RADIO1;
if(m_Flags[FindReplace::FullSearch])
nButton = IDC_RADIO2;
@@ -523,7 +523,7 @@
m_tempoSwing = pattern.HasTempoSwing() ? pattern.GetTempoSwing() : sndFile.m_tempoSwing;
GetDlgItem(IDC_CHECK1)->EnableWindow(sndFile.GetModSpecifications().hasPatternSignatures ? TRUE : FALSE);
- CheckDlgButton(IDC_CHECK1, bOverride ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK1, bOverride ? BST_CHECKED : BST_UNCHECKED);
SetDlgItemInt(IDC_ROWSPERBEAT, nRPB, FALSE);
SetDlgItemInt(IDC_ROWSPERMEASURE, nRPM, FALSE);
OnOverrideSignature();
@@ -1432,7 +1432,7 @@
}
m_CbnOctaveModifier.SetCurSel(m_Settings.octaveModifier + SplitKeyboardSettings::splitOctaveRange);
- CheckDlgButton(IDC_PATTERN_OCTAVELINK, (m_Settings.octaveLink && m_Settings.octaveModifier != 0) ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_PATTERN_OCTAVELINK, (m_Settings.octaveLink && m_Settings.octaveModifier != 0) ? BST_CHECKED : BST_UNCHECKED);
// Volume
m_CbnSplitVolume.AddString("No Change");
@@ -1501,7 +1501,7 @@
void CSplitKeyboadSettings::OnOctaveModifierChanged()
//---------------------------------------------------
{
- CheckDlgButton(IDC_PATTERN_OCTAVELINK, (m_CbnOctaveModifier.GetCurSel() != 9) ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_PATTERN_OCTAVELINK, (m_CbnOctaveModifier.GetCurSel() != 9) ? BST_CHECKED : BST_UNCHECKED);
}
Modified: trunk/OpenMPT/mptrack/SampleConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/SampleConfigDlg.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/SampleConfigDlg.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -63,15 +63,15 @@
CheckRadioButton(IDC_RADIO1, IDC_RADIO3, IDC_RADIO1 + TrackerSettings::Instance().sampleEditorKeyBehaviour);
- CheckDlgButton(IDC_COMPRESS_ITI, TrackerSettings::Instance().compressITI ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_COMPRESS_ITI, TrackerSettings::Instance().compressITI ? BST_CHECKED : BST_UNCHECKED);
m_cbnDefaultVolumeHandling.SetItemData(m_cbnDefaultVolumeHandling.AddString("MIDI volume"), PLUGIN_VOLUMEHANDLING_MIDI);
m_cbnDefaultVolumeHandling.SetItemData(m_cbnDefaultVolumeHandling.AddString("Dry/Wet ratio"), PLUGIN_VOLUMEHANDLING_DRYWET);
m_cbnDefaultVolumeHandling.SetItemData(m_cbnDefaultVolumeHandling.AddString("None"), PLUGIN_VOLUMEHANDLING_IGNORE);
m_cbnDefaultVolumeHandling.SetCurSel(TrackerSettings::Instance().DefaultPlugVolumeHandling);
- CheckDlgButton(IDC_PREVIEW_SAMPLES, TrackerSettings::Instance().previewInFileDialogs ? MF_CHECKED : MF_UNCHECKED);
- CheckDlgButton(IDC_NORMALIZE, TrackerSettings::Instance().m_MayNormalizeSamplesOnLoad ? MF_CHECKED : MF_UNCHECKED);
+ CheckDlgButton(IDC_PREVIEW_SAMPLES, TrackerSettings::Instance().previewInFileDialogs ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(IDC_NORMALIZE, TrackerSettings::Instance().m_MayNormalizeSamplesOnLoad ? BST_CHECKED : BST_UNCHECKED);
return TRUE;
}
Modified: trunk/OpenMPT/mptrack/SampleEditorDialogs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/SampleEditorDialogs.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/SampleEditorDialogs.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -172,7 +172,7 @@
CheckRadioButton(IDC_RADIO1, IDC_RADIO2, (m_nFormat.GetBitDepth() == 8) ? IDC_RADIO1 : IDC_RADIO2 );
CheckRadioButton(IDC_RADIO3, IDC_RADIO4, (m_nFormat.GetEncoding() == SampleIO::unsignedPCM) ? IDC_RADIO3 : IDC_RADIO4);
CheckRadioButton(IDC_RADIO5, IDC_RADIO6, (m_nFormat.GetChannelFormat() == SampleIO::mono) ? IDC_RADIO5 : IDC_RADIO6);
- CheckDlgButton(IDC_CHK_REMEMBERSETTINGS, (m_bRememberFormat ? MF_CHECKED : MF_UNCHECKED));
+ CheckDlgButton(IDC_CHK_REMEMBERSETTINGS, (m_bRememberFormat ? BST_CHECKED : BST_UNCHECKED));
}
Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TuningDialog.cpp 2015-06-13 14:57:08 UTC (rev 5307)
+++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2015-06-13 15:41:27 UTC (rev 5308)
@@ -296,7 +296,7 @@
if(m_pActiveTuning->GetEditMask() == EM_CONST ||
m_pActiveTuning->GetEditMask() == EM_CONST_STRICT)
{
- CheckDlgButton(IDC_CHECK_READONLY, MF_CHECKED);
+ CheckDlgButton(IDC_CHECK_READONLY, BST_CHECKED);
if(m_pActiveTuning->GetEditMask() == EM_CONST_STRICT)
m_ButtonReadOnly.EnableWindow(FALSE);
else
@@ -306,7 +306,7 @@
}
else
{
- CheckDlgButton(IDC_CHECK_READONLY, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK_READONLY, BST_UNCHECKED);
m_ButtonReadOnly.EnableWindow();
}
@@ -805,14 +805,14 @@
if(IsDlgButtonChecked(IDC_CHECK_READONLY))
{
if(m_pActiveTuning->SetEditMask(EM_CONST))
- CheckDlgButton(IDC_CHECK_READONLY, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK_READONLY, BST_UNCHECKED);
else
UpdateView(UM_TUNINGDATA);
}
else
{
if(m_pActiveTuning->SetEditMask(EM_ALLOWALL))
- CheckDlgButton(IDC_CHECK_READONLY, MF_CHECKED);
+ CheckDlgButton(IDC_CHECK_READONLY, BST_CHECKED);
else
UpdateView(UM_TUNINGDATA);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-14 16:18:49
|
Revision: 5317
http://sourceforge.net/p/modplug/code/5317
Author: saga-games
Date: 2015-06-14 16:18:43 +0000 (Sun, 14 Jun 2015)
Log Message:
-----------
[Imp] Live preview of edited tempo swing settings.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2015-06-14 08:49:52 UTC (rev 5316)
+++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2015-06-14 16:18:43 UTC (rev 5317)
@@ -571,7 +571,7 @@
//----------------------------------------
{
m_tempoSwing.resize(GetDlgItemInt(IDC_ROWSPERBEAT), TempoSwing::Unity);
- CTempoSwingDlg dlg(this, m_tempoSwing);
+ CTempoSwingDlg dlg(this, m_tempoSwing, modDoc.GetrSoundFile(), m_nPattern);
if(dlg.DoModal() == IDOK)
{
m_tempoSwing = dlg.m_tempoSwing;
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2015-06-14 08:49:52 UTC (rev 5316)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2015-06-14 16:18:43 UTC (rev 5317)
@@ -285,7 +285,7 @@
//------------------------------
{
m_tempoSwing.resize(GetDlgItemInt(IDC_ROWSPERBEAT), TempoSwing::Unity);
- CTempoSwingDlg dlg(this, m_tempoSwing);
+ CTempoSwingDlg dlg(this, m_tempoSwing, sndFile);
if(dlg.DoModal() == IDOK)
{
m_tempoSwing = dlg.m_tempoSwing;
@@ -1205,8 +1205,16 @@
END_MESSAGE_MAP()
+CTempoSwingDlg::CTempoSwingDlg(CWnd *parent, const TempoSwing ¤tTempoSwing, CSoundFile &sndFile, PATTERNINDEX pattern)
+ : CDialog(IDD_TEMPO_SWING, parent)
+ , m_tempoSwing(currentTempoSwing)
+ , m_origTempoSwing(pattern == PATTERNINDEX_INVALID ? sndFile.m_tempoSwing : sndFile.Patterns[pattern].GetTempoSwing())
+ , m_sndFile(sndFile)
+ , m_pattern(pattern)
+{ }
+
BOOL CTempoSwingDlg::OnInitDialog()
-//-----------------------------------
+//---------------------------------
{
struct Measurements
{
@@ -1296,7 +1304,7 @@
void CTempoSwingDlg::OnOK()
-//---------------------------
+//-------------------------
{
CDialog::OnOK();
// If this is the default setup, just clear the vector.
@@ -1309,7 +1317,7 @@
void CTempoSwingDlg::OnCancel()
-//---------------------------
+//-----------------------------
{
CDialog::OnCancel();
OnClose();
@@ -1317,17 +1325,25 @@
void CTempoSwingDlg::OnClose()
-//------------------------------
+//----------------------------
{
for(size_t i = 0; i < m_controls.size(); i++)
{
delete m_controls[i];
}
+ // Restore original swing properties after preview
+ if(m_pattern == PATTERNINDEX_INVALID)
+ {
+ m_sndFile.m_tempoSwing = m_origTempoSwing;
+ } else
+ {
+ m_sndFile.Patterns[m_pattern].SetTempoSwing(m_origTempoSwing);
+ }
}
void CTempoSwingDlg::OnReset()
-//------------------------------
+//----------------------------
{
for(size_t i = 0; i < m_controls.size(); i++)
{
@@ -1338,13 +1354,22 @@
void CTempoSwingDlg::OnHScroll(UINT /*nSBCode*/, UINT /*nPos*/, CScrollBar* /*pScrollBar*/)
-//-------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------
{
for(size_t i = 0; i < m_controls.size(); i++)
{
m_tempoSwing[i] = Util::muldivr(m_controls[i]->valueSlider.GetPos(), TempoSwing::Unity, SliderUnity) + TempoSwing::Unity;
}
m_tempoSwing.Normalize();
+ // Preview
+ if(m_pattern == PATTERNINDEX_INVALID)
+ {
+ m_sndFile.m_tempoSwing = m_tempoSwing;
+ } else
+ {
+ m_sndFile.Patterns[m_pattern].SetTempoSwing(m_tempoSwing);
+ }
+
for(size_t i = 0; i < m_tempoSwing.size(); i++)
{
TCHAR s[32];
@@ -1355,7 +1380,7 @@
BOOL CTempoSwingDlg::OnToolTipNotify(UINT, NMHDR *pNMHDR, LRESULT *)
-//--------------------------------------------------------------------
+//------------------------------------------------------------------
{
TOOLTIPTEXT *pTTT = (TOOLTIPTEXTA*)pNMHDR;
for(size_t i = 0; i < m_controls.size(); i++)
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2015-06-14 08:49:52 UTC (rev 5316)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2015-06-14 16:18:43 UTC (rev 5317)
@@ -280,9 +280,12 @@
std::vector<RowCtls *> m_controls;
public:
TempoSwing m_tempoSwing;
+ const TempoSwing m_origTempoSwing;
+ CSoundFile &m_sndFile;
+ PATTERNINDEX m_pattern;
public:
- CTempoSwingDlg(CWnd *parent, const TempoSwing &tempoSwing) : CDialog(IDD_TEMPO_SWING, parent), m_tempoSwing(tempoSwing) { }
+ CTempoSwingDlg(CWnd *parent, const TempoSwing ¤tTempoSwing, CSoundFile &sndFile, PATTERNINDEX pattern = PATTERNINDEX_INVALID);
protected:
virtual BOOL OnInitDialog();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-15 17:18:58
|
Revision: 5322
http://sourceforge.net/p/modplug/code/5322
Author: manxorist
Date: 2015-06-15 17:18:52 +0000 (Mon, 15 Jun 2015)
Log Message:
-----------
[Ref] Split class DebugSettings from class TrackerSettings and initialize the former first.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/TrackerSettings.cpp
trunk/OpenMPT/mptrack/TrackerSettings.h
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-15 16:36:08 UTC (rev 5321)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-15 17:18:52 UTC (rev 5322)
@@ -651,6 +651,7 @@
, m_pSettingsIniFile(nullptr)
, m_pSongSettings(nullptr)
, m_pSettings(nullptr)
+ , m_pDebugSettings(nullptr)
, m_pTrackerSettings(nullptr)
, m_pComponentManagerSettings(nullptr)
, m_pPluginCache(nullptr)
@@ -932,24 +933,12 @@
m_pSettingsIniFile = new IniFileSettingsBackend(m_szConfigFileName);
m_pSettings = new SettingsContainer(m_pSettingsIniFile);
+
+ m_pDebugSettings = new DebugSettings(*m_pSettings);
+
m_pTrackerSettings = new TrackerSettings(*m_pSettings);
- // enable debug features (as early as possible after reading the settings)
- #if !defined(NO_LOGGING) && !defined(MPT_LOG_IS_DISABLED)
- #if !defined(MPT_LOG_GLOBAL_LEVEL_STATIC)
- mpt::log::GlobalLogLevel = TrackerSettings::Instance().DebugLogLevel;
- #endif
- mpt::log::SetFacilities(TrackerSettings::Instance().DebugLogFacilitySolo, TrackerSettings::Instance().DebugLogFacilityBlocked);
- mpt::log::FileEnabled = TrackerSettings::Instance().DebugLogFileEnable;
- mpt::log::DebuggerEnabled = TrackerSettings::Instance().DebugLogDebuggerEnable;
- mpt::log::ConsoleEnabled = TrackerSettings::Instance().DebugLogConsoleEnable;
- #endif
MPT_LOG(LogInformation, "", MPT_USTRING("OpenMPT settings initialized."));
- if(TrackerSettings::Instance().DebugTraceEnable)
- {
- mpt::log::Trace::Enable(TrackerSettings::Instance().DebugTraceSize);
- }
- MPT_TRACE();
// Create missing diretories
if(!TrackerSettings::Instance().PathTunings.GetDefaultDir().IsDirectory())
@@ -1146,17 +1135,14 @@
ComponentManager::Release();
- if(TrackerSettings::Instance().DebugTraceAlwaysDump)
- {
- DebugTraceDump();
- }
-
delete m_pPluginCache;
m_pPluginCache = nullptr;
delete m_pComponentManagerSettings;
m_pComponentManagerSettings = nullptr;
delete m_pTrackerSettings;
m_pTrackerSettings = nullptr;
+ delete m_pDebugSettings;
+ m_pDebugSettings = nullptr;
delete m_pSettings;
m_pSettings = nullptr;
delete m_pSettingsIniFile;
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2015-06-15 16:36:08 UTC (rev 5321)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2015-06-15 17:18:52 UTC (rev 5322)
@@ -28,6 +28,7 @@
class Manager;
} // namespace SoundDevice
class CDLSBank;
+class DebugSettings;
class TrackerSettings;
class ComponentManagerSettings;
@@ -203,6 +204,7 @@
IniFileSettingsBackend *m_pSettingsIniFile;
SettingsContainer *m_pSettings;
+ DebugSettings *m_pDebugSettings;
TrackerSettings *m_pTrackerSettings;
IniFileSettingsBackend *m_pSongSettingsIniFile;
SettingsContainer *m_pSongSettings;
Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-15 16:36:08 UTC (rev 5321)
+++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-15 17:18:52 UTC (rev 5322)
@@ -131,6 +131,57 @@
}
+DebugSettings::DebugSettings(SettingsContainer &conf)
+//---------------------------------------------------
+ : conf(conf)
+ // Debug
+#if !defined(NO_LOGGING) && !defined(MPT_LOG_IS_DISABLED)
+ , DebugLogLevel(conf, "Debug", "LogLevel", static_cast<int>(mpt::log::GlobalLogLevel))
+ , DebugLogFacilitySolo(conf, "Debug", "LogFacilitySolo", std::string())
+ , DebugLogFacilityBlocked(conf, "Debug", "LogFacilityBlocked", std::string())
+ , DebugLogFileEnable(conf, "Debug", "LogFileEnable", mpt::log::FileEnabled)
+ , DebugLogDebuggerEnable(conf, "Debug", "LogDebuggerEnable", mpt::log::DebuggerEnabled)
+ , DebugLogConsoleEnable(conf, "Debug", "LogConsoleEnable", mpt::log::ConsoleEnabled)
+#endif
+ , DebugTraceEnable(conf, "Debug", "TraceEnable", false)
+ , DebugTraceSize(conf, "Debug", "TraceSize", 1000000)
+ , DebugTraceAlwaysDump(conf, "Debug", "TraceAlwaysDump", false)
+ , DebugStopSoundDeviceOnCrash(conf, "Debug", "StopSoundDeviceOnCrash", true)
+ , DebugStopSoundDeviceBeforeDump(conf, "Debug", "StopSoundDeviceBeforeDump", false)
+{
+
+ // Duplicate state for debug stuff in order to avoid calling into settings framework from crash context.
+ ExceptionHandler::stopSoundDeviceOnCrash = DebugStopSoundDeviceOnCrash;
+ ExceptionHandler::stopSoundDeviceBeforeDump = DebugStopSoundDeviceBeforeDump;
+
+ // enable debug features (as early as possible after reading the settings)
+ #if !defined(NO_LOGGING) && !defined(MPT_LOG_IS_DISABLED)
+ #if !defined(MPT_LOG_GLOBAL_LEVEL_STATIC)
+ mpt::log::GlobalLogLevel = DebugLogLevel;
+ #endif
+ mpt::log::SetFacilities(DebugLogFacilitySolo, DebugLogFacilityBlocked);
+ mpt::log::FileEnabled = DebugLogFileEnable;
+ mpt::log::DebuggerEnabled = DebugLogDebuggerEnable;
+ mpt::log::ConsoleEnabled = DebugLogConsoleEnable;
+ #endif
+ if(DebugTraceEnable)
+ {
+ mpt::log::Trace::Enable(DebugTraceSize);
+ }
+
+}
+
+
+DebugSettings::~DebugSettings()
+//-----------------------------
+{
+ if(DebugTraceAlwaysDump)
+ {
+ DebugTraceDump();
+ }
+}
+
+
TrackerSettings::TrackerSettings(SettingsContainer &conf)
//-------------------------------------------------------
: conf(conf)
@@ -260,27 +311,8 @@
, UpdateUpdateURL(conf, "Update", "UpdateURL", CUpdateCheck::GetUpdateURL())
, UpdateSendGUID(conf, "Update", "SendGUID", CUpdateCheck::GetSendGUID())
, UpdateShowUpdateHint(conf, "Update", "ShowUpdateHint", CUpdateCheck::GetShowUpdateHint())
- // Debug
-#if !defined(NO_LOGGING) && !defined(MPT_LOG_IS_DISABLED)
- , DebugLogLevel(conf, "Debug", "LogLevel", static_cast<int>(mpt::log::GlobalLogLevel))
- , DebugLogFacilitySolo(conf, "Debug", "LogFacilitySolo", std::string())
- , DebugLogFacilityBlocked(conf, "Debug", "LogFacilityBlocked", std::string())
- , DebugLogFileEnable(conf, "Debug", "LogFileEnable", mpt::log::FileEnabled)
- , DebugLogDebuggerEnable(conf, "Debug", "LogDebuggerEnable", mpt::log::DebuggerEnabled)
- , DebugLogConsoleEnable(conf, "Debug", "LogConsoleEnable", mpt::log::ConsoleEnabled)
-#endif
- , DebugTraceEnable(conf, "Debug", "TraceEnable", false)
- , DebugTraceSize(conf, "Debug", "TraceSize", 1000000)
- , DebugTraceAlwaysDump(conf, "Debug", "TraceAlwaysDump", false)
- , DebugStopSoundDeviceOnCrash(conf, "Debug", "StopSoundDeviceOnCrash", true)
- , DebugStopSoundDeviceBeforeDump(conf, "Debug", "StopSoundDeviceBeforeDump", false)
{
- // Debug
- // Duplicate state for debug stuff in order to avoid calling into settings framework from crash context.
- ExceptionHandler::stopSoundDeviceOnCrash = DebugStopSoundDeviceOnCrash;
- ExceptionHandler::stopSoundDeviceBeforeDump = DebugStopSoundDeviceBeforeDump;
-
// Effects
#ifndef NO_DSP
m_DSPSettings.m_nXBassDepth = conf.Read<int32>("Effects", "XBassDepth", m_DSPSettings.m_nXBassDepth);
Modified: trunk/OpenMPT/mptrack/TrackerSettings.h
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-15 16:36:08 UTC (rev 5321)
+++ trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-15 17:18:52 UTC (rev 5322)
@@ -433,6 +433,44 @@
};
+//=================
+class DebugSettings
+//=================
+{
+
+private:
+
+ SettingsContainer &conf;
+
+private:
+
+ // Debug
+
+#if !defined(NO_LOGGING) && !defined(MPT_LOG_IS_DISABLED)
+ Setting<int> DebugLogLevel;
+ Setting<std::string> DebugLogFacilitySolo;
+ Setting<std::string> DebugLogFacilityBlocked;
+ Setting<bool> DebugLogFileEnable;
+ Setting<bool> DebugLogDebuggerEnable;
+ Setting<bool> DebugLogConsoleEnable;
+#endif
+
+ Setting<bool> DebugTraceEnable;
+ Setting<uint32> DebugTraceSize;
+ Setting<bool> DebugTraceAlwaysDump;
+
+ Setting<bool> DebugStopSoundDeviceOnCrash;
+ Setting<bool> DebugStopSoundDeviceBeforeDump;
+
+public:
+
+ DebugSettings(SettingsContainer &conf);
+
+ ~DebugSettings();
+
+};
+
+
//===================
class TrackerSettings
//===================
@@ -643,24 +681,6 @@
Setting<bool> UpdateSendGUID;
Setting<bool> UpdateShowUpdateHint;
- // Debug
-
-#if !defined(NO_LOGGING) && !defined(MPT_LOG_IS_DISABLED)
- Setting<int> DebugLogLevel;
- Setting<std::string> DebugLogFacilitySolo;
- Setting<std::string> DebugLogFacilityBlocked;
- Setting<bool> DebugLogFileEnable;
- Setting<bool> DebugLogDebuggerEnable;
- Setting<bool> DebugLogConsoleEnable;
-#endif
-
- Setting<bool> DebugTraceEnable;
- Setting<uint32> DebugTraceSize;
- Setting<bool> DebugTraceAlwaysDump;
-
- Setting<bool> DebugStopSoundDeviceOnCrash;
- Setting<bool> DebugStopSoundDeviceBeforeDump;
-
public:
TrackerSettings(SettingsContainer &conf);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-16 13:06:41
|
Revision: 5325
http://sourceforge.net/p/modplug/code/5325
Author: saga-games
Date: 2015-06-16 13:06:34 +0000 (Tue, 16 Jun 2015)
Log Message:
-----------
[Fix] Pattern tab: Don't let the prev/next pattern display get confused when follow song is enabled and the user clicks on an invalid pattern index in the order list.
[Fix] Pattern tab: Properly show prev/next patterns when jumping around in the order list with follow song disabled.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Draw_pat.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2015-06-16 11:03:37 UTC (rev 5324)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2015-06-16 13:06:34 UTC (rev 5325)
@@ -361,7 +361,8 @@
} else
{
if(pTuning)
- { // Drawing custom note names
+ {
+ // Drawing custom note names
std::string noteStr = pTuning->GetNoteName(static_cast<CTuning::NOTEINDEXTYPE>(note-NOTE_MIDDLEC));
if(noteStr.size() < 3)
noteStr.resize(3, ' ');
@@ -369,11 +370,11 @@
DrawLetter(x, y, noteStr[0], pfnt->nNoteWidth / 2, 0);
DrawLetter(x + pfnt->nNoteWidth / 2, y, noteStr[1], pfnt->nNoteWidth / 2, 0);
DrawLetter(x + pfnt->nNoteWidth, y, noteStr[2], pfnt->nOctaveWidth, 0);
- }
- else //Original
+ } else
{
- UINT o = (note-1) / 12; //Octave
- UINT n = (note-1) % 12; //Note
+ // Original
+ UINT o = (note - NOTE_MIN) / 12; //Octave
+ UINT n = (note - NOTE_MIN) % 12; //Note
m_Dib.TextBlt(x, y, pfnt->nNoteWidth, pfnt->spacingY, xsrc, ysrc+(n+1)*pfnt->spacingY, pfnt->dib);
if(o <= 9)
m_Dib.TextBlt(x+pfnt->nNoteWidth, y, pfnt->nOctaveWidth, pfnt->spacingY,
@@ -577,6 +578,12 @@
}
ypaint += m_szHeader.cy;
+ ORDERINDEX curOrder;
+ if(IsLiveRecord() && m_nPlayOrd < sndFile.Order.size())
+ curOrder = m_nPlayOrd;
+ else
+ curOrder = static_cast<ORDERINDEX>(SendCtrlMessage(CTRLMSG_GETCURRENTORDER));
+
if (m_nMidRow)
{
if (yofs >= m_nMidRow)
@@ -590,13 +597,12 @@
// Display previous pattern
if (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_SHOWPREVIOUS)
{
- const ORDERINDEX startOrder = static_cast<ORDERINDEX>(SendCtrlMessage(CTRLMSG_GETCURRENTORDER));
- if(startOrder > 0)
+ if(curOrder > 0)
{
- ORDERINDEX prevOrder = sndFile.Order.GetPreviousOrderIgnoringSkips(startOrder);
+ ORDERINDEX prevOrder = sndFile.Order.GetPreviousOrderIgnoringSkips(curOrder);
//Skip +++ items
- if(startOrder < sndFile.Order.size() && sndFile.Order[startOrder] == m_nPattern)
+ if(curOrder < sndFile.Order.size() && sndFile.Order[curOrder] == m_nPattern)
{
nPrevPat = sndFile.Order[prevOrder];
}
@@ -639,14 +645,12 @@
if ((nVisRows > 0) && (m_nMidRow))
{
PATTERNINDEX nNextPat = PATTERNINDEX_INVALID;
- const ORDERINDEX startOrder= static_cast<ORDERINDEX>(SendCtrlMessage(CTRLMSG_GETCURRENTORDER));
-
- ORDERINDEX nNextOrder = sndFile.Order.GetNextOrderIgnoringSkips(startOrder);
- if(nNextOrder == startOrder) nNextOrder = ORDERINDEX_INVALID;
+ ORDERINDEX nNextOrder = sndFile.Order.GetNextOrderIgnoringSkips(curOrder);
+ if(nNextOrder == curOrder) nNextOrder = ORDERINDEX_INVALID;
//Ignore skip items(+++) from sequence.
const ORDERINDEX ordCount = sndFile.Order.GetLength();
- if(nNextOrder < ordCount && sndFile.Order[startOrder] == m_nPattern)
+ if(nNextOrder < ordCount && sndFile.Order[curOrder] == m_nPattern)
{
nNextPat = sndFile.Order[nNextOrder];
}
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2015-06-16 11:03:37 UTC (rev 5324)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2015-06-16 13:06:34 UTC (rev 5325)
@@ -66,7 +66,7 @@
ON_WM_DESTROY()
ON_MESSAGE(WM_MOD_KEYCOMMAND, OnCustomKeyMsg) //rewbs.customKeys
ON_MESSAGE(WM_MOD_MIDIMSG, OnMidiMsg)
- ON_MESSAGE(WM_MOD_RECORDPARAM, OnRecordPlugParamChange)
+ ON_MESSAGE(WM_MOD_RECORDPARAM, OnRecordPlugParamChange)
ON_COMMAND(ID_EDIT_CUT, OnEditCut)
ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
@@ -183,6 +183,7 @@
memset(splitActiveNoteChannel, 0xFF, sizeof(splitActiveNoteChannel));
memset(activeNoteChannel, 0xFF, sizeof(activeNoteChannel));
m_nPlayPat = PATTERNINDEX_INVALID;
+ m_nPlayOrd = ORDERINDEX_INVALID;
m_nPlayRow = 0;
m_nPlayTick = 0;
m_nMidRow = 0;
@@ -613,21 +614,29 @@
}
-bool CViewPattern::SetPlayCursor(PATTERNINDEX nPat, ROWINDEX nRow)
-//----------------------------------------------------------------
+bool CViewPattern::SetPlayCursor(ORDERINDEX ord, PATTERNINDEX pat, ROWINDEX row)
+//------------------------------------------------------------------------------
{
- PATTERNINDEX nOldPat = m_nPlayPat;
- ROWINDEX nOldRow = m_nPlayRow;
+ ORDERINDEX oldOrd = m_nPlayOrd;
+ PATTERNINDEX oldPat = m_nPlayPat;
+ ROWINDEX oldRow = m_nPlayRow;
- if ((nPat == m_nPlayPat) && (nRow == m_nPlayRow))
+ if (ord == m_nPlayOrd && pat == m_nPlayPat && row == m_nPlayRow)
return true;
- m_nPlayPat = nPat;
- m_nPlayRow = nRow;
- if (nOldPat == m_nPattern)
- InvalidateRow(nOldRow);
- if (m_nPlayPat == m_nPattern)
- InvalidateRow(m_nPlayRow);
+ m_nPlayOrd = ord;
+ m_nPlayPat = pat;
+ m_nPlayRow = row;
+ if (oldOrd != m_nPlayOrd)
+ {
+ InvalidatePattern(true);
+ } else
+ {
+ if (oldPat == m_nPattern)
+ InvalidateRow(oldRow);
+ if (m_nPlayPat == m_nPattern)
+ InvalidateRow(m_nPlayRow);
+ }
return true;
}
@@ -3775,7 +3784,7 @@
updateOrderList = false;
}
}
- SetPlayCursor(nPat, nRow);
+ SetPlayCursor(nOrd, nPat, nRow);
m_nPlayTick = pnotify->tick;
}
}
@@ -3790,7 +3799,7 @@
MemsetZero(ChnVUMeters); // Also zero all non-visible VU meters
if((m_Status & (psFollowSong | psDragActive)) == psFollowSong)
{
- SetPlayCursor(PATTERNINDEX_INVALID, ROWINDEX_INVALID);
+ SetPlayCursor(ORDERINDEX_INVALID, PATTERNINDEX_INVALID, ROWINDEX_INVALID);
}
}
@@ -4156,7 +4165,7 @@
return m_nPattern;
case VIEWMSG_SETCURRENTPATTERN:
- if (m_nPattern != (UINT)lParam) SetCurrentPattern(lParam);
+ SetCurrentPattern(lParam);
break;
case VIEWMSG_GETCURRENTPOS:
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2015-06-16 11:03:37 UTC (rev 5324)
+++ trunk/OpenMPT/mptrack/View_pat.h 2015-06-16 13:06:34 UTC (rev 5325)
@@ -163,8 +163,9 @@
UINT m_nMidRow, m_nSpacing, m_nAccelChar, m_nLastPlayedRow, m_nLastPlayedOrder;
FlagSet<PatternStatus> m_Status;
ROWINDEX m_nPlayRow;
- UINT m_nPlayTick;
+ uint32 m_nPlayTick;
PATTERNINDEX m_nPattern, m_nPlayPat;
+ ORDERINDEX m_nPlayOrd;
int32 m_nTransposeAmount;
int m_nXScroll, m_nYScroll;
@@ -269,7 +270,7 @@
// This should be used instead of consecutive calls to SetCurrentRow() then SetCurrentColumn()
bool SetCursorPosition(const PatternCursor &cursor, bool wrap = false);
bool DragToSel(const PatternCursor &cursor, bool scrollHorizontal, bool scrollVertical, bool noMove = false);
- bool SetPlayCursor(PATTERNINDEX nPat, ROWINDEX nRow);
+ bool SetPlayCursor(ORDERINDEX ord, PATTERNINDEX pat, ROWINDEX row);
bool UpdateScrollbarPositions(bool updateHorizontalScrollbar = true);
BYTE EnterNote(UINT nNote, UINT nIns=0, BOOL bCheck=FALSE, int vol=-1, BOOL bMultiCh=FALSE);
bool ShowEditWindow();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2015-06-16 16:41:49
|
Revision: 5326
http://sourceforge.net/p/modplug/code/5326
Author: saga-games
Date: 2015-06-16 16:41:43 +0000 (Tue, 16 Jun 2015)
Log Message:
-----------
[Fix] Hidable message box visibility flags were read from the wrong setting variable since r3074.
[Mod] General tab: Invert direction of the wet/dry slider to match the Zxx parameter (http://forum.openmpt.org/index.php?topic=3227.0)
Revision Links:
--------------
http://sourceforge.net/p/modplug/code/3074
Modified Paths:
--------------
trunk/OpenMPT/mptrack/TrackerSettings.cpp
trunk/OpenMPT/mptrack/View_gen.cpp
Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-16 13:06:34 UTC (rev 5325)
+++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-16 16:41:43 UTC (rev 5326)
@@ -206,7 +206,7 @@
, gnPlugWindowWidth(conf, "Display", "PlugSelectWindowWidth", 400)
, gnPlugWindowHeight(conf, "Display", "PlugSelectWindowHeight", 450)
, gnPlugWindowLast(conf, "Display", "PlugSelectWindowLast", 0)
- , gnMsgBoxVisiblityFlags(conf, "Display", "MDIGraphHeight", uint32_max)
+ , gnMsgBoxVisiblityFlags(conf, "Display", "MsgBoxVisibilityFlags", uint32_max)
, GUIUpdateInterval(conf, "Display", "GUIUpdateInterval", 0)
, VuMeterUpdateInterval(conf, "Display", "VuMeterUpdateInterval", 15)
, VuMeterDecaySpeedDecibelPerSecond(conf, "Display", "VuMeterDecaySpeedDecibelPerSecond", 88.0f)
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2015-06-16 13:06:34 UTC (rev 5325)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2015-06-16 16:41:43 UTC (rev 5326)
@@ -325,7 +325,7 @@
return;
}
- CHAR s[128];
+ TCHAR s[128];
nTabCount = (sndFile.m_nChannels + 3) / 4;
if (nTabCount != m_TabCtrl.GetItemCount())
{
@@ -336,7 +336,7 @@
for (int iItem=0; iItem<nTabCount; iItem++)
{
const int lastItem = MIN(iItem * 4 + 4, MAX_BASECHANNELS);
- wsprintf(s, "%d - %d", iItem * 4 + 1, lastItem);
+ wsprintf(s, _T("%d - %d"), iItem * 4 + 1, lastItem);
TC_ITEM tci;
tci.mask = TCIF_TEXT | TCIF_PARAM;
tci.pszText = s;
@@ -365,7 +365,7 @@
{
// Text
s[0] = 0;
- if (bEnable) wsprintf(s, "Channel %u", nChn + 1);
+ if (bEnable) wsprintf(s, _T("Channel %u"), nChn + 1);
SetDlgItemText(IDC_TEXT1 + ichn, s);
// Mute
CheckDlgButton(IDC_CHECK1 + ichn * 2, sndFile.ChnSettings[nChn].dwFlags[CHN_MUTE] ? TRUE : FALSE);
@@ -433,10 +433,10 @@
GetDlgItem(IDC_MOVEFXSLOT)->EnableWindow((pVstPlugin) ? TRUE : FALSE);
GetDlgItem(IDC_INSERTFXSLOT)->EnableWindow((pVstPlugin) ? TRUE : FALSE);
GetDlgItem(IDC_CLONEPLUG)->EnableWindow((pVstPlugin) ? TRUE : FALSE);
- int n = static_cast<int>(plugin.fDryRatio*100);
- wsprintf(s, "(%d%% wet, %d%% dry)", 100-n, n);
+ int n = static_cast<int>(plugin.fDryRatio * 100);
+ wsprintf(s, _T("%d%% wet, %d%% dry"), 100 - n, n);
SetDlgItemText(IDC_STATIC8, s);
- m_sbDryRatio.SetPos(n);
+ m_sbDryRatio.SetPos(100 - n);
if(pVstPlugin && pVstPlugin->isInstrument())
{
@@ -452,7 +452,7 @@
int gain = plugin.GetGain();
if(gain == 0) gain = 10;
float value = 0.1f * (float)gain;
- sprintf(s,"Gain: x %1.1f", value);
+ _stprintf(s, _T("Gain: x %1.1f"), value);
SetDlgItemText(IDC_STATIC2, s);
m_SpinMixGain.SetPos(gain);
@@ -518,10 +518,10 @@
std::string libName = mpt::ToCharset(mpt::CharsetLocale, mpt::CharsetUTF8, plugin.GetLibraryName());
if(!strcmp(plugin.GetName(), "") || libName != plugin.GetName())
{
- wsprintf(s, "FX%d: %s", iOut + 1, libName.c_str());
+ wsprintf(s, _T("FX%d: %s"), iOut + 1, libName.c_str());
} else
{
- wsprintf(s, "FX%d: %s (%s)", iOut + 1, libName.c_str(), plugin.GetName());
+ wsprintf(s, _T("FX%d: %s (%s)"), iOut + 1, libName.c_str(), plugin.GetName());
}
int n = m_CbnOutput.AddString(s);
@@ -736,10 +736,9 @@
}
- //rewbs.dryRatio
if ((pScrollBar) && (pScrollBar->m_hWnd == m_sbDryRatio.m_hWnd))
{
- int n = m_sbDryRatio.GetPos();
+ int n = 100 - m_sbDryRatio.GetPos();
if ((n >= 0) && (n <= 100) && (m_nCurrentPlugin < MAX_MIXPLUGINS))
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
@@ -747,14 +746,13 @@
if(plugin.pMixPlugin)
{
- wsprintf(s, "(%d%% wet, %d%% dry)", 100 - n, n);
+ wsprintf(s, "%d%% wet, %d%% dry", 100 - n, n);
SetDlgItemText(IDC_STATIC8, s);
plugin.fDryRatio = static_cast<float>(n) / 100.0f;
SetPluginModified();
}
}
}
- //end rewbs.dryRatio
if (bUpdate) pModDoc->UpdateAllViews(this, GeneralHint(nChn).Channels());
UnlockControls();
@@ -793,7 +791,7 @@
{
CModDoc *pModDoc = GetDocument();
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- CHAR s[32];
+ TCHAR s[32];
if((m_nCurrentPlugin >= MAX_MIXPLUGINS) || (!pModDoc)) return;
@@ -810,11 +808,12 @@
plugin.SetGain(gain);
float fValue = 0.1f * (float)gain;
- sprintf(s,"Gain: x %1.1f",fValue);
- SetDlgItemText(IDC_STATIC2, s);
+ _stprintf(s, _T("Gain: x %1.1f"), fValue);
+ SetDlgItemText(IDC_EDIT16, s);
SetPluginModified();
}
+ m_SpinMixGain.SetFocus();
}
CFormView::OnVScroll(nSBCode, nPos, pScrollBar);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-18 20:16:54
|
Revision: 5334
http://sourceforge.net/p/modplug/code/5334
Author: manxorist
Date: 2015-06-18 20:16:48 +0000 (Thu, 18 Jun 2015)
Log Message:
-----------
[Ref] sounddev: Move migration of old global defaults and migration of default DirectSound device from the general startup code in InitInstance into a separate function in class TrackerSettings.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/TrackerSettings.cpp
trunk/OpenMPT/mptrack/TrackerSettings.h
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-18 10:05:07 UTC (rev 5333)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-18 20:16:48 UTC (rev 5334)
@@ -991,58 +991,7 @@
// Load sound APIs
m_pSoundDevicesManager = new SoundDevice::Manager(SoundDevice::AppInfo().SetName(MPT_USTRING("OpenMPT")).SetHWND(*m_pMainWnd));
- if(TrackerSettings::Instance().m_SoundDeviceSettingsUseOldDefaults)
- {
- // get the old default device
- TrackerSettings::Instance().SetSoundDeviceIdentifier(SoundDevice::Legacy::FindDeviceInfo(*m_pSoundDevicesManager, TrackerSettings::Instance().m_SoundDeviceID_DEPRECATED).GetIdentifier());
- // apply old global sound device settings to each found device
- for(std::vector<SoundDevice::Info>::const_iterator it = m_pSoundDevicesManager->begin(); it != m_pSoundDevicesManager->end(); ++it)
- {
- TrackerSettings::Instance().SetSoundDeviceSettings(it->GetIdentifier(), TrackerSettings::Instance().GetSoundDeviceSettingsDefaults());
- }
- }
-#ifndef NO_DSOUND
- if(TrackerSettings::Instance().m_SoundDeviceDirectSoundOldDefaultIdentifier)
- {
- mpt::ustring oldIdentifier = SoundDevice::Legacy::GetDirectSoundDefaultDeviceIdentifierPre_1_25_00_04();
- mpt::ustring newIdentifier = SoundDevice::Legacy::GetDirectSoundDefaultDeviceIdentifier_1_25_00_04();
- if(!oldIdentifier.empty())
- {
- SoundDevice::Info info = m_pSoundDevicesManager->FindDeviceInfo(newIdentifier);
- if(info.IsValid())
- {
- SoundDevice::Settings defaults =
- TrackerSettings::Instance().m_SoundDeviceSettingsUseOldDefaults ?
- TrackerSettings::Instance().GetSoundDeviceSettingsDefaults()
- :
- m_pSoundDevicesManager->GetDeviceCaps(newIdentifier).DefaultSettings
- ;
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"Latency",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"Latency", Util::Round<int32>(defaults.Latency * 1000000.0)));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"UpdateInterval",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"UpdateInterval", Util::Round<int32>(defaults.UpdateInterval * 1000000.0)));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"SampleRate",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"SampleRate", defaults.Samplerate));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"Channels",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"Channels", defaults.Channels.GetNumHostChannels()));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"SampleFormat",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"SampleFormat", defaults.sampleFormat));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"ExclusiveMode",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"ExclusiveMode", defaults.ExclusiveMode));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"BoostThreadPriority",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"BoostThreadPriority", defaults.BoostThreadPriority));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"KeepDeviceRunning",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"KeepDeviceRunning", defaults.KeepDeviceRunning));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"UseHardwareTiming",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"UseHardwareTiming", defaults.UseHardwareTiming));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"DitherType",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"DitherType", defaults.DitherType));
- m_pSettings->Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"ChannelMapping",
- m_pSettings->Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"ChannelMapping", defaults.Channels));
- }
- }
- }
-#endif // !NO_DSOUND
+ m_pTrackerSettings->MigrateOldSoundDeviceSettings(*m_pSoundDevicesManager);
// Load static tunings
CSoundFile::LoadStaticTunings();
@@ -1072,7 +1021,11 @@
m_bInitialized = TRUE;
+ EndWaitCursor();
+
+ // Perform startup tasks.
+
if(TrackerSettings::Instance().FirstRun)
{
@@ -1099,8 +1052,6 @@
}
- EndWaitCursor();
-
#ifdef _DEBUG
if(!cmdInfo.m_bNoTests)
Test::DoTests();
@@ -1113,6 +1064,7 @@
pMainFrame->PlayPreview();
}
+
return TRUE;
}
Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-18 10:05:07 UTC (rev 5333)
+++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-06-18 20:16:48 UTC (rev 5334)
@@ -631,6 +631,64 @@
}
+void TrackerSettings::MigrateOldSoundDeviceSettings(SoundDevice::Manager &manager)
+//--------------------------------------------------------------------------------
+{
+ if(m_SoundDeviceSettingsUseOldDefaults)
+ {
+ // get the old default device
+ SetSoundDeviceIdentifier(SoundDevice::Legacy::FindDeviceInfo(manager, m_SoundDeviceID_DEPRECATED).GetIdentifier());
+ // apply old global sound device settings to each found device
+ for(std::vector<SoundDevice::Info>::const_iterator it = manager.begin(); it != manager.end(); ++it)
+ {
+ SetSoundDeviceSettings(it->GetIdentifier(), GetSoundDeviceSettingsDefaults());
+ }
+ }
+#ifndef NO_DSOUND
+ if(m_SoundDeviceDirectSoundOldDefaultIdentifier)
+ {
+ mpt::ustring oldIdentifier = SoundDevice::Legacy::GetDirectSoundDefaultDeviceIdentifierPre_1_25_00_04();
+ mpt::ustring newIdentifier = SoundDevice::Legacy::GetDirectSoundDefaultDeviceIdentifier_1_25_00_04();
+ if(!oldIdentifier.empty())
+ {
+ SoundDevice::Info info = manager.FindDeviceInfo(newIdentifier);
+ if(info.IsValid())
+ {
+ SoundDevice::Settings defaults =
+ m_SoundDeviceSettingsUseOldDefaults ?
+ GetSoundDeviceSettingsDefaults()
+ :
+ manager.GetDeviceCaps(newIdentifier).DefaultSettings
+ ;
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"Latency",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"Latency", Util::Round<int32>(defaults.Latency * 1000000.0)));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"UpdateInterval",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"UpdateInterval", Util::Round<int32>(defaults.UpdateInterval * 1000000.0)));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"SampleRate",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"SampleRate", defaults.Samplerate));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"Channels",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"Channels", defaults.Channels.GetNumHostChannels()));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"SampleFormat",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"SampleFormat", defaults.sampleFormat));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"ExclusiveMode",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"ExclusiveMode", defaults.ExclusiveMode));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"BoostThreadPriority",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"BoostThreadPriority", defaults.BoostThreadPriority));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"KeepDeviceRunning",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"KeepDeviceRunning", defaults.KeepDeviceRunning));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"UseHardwareTiming",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"UseHardwareTiming", defaults.UseHardwareTiming));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"DitherType",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"DitherType", defaults.DitherType));
+ conf.Write(L"Sound Settings", mpt::ToWide(newIdentifier) + L"_" + L"ChannelMapping",
+ conf.Read(L"Sound Settings", mpt::ToWide(oldIdentifier) + L"_" + L"ChannelMapping", defaults.Channels));
+ }
+ }
+ }
+#endif // !NO_DSOUND
+}
+
+
struct StoredSoundDeviceSettings
{
Modified: trunk/OpenMPT/mptrack/TrackerSettings.h
===================================================================
--- trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-18 10:05:07 UTC (rev 5333)
+++ trunk/OpenMPT/mptrack/TrackerSettings.h 2015-06-18 20:16:48 UTC (rev 5334)
@@ -29,7 +29,11 @@
OPENMPT_NAMESPACE_BEGIN
+namespace SoundDevice {
+class Manager;
+} // namespace SoundDevice
+
// User-defined colors
enum
{
@@ -686,6 +690,8 @@
TrackerSettings(SettingsContainer &conf);
+ void MigrateOldSoundDeviceSettings(SoundDevice::Manager &manager);
+
void SaveSettings();
static void GetDefaultColourScheme(COLORREF (&colours)[MAX_MODCOLORS]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-19 09:23:32
|
Revision: 5336
http://sourceforge.net/p/modplug/code/5336
Author: manxorist
Date: 2015-06-19 09:23:27 +0000 (Fri, 19 Jun 2015)
Log Message:
-----------
[Ref] Kill CTrackApp::m_bInitialized. Does not do anything useful.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-19 09:07:45 UTC (rev 5335)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-19 09:23:27 UTC (rev 5336)
@@ -660,7 +660,6 @@
m_pModTemplate = NULL;
m_pPluginManager = NULL;
m_pSoundDevicesManager = nullptr;
- m_bInitialized = FALSE;
}
@@ -1030,8 +1029,6 @@
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
- m_bInitialized = TRUE;
-
EndWaitCursor();
@@ -1126,7 +1123,6 @@
void CTrackApp::OnFileNew()
//-------------------------
{
- if (!m_bInitialized) return;
// Build from template
const mpt::PathString templateFile = TrackerSettings::Instance().defaultTemplateFile;
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2015-06-19 09:07:45 UTC (rev 5335)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2015-06-19 09:23:27 UTC (rev 5336)
@@ -212,7 +212,6 @@
CModDocTemplate *m_pModTemplate;
CVstPluginManager *m_pPluginManager;
SoundDevice::Manager *m_pSoundDevicesManager;
- BOOL m_bInitialized;
DWORD m_dwLastPluginIdleCall;
// Default macro configuration
MIDIMacroConfig m_MidiCfg;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2015-06-19 20:57:04
|
Revision: 5348
http://sourceforge.net/p/modplug/code/5348
Author: manxorist
Date: 2015-06-19 20:56:58 +0000 (Fri, 19 Jun 2015)
Log Message:
-----------
[Ref] Cleanup splash screen startup logic.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/mptrack.rc
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-19 19:07:56 UTC (rev 5347)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2015-06-19 20:56:58 UTC (rev 5348)
@@ -1297,7 +1297,7 @@
PNG::Bitmap *bitmap;
public:
- CSplashScreen(CWnd *parent);
+ CSplashScreen();
~CSplashScreen();
virtual BOOL OnInitDialog();
virtual void OnOK();
@@ -1318,11 +1318,10 @@
static DWORD gSplashScreenStartTime = 0;
-CSplashScreen::CSplashScreen(CWnd *parent)
-//----------------------------------------
+CSplashScreen::CSplashScreen()
+//----------------------------
{
bitmap = PNG::ReadPNG(MAKEINTRESOURCE(IDB_SPLASHNOFOLDFIN));
- Create(IDD_SPLASHSCREEN, parent);
}
@@ -1353,26 +1352,21 @@
BOOL CSplashScreen::OnInitDialog()
//--------------------------------
{
+ CDialog::OnInitDialog();
+
CDC *dc = GetDC();
bitmap->ToDIB(m_Bitmap, dc);
ReleaseDC(dc);
CRect rect;
- int cx, cy, newcx, newcy;
+ GetWindowRect(&rect);
+ SetWindowPos(nullptr,
+ rect.left - ((static_cast<int32>(bitmap->width) - rect.Width()) / 2),
+ rect.top - ((static_cast<int32>(bitmap->height) - rect.Height()) / 2),
+ bitmap->width,
+ bitmap->height,
+ SWP_NOZORDER | SWP_NOCOPYBITS);
- CDialog::OnInitDialog();
-
- GetWindowRect(&rect);
- cx = rect.Width();
- cy = rect.Height();
- newcx = bitmap->width;
- newcy = bitmap->height;
- if(newcx && newcy)
- {
- rect.left -= (newcx - cx) / 2;
- rect.top -= (newcy - cy) / 2;
- SetWindowPos(nullptr, rect.left, rect.top, newcx, newcy, SWP_NOCOPYBITS | SWP_NOZORDER);
- }
return TRUE;
}
@@ -1380,22 +1374,17 @@
void CSplashScreen::OnOK()
//------------------------
{
- if (gpSplashScreen)
- {
- EndWaitCursor();
- gpSplashScreen = NULL;
- }
- DestroyWindow();
- delete this;
+ StopSplashScreen();
}
static void StartSplashScreen()
//-----------------------------
{
- if (!gpSplashScreen)
+ if(!gpSplashScreen)
{
- gpSplashScreen = new CSplashScreen(theApp.m_pMainWnd);
+ gpSplashScreen = new CSplashScreen();
+ gpSplashScreen->Create(IDD_SPLASHSCREEN, theApp.m_pMainWnd);
gpSplashScreen->ShowWindow(SW_SHOW);
gpSplashScreen->UpdateWindow();
gpSplashScreen->BeginWaitCursor();
@@ -1407,11 +1396,12 @@
static void StopSplashScreen()
//----------------------------
{
- if (gpSplashScreen)
+ if(gpSplashScreen)
{
gpSplashScreen->EndWaitCursor();
gpSplashScreen->DestroyWindow();
delete gpSplashScreen;
+ gpSplashScreen = nullptr;
}
}
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2015-06-19 19:07:56 UTC (rev 5347)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2015-06-19 20:56:58 UTC (rev 5348)
@@ -1501,7 +1501,7 @@
LTEXT "In ""Relative"" base note mode, all notes are relative to a previously entered note in the pattern cell where the chord is entered.",IDC_STATIC,6,136,234,20
END
-IDD_SPLASHSCREEN DIALOGEX 0, 0, 188, 95
+IDD_SPLASHSCREEN DIALOGEX 0, 0, 266, 188
STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|