private static DisplayMode getDisplayModeFromFile() throws LWJGLException{
		Scanner s = null;
		int targetWidth;
		int targetHeight;
		try {
			s = new Scanner(new BufferedReader(new FileReader("Settings.ini")));
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		while(!s.next().contentEquals("Resolution="));
		while(!s.hasNextInt()){
			s.next();
		}
		targetWidth=s.nextInt();
		while(!s.hasNextInt()){
			s.next();
		}
		targetHeight=s.nextInt();
		s.close();
		//TODO add if fullscreen check here
		DisplayMode [] available=Display.getAvailableDisplayModes();
		for(DisplayMode d:available){
			if(d.getWidth()==targetWidth && d.getHeight()==targetHeight){//TODO add refreshrate check
				return d;
			}
		}
		return new DisplayMode(800,600);
		
		
		
		
	}