mirror of
https://github.com/open-goal/jak-project
synced 2026-05-30 17:06:23 -04:00
[gfx] fixes for when the window is force to weird size
This commit is contained in:
+2
-2
@@ -73,8 +73,8 @@ static constexpr int PAT_MAT_COUNT = 23;
|
||||
struct GfxGlobalSettings {
|
||||
// note: this is actually the size of the display that ISN'T letterboxed
|
||||
// the excess space is what will be letterboxed away.
|
||||
int lbox_w;
|
||||
int lbox_h;
|
||||
int lbox_w = 640;
|
||||
int lbox_h = 480;
|
||||
|
||||
// actual game resolution
|
||||
int game_res_w = 640;
|
||||
|
||||
@@ -483,6 +483,7 @@ void OpenGLRenderer::setup_frame(const RenderOptions& settings) {
|
||||
} else {
|
||||
lg::error("bad framebuffer setup. fbo: {}, tex: {}, zbuf: {}, fbo2: {}, tex2: {}",
|
||||
fbo_state.fbo, fbo_state.tex, fbo_state.zbuf, fbo_state.fbo2, fbo_state.tex2);
|
||||
lg::error("size was: {} x {}\n", fbo_state.width, fbo_state.height);
|
||||
fbo_state.delete_objects();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -517,8 +517,9 @@ void GLDisplay::render() {
|
||||
// render game!
|
||||
if (g_gfx_data->debug_gui.should_advance_frame()) {
|
||||
auto p = scoped_prof("game-render");
|
||||
render_game_frame(Gfx::g_global_settings.game_res_w, Gfx::g_global_settings.game_res_h, win_w,
|
||||
win_h, lbox_w, lbox_h, Gfx::g_global_settings.msaa_samples);
|
||||
render_game_frame(windowed() ? win_w : Gfx::g_global_settings.game_res_w,
|
||||
windowed() ? win_h : Gfx::g_global_settings.game_res_h, win_w, win_h, lbox_w,
|
||||
lbox_h, Gfx::g_global_settings.msaa_samples);
|
||||
}
|
||||
|
||||
if (g_gfx_data->debug_gui.should_gl_finish()) {
|
||||
|
||||
Reference in New Issue
Block a user