Skip to content

Commit 96ba240

Browse files
committed
update window.c
1 parent 8847314 commit 96ba240

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src_c/window.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,28 +320,21 @@ window_set_always_on_top(pgWindowObject *self, PyObject *arg, void *v)
320320

321321
return 0;
322322
}
323-
324-
static PyObject *
325-
window_get_always_on_top(pgWindowObject *self, void *v)
326-
{
327-
return PyBool_FromLong(SDL_GetWindowFlags(self->_win) &
328-
SDL_WINDOW_ALWAYS_ON_TOP);
329-
}
330-
331323
#else
332324
static int
333325
window_set_always_on_top(pgWindowObject *self, PyObject *arg, void *v)
334326
{
335327
PyErr_SetString(pgExc_SDLError, "'always_on_top' requires SDL 2.0.16+");
336328
return -1;
337329
}
330+
#endif // SDL_VERSION_ATLEAST(2, 0, 16)
338331

339332
static PyObject *
340333
window_get_always_on_top(pgWindowObject *self, void *v)
341334
{
342-
return RAISE(pgExc_SDLError, "'always_on_top' requires SDL 2.0.16+")
335+
return PyBool_FromLong(SDL_GetWindowFlags(self->_win) &
336+
SDL_WINDOW_ALWAYS_ON_TOP);
343337
}
344-
#endif // SDL_VERSION_ATLEAST(2, 0, 16)
345338

346339
static PyObject *
347340
window_get_window_id(pgWindowObject *self, PyObject *_null)

0 commit comments

Comments
 (0)