From: Toni Wilen Date: Fri, 2 Feb 2024 18:52:30 +0000 (+0200) Subject: Fullscreen OSD font update fix X-Git-Tag: 5200~32 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=aa6246e2cf87cd2933e4d9f16c0033d1b63a8280;p=francis%2Fwinuae.git Fullscreen OSD font update fix --- diff --git a/custom.cpp b/custom.cpp index fac9e3c2..de96f401 100644 --- a/custom.cpp +++ b/custom.cpp @@ -7056,9 +7056,9 @@ void compute_framesync(void) set_config_changed(); if (currprefs.monitoremu_mon != 0) { - target_graphics_buffer_update(currprefs.monitoremu_mon); + target_graphics_buffer_update(currprefs.monitoremu_mon, false); } - if (target_graphics_buffer_update(0)) { + if (target_graphics_buffer_update(0, false)) { reset_drawing(); } } diff --git a/include/xwin.h b/include/xwin.h index 83f19cce..b726001f 100644 --- a/include/xwin.h +++ b/include/xwin.h @@ -56,7 +56,7 @@ extern bool show_screen_maybe(int monid, bool); extern int lockscr(struct vidbuffer*, bool, bool, bool); extern void unlockscr(struct vidbuffer*, int, int); -extern bool target_graphics_buffer_update(int monid); +extern bool target_graphics_buffer_update(int monid, bool force); extern float target_adjust_vblank_hz(int monid, float); extern int target_get_display_scanline(int displayindex); extern void target_spin(int); diff --git a/od-win32/direct3d11.cpp b/od-win32/direct3d11.cpp index 1c61559a..428bce11 100644 --- a/od-win32/direct3d11.cpp +++ b/od-win32/direct3d11.cpp @@ -3429,7 +3429,7 @@ static bool xD3D11_initvals(HWND ahwnd, int monid, int w_w, int w_h, int t_w, in d3d->dmultxh = mmulth; d3d->dmultxv = mmultv; if (d3d->m_device) { - target_graphics_buffer_update(monid); + target_graphics_buffer_update(monid, false); } return changed; diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index b496f397..eb258c09 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -2428,7 +2428,7 @@ int check_prefs_changed_gfx(void) } } if (c & 1024) { - target_graphics_buffer_update(mon->monitor_id); + target_graphics_buffer_update(mon->monitor_id, true); } if (c & 512) { reopen_gfx(mon); @@ -3085,7 +3085,7 @@ void gfx_set_picasso_modeinfo(int monid, RGBFTYPE rgbfmt) #ifdef RETROPLATFORM rp_set_hwnd(mon->hAmigaWnd); #endif - target_graphics_buffer_update(monid); + target_graphics_buffer_update(monid, false); } #endif @@ -3846,6 +3846,7 @@ static int create_windows(struct AmigaMonitor *mon) addnotifications (mon->hAmigaWnd, FALSE, FALSE); mon->window_extra_height_bar = sbheight; mon->dpi = getdpiforwindow(mon->hAmigaWnd); + createstatusline(mon->hMainWnd, mon->monitor_id); if (mon->monitor_id) { ShowWindow(mon->hMainWnd, SW_SHOWNOACTIVATE); @@ -4105,7 +4106,6 @@ retry: } else if (errv < 0) { modechanged = false; } - target_graphics_buffer_update(mon->monitor_id); updatewinrect(mon, true); } @@ -4116,7 +4116,7 @@ retry: display_param_init(mon); createstatusline(mon->hAmigaWnd, mon->monitor_id); } - + target_graphics_buffer_update(mon->monitor_id, false); picasso_refresh(mon->monitor_id); #ifdef RETROPLATFORM @@ -4137,7 +4137,7 @@ oops: return ret; } -bool target_graphics_buffer_update(int monid) +bool target_graphics_buffer_update(int monid, bool force) { struct AmigaMonitor *mon = &AMonitors[monid]; struct picasso_vidbuf_description *vidinfo = &picasso_vidinfo[monid]; @@ -4158,7 +4158,7 @@ bool target_graphics_buffer_update(int monid) h = vb->outheight; } - if (oldtex_w[monid] == w && oldtex_h[monid] == h && oldtex_rtg[monid] == mon->screen_is_picasso && D3D_alloctexture(mon->monitor_id, -w, -h)) { + if (!force && oldtex_w[monid] == w && oldtex_h[monid] == h && oldtex_rtg[monid] == mon->screen_is_picasso && D3D_alloctexture(mon->monitor_id, -w, -h)) { osk_setup(monid, -2); return false; }