summaryrefslogtreecommitdiff
path: root/src/render/mglfunctions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/mglfunctions.h')
-rw-r--r--src/render/mglfunctions.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/render/mglfunctions.h b/src/render/mglfunctions.h
index 59f05e190..900042710 100644
--- a/src/render/mglfunctions.h
+++ b/src/render/mglfunctions.h
@@ -36,23 +36,27 @@
reinterpret_cast<const GLubyte*>(name))
#endif
-#define assignFunction(func, name) m##func \
- = reinterpret_cast<func##_t>(getFunction(name)); \
- if (m##func == nullptr) \
- logger->log(std::string("function not found: ") + name); \
- else \
- logger->log(std::string("assigned function: ") + name);
-
-#define assignFunctionEmu(func, name) m##func \
- = reinterpret_cast<func##_t>(getFunction(name)); \
- if (m##func == nullptr) \
+#define assignFunction(func, name) \
{ \
- m##func = emu##func; \
- logger->log(std::string("emulated function: ") + name); \
- } \
- else \
+ m##func = reinterpret_cast<func##_t>(getFunction(name)); \
+ if (m##func == nullptr) \
+ logger->log(std::string("function not found: ") + name); \
+ else \
+ logger->log(std::string("assigned function: ") + name); \
+ }
+
+#define assignFunctionEmu(func, name) \
{ \
- logger->log(std::string("assigned function: ") + name); \
+ m##func = reinterpret_cast<func##_t>(getFunction(name)); \
+ if (m##func == nullptr) \
+ { \
+ m##func = emu##func; \
+ logger->log(std::string("emulated function: ") + name); \
+ } \
+ else \
+ { \
+ logger->log(std::string("assigned function: ") + name); \
+ } \
}
#define emulateFunction(func) m##func = emu##func; \