diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 1de76fb..f1522df 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -35,4 +35,4 @@ jobs: run: | cd /mnt/HDD/public/.EmulatorJS/ rm -f "minify/package-lock.json" - rm -rf "minify/node_modules/" \ No newline at end of file + rm -rf "minify/node_modules/" diff --git a/.github/workflows/newlines.yml b/.github/workflows/newlines.yml new file mode 100644 index 0000000..5dd0f16 --- /dev/null +++ b/.github/workflows/newlines.yml @@ -0,0 +1,42 @@ +name: Check for Newline at End of Files + +on: + pull_request: + types: + - opened + - synchronize + - reopened + +jobs: + check-newlines: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Check for missing newlines + run: | + files=$(git ls-files) + + newline_error=0 + + for file in $files; do + if file --mime "$file" | grep -q "binary"; then + #echo "Skipping binary file: $file" + continue + fi + + last_char=$(tail -c 1 "$file" | xxd -p) + if [[ "$last_char" != "0a" ]]; then + echo "File $file does not end with a newline!" + newline_error=1 + fi + done + + if [[ $newline_error -eq 1 ]]; then + echo "One or more files do not end with a newline." + exit 1 + else + echo "All files end with a newline." + fi diff --git a/data/cores/package.json b/data/cores/package.json index da3f85c..fa1da7d 100644 --- a/data/cores/package.json +++ b/data/cores/package.json @@ -62,4 +62,4 @@ "@emulatorjs/core-prboom": "latest", "@emulatorjs/core-ppsspp": "latest" } -} \ No newline at end of file +} diff --git a/data/localization/ar-AR.json b/data/localization/ar-AR.json index 6c6f715..50d22e5 100644 --- a/data/localization/ar-AR.json +++ b/data/localization/ar-AR.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "DPAD_DOWN", "DPAD_LEFT": "DPAD_LEFT", "DPAD_RIGHT": "DPAD_RIGHT" -} \ No newline at end of file +} diff --git a/data/localization/ben-BEN.json b/data/localization/ben-BEN.json index aeee569..b220966 100644 --- a/data/localization/ben-BEN.json +++ b/data/localization/ben-BEN.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "DPAD_DOWN", "DPAD_LEFT": "DPAD_LEFT", "DPAD_RIGHT": "DPAD_RIGHT" -} \ No newline at end of file +} diff --git a/data/localization/el-GR.json b/data/localization/el-GR.json index 161daa8..b0c7fc4 100644 --- a/data/localization/el-GR.json +++ b/data/localization/el-GR.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "DPAD_DOWN", "DPAD_LEFT": "DPAD_LEFT", "DPAD_RIGHT": "DPAD_RIGHT" -} \ No newline at end of file +} diff --git a/data/localization/es-ES.json b/data/localization/es-ES.json index 937ce25..8ea7ec7 100644 --- a/data/localization/es-ES.json +++ b/data/localization/es-ES.json @@ -307,4 +307,4 @@ "DPAD_DOWN": "DPAD_ABAJO", "DPAD_LEFT": "DPAD_IZQUIERDA", "DPAD_RIGHT": "DPAD_DERECHO" -} \ No newline at end of file +} diff --git a/data/localization/hi-HI.json b/data/localization/hi-HI.json index 98f13fe..b7b05b2 100644 --- a/data/localization/hi-HI.json +++ b/data/localization/hi-HI.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "डीपीएडी_डाउन", "DPAD_LEFT": "DPAD_LEFT", "DPAD_RIGHT": "डीपीएडी_दाएँ" -} \ No newline at end of file +} diff --git a/data/localization/jv-JV.json b/data/localization/jv-JV.json index 7d1a10c..47c71c9 100644 --- a/data/localization/jv-JV.json +++ b/data/localization/jv-JV.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "DPAD_DOWN", "DPAD_LEFT": "DPAD_LEFT", "DPAD_RIGHT": "DPAD_RIGHT" -} \ No newline at end of file +} diff --git a/data/localization/ko-KO.json b/data/localization/ko-KO.json index 133c673..b9f901c 100644 --- a/data/localization/ko-KO.json +++ b/data/localization/ko-KO.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "DPAD_DOWN", "DPAD_LEFT": "DPAD_LEFT", "DPAD_RIGHT": "DPAD_RIGHT" -} \ No newline at end of file +} diff --git a/data/localization/ru-RU.json b/data/localization/ru-RU.json index 55a85f3..be4d5fe 100644 --- a/data/localization/ru-RU.json +++ b/data/localization/ru-RU.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "DPAD_ВНИЗ", "DPAD_LEFT": "DPAD_ВЛЕВО", "DPAD_RIGHT": "DPAD_СПРАВО" -} \ No newline at end of file +} diff --git a/data/localization/zh-CN.json b/data/localization/zh-CN.json index 3b22020..4dae937 100644 --- a/data/localization/zh-CN.json +++ b/data/localization/zh-CN.json @@ -298,4 +298,4 @@ "DPAD_DOWN": "十字键向下", "DPAD_LEFT": "十字键向左", "DPAD_RIGHT": "十字键向右" -} \ No newline at end of file +} diff --git a/data/src/nipplejs.js b/data/src/nipplejs.js index 2c31fb6..bf35a0c 100644 --- a/data/src/nipplejs.js +++ b/data/src/nipplejs.js @@ -1 +1 @@ -!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define("nipplejs",[],i):"object"==typeof exports?exports.nipplejs=i():t.nipplejs=i()}(window,function(){return function(t){var i={};function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(o,n,function(i){return t[i]}.bind(null,n));return o},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=0)}([function(t,i,e){"use strict";e.r(i);var o,n=function(t,i){var e=i.x-t.x,o=i.y-t.y;return Math.sqrt(e*e+o*o)},s=function(t){return t*(Math.PI/180)},r=function(t){return t*(180/Math.PI)},d=new Map,a=function(t){d.has(t)&&clearTimeout(d.get(t)),d.set(t,setTimeout(t,100))},p=function(t,i,e){for(var o,n=i.split(/[ ,]+/g),s=0;s=0&&this._handlers_[t].splice(this._handlers_[t].indexOf(i),1),this},_.prototype.trigger=function(t,i){var e,o=this,n=t.split(/[ ,]+/g);o._handlers_=o._handlers_||{};for(var s=0;ss&&n<3*s&&!t.lockX?i="up":n>-s&&n<=s&&!t.lockY?i="left":n>3*-s&&n<=-s&&!t.lockX?i="down":t.lockY||(i="right"),t.lockY||(e=n>-r&&n0?"up":"down"),t.force>this.options.threshold){var d,a={};for(d in this.direction)this.direction.hasOwnProperty(d)&&(a[d]=this.direction[d]);var p={};for(d in this.direction={x:e,y:o,angle:i},t.direction=this.direction,a)a[d]===this.direction[d]&&(p[d]=!0);if(p.x&&p.y&&p.angle)return t;p.x&&p.y||this.trigger("plain",t),p.x||this.trigger("plain:"+e,t),p.y||this.trigger("plain:"+o,t),p.angle||this.trigger("dir dir:"+i,t)}else this.resetDirection();return t};var P=k;function E(t,i){this.nipples=[],this.idles=[],this.actives=[],this.ids=[],this.pressureIntervals={},this.manager=t,this.id=E.id,E.id+=1,this.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1,shape:"circle",dynamicPage:!1,follow:!1},this.config(i),"static"!==this.options.mode&&"semi"!==this.options.mode||(this.options.multitouch=!1),this.options.multitouch||(this.options.maxNumberOfNipples=1);var e=getComputedStyle(this.options.zone.parentElement);return e&&"flex"===e.display&&(this.parentIsFlex=!0),this.updateBox(),this.prepareNipples(),this.bindings(),this.begin(),this.nipples}E.prototype=new T,E.constructor=E,E.id=0,E.prototype.prepareNipples=function(){var t=this.nipples;t.on=this.on.bind(this),t.off=this.off.bind(this),t.options=this.options,t.destroy=this.destroy.bind(this),t.ids=this.ids,t.id=this.id,t.processOnMove=this.processOnMove.bind(this),t.processOnEnd=this.processOnEnd.bind(this),t.get=function(i){if(void 0===i)return t[0];for(var e=0,o=t.length;e