Skip to content

Commit

Permalink
dropped enhanceddisplayswitch, use native displayswitch
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne committed Nov 10, 2024
1 parent b9effdc commit cb767fd
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions BigPictureTV.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17 silent lrelease embed_translations

QM_FILES_RESOURCE_PREFIX = /translations
DEPENDENCIES_DIR = $$PWD/dependencies
DEST_DIR = $$OUT_PWD/release/dependencies

INCLUDEPATH += \
AudioManager \
Expand Down Expand Up @@ -50,5 +48,3 @@ RESOURCES += \
RC_FILE = Resources/appicon.rc

LIBS += -lole32 -luser32 -ladvapi32 -lshell32

QMAKE_POST_LINK += powershell -Command "New-Item -ItemType Directory -Path '$$DEST_DIR' -Force; Copy-Item -Path '$$DEPENDENCIES_DIR\*' -Destination '$$DEST_DIR' -Recurse -Force"
2 changes: 1 addition & 1 deletion BigPictureTV/BigPictureTV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void BigPictureTV::handleMonitorChanges(bool isDesktopMode, bool disableVideo)
}

if (command) {
Utils::runEnhancedDisplayswitch(command);
Utils::runDisplayswitch(command);
}
}

Expand Down
5 changes: 2 additions & 3 deletions Utils/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
#include <QCoreApplication>
#include <QFileInfo>

void Utils::runEnhancedDisplayswitch(const QString &command)
void Utils::runDisplayswitch(const QString &command)
{
QProcess process;
QString executablePath = "dependencies/EnhancedDisplaySwitch.exe";
process.start(executablePath, QStringList() << command);
process.start("displayswitch.exe", QStringList() << command);
process.waitForFinished();
}

Expand Down
2 changes: 1 addition & 1 deletion Utils/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <QFrame>

namespace Utils {
void runEnhancedDisplayswitch(const QString &command);
void runDisplayswitch(const QString &command);
QIcon getIconForTheme();
QString getActivePowerPlan();
void setPowerPlan(QString planGuid);
Expand Down
Binary file removed dependencies/EnhancedDisplaySwitch.exe
Binary file not shown.

0 comments on commit cb767fd

Please sign in to comment.