fix(nds): input fighting
This commit is contained in:
@@ -38,7 +38,6 @@ onMounted(() => {
|
|||||||
? 'opacity-100 text-highlighted'
|
? 'opacity-100 text-highlighted'
|
||||||
: 'opacity-50 hover:opacity-100',
|
: 'opacity-50 hover:opacity-100',
|
||||||
]"
|
]"
|
||||||
@keydown.up.prevent="open = true"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -51,6 +50,8 @@ onMounted(() => {
|
|||||||
:step="2"
|
:step="2"
|
||||||
orientation="vertical"
|
orientation="vertical"
|
||||||
color="neutral"
|
color="neutral"
|
||||||
|
@keydown.prevent
|
||||||
|
@mouseup="($event.target as HTMLElement).blur()"
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(v) => {
|
(v) => {
|
||||||
app.settings.volume = (v ?? 100) / 100;
|
app.settings.volume = (v ?? 100) / 100;
|
||||||
|
|||||||
@@ -13,12 +13,10 @@ export const useKeyDown = (callback: KeyDownCallback) => {
|
|||||||
if (app.lagDetected) return;
|
if (app.lagDetected) return;
|
||||||
|
|
||||||
const ndsButton = mapCodeToNDS(event.code);
|
const ndsButton = mapCodeToNDS(event.code);
|
||||||
if (
|
if (ndsButton && document.activeElement && document.activeElement !== document.body) {
|
||||||
ndsButton &&
|
(document.activeElement as HTMLElement).blur();
|
||||||
document.activeElement &&
|
}
|
||||||
document.activeElement !== document.body
|
|
||||||
)
|
|
||||||
return;
|
|
||||||
callback({
|
callback({
|
||||||
key: ndsButton ? `NDS_${ndsButton}` : event.key,
|
key: ndsButton ? `NDS_${ndsButton}` : event.key,
|
||||||
ndsButton,
|
ndsButton,
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export const useAppStore = defineStore("app", {
|
|||||||
setRenderingMode(mode: Settings["renderingMode"]) {
|
setRenderingMode(mode: Settings["renderingMode"]) {
|
||||||
this.ready = mode === "2d";
|
this.ready = mode === "2d";
|
||||||
this.settings.renderingMode = mode;
|
this.settings.renderingMode = mode;
|
||||||
if (mode === "3d") this.lagDetected = false;
|
this.lagDetected = false;
|
||||||
this.save();
|
this.save();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user