diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2026-03-07 00:05:10 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 21:05:10 +0000 |
| commit | a5858018d896e0e0f0db517f893cd9a0936dd881 (patch) | |
| tree | 64bec75dc882ea27d5ee62a6ba25b22fa78146ae /src/debug/HyprCtl.cpp | |
| parent | 8685fd7b0c2afe06c798554dea80c53f98d73894 (diff) | |
renderer: shader variants refactor (#13434)
Part 0 of renderer reworks.
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 417767e1..3f51e8df 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -2049,7 +2049,12 @@ static std::string submapRequest(eHyprCtlOutputFormat format, std::string reques } static std::string reloadShaders(eHyprCtlOutputFormat format, std::string request) { - if (g_pHyprOpenGL->initShaders()) + CVarList vars(request, 0, ' '); + + if (vars.size() > 2) + return "too many args"; + + if (g_pHyprOpenGL && g_pHyprRenderer->reloadShaders(vars.size() == 2 ? vars[1] : "")) return format == FORMAT_JSON ? "{\"ok\": true}" : "ok"; else return format == FORMAT_JSON ? "{\"ok\": false}" : "error"; @@ -2076,8 +2081,8 @@ CHyprCtl::CHyprCtl() { registerCommand(SHyprCtlCommand{"locked", true, getIsLocked}); registerCommand(SHyprCtlCommand{"descriptions", true, getDescriptions}); registerCommand(SHyprCtlCommand{"submap", true, submapRequest}); - registerCommand(SHyprCtlCommand{.name = "reloadshaders", .exact = true, .fn = reloadShaders}); + registerCommand(SHyprCtlCommand{.name = "reloadshaders", .exact = false, .fn = reloadShaders}); registerCommand(SHyprCtlCommand{"monitors", false, monitorsRequest}); registerCommand(SHyprCtlCommand{"reload", false, reloadRequest}); registerCommand(SHyprCtlCommand{"plugin", false, dispatchPlugin}); |
