diff options
-rw-r--r-- | pugl/detail/implementation.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pugl/detail/implementation.c b/pugl/detail/implementation.c index 055e917..dbb0c5f 100644 --- a/pugl/detail/implementation.c +++ b/pugl/detail/implementation.c @@ -241,6 +241,19 @@ puglGetWorld(PuglView* view) PuglStatus puglSetViewHint(PuglView* view, PuglViewHint hint, int value) { + if (value == PUGL_DONT_CARE) { + switch (hint) { + case PUGL_USE_COMPAT_PROFILE: + case PUGL_USE_DEBUG_CONTEXT: + case PUGL_CONTEXT_VERSION_MAJOR: + case PUGL_CONTEXT_VERSION_MINOR: + case PUGL_SWAP_INTERVAL: + return PUGL_BAD_PARAMETER; + default: + break; + } + } + if (hint < PUGL_NUM_VIEW_HINTS) { view->hints[hint] = value; return PUGL_SUCCESS; |