Code:
//desktopauflösung ermitteln
	desktop_size.x = sys_metrics(0);
	desktop_size.y = sys_metrics(1);
	
	//auf ermittelte oder gespeicherte auflösung umschalten
	video_set(desktop_size.x,desktop_size.y,0,1);



We had some strange effects with resolution setting via sys_metrics.
Usually this is not a problem at all, but maybe replace it with video_mode = 12; for testing if this is causing the problem.