Skip to content

Commit aef8f35

Browse files
committed
Make the warning message clearer
1 parent 86271de commit aef8f35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src_c/display.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1440,10 +1440,10 @@ pg_set_mode(PyObject *self, PyObject *arg, PyObject *kwds)
14401440
((surface->surf->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0)) {
14411441
char buffer[150];
14421442
char *format_string =
1443-
"Requested window size was smaller than minimum supported "
1444-
"window size on platform. Using (%d, %d) instead.";
1445-
snprintf(buffer, sizeof(buffer), format_string, surface->surf->w,
1446-
surface->surf->h);
1443+
"Requested window was forcibly resized by the OS.\n\t"
1444+
"Requested window size: (%d, %d)\n\tNew window size: (%d, %d)";
1445+
snprintf(buffer, sizeof(buffer), format_string, w_actual, h_actual,
1446+
surface->surf->w, surface->surf->h);
14471447
if (PyErr_WarnEx(PyExc_RuntimeWarning, buffer, 1) != 0) {
14481448
return NULL;
14491449
}

0 commit comments

Comments
 (0)