Skip to content

Commit ad933f7

Browse files
authored
On WebUSB page: added note about not running flycast and update link (#199)
On WebUSB page: added note about not running flycast and update link
1 parent 055b089 commit ad933f7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/webusb/application.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
let selectButton = document.querySelector("#select");
2222
let selectedDevice = document.querySelector('#selected-device')
2323
let statusDisplay = document.querySelector('#status');
24+
let versionUpdateDisplay = document.querySelector('#versionUpdate');
2425
let saveButton = document.querySelector('#save');
2526
let mscCheckbox = document.querySelector('#enable-msc-check');
2627
let enableWebusbAnnounceCheck = document.querySelector('#enable-webusb-announce-check');
@@ -415,6 +416,14 @@
415416
if (!selectedPort.name.includes(deviceVersion)) {
416417
selectedDeviceText += `, ${deviceVersion}`;
417418
}
419+
420+
// TODO: make this automatic
421+
if (selectedPort.major < 1 || selectedPort.minor < 2 || selectedPort.patch < 1) {
422+
versionUpdateDisplay.innerHTML = "<a href='https://github.com/OrangeFox86/DreamPicoPort/releases/tag/v1.2.1'>New version of firmware available</a>";
423+
} else {
424+
versionUpdateDisplay.innerHTML = "";
425+
}
426+
418427
selectedDevice.textContent = selectedDeviceText;
419428
enableAllControls();
420429
setStatus("Loading settings...");

docs/webusb/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ <h1>Dream Pico Port Settings</h1>
1414
<br>
1515
<b>Version 1.2.0 of firmware or later must be loaded for this page to work.</b>
1616
<br>
17+
<b>Ensure flycast is not running while attempting to activate functions on this page</b>
18+
<br>
1719
See <a href="https://github.com/OrangeFox86/DreamPicoPort" target="_blank">Dream Pico Port GitHub page</a>.
1820

1921
<br>
@@ -22,6 +24,8 @@ <h1>Dream Pico Port Settings</h1>
2224
<button id="select" class="button black">Select Device</button>
2325
<span id="selected-device"></span>
2426
<div id="status">Click Select Device to provide this page permissions to access a Dream Pico Port device</div>
27+
<br>
28+
<div id="versionUpdate"></div>
2529
</div>
2630
<br>
2731
<br>

0 commit comments

Comments
 (0)