DisplayError on call nonexistent GL commands only if pj64 debugger on

This commit is contained in:
unknown 2015-03-04 20:40:31 -05:00
parent d52605ec01
commit 367ef048e0
1 changed files with 8 additions and 0 deletions

View File

@ -22,6 +22,12 @@
#include <IL/il.h> #include <IL/il.h>
#endif #endif
/*
* `GetSystemSetting` and `FindSystemSettingId` from Project64 debugger
* used only in DisplayError when OpenGL extension loading fails on WGL
*/
#include "../Settings/Settings.h"
struct ResolutionInfo struct ResolutionInfo
{ {
unsigned int dwW, dwH, dwF; unsigned int dwW, dwH, dwF;
@ -259,6 +265,8 @@ static inline void opt_glCopyTexImage2D( GLenum target,
void DisplayError(const char * message) void DisplayError(const char * message)
{ {
if (GetSystemSetting(FindSystemSettingId("Debugger")) == 0)
return;
MessageBoxA(NULL, message, NULL, MB_ICONERROR); MessageBoxA(NULL, message, NULL, MB_ICONERROR);
return; return;
} }