diff --git a/src/main.cpp b/src/main.cpp index e910fbf..0d098b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,12 +6,12 @@ #include -#define USE_GPU_ENGINE 0 -extern "C" -{ - __declspec(dllexport) unsigned long NvOptimusEnablement = USE_GPU_ENGINE; - __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = USE_GPU_ENGINE; +#if defined(_WIN32) || defined(_WIN64) +extern "C" { + __declspec(dllexport) unsigned long NvOptimusEnablement = USE_GPU_ENGINE; + __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = USE_GPU_ENGINE; } +#endif static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods) diff --git a/thirdparty/stb_image/include/stb_image/stb_image.h b/thirdparty/stb_image/include/stb_image/stb_image.h index c0836cf..01eb7b3 100644 --- a/thirdparty/stb_image/include/stb_image/stb_image.h +++ b/thirdparty/stb_image/include/stb_image/stb_image.h @@ -337,6 +337,7 @@ RECENT REVISION HISTORY: // very big. #include +#include inline void *STBIMAGE_CUSTOM_REALOC(void *p, size_t oldSize, size_t newsz) {