@@ -513,6 +513,8 @@ function loadIndexPage(animation = true, path = false, content = false, keepScro
513
513
514
514
justifyViewModule ( ) ;
515
515
516
+ gamepad . updateBrowsableItems ( ) ;
517
+
516
518
$ ( window ) . off ( 'resize' ) . on ( 'resize' , function ( ) {
517
519
justifyViewModule ( ) ;
518
520
} ) ;
@@ -697,7 +699,7 @@ function getFolderThumbnailsAsync(path)
697
699
if ( file . containsCompressed ( error . compressedPath ) && fs . existsSync ( realPath ) && fs . statSync ( realPath ) . size < 52428800 )
698
700
{
699
701
( function ( folderSha ) {
700
-
702
+
701
703
addFolderImagesQueue ( path , 4 , function ( images ) {
702
704
703
705
for ( var i = 0 ; i < images . length ; i ++ )
@@ -1596,10 +1598,12 @@ function openComic(animation = true, path = true, mainPath = true, end = false,
1596
1598
1597
1599
generateAppMenu ( ) ;
1598
1600
1601
+ gamepad . updateBrowsableItems ( ) ;
1602
+
1599
1603
}
1600
1604
else if ( file . containsCompressed ( path ) )
1601
1605
{
1602
- fileCompressed . decompressRecursive ( path , function ( ) {
1606
+ fileCompressed . decompressRecursive ( path , function ( ) {
1603
1607
1604
1608
openComic ( animation , path , mainPath , end ) ;
1605
1609
@@ -1617,6 +1621,19 @@ function skipPreviousComicF()
1617
1621
return skipPreviousComic ;
1618
1622
}
1619
1623
1624
+ // Gamepad events
1625
+ gamepad . setButtonEvent ( 'reading' , 1 , function ( key , button ) {
1626
+
1627
+ if ( key == 1 )
1628
+ {
1629
+ let barBack = document . querySelector ( '.bar-back.active, .bar-back.show' ) ;
1630
+
1631
+ if ( barBack )
1632
+ eval ( barBack . getAttribute ( 'onclick' ) ) ;
1633
+ }
1634
+
1635
+ } ) ;
1636
+
1620
1637
module . exports = {
1621
1638
loadIndexPage : loadIndexPage ,
1622
1639
loadLanguagesPage : loadLanguagesPage ,
0 commit comments