mirror of
https://gitlab.com/arnekeller/tunnel-racer.git
synced 2024-11-08 16:50:38 +00:00
Request landscape orientation
This commit is contained in:
parent
1c89765b63
commit
5f66862843
1
game.js
1
game.js
@ -276,6 +276,7 @@ document.getElementById("start").onclick = () => {
|
|||||||
set_head_gn();
|
set_head_gn();
|
||||||
try {
|
try {
|
||||||
document.body.requestFullscreen();
|
document.body.requestFullscreen();
|
||||||
|
window.screen.orientation.lock.call(window.screen.orientation, 'landscape');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// browser doesn't support this API, try another hack
|
// browser doesn't support this API, try another hack
|
||||||
window.scrollTo(0,1);
|
window.scrollTo(0,1);
|
||||||
|
Loading…
Reference in New Issue
Block a user