Rewritten renderer blitting, fixes flickering when inversion or grayscale is used.

This commit is contained in:
OBattler
2021-10-06 02:26:30 +02:00
parent 7fc111584d
commit 46807540ed
8 changed files with 76 additions and 61 deletions

View File

@@ -822,6 +822,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case IDM_VID_INVERT:
video_toggle_option(hmenu, &invert_display, IDM_VID_INVERT);
video_copy = (video_grayscale || invert_display) ? video_transform_copy : memcpy;
break;
case IDM_VID_OVERSCAN:
@@ -854,6 +855,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case IDM_VID_GRAY_WHITE:
CheckMenuItem(hmenu, IDM_VID_GRAY_RGB+video_grayscale, MF_UNCHECKED);
video_grayscale = LOWORD(wParam) - IDM_VID_GRAY_RGB;
video_copy = (video_grayscale || invert_display) ? video_transform_copy : memcpy;
CheckMenuItem(hmenu, IDM_VID_GRAY_RGB+video_grayscale, MF_CHECKED);
device_force_redraw();
config_save();