mirror of
https://gitlab.com/octospacc/Web-Archives-Misc
synced 2025-03-12 09:10:14 +01:00
Update DS
This commit is contained in:
parent
81a3668e5a
commit
750379b588
@ -1092,7 +1092,7 @@ function isScreenLandscape() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//if (location.origin == 'https://ds.44670.org') {
|
if (location.origin == 'https://ds.44670.org') {
|
||||||
if (isSaveSupported) {
|
if (isSaveSupported) {
|
||||||
// Register Service Worker
|
// Register Service Worker
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
@ -1129,7 +1129,7 @@ function isScreenLandscape() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
//}
|
}
|
||||||
|
|
||||||
var vertShaderSource = `
|
var vertShaderSource = `
|
||||||
precision mediump float;
|
precision mediump float;
|
||||||
@ -1787,14 +1787,4 @@ async function dpManualBtn(isUpload) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.fetch_fetch = window.fetch;
|
dpOnLoad()
|
||||||
window.fetch = function(e) {
|
|
||||||
console.log(e);
|
|
||||||
if (e.includes("//c.44670.org/m")) {
|
|
||||||
return fetch_fetch("build/m"); //("../c.44670.org/m"); //("data:text/plain;utf8,");
|
|
||||||
} else {
|
|
||||||
return fetch_fetch(e);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
dpOnLoad()
|
|
@ -1,178 +0,0 @@
|
|||||||
|
|
||||||
var expireInDays = 0;
|
|
||||||
var enableAD = 1;
|
|
||||||
var patLevel = 0;
|
|
||||||
var enableEA = 0;
|
|
||||||
|
|
||||||
var currentDay = '' + ~~(Date.now() / (24 * 60 * 60 * 1000));
|
|
||||||
var showBuyGamepads = true;
|
|
||||||
var showEarlyAccess = true;
|
|
||||||
var showSns = true;
|
|
||||||
var lang = navigator.language || 'unknown';
|
|
||||||
|
|
||||||
|
|
||||||
if ((lang == 'zh-CN') || (lang == 'ja')) {
|
|
||||||
enableAD = 0;
|
|
||||||
showSns = false;
|
|
||||||
}
|
|
||||||
if (lang == 'ja') {
|
|
||||||
showEarlyAccess = false;
|
|
||||||
showBuyGamepads = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (expireInDays > 0) {
|
|
||||||
enableAD = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$id('loading').hidden = true
|
|
||||||
$id('loadrom').hidden = false
|
|
||||||
$id('btn-choose-file').onclick = () => {
|
|
||||||
tryInitSound();
|
|
||||||
$id('rom').click();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (showEarlyAccess) {
|
|
||||||
var inviteText = '';
|
|
||||||
if (expireInDays > 0) {
|
|
||||||
inviteText = 'Days available for Early Access features: ' + expireInDays + "\n";
|
|
||||||
}
|
|
||||||
if (patLevel > 0) {
|
|
||||||
inviteText = 'Thank you for your support!\n'
|
|
||||||
inviteText += 'Ad-free and Early Access features are enabled!\n';
|
|
||||||
}
|
|
||||||
var p = document.createElement('p');
|
|
||||||
p.innerText = inviteText;
|
|
||||||
$id('pro').appendChild(p);
|
|
||||||
|
|
||||||
if (patLevel <= 0) {
|
|
||||||
var div = document.createElement('div');
|
|
||||||
div.innerHTML = `<p class="link">Enter Early Access Code</p>`;
|
|
||||||
div.onclick = () => {
|
|
||||||
var code = window.prompt('Enter your Patreon Access Code: \n (You don\'t need it for the stable version)');
|
|
||||||
if (!code) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
code = code.trim().toLowerCase();
|
|
||||||
if ((code.length != 36) && (code.length != 10)) {
|
|
||||||
alert('not a valid code');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fetch("https://c.44670.org/k", {
|
|
||||||
method: 'POST',
|
|
||||||
body: localStorage['s'] + "," + code
|
|
||||||
}).then(res => res.text()).then(res => {
|
|
||||||
eval(res)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$id('pro').appendChild(div);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var divBuyGamepads
|
|
||||||
if (showBuyGamepads) {
|
|
||||||
$id('a-gamepad').onclick = () => {
|
|
||||||
if (!divBuyGamepads) {
|
|
||||||
divBuyGamepads = document.createElement('div');
|
|
||||||
divBuyGamepads.hidden = true
|
|
||||||
divBuyGamepads.innerHTML = `
|
|
||||||
<style>
|
|
||||||
.gamepad-item {
|
|
||||||
text-decoration: none;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #333;
|
|
||||||
}
|
|
||||||
.gamepad-item img {
|
|
||||||
padding-right: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<h1>About Gamepads</h1>
|
|
||||||
<p>
|
|
||||||
After the gamepad is paired in System Settings, press <b>Select or Start</b> to connect with DS Player.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Please note that these gamepads are only tested on iOS and are not guaranteed to work in other platforms.<br>
|
|
||||||
iOS may change the accessory restrictions via software update, so we cannot guarantee that these gamepads will work in the future.<br>
|
|
||||||
This software is not affiliated with any of these gamepads vendors.<br>
|
|
||||||
</p>
|
|
||||||
<table style="background-color: #444;">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Product</th>
|
|
||||||
<th>Notes</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr><td>8Bitdo Zero 2</td><td>Switch to macOS mode by pressing A+Start.</td></tr>
|
|
||||||
<tr><td>DS 4/5</td><td>Officially supported by iOS[1].</td></tr>
|
|
||||||
</table>
|
|
||||||
<a href="#" id="a-close-gamepad">Close</a>
|
|
||||||
<br><br><br>
|
|
||||||
<p>
|
|
||||||
[1] <a href="https://support.apple.com/en-us/HT211813">https://support.apple.com/en-us/HT211813</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
`
|
|
||||||
|
|
||||||
document.body.appendChild(divBuyGamepads);
|
|
||||||
}
|
|
||||||
$id('welcome').hidden = true;
|
|
||||||
divBuyGamepads.hidden = false;
|
|
||||||
$id('a-close-gamepad').onclick = () => {
|
|
||||||
$id('welcome').hidden = false;
|
|
||||||
divBuyGamepads.hidden = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showSns) {
|
|
||||||
$id('p-sns').innerHTML = `
|
|
||||||
<a href="/gba">GBA Player</a> | <a target="_blank" href="https://www.patreon.com/ds44670">Patreon</a> | <a target="_blank" href="https://discord.gg/W4UdzbRSu2">Discord</a>`
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!enableEA) {
|
|
||||||
lsLayout = 0
|
|
||||||
config.scaleMode = 0
|
|
||||||
config.turbo = false
|
|
||||||
config.vkScale = 1
|
|
||||||
window.localStorage['config'] = JSON.stringify(config)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var VER = 'v20230106'
|
|
||||||
|
|
||||||
window.whatsNew = () => {
|
|
||||||
alert(`What's new in ` + VER + `:
|
|
||||||
- Cloud save.
|
|
||||||
- For gamepads: access menu by L+R+X+Y.
|
|
||||||
|
|
||||||
== EARLY Access ==
|
|
||||||
- XBRZ upscaling filter.
|
|
||||||
- Turbo mode(iPhone 12+ only).
|
|
||||||
- Cheat support.
|
|
||||||
- Use the device's microphone.
|
|
||||||
- Choose screen layout in landscape.
|
|
||||||
- Resize virtual keyboard.
|
|
||||||
|
|
||||||
|
|
||||||
`)
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((localStorage['lastver'] || '') != VER) {
|
|
||||||
localStorage['lastver'] = VER
|
|
||||||
if (isSaveSupported) {
|
|
||||||
whatsNew()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
2213
public/Repo/ds.44670.org/build/nds.symbols
Normal file
2213
public/Repo/ds.44670.org/build/nds.symbols
Normal file
File diff suppressed because it is too large
Load Diff
BIN
public/Repo/ds.44670.org/build/nds.wasm
Normal file → Executable file
BIN
public/Repo/ds.44670.org/build/nds.wasm
Normal file → Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user