diff options
author | David Robillard <d@drobilla.net> | 2020-04-01 19:35:59 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-04-01 19:41:37 +0200 |
commit | c1e4ec68aa37718d7e472486c117a81d08363f14 (patch) | |
tree | ab172395d152d3f8fe40db8cae4cd8b53fe94684 | |
parent | fcddc7933dbff47754b8e4acea7406b77df1bf21 (diff) |
Add PUGL_BAD_PARAMETER status
-rw-r--r-- | pugl/detail/implementation.c | 4 | ||||
-rw-r--r-- | pugl/pugl.h | 1 |
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 |