SalaMuseoGames/_includes/emulator.html

55 lines
2.4 KiB
HTML

{% capture rom_url %}{{ include.rom_url }}{% endcapture %}
{% if include.rom_index != '' and rom_url == '' %}
{% capture rom_url %}https://gamingshitposting.github.io/ext-bin-1/roms/{{ include.rom_index }}.7z{% endcapture %}
{% endif %}
{% if include.platform == 'psx' %}
<p><script id="ChromiumReccomendationElement">
isChromium = false;
if (navigator.userAgentData && navigator.userAgentData.brands) {
navigator.userAgentData.brands.forEach(function(brand){
if (brand.brand == 'Chromium') {
isChromium = true;
}
});
}
if (!isChromium) {
document.getElementById('ChromiumReccomendationElement').outerHTML = `<p>
Note: a Chromium-based browser is recommended for {{ include.platform | upcase }} games. If you experience slowdowns or jitters, <a href="https://download-chromium.appspot.com">get Chromium</a>. Alternatively, try dialing down the "pcsx rearmed psxclock" emulator setting.
</p>`;
}
</script></p>
{% endif %}
<p>
{% if include.backend == 'cuttingedge' or include.backend == 'emulatorjs' or include.platform == 'nes' or include.platform == 'snes' or include.platform == 'segaMS' or include.platform == 'segaMD' or include.platform == 'gba' or include.platform == 'psx' %}
<div style="width:640px; height:480px; max-width:100%">
<div id="GameFrame"></div>
</div>
<!-- TODO: add menu to change options -->
<script type="text/javascript">
EJS_player = '#GameFrame';
EJS_core = ('{{ include.emulator }}' || '{{ include.platform }}');
EJS_gameUrl = '{{ rom_url }}';
EJS_pathtodata = 'https://gamingshitposting.github.io/ext-bin-1/EmulatorJS/data/';
EJS_screenRecording = { videoBitrate: 150000000 };
</script>
<script src="https://gamingshitposting.github.io/ext-bin-1/EmulatorJS/data/loader.js"></script>
{% elsif include.platform == 'dos' %}
<button onclick="(function(ctx){
ctx.parentElement.scrollIntoView();
ctx.parentElement.querySelector('iframe.AppFrame').focus();
})(this)">Focus</button>
<iframe class="AppFrame" src="https://gamingshitposting.github.io/ext-bin-1/dos.zone/{{ rom_index }}/index.html"></iframe>
{% else %}
<button onclick="(function(ctx){
ctx.parentElement.scrollIntoView();
ctx.parentElement.querySelector('iframe.AppFrame').focus();
})(this)">Focus</button>
{% if include.platform == 'nds' %}
<iframe class="AppFrame" src="https://octospacc.gitlab.io/Web-Archives-Misc/Repo/DeSmuME/#RomUrl={{ include.rom_binary }}"></iframe>
{% endif %}
{% endif %}
</p>