mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 15:45:40 +12:00
Fix async shader compiler on Windows
This commit is contained in:
parent
0793032ece
commit
927a19d4f5
2 changed files with 19 additions and 0 deletions
|
@ -19,6 +19,14 @@ public:
|
|||
/// Prevents the function from being invoked when we go out of scope.
|
||||
ALWAYS_INLINE void Cancel() { m_func.reset(); }
|
||||
|
||||
/// Runs the destructor function now instead of when we go out of scope.
|
||||
ALWAYS_INLINE void Run() {
|
||||
if (!m_func.has_value()) return;
|
||||
|
||||
m_func.value()();
|
||||
m_func.reset();
|
||||
}
|
||||
|
||||
/// Explicitly fires the function.
|
||||
ALWAYS_INLINE void Invoke()
|
||||
{
|
||||
|
|
11
third_party/duckstation/gl/context_wgl.cpp
vendored
11
third_party/duckstation/gl/context_wgl.cpp
vendored
|
@ -19,6 +19,17 @@ static void* GetProcAddressCallback(const char* name)
|
|||
}
|
||||
|
||||
namespace GL {
|
||||
static bool ReloadWGL(HDC dc)
|
||||
{
|
||||
if (!gladLoadWGL(dc))
|
||||
{
|
||||
Log_ErrorPrint("Loading GLAD WGL functions failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ContextWGL::ContextWGL(const WindowInfo& wi) : Context(wi) {}
|
||||
|
||||
ContextWGL::~ContextWGL()
|
||||
|
|
Loading…
Add table
Reference in a new issue