forked from Ports/perfect_dark
port: add MSAA setting
This commit is contained in:
1 parent
05233ef853
commit
a7692fe4ef
3 files changed
+6
-1
No files matched your search
@@ -2552,7 +2552,6 @@ extern "C" void gfx_init(struct GfxWindowManagerAPI* wapi, struct GfxRenderingAP
|
||||
gfx_rapi->init();
|
||||
gfx_rapi->update_framebuffer_parameters(0, width, height, 1, false, true, true, true);
|
||||
gfx_current_dimensions.internal_mul = 1;
|
||||
gfx_msaa_level = 1;
|
||||
gfx_current_game_window_viewport.width = gfx_current_dimensions.width = width;
|
||||
gfx_current_game_window_viewport.height = gfx_current_dimensions.height = height;
|
||||
game_framebuffer = gfx_rapi->create_framebuffer();
|
||||
|
||||
@@ -34,6 +34,7 @@ struct configentry {
|
||||
{ "Video.FramerateLimit", CONFIG_S32, { .s32val = 0 } },
|
||||
{ "Video.FovY", CONFIG_F32, { .f32val = 60.f } },
|
||||
{ "Video.TextureFilter", CONFIG_S32, { .s32val = 1 } },
|
||||
{ "Video.MSAA", CONFIG_S32, { .s32val = 0 } },
|
||||
/* Audio */
|
||||
{ "Audio.BufferSize", CONFIG_S32, { .s32val = 512 } },
|
||||
{ "Audio.QueueLimit", CONFIG_S32, { .s32val = 8192 } },
|
||||
|
||||
@@ -36,6 +36,11 @@ s32 videoInit(void)
|
||||
const s32 h = configGetInt("Video.DefaultHeight", 480);
|
||||
const bool fs = configGetInt("Video.DefaultFullscreen", false);
|
||||
|
||||
gfx_msaa_level = configGetInt("Video.MSAA", 0);
|
||||
if (gfx_msaa_level < 1 || gfx_msaa_level > 16) {
|
||||
gfx_msaa_level = 1;
|
||||
}
|
||||
|
||||
gfx_init(wmAPI, renderingAPI, "PD", fs, w, h, 100, 100);
|
||||
|
||||
wmAPI->set_swap_interval(configGetInt("Video.VSync", 1));
|
||||
|
||||
Reference in new issue
Block a user