mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
Feat: adds a interger scalling (another option) (#2620)
* Add integer scaling mode * Add Fit and Auto options for integer scaling * Update vk_present.c ( removed comentarios) * Fix integer scaling view-space input bounds * Fix integer scaling view coordinate ratios * Fix glasses touch and effective Cardboard alignment * Translate integer scaling settings * Fix glasses picture bounds scaling
This commit is contained in:
1 parent
1cada9ad50
commit
c7ff93ec19
39 files changed
+147
-25
No files matched your search
@@ -416,8 +416,7 @@ 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 = (float)(int)m;
|
||||
if (aspect < 1.0f) aspect = 1.0f;
|
||||
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