Skip to content

Commit 9384e59

Browse files
committed
[KMS/DRM] Add warning comentary to avoid future experiments with scaling.
1 parent b99543b commit 9384e59

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/video/kmsdrm/SDL_kmsdrmvideo.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,11 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
995995
SDL_free(windata);
996996
}
997997

998+
/**********************************************************************/
999+
/* We simply IGNORE if it's a fullscreen window, window->flags don't */
1000+
/* reflect it: if it's fullscreen, KMSDRM_SetWindwoFullscreen() which */
1001+
/* will be called by SDL later, and we can manage it there. */
1002+
/**********************************************************************/
9981003
int
9991004
KMSDRM_CreateWindow(_THIS, SDL_Window * window)
10001005
{
@@ -1069,15 +1074,17 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window)
10691074
KMSDRM_InitCursor();
10701075
}
10711076

1072-
/**********************************************************************/
1073-
/* We simply IGNORE if it's a fullscreen window, window->flags don't */
1074-
/* reflect it: if it's fullscreen, KMSDRM_SetWindwoFullscreen() which */
1075-
/* will be called by SDL later, and we can manage it there. */
1076-
/**********************************************************************/
1077-
1078-
/* Try to find a matching video mode for the window, fallback to the
1079-
original mode if not available, and configure the mode we chose
1080-
into the CRTC. */
1077+
/* Try to find a matching video mode for the window, fallback to the
1078+
original mode if not available, and configure the mode we chose
1079+
into the CRTC.
1080+
You may be tempted to not do a videomode change, remaining always on
1081+
the original resolution, and use the SendWindowEvent() parameters to
1082+
make SDL2 pre-scale the image for us to an AR-corrected size inside
1083+
the original mode, but DON'T: vectorized games (GL games) are rendered
1084+
with the size specified in SendWindowEvent(),instead of being rendered
1085+
at the original size and then scaled.
1086+
It makes sense because GL is used to render the scene in GL games,
1087+
so the scene is rendered at the window size. */
10811088
mode = KMSDRM_GetConnectorMode(dispdata->connector, window->w, window->h );
10821089

10831090
if (mode) {

0 commit comments

Comments
 (0)