Skip to content

Commit

Permalink
fix load ordering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Knifa committed Jan 5, 2024
1 parent a77a5b9 commit b0a89f9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="reset.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="index.css" />
</head>

<body>
Expand Down Expand Up @@ -100,6 +100,6 @@ <h2>Stream</h2>
</div>
</div>

<script src="stuff.js"></script>
<script src="index.js"></script>
</body>
</html>
File renamed without changes.
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ module github.com/fpv-wtf/dji-moonlight-gui

go 1.20

require (
github.com/jchv/go-webview2 v0.0.0-20221223143126-dc24628cff85
github.com/webview/webview v0.0.0-20230210061304-7b40e46d97e9
)
require github.com/jchv/go-webview2 v0.0.0-20221223143126-dc24628cff85

require (
github.com/jchv/go-winloader v0.0.0-20200815041850-dec1ee9a7fd5 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ github.com/jchv/go-webview2 v0.0.0-20221223143126-dc24628cff85 h1:t6lhRbwURcdWgp
github.com/jchv/go-webview2 v0.0.0-20221223143126-dc24628cff85/go.mod h1:/BNVc0Sw3Wj6Sz9uSxPwhCEUhhWs92hPde75K2YV24A=
github.com/jchv/go-winloader v0.0.0-20200815041850-dec1ee9a7fd5 h1:pdFFlHXY9tZXmJz+tRSm1DzYEH4ebha7cffmm607bMU=
github.com/jchv/go-winloader v0.0.0-20200815041850-dec1ee9a7fd5/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
github.com/webview/webview v0.0.0-20230210061304-7b40e46d97e9 h1:SPyWnfToUom3xNh3dKGkq1ZV7pw+VSWDcfVrUM1nRWs=
github.com/webview/webview v0.0.0-20230210061304-7b40e46d97e9/go.mod h1:rpXAuuHgyEJb6kXcXldlkOjU6y4x+YcASKKXJNUhh0Y=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210218145245-beda7e5e158e h1:f5mksnk+hgXHnImpZoWj64ja99j9zV7YUgrVG95uFE4=
golang.org/x/sys v0.0.0-20210218145245-beda7e5e158e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func main() {
Center: true,
Height: WindowHeight,
IconId: 0,
Title: "DJI Moonlight",
Title: "DJI Moonlight (v1.0.2)",
Width: WindowWidth,
},
})
Expand Down Expand Up @@ -292,15 +292,15 @@ func main() {
// Get current directory
dir, _ := os.Getwd()

w.SetSize(WindowWidth, WindowHeight, webview2.HintFixed)
w.Navigate("file://" + dir + "/assets/index.html")

w.Bind("b_getGames", m.GetGames)
w.Bind("b_pair", m.Pair)
w.Bind("b_unpair", m.Unpair)
w.Bind("b_forceStop", m.ForceStop)
w.Bind("b_streamGame", m.StreamGame)
w.Bind("b_quit", m.Quit)

w.SetSize(WindowWidth, WindowHeight, webview2.HintFixed)
w.Navigate("file://" + dir + "/assets/index.html")

w.Run()
}

0 comments on commit b0a89f9

Please sign in to comment.