Use electron.main.App.commandLine type
`electron.main.App.commandLine` is now defined in electron externs, no need for untyped workaround anymore.
This commit is contained in:
@@ -7,7 +7,7 @@ class ElectronSetup {
|
|||||||
|
|
||||||
static function main()
|
static function main()
|
||||||
{
|
{
|
||||||
untyped (electron.main.App).commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
|
electron.main.App.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
|
||||||
|
|
||||||
var windows:Array<OpenFLWindow> = [
|
var windows:Array<OpenFLWindow> = [
|
||||||
::foreach windows::
|
::foreach windows::
|
||||||
@@ -46,9 +46,7 @@ class ElectronSetup {
|
|||||||
if (height == 0) height = 600;
|
if (height == 0) height = 600;
|
||||||
var frame:Bool = window.borderless == false;
|
var frame:Bool = window.borderless == false;
|
||||||
|
|
||||||
var commandLine = Reflect.getProperty(electron.main.App, "commandLine");
|
electron.main.App.commandLine.appendSwitch('--autoplay-policy','no-user-gesture-required');
|
||||||
var appendSwitch:haxe.Constraints.Function = Reflect.getProperty(commandLine, "appendSwitch");
|
|
||||||
appendSwitch('--autoplay-policy','no-user-gesture-required');
|
|
||||||
|
|
||||||
electron.main.App.on( 'ready', function(e) {
|
electron.main.App.on( 'ready', function(e) {
|
||||||
var config:Dynamic = {
|
var config:Dynamic = {
|
||||||
@@ -100,4 +98,4 @@ typedef OpenFLWindow =
|
|||||||
width:Int,
|
width:Int,
|
||||||
x:Int,
|
x:Int,
|
||||||
y:Int
|
y:Int
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user