Skip to content

Commit

Permalink
[Renderer] Added missing calling convention in FnPtr template declara…
Browse files Browse the repository at this point in the history
…tion

This fixes compilation of Windows x86 builds when creating template instantiations of FnPtr with functions using __stdcall.
  • Loading branch information
pzychotic committed Oct 27, 2024
1 parent 73d2764 commit 09a9619
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renderer/dyna_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ inline void CheckError() {

template <typename T> struct FnPtr;
template <typename Ret, typename... Args>
struct FnPtr<Ret(Args...)> {
struct FnPtr<Ret GLFUNCCALL(Args...)> {
explicit FnPtr(std::string_view name, bool optional = false);

Ret operator()(Args... args) const {
Expand Down Expand Up @@ -99,7 +99,7 @@ static void LoadGLFnPtrs() {
}

template<typename Ret, typename... Args>
FnPtr<Ret(Args...)>::FnPtr(std::string_view name, bool optional) : fn_{} {
FnPtr<Ret GLFUNCCALL(Args...)>::FnPtr(std::string_view name, bool optional) : fn_{} {
inits_.push_back(std::make_tuple(reinterpret_cast<void**>(&fn_), name, optional));
}

Expand Down

0 comments on commit 09a9619

Please sign in to comment.