forked from Ports/perfect_dark
port: add a config option to disable texture filtering on fonts
This commit is contained in:
1 parent
e883144a76
commit
9eb3ffcc30
3 files changed
+15
-1
No files matched your search
@@ -19,6 +19,7 @@ s32 videoGetNativeHeight(void);
|
|||||||
s32 videoGetWidth(void);
|
s32 videoGetWidth(void);
|
||||||
s32 videoGetHeight(void);
|
s32 videoGetHeight(void);
|
||||||
f32 videoGetAspect(void);
|
f32 videoGetAspect(void);
|
||||||
|
u32 videoGetFontTextureFilter(void);
|
||||||
|
|
||||||
s32 videoCreateFramebuffer(u32 w, u32 h);
|
s32 videoCreateFramebuffer(u32 w, u32 h);
|
||||||
void videoSetFramebuffer(s32 target);
|
void videoSetFramebuffer(s32 target);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ static u32 dlcount = 0;
|
|||||||
static u32 frames = 0;
|
static u32 frames = 0;
|
||||||
static u32 framesPerSec = 0;
|
static u32 framesPerSec = 0;
|
||||||
static f64 startTime, endTime, fpsTime;
|
static f64 startTime, endTime, fpsTime;
|
||||||
|
static u32 fontTextureFilter = 1;
|
||||||
|
|
||||||
s32 videoInit(void)
|
s32 videoInit(void)
|
||||||
{
|
{
|
||||||
@@ -46,6 +47,8 @@ s32 videoInit(void)
|
|||||||
if (filter > FILTER_THREE_POINT) filter = FILTER_THREE_POINT;
|
if (filter > FILTER_THREE_POINT) filter = FILTER_THREE_POINT;
|
||||||
renderingAPI->set_texture_filter((enum FilteringMode)filter);
|
renderingAPI->set_texture_filter((enum FilteringMode)filter);
|
||||||
|
|
||||||
|
fontTextureFilter = configGetInt("Video.FontTextureFilter", 1);
|
||||||
|
|
||||||
initDone = true;
|
initDone = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -134,6 +137,11 @@ f32 videoGetAspect(void)
|
|||||||
return gfx_current_dimensions.aspect_ratio;
|
return gfx_current_dimensions.aspect_ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 videoGetFontTextureFilter(void)
|
||||||
|
{
|
||||||
|
return fontTextureFilter;
|
||||||
|
}
|
||||||
|
|
||||||
s32 videoCreateFramebuffer(u32 w, u32 h)
|
s32 videoCreateFramebuffer(u32 w, u32 h)
|
||||||
{
|
{
|
||||||
return gfx_create_framebuffer(w, h);
|
return gfx_create_framebuffer(w, h);
|
||||||
|
|||||||
@@ -394,7 +394,12 @@ Gfx *text0f153628(Gfx *gdl)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
gDPSetTextureFilter(gdl++, G_TF_BILERP);
|
if (videoGetFontTextureFilter() == 0) {
|
||||||
|
gDPSetTextureFilter(gdl++, G_TF_POINT);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gDPSetTextureFilter(gdl++, G_TF_BILERP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return gdl;
|
return gdl;
|
||||||
|
|||||||
Reference in new issue
Block a user