mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-03-20 17:48:46 +00:00
Fix scanlines on high-dpi screens.
This commit is contained in:
parent
2911960482
commit
546c4f36f0
@ -72,6 +72,8 @@ int main(int argc, char *argv[])
|
|||||||
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", "$HOME"));
|
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", "$HOME"));
|
||||||
engine.rootContext()->setContextProperty("fileIO", &fileIO);
|
engine.rootContext()->setContextProperty("fileIO", &fileIO);
|
||||||
|
|
||||||
|
engine.rootContext()->setContextProperty("devicePixelRatio", app.devicePixelRatio());
|
||||||
|
|
||||||
// Manage import paths for Linux and OSX.
|
// Manage import paths for Linux and OSX.
|
||||||
QStringList importPathList = engine.importPathList();
|
QStringList importPathList = engine.importPathList();
|
||||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/qmltermwidget");
|
importPathList.prepend(QCoreApplication::applicationDirPath() + "/qmltermwidget");
|
||||||
|
@ -61,8 +61,8 @@ ShaderEffect {
|
|||||||
// This is the average value of the abs(sin) function. Needed to avoid aliasing.
|
// This is the average value of the abs(sin) function. Needed to avoid aliasing.
|
||||||
readonly property real absSinAvg: 0.63661828335466886
|
readonly property real absSinAvg: 0.63661828335466886
|
||||||
property size rasterizationSmooth: Qt.size(
|
property size rasterizationSmooth: Qt.size(
|
||||||
Utils.clamp(2.0 * virtual_resolution.width / width, 0.0, 1.0),
|
Utils.clamp(2.0 * virtual_resolution.width / (width * devicePixelRatio), 0.0, 1.0),
|
||||||
Utils.clamp(2.0 * virtual_resolution.height / height, 0.0, 1.0))
|
Utils.clamp(2.0 * virtual_resolution.height / (height * devicePixelRatio), 0.0, 1.0))
|
||||||
|
|
||||||
property real dispX
|
property real dispX
|
||||||
property real dispY
|
property real dispY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user