case MENU_ANI_BKGND: // MLL 06-01-2019: ani backgrounds
gP.bAniBkgnd = !gP.bAniBkgnd;
if (gP.bAniBkgnd) {
dwStyle = MF_CHECKED;
resetCurAniShader();
parseAniShader(L"voronoi.fs"); // default
if (!gl_LoadAniBackgrounds(GetDlgItem(gP.hMain, IDC_LISTBOX))) {
CheckMenuItem(gR.hAniMenu, MENU_ANI_BKGND, MF_UNCHECKED);
EnableMenuItem(gR.hAniMenu, MENU_ANI_BKGND, MF_GRAYED);
break;
}
gP.tCurAniBkgndShader.nShaderID = glsl_LoadShaderFromFile("voronoi.fs");
rAniStart = GetTickCount64() / 1000.0f;
StartSync();
} else {
dwStyle = MF_UNCHECKED;
gl_LoadBackgrounds(GetDlgItem(gP.hMain, IDC_LISTBOX), TRUE); // PAT 09-09-2019 use TRUE to restore the current wallpaper rather than "back02.jpg"
resetCurAniShader();
//if (!(gP.bGiration | gP.bUseFPS | gP.bAnimateLights | gP.bRotation | gP.bIsLerping))
// StopSync(SYNC_OFF);
}
CheckMenuItem(gR.hAniMenu, MENU_ANI_BKGND, dwStyle);
gP.bRedraw = TRUE; // Redraw the OpenGL scene
break;