mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
[KMS/DRM] Add warning comentary to avoid future experiments with scaling.
This commit is contained in:
parent
b99543b682
commit
9384e59561
@ -995,6 +995,11 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
|
|||||||
SDL_free(windata);
|
SDL_free(windata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************/
|
||||||
|
/* We simply IGNORE if it's a fullscreen window, window->flags don't */
|
||||||
|
/* reflect it: if it's fullscreen, KMSDRM_SetWindwoFullscreen() which */
|
||||||
|
/* will be called by SDL later, and we can manage it there. */
|
||||||
|
/**********************************************************************/
|
||||||
int
|
int
|
||||||
KMSDRM_CreateWindow(_THIS, SDL_Window * window)
|
KMSDRM_CreateWindow(_THIS, SDL_Window * window)
|
||||||
{
|
{
|
||||||
@ -1069,15 +1074,17 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window)
|
|||||||
KMSDRM_InitCursor();
|
KMSDRM_InitCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/* Try to find a matching video mode for the window, fallback to the
|
||||||
/* We simply IGNORE if it's a fullscreen window, window->flags don't */
|
original mode if not available, and configure the mode we chose
|
||||||
/* reflect it: if it's fullscreen, KMSDRM_SetWindwoFullscreen() which */
|
into the CRTC.
|
||||||
/* will be called by SDL later, and we can manage it there. */
|
You may be tempted to not do a videomode change, remaining always on
|
||||||
/**********************************************************************/
|
the original resolution, and use the SendWindowEvent() parameters to
|
||||||
|
make SDL2 pre-scale the image for us to an AR-corrected size inside
|
||||||
/* Try to find a matching video mode for the window, fallback to the
|
the original mode, but DON'T: vectorized games (GL games) are rendered
|
||||||
original mode if not available, and configure the mode we chose
|
with the size specified in SendWindowEvent(),instead of being rendered
|
||||||
into the CRTC. */
|
at the original size and then scaled.
|
||||||
|
It makes sense because GL is used to render the scene in GL games,
|
||||||
|
so the scene is rendered at the window size. */
|
||||||
mode = KMSDRM_GetConnectorMode(dispdata->connector, window->w, window->h );
|
mode = KMSDRM_GetConnectorMode(dispdata->connector, window->w, window->h );
|
||||||
|
|
||||||
if (mode) {
|
if (mode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user