Skip to content

Commit 3c0e08a

Browse files
committed
format
1 parent e6aa7cc commit 3c0e08a

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

src_c/window.c

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,11 @@ window_flip(pgWindowObject *self)
187187
{
188188
int result;
189189

190-
if (self->context == NULL)
191-
{
190+
if (self->context == NULL) {
192191
if (!self->surf) {
193192
return RAISE(pgExc_SDLError,
194-
"the Window has no surface associated with it, did "
195-
"you forget to call Window.get_surface()");
193+
"the Window has no surface associated with it, did "
194+
"you forget to call Window.get_surface()");
196195
}
197196

198197
Py_BEGIN_ALLOW_THREADS;
@@ -202,8 +201,7 @@ window_flip(pgWindowObject *self)
202201
return RAISE(pgExc_SDLError, SDL_GetError());
203202
}
204203
}
205-
else
206-
{
204+
else {
207205
SDL_GL_SwapWindow(self->_win);
208206
}
209207
Py_RETURN_NONE;
@@ -730,16 +728,14 @@ window_get_opacity(pgWindowObject *self, void *v)
730728
return PyFloat_FromDouble((double)opacity);
731729
}
732730

733-
static PyObject*
731+
static PyObject *
734732
window_get_opengl(pgWindowObject *self, void *v)
735733
{
736734
long hasGL;
737-
if (!self->_is_borrowed)
738-
{
735+
if (!self->_is_borrowed) {
739736
hasGL = self->context != NULL;
740737
}
741-
else
742-
{
738+
else {
743739
int flags = SDL_GetWindowFlags(self->_win);
744740
hasGL = (flags & SDL_WINDOW_OPENGL) > 0;
745741
}
@@ -816,13 +812,11 @@ window_init(pgWindowObject *self, PyObject *args, PyObject *kwargs)
816812
return -1;
817813

818814
if (!strcmp(_key_str, "opengl")) {
819-
if (_value_bool)
820-
{
815+
if (_value_bool) {
821816
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
822817
flags |= SDL_WINDOW_OPENGL;
823818
}
824-
else
825-
{
819+
else {
826820
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0);
827821
}
828822
}

0 commit comments

Comments
 (0)