Changed fullscreen function, so that it works on both Windows and Linux