Yeah, D3D needs an update and I'm somewhat behind 😜
hmm...seems to work for me. Both the mapper and fullscreen toggle call GFX_ResetScreen which calls sdl.draw.reset() which is set exactly to RENDER_ReInit().
I just thought of another thing. You could make a variable, something like needs_updating or whatever. Set it to false when whole screen is in cache or true if not. This could be used in GFX_EndUpdate() to decide whether to update the screen or not. Like the smartupdate patch 😀. This would help with opengl (slow texture uploads, which are not necessary in this case) and openglhq and d3d hardware scalers since those could be skipped. Most games rarely do more then 20-30 updates / s...
edit: Another thing I've noticed while testing. In TombRider when using output=surface and scaler=hq2x and the game starts in high resolution (=hq2x not used), the first time I switch to low-res (F1) the picture will be blurred. Not like hq2x at all 😀. If I go back to high-res and again switch to low-res, it will be fine. Yes, the cache is rebuilt but it seems hq2x is not properly initialized sometimes...
edit2: or even better. If possible record a rectangle that has changed from previous frame (if it can be computed easily). This can be used for partial texture updates by opengl and d3d.