changed avoidProgressive to allowInterlaced
This commit is contained in:
parent
972932209b
commit
9e0a76f5a6
30
src/core.c
30
src/core.c
|
|
@ -3141,13 +3141,13 @@ static bool InitGraphicsDevice(int width, int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool findExactly = true;
|
bool findExactly = true;
|
||||||
bool avoidProgressive = CORE.Window.flags & FLAG_INTERLACED_HINT;
|
bool allowInterlaced = CORE.Window.flags & FLAG_INTERLACED_HINT;
|
||||||
const double fps = (CORE.Time.target > 0) ? (1.0 / CORE.Time.target) : 60;
|
const double fps = (CORE.Time.target > 0) ? (1.0 / CORE.Time.target) : 60;
|
||||||
#define IS_INTERLACED(mode) (mode.flags & DRM_MODE_FLAG_INTERLACE)
|
#define IS_INTERLACED(mode) (mode.flags & DRM_MODE_FLAG_INTERLACE)
|
||||||
#define IS_PROGRESSIVE(mode) (!IS_INTERLACED(mode))
|
#define IS_PROGRESSIVE(mode) (!IS_INTERLACED(mode))
|
||||||
find_connector_mode:
|
find_connector_mode:
|
||||||
TRACELOG(LOG_TRACE, "searching connector mode, should find exactly matching: %s, should avoid progressive mode: %s",
|
TRACELOG(LOG_TRACE, "searching connector mode, should find exactly matching: %s, selecting an interlace mode is allowed: %s",
|
||||||
findExactly ? "yes" : "no", avoidProgressive ? "yes" : "no");
|
findExactly ? "yes" : "no", allowInterlaced ? "yes" : "no");
|
||||||
// If InitWindow should use the current mode find it in the connector's mode list
|
// If InitWindow should use the current mode find it in the connector's mode list
|
||||||
if ((CORE.Window.screen.width <= 0) || (CORE.Window.screen.height <= 0))
|
if ((CORE.Window.screen.width <= 0) || (CORE.Window.screen.height <= 0))
|
||||||
{
|
{
|
||||||
|
|
@ -3157,18 +3157,18 @@ find_connector_mode:
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "mode %d h=%u v=%u %s refresh=%u", i, CORE.Window.connector->modes[i].hdisplay, CORE.Window.connector->modes[i].vdisplay,
|
TRACELOG(LOG_TRACE, "mode %d h=%u v=%u %s refresh=%u", i, CORE.Window.connector->modes[i].hdisplay, CORE.Window.connector->modes[i].vdisplay,
|
||||||
IS_INTERLACED(CORE.Window.connector->modes[i]) ? "interlaced" : "progressive", CORE.Window.connector->modes[i].vrefresh);
|
IS_INTERLACED(CORE.Window.connector->modes[i]) ? "interlaced" : "progressive", CORE.Window.connector->modes[i].vrefresh);
|
||||||
if (IS_PROGRESSIVE(CORE.Window.connector->modes[i]))
|
if (IS_INTERLACED(CORE.Window.connector->modes[i]))
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "progressive mode");
|
TRACELOG(LOG_TRACE, "interlaced mode");
|
||||||
if (avoidProgressive)
|
if (!allowInterlaced)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "but shouldn't choose an progressive mode");
|
TRACELOG(LOG_TRACE, "but shouldn't choose an interlaced mode");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "interlaced mode");
|
TRACELOG(LOG_TRACE, "progressive mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == BINCMP(&CORE.Window.crtc->mode, &CORE.Window.connector->modes[i]))
|
if (0 == BINCMP(&CORE.Window.crtc->mode, &CORE.Window.connector->modes[i]))
|
||||||
|
|
@ -3193,18 +3193,18 @@ find_connector_mode:
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "mode %d h=%u v=%u %s refresh=%u", i, CORE.Window.connector->modes[i].hdisplay, CORE.Window.connector->modes[i].vdisplay,
|
TRACELOG(LOG_TRACE, "mode %d h=%u v=%u %s refresh=%u", i, CORE.Window.connector->modes[i].hdisplay, CORE.Window.connector->modes[i].vdisplay,
|
||||||
IS_INTERLACED(CORE.Window.connector->modes[i]) ? "interlaced" : "progressive", CORE.Window.connector->modes[i].vrefresh);
|
IS_INTERLACED(CORE.Window.connector->modes[i]) ? "interlaced" : "progressive", CORE.Window.connector->modes[i].vrefresh);
|
||||||
if (IS_PROGRESSIVE(CORE.Window.connector->modes[i]))
|
if (IS_INTERLACED(CORE.Window.connector->modes[i]))
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "progressive mode");
|
TRACELOG(LOG_TRACE, "interlaced mode");
|
||||||
if (avoidProgressive)
|
if (!allowInterlaced)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "but shouldn't choose an progressive mode");
|
TRACELOG(LOG_TRACE, "but shouldn't choose an interlaced mode");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_TRACE, "interlaced mode");
|
TRACELOG(LOG_TRACE, "progressive mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
@ -3238,9 +3238,9 @@ find_connector_mode:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (avoidProgressive)
|
if (!allowInterlaced)
|
||||||
{
|
{
|
||||||
avoidProgressive = false;
|
allowInterlaced = true;
|
||||||
findExactly = true;
|
findExactly = true;
|
||||||
goto find_connector_mode;
|
goto find_connector_mode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user