var gameWidth:Int = 1920;var gameHeight:Int = 1080;
...
addChild(new FlxGame( gameWidth, gameHeight, initialState, zoom, framerate, framerate, skipSplash, startFullscreen));
Lib.current.stage.align = StageAlign.TOP_LEFT; Lib.current.stage.displayState = StageDisplayState.FULL_SCREEN; var fill:RatioScaleMode = new RatioScaleMode();
FlxG.scaleMode = fill;
FlxG.camera.bgColor = 0xff000000;
RatioScaleMode, this keeps the 1920x1080 aspect ratio for every device, creating black fringes.
Use instead FillScaleMode, it fits the whole screen, no black fringes. You just need to UPDATE this line:
var fill:FillScaleMode = new FillScaleMode();
Also import:import flixel.system.scaleModes.FillScaleMode;
if (zoom == -1) { var ratioX:Float = stageWidth / gameWidth; var ratioY:Float = stageHeight / gameHeight; zoom = Math.min(ratioX, ratioY); gameWidth = Math.ceil(stageWidth / zoom); gameHeight = Math.ceil(stageHeight / zoom);}
addChild(new FlxGame( gameWidth, gameHeight, initialState,
1,