void gfxboard_refresh(int monid)
{
- if (monid > 0) {
+ if (monid >= 0) {
for (int i = 0; i < MAX_RTG_BOARDS; i++) {
- struct rtggfxboard *gb = &rtggfxboards[i];
- if (gb->monitor_id == monid) {
- gb->fullrefresh = 2;
+ struct rtgboardconfig *rbc = &currprefs.rtgboards[i];
+ if (rbc->monitor_id == monid && rbc->rtgmem_size) {
+ if (rbc->rtgmem_type >= GFXBOARD_HARDWARE) {
+ struct rtggfxboard *gb = &rtggfxboards[i];
+ gb->fullrefresh = 2;
+ } else {
+ picasso_refresh(monid);
+ }
}
}
} else {
- if (rtg_visible[monid] >= 0) {
- rtggfxboards[rtg_visible[monid]].fullrefresh = 2;
+ for (int i = 0; i < MAX_RTG_BOARDS; i++) {
+ struct rtgboardconfig *rbc = &currprefs.rtgboards[i];
+ if (rbc->rtgmem_size) {
+ gfxboard_refresh(rbc->monitor_id);
+ }
}
}
}
}
}
-static void xD3D_restore(int monid)
+static void xD3D_restore(int monid, bool checkonly)
{
struct d3dstruct *d3d = &d3ddata[monid];
-
+ if (checkonly)
+ return;
d3d->renderdisabled = false;
}
extern bool(*D3D_setcursor)(int, int x, int y, int width, int height, bool visible, bool noscale);
extern uae_u8* (*D3D_setcursorsurface)(int, int *pitch);
extern float(*D3D_getrefreshrate)(int);
-extern void(*D3D_restore)(int);
+extern void(*D3D_restore)(int, bool);
extern void(*D3D_resize)(int, int);
extern void(*D3D_change)(int, int);
extern bool(*D3D_getscalerect)(int, float *mx, float *my, float *sx, float *sy);
#include "statusline.h"
#include "hq2x_d3d.h"
#include "gui.h"
+#include "gfxboard.h"
#include "d3dx.h"
bool (*D3D_setcursor)(int, int x, int y, int width, int height, bool visible, bool noscale);
uae_u8* (*D3D_setcursorsurface)(int, int *pitch);
float (*D3D_getrefreshrate)(int);
-void(*D3D_restore)(int);
+void(*D3D_restore)(int, bool);
void(*D3D_resize)(int, int);
void (*D3D_change)(int, int);
bool(*D3D_getscalerect)(int, float *mx, float *my, float *sx, float *sy);
resizemode(d3d);
notice_screen_contents_lost(d3d - d3d11data);
+ gfxboard_refresh(d3d - d3d11data);
write_log(_T("D3D11 resize exit\n"));
}
struct d3d11struct *d3d = &d3d11data[monid];
}
-static void xD3D11_restore(int monid)
+static void xD3D11_restore(int monid, bool checkonly)
{
+ struct d3d11struct *d3d = &d3d11data[monid];
+ recheck(d3d);
}
static void xD3D11_vblank_reset(double freq)
} else if (guion == 0) {
d3d->delayedfs = 1;
notice_screen_contents_lost(monid);
+ gfxboard_refresh(monid);
}
write_log(_T("fs guimode end\n"));
}
ignorelbutton = true;
break;
case WM_ACTIVATEAPP:
- D3D_restore(0);
+ D3D_restore(0, false);
//write_log(_T("WM_ACTIVATEAPP %08x\n"), wParam);
if (!wParam && isfullscreen() > 0 && D3D_resize && !gui_active) {
write_log(_T("WM_ACTIVATEAPP inactive %p\n"), hWnd);
bufmem_ptr = sptr;
if (d3d) {
+ if (D3D_restore)
+ D3D_restore(monid, true);
surfstart = D3D_locktexture(monid, &pitch, &surf_height, true);
if (surfstart == NULL)
return;