Skip to content

Commit f387636

Browse files
committed
Removed unnecessary call to SDL getter, and swapped to snake-case
1 parent 1896765 commit f387636

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src_c/display.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,15 +1362,15 @@ pg_set_mode(PyObject *self, PyObject *arg, PyObject *kwds)
13621362
*/
13631363
if (!state->using_gl && ((flags & (PGS_SCALED | PGS_FULLSCREEN)) == 0) &&
13641364
!vsync) {
1365-
SDL_Surface *sdlSurf = SDL_GetWindowSurface(win);
1366-
if (((sdlSurf->w != w_actual) || (sdlSurf->h != h_actual)) &&
1367-
((sdlSurf->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0)) {
1365+
if (((surface->surf->w != w_actual) ||
1366+
(surface->surf->h != h_actual)) &&
1367+
((surface->surf->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0)) {
13681368
char buffer[150];
1369-
char *formatString =
1369+
char *format_string =
13701370
"Requested window size was smaller than minimum supported "
13711371
"window size on platform. Using (%d, %d) instead.";
1372-
snprintf(buffer, sizeof(buffer), formatString, sdlSurf->w,
1373-
sdlSurf->h);
1372+
snprintf(buffer, sizeof(buffer), format_string, surface->surf->w,
1373+
surface->surf->h);
13741374
if (PyErr_WarnEx(PyExc_RuntimeWarning, buffer, 1) != 0) {
13751375
return NULL;
13761376
}

0 commit comments

Comments
 (0)