Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#51622 - [higan] Fullscreen patch

Attached to Project: Community Packages
Opened by Kakashi (Kakashi) - Monday, 31 October 2016, 22:16 GMT
Last edited by Maxime Gauduin (Alucryd) - Saturday, 04 February 2017, 19:35 GMT
Task Type Feature Request
Category Upstream Bugs
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Patch to remove integer scaling.

Additional info:
* version 101
* https://board.byuu.org/viewtopic.php?p=33532#p33532
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Saturday, 04 February 2017, 19:35 GMT
Reason for closing:  Won't implement
Comment by Doug Newgard (Scimmia) - Monday, 31 October 2016, 22:21 GMT
How about providing some actual information here? Your link is inaccessible by those without an account, making things even worse.
Comment by Kakashi (Kakashi) - Monday, 31 October 2016, 23:19 GMT
higan currently scales it's image via integer scaling only. This creates massive black borders on many screens.
This patch gives the option to disable integer scaling and thereby allow a fullscreen image (with overscan blanking).
   patch (3.2 KiB)
Comment by Kakashi (Kakashi) - Thursday, 03 November 2016, 05:28 GMT
As of higan v101r22 (https://gitlab.com/higan/higan), the fix would go something like this:

sfc/interface/interface.cpp (make similar changes to fc, ms, md, gb, gba, and ws, too)


Code:
auto Interface::videoSize(uint width, uint height, bool arc, bool intScale) -> VideoSize {
double w = 256 * (arc ? 8.0 / 7.0 : 1.0);
double h = 240;
double m;

if(intScale) m = min( (uint)(width / w), (uint)(height / h));
else m = min((double)(width / w), (double)(height / h));

return {(uint)(w * m), (uint)(h * m)};
}




target-tomoko/presentation/presentation.cpp


Code:
auto Presentation::resizeViewport() -> void {
//clear video area before resizing to avoid seeing distorted video momentarily
clearViewport();

uint scale = 2;
if(settings["Video/Scale"].text() == "Small" ) scale = 2;
if(settings["Video/Scale"].text() == "Medium") scale = 3;
if(settings["Video/Scale"].text() == "Large" ) scale = 4;

uint windowWidth = 0, windowHeight = 0;
bool aspectCorrection = true;
bool integerScaling = true;
if(!fullScreen()) {
aspectCorrection = settings["Video/AspectCorrection"].boolean();
windowWidth = 320 * scale;
windowHeight = 240 * scale;
} else {
integerScaling = settings["Video/Shader"].text() == "None";
windowWidth = geometry().width();
windowHeight = geometry().height();
}
if(!fullScreen()) setSize({windowWidth, windowHeight});

if(!emulator) {
viewport.setGeometry({0, 0, windowWidth, windowHeight});
} else {
auto videoSize = emulator->videoSize(windowWidth, windowHeight, aspectCorrection, integerScaling);
viewport.setGeometry({
(windowWidth - videoSize.width) / 2, (windowHeight - videoSize.height) / 2,
videoSize.width, videoSize.height
});
}

//clear video area again to ensure entire viewport area has been painted in
clearViewport();
}




This takes out the "Disable Integer Scaling" setting and instead makes it so that Integer Scaling is enabled for the None filter, and disabled for the Blur filter and all video shaders. If you want to make the display fill the screen from top to bottom, you will need to select the Blur filter or install some video shaders and use those.

If you really want to disable integer scaling for Nearest Neighbor, change

integerScaling = settings["Video/Shader"].text() == "None";

to

integerScaling = false;
Comment by Kakashi (Kakashi) - Friday, 03 February 2017, 17:06 GMT
  • Field changed: Percent Complete (100% → 0%)
I have tried this and am still getting massive black borders.
Comment by Doug Newgard (Scimmia) - Friday, 03 February 2017, 17:07 GMT
As far as I can tell, this was rejected by upstream, not included with 102.
Comment by Maxime Gauduin (Alucryd) - Saturday, 04 February 2017, 19:34 GMT
It has indeed. That settles it then, if upstream won't support it, I won't include it in our package, it's against arch policies to patch unsupported stuff.

Loading...