From 4ca1decd4e64a1741e7835fb73e0fbc71f04acb1 Mon Sep 17 00:00:00 2001 From: Angel Xex Date: Mon, 7 Feb 2022 22:53:14 -0300 Subject: [PATCH 1/2] OC with ShaderMania --- source/UI/playerWindows.cpp | 4 ++++ source/libmpv.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/source/UI/playerWindows.cpp b/source/UI/playerWindows.cpp index d0b3d75..1bfdf29 100644 --- a/source/UI/playerWindows.cpp +++ b/source/UI/playerWindows.cpp @@ -4,9 +4,13 @@ #include "imgui.h" #include "utils.h" #include "imgui_internal.h" +#ifdef NXMP_SWITCH #include "SwitchSys.h" +#endif #ifdef NXMP_SWITCH + + using namespace c2d; #endif diff --git a/source/libmpv.cpp b/source/libmpv.cpp index 08d1994..4d2f742 100644 --- a/source/libmpv.cpp +++ b/source/libmpv.cpp @@ -3,7 +3,13 @@ #include #include "libmpv.h" #include "utils.h" +#ifdef NXMP_SWITCH +#include "SwitchSys.h" +#endif +#ifdef NXMP_SWITCH +using namespace c2d; +#endif bool codecSort(const decoderlist_struct &a, const decoderlist_struct &b) { @@ -677,9 +683,15 @@ bool libMpv::getAudioNormalize(){ void libMpv::setShader(std::string _filename){ std::string command = std::string("no-osd change-list glsl-shaders set ") + _filename; mpv_command_string(handle,command.c_str()); + #ifdef NXMP_SWITCH + SwitchSys::maxClock(); + #endif } void libMpv::clearShader(){ mpv_command_string(handle,"no-osd change-list glsl-shaders clr \"\""); + #ifdef NXMP_SWITCH + SwitchSys::defaultClock(SwitchSys::stock_cpu_clock, SwitchSys::stock_gpu_clock, SwitchSys::stock_emc_clock); + #endif } void libMpv::resetFileInfo(){ From b2648809bcbb1c5467c9393beb011378c3876a23 Mon Sep 17 00:00:00 2001 From: Angel Xex Date: Mon, 7 Feb 2022 22:55:12 -0300 Subject: [PATCH 2/2] Update playerWindows.cpp --- source/UI/playerWindows.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/UI/playerWindows.cpp b/source/UI/playerWindows.cpp index 1bfdf29..9dab417 100644 --- a/source/UI/playerWindows.cpp +++ b/source/UI/playerWindows.cpp @@ -9,8 +9,6 @@ #endif #ifdef NXMP_SWITCH - - using namespace c2d; #endif