mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 21:15:43 +00:00
Feat: Add new button for integer scalling, adds tolerancy and rename (#2690)
* Add integer scaling mode * Fix integer scaling view-space input bounds * Improve integer scaling tolerance * Add Fit and Auto scaling toggle to session drawer * Translate Fit and Integer scaling labels * Clarify integer scaling cropping hint * Update integer scaling hint across translations * Fix integer scaling settings and translations * Fix controller input for integer scaling * Complete integer scaling hint translations * Fix integer scaling hint translations * Restore XML declaration quote style * Use double quotes in XML declarations * Add missing norugeuingz translatisn * fix: include math.h for roundf integer scaling * fix: link math library in Vulkan caller tests * Fix integer scaling translations * Fix Italian integer scaling string * Fix Italian scaling hint apostrophe
This commit is contained in:
1 parent
37a816c212
commit
a8c1a9ff4d
38 files changed
+136
-48
No files matched your search
@@ -13,6 +13,7 @@
|
||||
#include "quest_device.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <sys/system_properties.h>
|
||||
#include <unistd.h>
|
||||
@@ -416,7 +417,13 @@ static void update_map(int scene_w, int scene_h) {
|
||||
if (mode == VKP_MODE_FILL) aspect = sx > sy ? sx : sy;
|
||||
else if (mode == VKP_MODE_INTEGER) {
|
||||
float m = sx < sy ? sx : sy;
|
||||
aspect = m >= 1.0f ? (float)(int)m : m;
|
||||
float nearest = roundf(m);
|
||||
if (nearest >= 1.0f && nearest > m &&
|
||||
nearest - m < 0.15f) {
|
||||
aspect = nearest;
|
||||
} else {
|
||||
aspect = m >= 1.0f ? (float)(int)m : m;
|
||||
}
|
||||
} else aspect = sx < sy ? sx : sy;
|
||||
g_map.kx = g_map.ky = aspect;
|
||||
g_map.off_x = (float)(g_map.rx + (int)((g_map.rw - scene_w * aspect) * 0.5f));
|
||||
|
||||
Reference in new issue
Block a user