mirror of
https://github.com/xemu-project/xemu.git
synced 2026-07-11 01:24:41 +02:00
ui: Add display filter configuration
This commit is contained in:
@@ -237,6 +237,10 @@ display:
|
||||
surface_scale:
|
||||
type: integer
|
||||
default: 1
|
||||
filtering:
|
||||
type: enum
|
||||
values: [linear, nearest]
|
||||
default: linear
|
||||
window:
|
||||
fullscreen_on_startup: bool
|
||||
fullscreen_exclusive: bool
|
||||
|
||||
@@ -888,6 +888,17 @@ void RenderFramebuffer(GLint tex, int width, int height, bool flip, float scale[
|
||||
{
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
|
||||
switch (g_config.display.filtering) {
|
||||
case CONFIG_DISPLAY_FILTERING_LINEAR:
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
break;
|
||||
case CONFIG_DISPLAY_FILTERING_NEAREST:
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
break;
|
||||
}
|
||||
|
||||
DecalShader *s = g_framebuffer_shader;
|
||||
s->flip = flip;
|
||||
|
||||
@@ -203,6 +203,8 @@ void ShowMainMenu()
|
||||
ImGui::SameLine();
|
||||
HelpMarker("Controls how the rendered content should be scaled "
|
||||
"into the window");
|
||||
ImGui::Combo("Filter Method", &g_config.display.filtering,
|
||||
"Linear\0Nearest\0");
|
||||
ImGui::Combo("Aspect Ratio", &g_config.display.ui.aspect_ratio,
|
||||
"Native\0Auto\0""4:3\0""16:9\0");
|
||||
if (ImGui::MenuItem("Fullscreen", "F11",
|
||||
|
||||
Reference in New Issue
Block a user