Skip to content

Commit 805c8a3

Browse files
committed
move the #if block
1 parent 8fb4d5a commit 805c8a3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src_c/window.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,26 +308,22 @@ window_get_borderless(pgWindowObject *self, void *v)
308308
SDL_WINDOW_BORDERLESS);
309309
}
310310

311-
#if SDL_VERSION_ATLEAST(2, 0, 16)
312311
static int
313312
window_set_always_on_top(pgWindowObject *self, PyObject *arg, void *v)
314313
{
314+
#if SDL_VERSION_ATLEAST(2, 0, 16)
315315
int enable = PyObject_IsTrue(arg);
316316
if (enable == -1)
317317
return -1;
318318

319319
SDL_SetWindowAlwaysOnTop(self->_win, enable);
320320

321321
return 0;
322-
}
323322
#else
324-
static int
325-
window_set_always_on_top(pgWindowObject *self, PyObject *arg, void *v)
326-
{
327323
PyErr_SetString(pgExc_SDLError, "'always_on_top' requires SDL 2.0.16+");
328324
return -1;
329-
}
330325
#endif // SDL_VERSION_ATLEAST(2, 0, 16)
326+
}
331327

332328
static PyObject *
333329
window_get_always_on_top(pgWindowObject *self, void *v)

0 commit comments

Comments
 (0)