diff --git a/3RVX/3RVX.cpp b/3RVX/3RVX.cpp
index 438f9313..b146b957 100644
--- a/3RVX/3RVX.cpp
+++ b/3RVX/3RVX.cpp
@@ -210,8 +210,7 @@ LRESULT CALLBACK WndProc(
break;
case MSG_SETTINGS:
- CLOG(L"Launching settings editor");
- /* TODO: launch! */
+ Settings::LaunchSettingsApp();
break;
case MSG_HIDEOSD:
diff --git a/3RVX/3RVX.vcxproj b/3RVX/3RVX.vcxproj
index 82fadfaa..406121fb 100644
--- a/3RVX/3RVX.vcxproj
+++ b/3RVX/3RVX.vcxproj
@@ -55,7 +55,7 @@
Wtsapi32.lib;winmm.lib;%(AdditionalDependencies)
- robocopy /MIR /XO /NP "$(ProjectDir)Skins" "$(TargetDir)\Skins" 2>&1 || exit /B 0
+ mklink /j "$(TargetDir)\Skins" "$(ProjectDir)Skins" || exit /B 0
@@ -73,8 +73,7 @@
Wtsapi32.lib;winmm.lib;%(AdditionalDependencies)
-
-
+ mklink /j "$(TargetDir)\Skins" "$(ProjectDir)Skins" || exit /B 0
diff --git a/3RVX/Error.h b/3RVX/Error.h
index 79e058ec..da20cbba 100644
--- a/3RVX/Error.h
+++ b/3RVX/Error.h
@@ -5,6 +5,8 @@
#define GENERR (0x1 << 7)
#define SKINERR (GENERR << 8)
+#define GENERR_NOTFOUND GENERR + 1
+
#define SKINERR_INVALID_SKIN SKINERR + 1
#define SKINERR_INVALID_OSD SKINERR + 2
#define SKINERR_INVALID_METER SKINERR + 3
diff --git a/3RVX/OSD/EjectOSD.cpp b/3RVX/OSD/EjectOSD.cpp
index 6eb04ee4..2c94636b 100644
--- a/3RVX/OSD/EjectOSD.cpp
+++ b/3RVX/OSD/EjectOSD.cpp
@@ -18,8 +18,7 @@ OSD(L"3RVX-EjectDispatcher") {
Gdiplus::Bitmap *bg = skin->OSDBgImg("eject");
_mWnd->BackgroundImage(bg);
_mWnd->Update();
-
- _mWnd->VisibleDuration(800);
+ _mWnd->VisibleDuration(Settings::Instance()->HideDelay());
HMONITOR monitor = Monitor::Primary();
PositionWindow(monitor, *_mWnd);
diff --git a/3RVX/OSD/VolumeOSD.cpp b/3RVX/OSD/VolumeOSD.cpp
index 8d13a08e..0fb47be5 100644
--- a/3RVX/OSD/VolumeOSD.cpp
+++ b/3RVX/OSD/VolumeOSD.cpp
@@ -47,11 +47,12 @@ _muteWnd(L"3RVX-MasterMuteOSD", L"3RVX-MasterMuteOSD")
UpdateDeviceMenu();
+ Settings *settings = Settings::Instance();
FadeOut *fOut = new FadeOut();
_mWnd.HideAnimation(fOut);
- _mWnd.VisibleDuration(800);
+ _mWnd.VisibleDuration(settings->HideDelay());
_muteWnd.HideAnimation(fOut);
- _muteWnd.VisibleDuration(800);
+ _muteWnd.VisibleDuration(settings->HideDelay());
UpdateIcon();
float v = _volumeCtrl->Volume();
@@ -174,16 +175,24 @@ void VolumeOSD::UpdateIconTip() {
}
}
+void VolumeOSD::UnMute() {
+ if (_volumeCtrl->Muted() == true) {
+ _volumeCtrl->Muted(false);
+ }
+}
+
void VolumeOSD::ProcessHotkeys(HotkeyInfo &hki) {
float currentVol = _volumeCtrl->Volume();
switch (hki.action) {
case HotkeyInfo::IncreaseVolume:
+ UnMute();
_volumeCtrl->Volume(currentVol + _defaultIncrement);
SendMessage(_hWnd, MSG_VOL_CHNG, NULL, NULL);
break;
case HotkeyInfo::DecreaseVolume:
- _volumeCtrl->Volume(currentVol - _defaultIncrement);
+ UnMute();
+ _volumeCtrl->Volume(currentVol - _defaultIncrement - 0.0001f);
SendMessage(_hWnd, MSG_VOL_CHNG, NULL, NULL);
break;
@@ -239,9 +248,7 @@ VolumeOSD::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
int menuItem = LOWORD(wParam);
switch (menuItem) {
case MENU_SETTINGS:
- CLOG(L"Opening Settings App: %s", Settings::SettingsApp().c_str());
- ShellExecute(NULL, L"open",
- Settings::SettingsApp().c_str(), NULL, NULL, SW_SHOWNORMAL);
+ Settings::LaunchSettingsApp();
break;
case MENU_MIXER: {
diff --git a/3RVX/OSD/VolumeOSD.h b/3RVX/OSD/VolumeOSD.h
index 57aad0da..b6a29385 100644
--- a/3RVX/OSD/VolumeOSD.h
+++ b/3RVX/OSD/VolumeOSD.h
@@ -45,6 +45,7 @@ class VolumeOSD : public OSD {
void UpdateIconImage();
void UpdateIconTip();
void UpdateDeviceMenu();
+ void UnMute();
virtual LRESULT
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
diff --git a/3RVX/Settings.cpp b/3RVX/Settings.cpp
index a2d2d29e..ab8cad07 100644
--- a/3RVX/Settings.cpp
+++ b/3RVX/Settings.cpp
@@ -3,6 +3,7 @@
#include
#include
+#include "Error.h"
#include "HotkeyActions.h"
#include "HotkeyInfo.h"
#include "Logger.h"
@@ -42,10 +43,6 @@ std::vector Settings::HideAnimNames = {
L"fade"
};
-Settings::Settings() {
-
-}
-
Settings *Settings::Instance() {
if (instance == NULL) {
instance = new Settings();
@@ -107,6 +104,18 @@ std::wstring Settings::LanguagesDir() {
return AppDir() + L"\\" + LANG_DIR;
}
+void Settings::LaunchSettingsApp() {
+ std::wstring app = SettingsApp();
+
+ CLOG(L"Opening Settings App: %s", app.c_str());
+ int exec = (int) ShellExecute(
+ NULL, L"open", app.c_str(), NULL, NULL, SW_SHOWNORMAL);
+
+ if (exec <= 32) {
+ Error::ErrorMessage(GENERR_NOTFOUND, app);
+ }
+}
+
std::wstring Settings::AudioDeviceID() {
return GetText(XML_AUDIODEV);
}
diff --git a/3RVX/Settings.h b/3RVX/Settings.h
index e70ad4e2..9d24c85c 100644
--- a/3RVX/Settings.h
+++ b/3RVX/Settings.h
@@ -44,6 +44,7 @@ class Settings {
static std::wstring AppDir();
static std::wstring SkinDir();
static std::wstring SettingsApp();
+ static void LaunchSettingsApp();
std::wstring AudioDeviceID();
@@ -88,7 +89,9 @@ class Settings {
void Hotkeys(std::vector hotkeys);
private:
- Settings();
+ Settings() {
+
+ }
static Settings *instance;
static std::wstring _appDir;
diff --git a/3RVX/skins/Classic/OSD/volume_bg.png b/3RVX/skins/Classic/OSD/volume.png
similarity index 100%
rename from 3RVX/skins/Classic/OSD/volume_bg.png
rename to 3RVX/skins/Classic/OSD/volume.png
diff --git a/3RVX/skins/Classic/skin.xml b/3RVX/skins/Classic/skin.xml
index 6f2be0db..78c12907 100644
--- a/3RVX/skins/Classic/skin.xml
+++ b/3RVX/skins/Classic/skin.xml
@@ -1,12 +1,12 @@
-
-
+ Steve Jobs
+ http://www.apple.com
-
+
@@ -17,8 +17,8 @@
-
-
+
diff --git a/SettingsUI/SettingsUI.vcxproj b/SettingsUI/SettingsUI.vcxproj
index 97d4430b..370941ff 100644
--- a/SettingsUI/SettingsUI.vcxproj
+++ b/SettingsUI/SettingsUI.vcxproj
@@ -75,6 +75,9 @@
_DEBUG;%(PreprocessorDefinitions)
$(IntDir);%(AdditionalIncludeDirectories)
+
+ mklink /j "$(TargetDir)\Skins" "$(ProjectDir)Skins" || exit /B 0
+
@@ -102,6 +105,9 @@
NDEBUG;%(PreprocessorDefinitions)
$(IntDir);%(AdditionalIncludeDirectories)
+
+ mklink /j "$(TargetDir)\Skins" "$(ProjectDir)Skins" || exit /B 0
+