notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
67d399b
)
frontend: fix integer-prefer scaler
author
notaz
<notasas@gmail.com>
Sun, 9 Oct 2011 22:19:06 +0000
(
01:19
+0300)
committer
notaz
<notasas@gmail.com>
Sun, 9 Oct 2011 22:52:52 +0000
(
01:52
+0300)
frontend/menu.c
patch
|
blob
|
blame
|
history
diff --git
a/frontend/menu.c
b/frontend/menu.c
index
931468f
..
83ad1c4
100644
(file)
--- a/
frontend/menu.c
+++ b/
frontend/menu.c
@@
-2009,16
+2009,10
@@
void menu_notify_mode_change(int w, int h, int bpp)
g_layer_w = w; g_layer_h = h;
break;
g_layer_w = w; g_layer_h = h;
break;
- case SCALE_4_3:
- mult = 240.0f / (float)h * 4.0f / 3.0f;
- if (h > 256)
- mult *= 2.0f;
- g_layer_w = mult * (float)g_menuscreen_h;
- g_layer_h = g_menuscreen_h;
- printf(" -> %dx%d %.1f\n", g_layer_w, g_layer_h, mult);
- break;
-
case SCALE_4_3v2:
case SCALE_4_3v2:
+ if (h > g_menuscreen_h || (240 < h && h <= 360))
+ goto fractional_4_3;
+
// 4:3 that prefers integer scaling
imult = g_menuscreen_h / h;
g_layer_w = w * imult;
// 4:3 that prefers integer scaling
imult = g_menuscreen_h / h;
g_layer_w = w * imult;
@@
-2029,6
+2023,16
@@
void menu_notify_mode_change(int w, int h, int bpp)
printf(" -> %dx%d %.1f\n", g_layer_w, g_layer_h, mult);
break;
printf(" -> %dx%d %.1f\n", g_layer_w, g_layer_h, mult);
break;
+ fractional_4_3:
+ case SCALE_4_3:
+ mult = 240.0f / (float)h * 4.0f / 3.0f;
+ if (h > 256)
+ mult *= 2.0f;
+ g_layer_w = mult * (float)g_menuscreen_h;
+ g_layer_h = g_menuscreen_h;
+ printf(" -> %dx%d %.1f\n", g_layer_w, g_layer_h, mult);
+ break;
+
case SCALE_FULLSCREEN:
g_layer_w = g_menuscreen_w;
g_layer_h = g_menuscreen_h;
case SCALE_FULLSCREEN:
g_layer_w = g_menuscreen_w;
g_layer_h = g_menuscreen_h;