aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
Diffstat (limited to 'pugl')
-rw-r--r--pugl/detail/implementation.c4
-rw-r--r--pugl/pugl.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/pugl/detail/implementation.c b/pugl/detail/implementation.c
index d7f1413..1454899 100644
--- a/pugl/detail/implementation.c
+++ b/pugl/detail/implementation.c
@@ -60,6 +60,7 @@ puglStrerror(const PuglStatus status)
case PUGL_FAILURE: return "Non-fatal failure";
case PUGL_UNKNOWN_ERROR: return "Unknown system error";
case PUGL_BAD_BACKEND: return "Invalid or missing backend";
+ case PUGL_BAD_PARAMETER: return "Invalid parameter";
case PUGL_BACKEND_FAILED: return "Backend initialisation failed";
case PUGL_REGISTRATION_FAILED: return "Window class registration failed";
case PUGL_CREATE_WINDOW_FAILED: return "Window creation failed";
@@ -238,9 +239,10 @@ puglSetViewHint(PuglView* view, PuglViewHint hint, int value)
{
if (hint < PUGL_NUM_WINDOW_HINTS) {
view->hints[hint] = value;
+ return PUGL_SUCCESS;
}
- return PUGL_SUCCESS;
+ return PUGL_BAD_PARAMETER;
}
PuglStatus
diff --git a/pugl/pugl.h b/pugl/pugl.h
index b09d883..8d0039e 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -482,6 +482,7 @@ typedef enum {
PUGL_FAILURE, ///< Non-fatal failure
PUGL_UNKNOWN_ERROR, ///< Unknown system error
PUGL_BAD_BACKEND, ///< Invalid or missing backend
+ PUGL_BAD_PARAMETER, ///< Invalid parameter
PUGL_BACKEND_FAILED, ///< Backend initialisation failed
PUGL_REGISTRATION_FAILED, ///< Window class registration failed
PUGL_CREATE_WINDOW_FAILED, ///< Window creation failed