mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-10 18:18:49 +00:00
Introduce an Event system to VideoCommon
A lot of the remaining complexity in Renderer is the massive Swap function which tries to handle a bunch of FrameBegin/FrameEnd events. Rather than create a new place for it. This event system will try to distribute it all over the place
This commit is contained in:
parent
d6cd8de1a7
commit
154cb4f722
6 changed files with 186 additions and 0 deletions
17
Source/Core/Common/StringLiteral.h
Normal file
17
Source/Core/Common/StringLiteral.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2023 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// A useful template for passing string literals as arguments to templates
|
||||
// from: https://ctrpeach.io/posts/cpp20-string-literal-template-parameters/
|
||||
template<size_t N>
|
||||
struct StringLiteral {
|
||||
consteval StringLiteral(const char (&str)[N]) {
|
||||
std::copy_n(str, N, value);
|
||||
}
|
||||
|
||||
char value[N];
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue