private void initFullscreen ( Resolution output , int depth ) { final java . awt . Window window = new java . awt . Window ( frame , conf ) ; window . setBackground ( Color . BLACK ) ; window . setIgnoreRepaint ( true ) ; window . setPreferredSize ( new Dimension ( output . getWidth ( ) , output . getHeight ( ) ) ) ; dev . setFullScreenWindow ( window ) ; final DisplayMode disp = isSupported ( new DisplayMode ( output . getWidth ( ) , output . getHeight ( ) , depth , output . getRate ( ) ) ) ; if ( disp == null ) { throw new LionEngineException ( ScreenFullAwt . ERROR_UNSUPPORTED_FULLSCREEN + formatResolution ( output , depth ) + getSupportedResolutions ( ) ) ; } if ( ! dev . isDisplayChangeSupported ( ) ) { throw new LionEngineException ( ScreenFullAwt . ERROR_SWITCH ) ; } dev . setDisplayMode ( disp ) ; window . validate ( ) ; ToolsAwt . createBufferStrategy ( window , conf ) ; buf = window . getBufferStrategy ( ) ; // Set input listeners componentForKeyboard = frame ; componentForMouse = window ; componentForCursor = window ; frame . validate ( ) ; }
Prepare fullscreen mode .