diff options
author | Lioncash <mathew1800@gmail.com> | 2019-05-14 18:12:57 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-05-19 20:12:20 +0200 |
commit | 91ec251c4abe34373880ba0660954a688ecf6324 (patch) | |
tree | 526498f65800c81abe7d8525e396f7728437ce9f /src | |
parent | Merge pull request #2441 from ReinUsesLisp/al2p (diff) | |
download | yuzu-91ec251c4abe34373880ba0660954a688ecf6324.tar yuzu-91ec251c4abe34373880ba0660954a688ecf6324.tar.gz yuzu-91ec251c4abe34373880ba0660954a688ecf6324.tar.bz2 yuzu-91ec251c4abe34373880ba0660954a688ecf6324.tar.lz yuzu-91ec251c4abe34373880ba0660954a688ecf6324.tar.xz yuzu-91ec251c4abe34373880ba0660954a688ecf6324.tar.zst yuzu-91ec251c4abe34373880ba0660954a688ecf6324.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 4bff54a59..58304285f 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -69,6 +69,17 @@ public: AddNewLine(); } + // Overload the forwards all arguments directly to libfmt. + // Note that all formatting requirements for fmt must be + // obeyed when using this function. (e.g. {{ must be used + // printing the character '{' is desirable. Ditto for }} and '}', + // etc). + template <typename... Args> + void AddLine(std::string_view text, Args&&... args) { + AddExpression(fmt::format(text, std::forward<Args>(args)...)); + AddNewLine(); + } + void AddNewLine() { DEBUG_ASSERT(scope >= 0); shader_source += '\n'; |