Why he is checking in condition mode == null ? Could this condition be like:
(modes[i].getWidth() == width) && (modes[i].getHeight() == height) && (modes[i].getBitsPerPixel() == bpp ) )... return modes[i]
Its saying that if we find a mode that has the same width and height and we don't have a mode yet, then use that mode no matter what the bpp is. This keeps us from saying we want 32bpp and its on linux and only shows up as 24bpp. (I think that's right) Also, if the machine doesn't support 32bpp, only 16bpp, then we still find a mode to change to (the 16bpp mode).
In this I don't understatnd what is Sys.getTimerResoluton for, because I found out through System.Out.println... that the amount of it is 1000. Its make no sense to multiply it by 1000 and then divide it by 1000. But I think that I dont really understood the Sys.geTimer Resolution function.
The Sys.getTimerResolution() used to return values other than 1000, but I still don't know why its being multiplied by 1000 :lol: