mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-12-25 01:11:49 +01:00
c9e025ba74
Touching the screen when using ultrawide touches the wrong position, this makes sure the position is correct. Credits: Xalphenos
26 lines
559 B
Plaintext
26 lines
559 B
Plaintext
<?php
|
|
$width = $argv[1];
|
|
$height = $argv[2];
|
|
|
|
$aspect = $width / (float)$height;
|
|
|
|
if (round($aspect*100.0) == 178)
|
|
exit(1);
|
|
|
|
$aspect = number_format((float)$aspect, 3, '.', '');
|
|
?>
|
|
[RedCarpetAspectUW]
|
|
moduleMatches = 0xBBAF1908, 0xD2308838, 0xEB70C731
|
|
# rodata constants
|
|
0x10363ED4 = .float <?=$aspect?>
|
|
0x1036A688 = .float <?=$aspect?>
|
|
_aspectAddr = 0x10363ED4
|
|
|
|
# Aspect calculation
|
|
0x0241D9B4 = lis r8, _aspectAddr@ha
|
|
0x0241D9B8 = lfs f0, _aspectAddr@l(r8)
|
|
|
|
# touch position fix
|
|
0x0241D9D4 = lis r8, _aspectAddr@ha
|
|
0x0241D9D8 = lfs f0, _aspectAddr@l(r8)
|