Skip to content

Commit

Permalink
Improve terms, help, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knifa committed Apr 6, 2023
1 parent 025cf72 commit f470ddf
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ Keep an eye on the console output for anything weird.
1. Run `dji-moonlight-gui.exe`.
2. Pair Moonlight with your streaming software by pressing _Pair_. The PIN will
be displayed in the console. This only needs to be done once.

_GeForce Experience_: A popup will appear on your PC asking you to confirm
the pin.

_Sunshine_: You will need to go to the _Settings_ page in your browser and
enter the pin.
3. Press _Refresh_ to list your games.
4. Select a game and press _Stream_.

Expand Down
21 changes: 16 additions & 5 deletions assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,27 @@ <h2>Stream</h2>

<div id="options">
<div class="optionsContainer">
<label for="mode">Mode</label>
<label for="mode">
Mode
<span class="details">Must match goggle-side</span>
</label>
<select id="mode" value="net">
<option value="net" selected>Network</option>
<option value="usb">USB</option>
<option value="net" selected>RNDIS</option>
<option value="usb">BULK</option>
</select>
</div>

<div class="optionsContainer">
<label for="bitrate">Bitrate (Mbps)</label>
<label for="bitrate">
Bitrate (Mbps)
<span class="details">Limited by mode</span>
</label>
<select id="bitrate" value="20">
<option disabled>RNDIS & BULK</option>
<option value="10">10</option>
<option value="20" selected>20</option>
<option value="30">30</option>
<option disabled>BULK only</option>
<option value="40">40</option>
<option value="50">50</option>
<option value="60">60</option>
Expand All @@ -46,7 +54,10 @@ <h2>Stream</h2>
</div>

<div class="optionsContainer">
<label for="fps">FPS</label>
<label for="fps">
FPS
<span class="details">Limited by display refresh rate</span>
</label>
<select id="fps" value="120">
<option value="60">60</option>
<option value="90">90</option>
Expand Down
7 changes: 7 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ label {
color: var(--main-color);;
}

label span.details {
font-size: 0.8rem;
font-style: italic;
color: #aaa;
margin-left: 0.5rem;
}

input {
width: 100%;
outline: none;
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func (m *MoonlightManager) GetGames() ([]string, error) {
cmd.Args = append(cmd.Args, "list")

m.RunningStateFunc(true)
m.ConsoleOutputFunc(fmt.Sprintf("> %s", strings.Join(cmd.Args, " ")))
out, _ := cmd.CombinedOutput()

outString := strings.TrimSpace(string(out))
Expand Down Expand Up @@ -84,6 +85,7 @@ func (m *MoonlightManager) Pair() error {
reader := bufio.NewReader(combined)

m.RunningStateFunc(true)
m.ConsoleOutputFunc(fmt.Sprintf("> %s", strings.Join(cmd.Args, " ")))
cmd.Start()
m.RunningCmdLock.Unlock()

Expand Down Expand Up @@ -121,6 +123,7 @@ func (m *MoonlightManager) Unpair() error {
cmd.Args = append(cmd.Args, "unpair")

m.RunningStateFunc(true)
m.ConsoleOutputFunc(fmt.Sprintf("> %s", strings.Join(cmd.Args, " ")))
out, _ := cmd.CombinedOutput()

m.ConsoleOutputFunc(string(out))
Expand All @@ -143,6 +146,7 @@ func (m *MoonlightManager) Quit() error {

cmd.Args = append(cmd.Args, "quit")
m.RunningStateFunc(true)
m.ConsoleOutputFunc(fmt.Sprintf("> %s", strings.Join(cmd.Args, " ")))
out, _ := cmd.CombinedOutput()

m.ConsoleOutputFunc(string(out))
Expand Down
Binary file modified media/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f470ddf

Please sign in to comment.